Skip to content

Control and proof

Rate limiting for AI agents

Rate 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.

Updated Also called Agent rate limits, API rate limiting for agents4 sources checked

What it is

A rate limit caps requests per window: per second, minute, hour or day. RFC 6585 defines status 429, Too Many Requests, for a client that has sent too many in a given time, optionally with a Retry-After header saying how long to wait. For agents there are two limits that matter: how fast the agent may call the platform it uses, and how fast that platform calls each vendor.

Why it matters

Agents work at machine speed, in parallel and sometimes in loops. Vendor quotas are usually per account, not per integration, so an eager agent can spend the quota your billing sync and ticket integration also need. The MCP tools specification says servers must rate limit tool invocations. OWASP lists rate limiting as a way to reduce the damage of excessive agency, though not to prevent it.

How it works

  • Declare each vendor's published limits and what they are counted against (account, user, database).
  • Count atomically across every instance, so ten workers do not get ten budgets.
  • Leave headroom below the published limit for the customer's other integrations.
  • Queue briefly, then refuse with 429 and Retry-After when over budget.
  • Cap concurrency per connection, so one run cannot open hundreds of sockets.
  • Limit inbound traffic per address, per credential and per tenant.

Example

A vendor allows 10,000 requests an hour per account. Two agents and a nightly sync share that account. Without coordination, the agents spend the hour's budget by 9:20, and the sync fails. With pacing at 92% of the limit, counted per account, the agents slow down and the sync keeps its share.

Common pitfalls

  • Agents retrying 429s immediately, turning one refusal into a burst.
  • Counting per connection when the vendor counts per account.
  • Ignoring Retry-After.
  • Using rate limits as a budget. Slow and steady can still spend a month's allowance. See spending caps.

How actionlake handles it

Each service file declares the vendor's limits. The gateway counts them per vendor account per window, across all instances, and spends to 92% of the published limit, leaving 8% for your other systems. Over budget, it holds the request briefly, then answers 429 with Retry-After; callers should not retry a 429 themselves, because we are pacing that vendor for everyone. A per-connection concurrency cap stops one plan opening hundreds of sockets. Vendor 429s are not billed. Inbound, separate buckets apply per address, per credential and per tenant, set well above what a busy agent sends. Read more in your rate limits are safe with us.

Questions

What should an AI agent do when it gets a 429?

Wait for the time in the Retry-After header, or back off with jitter if there is none. Never retry immediately in a loop.

Why do vendor rate limits matter if my agent is the only user?

Your agent is rarely the only user. Billing syncs, ticket integrations and people share the same account quota, and a lockout affects all of them.

Is a rate limit the same as a spending cap?

No. A rate limit controls speed; a spending cap controls total use over a period. Agents need both.

Sources

  1. RFC 6585: Additional HTTP Status Codes (429 Too Many Requests)IETF · checked 22 October 2026
  2. Server features: Tools (2025-11-25)Model Context Protocol · checked 22 October 2026
  3. LLM06:2025 Excessive AgencyOWASP Gen AI Security Project · checked 22 October 2026
  4. LLM10:2025 Unbounded ConsumptionOWASP 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.