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.
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:
- LangChain's batch() lets you control the maximum number of parallel calls through max_concurrency in the RunnableConfig dictionary.
- CrewAI agents take a max_rpm attribute, documented as maximum requests per minute to avoid rate limits.
- LangChain chat models accept a rate_limiter parameter at initialization, and the built-in InMemoryRateLimiter can be shared by multiple threads in the same process.
- OpenAI's Agents SDK has max_function_tool_concurrency, which lets you cap how many of those local function tool calls run at once. It acts on tool calls after the model has emitted them, so it limits tool fan-out and leaves model requests to your own limiter.
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.
- Read the wait hint first. Anthropic's retry-after header gives the number of seconds to wait before retrying, and not every 429 carries it.
- Without a hint, use exponential backoff. AWS describes it as increasing wait times for a specified number of retry attempts and lists a 429 Too many requests exception from throttling as a case for the pattern.
- Add jitter. AWS defines it as a random amount of time before a request or retry, to help prevent large bursts.
- Cap the attempts. Google's SRE book describes a per-request retry budget of up to three attempts, plus a per-client budget where a request is only retried while the retry ratio is below 10%.
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?
- Parallel workflow (adk.dev), reviewed November 2026
- Microsoft Agent Framework Workflows Orchestrations (learn.microsoft.com), reviewed November 2026
- Graph API overview (docs.langchain.com), reviewed November 2026
- How we built our multi-agent research system \ Anthropic (anthropic.com), reviewed November 2026
- Rate limits (platform.openai.com), reviewed November 2026
- Rate limits (platform.claude.com), reviewed November 2026
- Models (docs.langchain.com), reviewed November 2026
- Agents (docs.crewai.com), reviewed November 2026
- Running agents (openai.github.io), reviewed November 2026
- AI Rate Limiting Advanced (docs.konghq.com), reviewed November 2026
- Retry with backoff pattern (docs.aws.amazon.com), reviewed November 2026
- Timeouts, retries, and backoff with jitter (aws.amazon.com), reviewed November 2026
- Google SRE: Load Balancing with Client Side Throttling (sre.google), reviewed November 2026
- Prompt caching (platform.claude.com), reviewed November 2026
- Batch API (platform.openai.com), reviewed November 2026
- Batch processing (docs.anthropic.com), reviewed November 2026
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