AI Agent Rate Limiting: Limits per User, Tool and Budget

AI Agent Rate Limiting: Limits per User, Tool and Budget

Which limits an AI agent needs, where each one sits, and which ones should make it wait rather than stop.

Key takeaways

  • AI agent rate limiting caps the requests, tokens and tool calls an agent can use in a set time. Set it per user, per tool and per budget, on top of the limit your model provider sets.
  • Count the per-user limit by signed-in user, not by network address. A whole office can share one address, so one busy colleague can lock out everyone else.
  • Give a costly tool its own cap per message, and count attempts rather than successes, so a failing tool can't be retried past the cap.
  • Wait and retry only when the error gives a wait time. A spend cap fails however often you retry, so stop and tell a person.
  • When a limit is hit, the user should read what happened and when to try again, never a bare error code.

The finance manager wants a hard monthly cap on what the company's new AI agent can spend. The agent is software that answers customer questions on the website, and it pays for every call it makes to an AI model. The operations lead wants it never to tell a customer to come back later.

Most software protects itself by counting how many times each person asks for something per minute. An agent breaks that count. One question from a customer can mean many calls to the AI model, one for each step the agent takes.

Rate limiting means allowing only a set number of requests or actions in a set time. Set in the right places, it gives both of them what they asked for. The finance manager gets a budget that stops work. The operations lead gets limits that only make work wait.

What is AI agent rate limiting?

AI agent rate limiting caps how many requests, tokens and tool calls an agent can use in a set time. Tokens are the chunks of text a model reads and writes, and you pay for them. You set limits per user, per tool and per budget, on top of the limit your model provider sets.

The rule we use:

Wait when time will fix it. Stop when only a person can.

Why does an AI agent need different rate limits from a normal app?

A normal web app makes one request when a person clicks. An agent works in a loop: it asks the model, calls a tool, reads the result and asks the model again. Three things follow.

  • Tokens matter as much as requests. As of November 2026, Anthropic's rate limits page measures limits in requests, input tokens and output tokens per minute. OpenAI adds per-day and image limits, and its guide says they "can be hit across any of the options depending on what occurs first". One long document can use up a token limit in a handful of requests.
  • Bursts come from one user. A single message can fire several calls within seconds. Anthropic notes that "Short bursts of requests can exceed the limit" even when the per-minute total looks safe.
  • Nobody may be watching. Agents that run on a schedule have no person to notice a runaway bill. OWASP's Top 10 for LLM applications calls this risk unbounded consumption, and one of its fixes is to "apply rate limiting and user quotas".

Which rate limits does an AI agent need?

Four, and each sits at a different point on a request's path.

Exhibit: where each AI agent rate limit sits on one request's path. Users and scheduled jobs reach the agent through limit 1, per user. The agent reaches tools and other systems through limit 2, per tool. The agent reaches the model provider, which applies limit 3, the provider's rate limit. Limit 4, the budget, counts the money spent on every model call. Limits 1 to 3 lift with time or a new message; the budget needs a person.

  1. Per user. Counts messages from each signed-in user in a window, such as 15 minutes. It stops one user, or one script, from crowding out everyone else. When it's hit, the user waits for the window to reset.
  2. Per tool. Caps how often the agent may call one tool, per minute or per message. It protects the systems the agent touches, and your bill when a tool is expensive. A per-minute limit is waited out. A per-message cap isn't retried: the agent carries on without the tool and tells the user why.
  3. The provider's rate limit. Set by the company that runs the model, in requests and tokens per minute. When it's hit, the error usually says how long to wait.
  4. Budget. Caps money, or tokens, per day or month for an agent or a team. When it's hit, retrying won't help.

What does it mean when an AI is rate limited?

The model provider, or your own software, refused a request because a limit for the current window is used up. Usually the reply is error 429 with a wait time.

A spend cap can send back the same error. Anthropic says that once an organisation hits its monthly spend cap, requests return a 429, but "the response has no retry-after header". Retrying "fails until access resumes". As of November 2026, a spend limit you set yourself returns a different error again, a 400.

Exhibit: a comparison table. A rate limit means too much, too fast, for now; the error is a 429 with how long to wait; retry after the wait; the software handles it. A spend cap means the money for the period is used up; the error is a 429 with no wait time, or a 400 for a limit you set; retrying fails until the cap resets or is raised; a person who owns the budget must act.

  1. A 429 with a wait time: wait. Wait as long as the error says, then retry once or twice with a growing pause.
  2. A 429 with no wait time, or a spend-limit 400: stop. Don't retry. Tell the user what happened, and alert whoever owns the budget.

If the cap hits halfway through a task, save what the agent has already done before it stops. Then the task can carry on once the cap resets or a person raises it, instead of starting again.

Our post on LLM fallback strategy shows how to save half-finished work, and covers the other errors a model can return.

What is a reasonable rate limit for an AI agent?

