Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

A $37 bill taught me to put spending limits on my AI agents

Описание и применение

Проблема: агенты ИИ могут бесконечно повторять запросы, превышая лимиты и вызывая неожиданные счета. Решение: назначить отдельные бюджеты, использовать списки разрешенных сервисов, ограничивать отдельные транзакции и включать контроль аномалий. В итоге расходы контролируются, а агенты работают в пределах заданных лимитов.

Задача

AI agents can enter error loops that exceed intended spending limits, leading to unexpectedly high bills.

Результат

The agent system now prevents runaway costs, provides clear budget exhaustion notifications, and allows quick adjustments without monitoring bills nightly.

Рабочий процесс

  • 1. List all paid services and their monthly costs.
  • 2. Assign each main agent a dedicated budget and enforce it in code.
  • 3. Use one API key per agent to isolate billing and limits.
  • 4. Split budgets into Exploration, Project, and Escalation buckets.
  • 5. Create an allow-list of trusted services and request new ones through the agent.
  • 6. Set per-call and per-day caps to stop retry loops.
  • 7. Flag any single charge over $2 for human review.
  • 8. Freeze accounts on anomaly detection (high call rate, failure rate, or spend speed).
  • 9. Use a visible owner identifier for agent calls to encourage merchant trust.

Доказательства

On the third night the bill said $37 for one day.

Источник

A subtask had fallen into an error loop. Call fails, agent tweaks a parameter, retries, fails again.

Источник

I use three buckets: Exploration, Project, Escalation.

Источник

Now nothing is allowed by default: Start with services you already trust, like OpenAI, Anthropic and your existing data sources.

Источник

Any single charge over $2 goes to a human.

Источник

  • Дата записи: 2026-10-18T04:41:13.857Z