Skip to content

Control and proof

Agent spending caps and budgets

An agent spending cap is a hard limit on how much a single AI agent credential may spend or call in a period, checked before each request is sent, so that a looping or misbehaving agent stops at the limit instead of after it.

Updated Also called AI agent budget, Spend limit per API key, Agent cost cap3 sources checked

What it is

A budget for one agent. It can be counted in money, in API calls or in tokens, and it applies per credential, with a ceiling for the whole organisation above it. When the agent reaches the cap, further requests are refused.

Why it matters

Agents loop. A misread error, a pagination bug or a prompt-injected instruction can make an agent call the same API thousands of times overnight. OWASP lists this as unbounded consumption, including "denial of wallet", where high volumes exploit pay-per-use pricing. OWASP's agent cheat sheet says to enforce token, cost, retry and tool-chain limits. The cost is not only the model bill: downstream API calls can carry per-call fees and use up a vendor quota your other integrations depend on.

How it works

  1. Count the unit that costs money, per credential and per period.
  2. Reserve before sending: check headroom and reserve the call's cost before the request leaves.
  3. Settle after the response, releasing what was not used.
  4. Cascade: a child credential's spending also counts against every parent, so a sub-agent cannot exceed its creator's budget.
  5. Refuse clearly at the limit, with an error the agent can understand.

Example

A reporting agent has a cap of 20,000 calls a month. A bug makes it page through the same list in a loop. At call 20,000 its requests are refused before they reach the vendor; the overnight damage is the cap, not the vendor's daily quota.

Common pitfalls

  • Alerts instead of caps. An email at 80% does nothing at 3am.
  • Check after the call. A cap checked once the request is sent lets the crossing request through, and with parallel calls, many more.
  • Only a tenant-wide cap. One runaway agent spends everyone's budget.
  • Counting free work. Caps that count cached answers or failed calls punish the wrong behaviour.

How actionlake handles it

Caps in actionlake are counted in upstream calls, the billing unit. There is a cap on the tenant, and each key can carry its own, checked before dispatch with reserve-and-settle, so hitting a cap costs nothing and the vendor never sees the request. Budgets cascade: a child key's calls count against every parent. The Free plan stops hard at its 100,000 included calls a month. Cached answers, searches, dry runs and calls that failed for reasons you did not cause are not counted. The free cost tool shows spend so far, the forecast and cap headroom. See pricing.

Questions

How do I stop an AI agent running up a huge API bill?

Give it its own credential with a hard cap checked before each request is sent, cascade the cap to any sub-agents, and keep a tenant-wide ceiling above all of them.

What is the difference between a spending cap and a rate limit?

A rate limit controls speed, requests per second or minute. A spending cap controls total use over a period. An agent can stay under a rate limit and still exhaust a monthly budget.

What is denial of wallet?

OWASP's term for an attack or failure that drives up the cost of a pay-per-use AI service through a high volume of operations, rather than taking it offline.

Sources

  1. LLM10:2025 Unbounded ConsumptionOWASP Gen AI Security Project · checked 22 October 2026
  2. AI Agent Security Cheat SheetOWASP Cheat Sheet Series · checked 22 October 2026
  3. LLM06:2025 Excessive AgencyOWASP Gen AI Security Project · checked 22 October 2026

All 30 glossary terms

Connect an agent. Start free.

100,000 calls free every month. No card. Hard caps on every key.