There's no single right number, but there is a right way to find one: start from what real use looks like, not from a round figure.

Limit How to pick the first number Sign it's too low
Per user Your busiest real user's busiest 15 minutes, with room on top Users hit the limit in normal work
Per tool What the other system allows, and what one task truly needs Tasks stop short of done
Provider's limit Your account tier, shown in the provider's console Errors at ordinary load
Budget Cost per task times the tasks you expect, plus a margin You hit it before the end of a normal month

The way you count changes what users feel. A fixed window resets the count at set times, so a user can send a burst at the end of one window and another at the start of the next.

A sliding window, which always counts the last 15 minutes whatever the clock says, catches that burst. Anthropic's own limit refills a little at a time instead: capacity "is continuously replenished up to your maximum limit".

Keep your count in one shared place, or each server counts separately. If a few users send very long documents, count their tokens as well as their messages.

Watch for one surprise. Anthropic also applies ramp limits: after "a sharp increase in usage", requests can fail even under your per-minute limits. A new agent going live to everyone at once can hit this, so release it to users in stages.

Set limits from your busiest real day, then watch who hits them.

How we set rate limits in Avesta AgentOS

Avesta AgentOS is the platform we use to build and run AI agents. Three patterns from it are worth copying. The numbers are as of November 2026.

1. A per-user limit with a separate count for each feature

Messages to a deployed agent are limited to 100 per user every 15 minutes, because each message can mean several model calls.

It's a fixed window that starts at the user's first message, and all our servers share one count. The count follows the signed-in user, and falls back to the network address only when nobody can be identified. A whole office often shares one address, so a count per address lets one busy colleague lock everyone else out.

Each group of features also keeps its own count. Using up the chat limit doesn't block the same user's voice messages or image uploads.

2. A per-tool cap for the costly tool

An agent in Avesta AgentOS can make up to 20 model calls for one message by default. That's its step limit. Without a tool cap, one request could mean 20 image generations. So image generation is capped at 3 per message.

The cap counts attempts, not finished images. A tool that keeps failing can't be retried past the limit.

3. Limits that explain themselves

The per-user limit returns how many messages are left and how many seconds until the count resets, so the app can show when to try again. When the image cap is hit, the agent is told to explain the limit and ask the user to send another message if they need more.

One gap we're open about: Avesta AgentOS shows model calls and spend for each agent, but it doesn't enforce a spend cap itself. Set that hard stop at the provider: Anthropic lets you set your own monthly spend limit, and lower limits for each workspace (a group of keys inside one account).

When can you skip a per-user rate limit?

An internal agent used by five staff who all sign in needs little protection from its own users. You know everyone, and the provider's limit and a budget catch a runaway.

For batch work, such as summarising last night's calls, don't refuse requests at all. Queue them and send them at a steady pace. Anthropic's advice for bulk jobs is to "start scheduled or bulk jobs at a low rate and spread requests evenly".

A queue also answers the operations lead, who didn't want customers turned away. When a busy hour pushes customer chats near a limit, a short queue is kinder than a refusal. Keep the hard refusal for traffic that shouldn't be there.

The bottom line

If you set only one limit this week, make it the budget, at the provider. It's the one that protects you when nobody is watching. Add the per-user limit before the agent faces the public, and per-tool caps for anything that costs money per call. Our guide to AI agent tool call failures shows how to write the error messages an agent reads when a tool says no.

Does anyone on your team know your provider's monthly spend cap, and what your agent does when it's reached?


Want AI agents with per-user and per-tool limits from day one? See how Avesta AgentOS runs them.

See how Avesta AgentOS works

Get started: hello@avestalabs.ai

Frequently asked questions

What is the difference between rate limiting and throttling?
Rate limiting refuses requests over a set number in a set time, and tells the caller to try again later. Throttling slows requests down instead, usually by queuing them and sending them at a steady pace. Many systems use both: a queue in front for work that can wait, and a rate limit behind it for traffic that shouldn't be there.
Does prompt caching help with LLM rate limits?
It can. As of November 2026, Anthropic counts only uncached input tokens toward its input-tokens-per-minute limit, so text the model reads from the cache doesn't use up that limit. Agents resend the same instructions and tool descriptions on every call, so caching them leaves more of the limit for new text. Check your own provider's rules, as they differ.
How do several AI agents share one provider quota?
By default they all draw from one quota, so a busy agent can use up the limit for the rest. Anthropic lets you set lower spend and rate limits for each workspace, so you can put each agent or team in its own workspace with its own share. The organisation's overall limit still applies on top.
Should rate limits live in the agent or in an API gateway?
The per-user limit fits at the front door, which can be an API gateway, because it only needs to know who is asking. Per-tool caps need to know what the agent is doing in this message, so they belong in the software that runs the agent. Many teams use both: a gateway for traffic, the agent's own code for tools and steps.

Share this article

Written by

Jeet Adeshara

AI Engineer