Guides

Spend alerts vs hard limits for AI agents

An alert reports money that has already been spent. A limit checked before the call decides whether more gets spent. Agents need both, and they do different jobs.

Checked against the sources on October 31, 2026.

The difference

Alerts and hard limits compared
AlertHard limit
What it doesTells someoneRefuses the call
When it actsAfter the spend is recordedBefore the next call, if checked in line
Needs a person awakeYesNo
Risk if badly setIgnored, or noiseStops work that was fine
Best forEarly warning and trendsThe most you can lose

Why alerts alone don't work for agents

Alerts suit a person using a tool, because a person sees the note and stops. Agents run at night and at weekends, in parallel, without anyone watching. By the time someone reads the alert, the loop has kept going for as long as they took to read it.

Every alert also has a gap between the money going out and the alert going out. The usage has to be recorded, added up and compared with the threshold. A slow leak fits inside that gap happily. A fast loop can spend much more than the threshold before anyone hears about it. At the costs a long-running loop reaches, even an hour of delay matters.

Where the check sits decides what you get

A limit can only stop a call if the check happens in the path of the call. There are three places teams put one:

  • At the provider. The strongest place, since nothing gets around it, but the scope is broad and the limits are monthly. See how those limits work.
  • In a gateway in front of the provider. Every call passes through it, so it can hold limits for each agent or key. It only works if agents can't reach the provider directly, so don't give them the provider key.
  • In the agent's own code. Quick to add, and fine as an extra layer. It stops only what that code covers, and a bug in the agent is the very thing you're guarding against.

A limit has to estimate

The exact cost of a call isn't known until the reply is finished. So a check before the call works from an estimate, then the real figure is recorded after. Parallel calls can each pass the check before any of them is recorded, which means a limit can be passed by a little.

Two things reduce this: reserving the estimated cost before the call goes out, which is what LiteLLM does by default, and setting limits a little below the number you truly can't exceed. OpenAI makes the same point about its own limits, noting that recorded spend can slightly exceed the configured amount.

How to use both

  1. Set the hard limit first, at the most you're willing to lose in the window.
  2. Set a warning at around 80%, so a person can look before work stops.
  3. Add a second warning at around 50% for agents that matter, if you want earlier notice.
  4. Send warnings where someone will actually see them, such as Slack, as well as email.
  5. When a limit fires, find out why before raising it.

Spend is in early access: you can set budgets and see what each call cost today, and budgets that stop calls are being switched on across the platform.

Questions

What is the difference between a spend alert and a hard limit?
A spend alert tells someone that spending reached a level, and calls carry on. A hard limit refuses further calls once spending reaches it. An alert gives you time to act, and a limit acts for you.
Can AI spending go over a hard limit?
Slightly, yes. The exact cost of a call is only known after it finishes, and parallel calls can pass a check at the same moment. OpenAI says recorded spend can slightly exceed a configured limit, so set limits a little below your true maximum.
What warning level should I use for an AI budget?
80% of the limit is a common starting point. Use an earlier warning for important agents, so someone can look at it before work stops.

Sources