Skip to content
sync ai agents

Rate limits in multi-agent systems

Put one shared limiter in front of every agent that uses the same model credentials. Cap total concurrent calls there and queue the rest. On a 429, wait for any retry-after hint or back off exponentially with jitter, and retry at one layer only. Then trim the tokens each agent sends, and move work that can wait to a batch endpoint so it stays off the real-time limits.

Why does a fan-out multiply requests?

One user task turns into many model calls once an orchestrator starts workers side by side. Each worker then calls the model again for every tool step, so the count grows inside every branch as well.

Most frameworks make fan-out a single declaration. Google's ADK says its ParallelAgent executes its sub-agents concurrently, and that all the agents start running at approximately the same time. Microsoft's Agent Framework uses a ConcurrentBuilder to run multiple agents in parallel, and in LangGraph Send dynamically invokes nodes for fan-out. The provider still sees every one of those calls, so the cap belongs in the central orchestrator or below it.

ADK users should note that in Python, TypeScript, Go and Kotlin, template workflows have been superseded by graph-based and dynamic workflows.

Anthropic's research system shows the shape of the burst. Its lead agents execute subagents synchronously, waiting for each set to finish before moving on. Anthropic writes that asynchronous execution would enable additional parallelism but adds challenges in result coordination, state consistency and error propagation.

Which rate limits do parallel agents share?

On OpenAI, rate limits are defined at the organization level and at the project level, not per user. Count every agent in a project against one budget.

Several meters run at once. OpenAI measures RPM, RPD, TPM, TPD and IPM, and limits can be hit across any of the options depending on which fills first. Its own example has 20 requests with only 100 tokens filling a 20 RPM limit while a 150k TPM limit sits unused.

OpenAI also states that some model families have shared rate limits. Check whether your planner model and worker model sit in one such family before assuming they have separate headroom.

Anthropic warns that a per-minute limit may be enforced over a shorter window: 60 requests per minute might be enforced as 1 request per second, and short bursts can trigger errors. A fan-out that launches every worker in the same second is exactly that kind of burst. The API uses a token bucket algorithm, so capacity refills continuously instead of resetting at fixed intervals.

On Anthropic, you can set custom spend and rate limits for each workspace, which the docs say protects other workspaces in your organization from potential overuse. The organization-wide limits always apply, even if workspace limits add up to more.

How do I cap concurrency across agents?

Cap it at the layer that sees every call. If each of eight workers enforces two calls at a time on its own, you still send sixteen.

Framework settings cover agents that run in one process:

Know what each setting misses. LangChain's limiter can only limit the number of requests per unit time and will not help with request size. Agents spread across processes or hosts need a limit that lives outside any one process, such as a gateway or a shared queue.

Kong's AI Rate Limiting Advanced plugin is one gateway option. It uses the token data returned by the LLM provider to cost each query, and its redis strategy keeps counters on a Redis server shared across nodes. The plugin is only available as part of AI Gateway Enterprise, and Kong notes that because token usage is only known after the model responds, concurrent requests can exceed the configured limit. Set the gateway limit below the provider limit to leave headroom.

How should agents back off after a 429?

Use a single retry point with growing, randomized waits. These steps apply to any provider.

Nested agents make retries dangerous. AWS explains that when every layer of a service stack has its own retries, the retries at each layer multiply, and its practice for low-cost operations is to retry at a single point in the stack. Google's SRE book puts the retry at the layer immediately above the one rejecting the request.

If you wrap calls yourself, turn off the SDK's own retries. OpenAI's backoff examples create the client with OpenAI( max_retries = 0 ) and retry openai.RateLimitError through the third-party backoff library. For the related failure where an agent repeats its own work, see preventing agent loops.

How do I reduce tokens per agent?

When the token meter is the one filling, trimming context buys more headroom than slowing down. Give each worker only the slice of state its task needs instead of the full shared transcript.

Set output caps tightly. OpenAI says your rate limit is calculated as the maximum of max_tokens and the estimated tokens from the request's character count, so a large max_tokens on a short answer reserves budget you never use.

Long-running agents can shed context as they go. Anthropic's research agents summarize completed work phases and store essentials in external memory, and near the limit they can spawn fresh subagents with clean contexts. CrewAI's respect_context_window setting does a similar job, keeping messages under context window size by summarizing, and it defaults to True.

Caching helps when workers share a long prefix such as tool definitions. Anthropic's caching page says this matters for rate limits because input_tokens is typically much smaller than your total input when caching works well. Its Console chart tracks hourly maximum uncached input tokens per minute, which shows whether caching is moving the number you care about.

Which work can leave the real-time budget?

Anything that does not need an immediate answer can go to a batch endpoint. OpenAI says Batch API jobs don't count toward standard per-model request or token rate limits. Anthropic states that usage of the Batches API does not affect rate limits in the Messages API.

Batch work has limits of its own. OpenAI's Batch/Background Rate Limit caps the total input tokens queued for a model, and you can create up to 2,000 batches per hour. On Anthropic, rate limits cover both HTTP requests and requests within a batch waiting to be processed, and batches might take up to 24 hours. Evaluations, bulk summaries and nightly re-indexing fit that window. A planner waiting on a worker does not.

For the remaining real-time calls, a priority queue in front of the shared cap lets the interactive agent go first while bulk workers wait. When something still fails, the traces described in debugging multi-agent systems show which agent burned the budget.

Which sources does this page use?

What do people ask about rate limits in multi-agent systems?

  • Should each agent get its own API key?

    Separate keys help only if the provider meters them separately. OpenAI defines limits at the organization and project level, so check where your quota is scoped before splitting keys.

  • Is every 429 a rate limit I can wait out?

    No. On Anthropic, the spend-cap 429 never carries a retry-after header, and API usage pauses until 00:00 UTC on the first day of the next month unless you request a higher limit sooner. Route that case to an alert instead of a retry loop.

  • Does lowering concurrency slow the whole workflow?

    A cap well below what the provider allows will slow it. Set the cap close to your real limit, watch the 429 rate, and adjust, since uncapped workers that fail and retry also lose time.

Updated November 2026

Not sure which pattern fits?

Six questions, about a minute. You'll get a pattern, a shortlist and the tradeoffs.

Take the finder

Which related questions can you explore next?