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.
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
- Count the unit that costs money, per credential and per period.
- Reserve before sending: check headroom and reserve the call's cost before the request leaves.
- Settle after the response, releasing what was not used.
- Cascade: a child credential's spending also counts against every parent, so a sub-agent cannot exceed its creator's budget.
- 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.
Related terms
- Upstream callAn upstream call is one HTTP request that actionlake sent to a vendor's API on your behalf and that returned a definitive, attributable response; it is the unit actionlake meters and bills.
- Rate limiting for AI agentsRate limiting for AI agents controls how many requests an agent can make in a time window, both to the platform it calls and to each vendor API behind it, so a fast or looping agent cannot exhaust a shared quota or trigger lockouts.
- AI agent permissionsAI agent permissions are the rules that decide which systems, actions and data an agent's credential may reach, and least privilege for agents means granting only the actions a task needs and enforcing that limit outside the model.
- Dry runA dry run checks whether an agent's action would succeed, whether it is allowed and what it would cost, by validating the inputs, permissions and connection without sending anything to the vendor.
- AI agent audit logAn AI agent audit log is a record of every action an agent took: which credential ran it, what it did, in which system, with what outcome and cost, and why, kept so a person can reconstruct and verify events later.
Sources
Connect an agent. Start free.
100,000 calls free every month. No card. Hard caps on every key.