Rate limits
Request limits per API key and per workspace, the 429 response, MCP call limits and how to back off.
The API limits how fast its most expensive operations can be invoked, mainly those that call a model, to keep a runaway loop in one integration from using up a whole workspace's allowance. Other operations are outside these limits. This page lists the limits, shows what a limited response looks like and explains how to back off.
How limits work
- A limited request is counted in two buckets and must fit in both: one for the caller (the API key, or the signed-in person) and one for the whole workspace.
- Every API key has its own caller bucket. Two keys do not share one, but they do share the workspace bucket.
- Limits are grouped into classes with separate counters, so comparing models does not use up the allowance for agent runs.
- Windows are fixed, not rolling. A counter resets on a clock boundary, for example every 10 or 60 seconds, so a burst that straddles a boundary can briefly reach twice the limit.
- A request that the caller bucket refuses does not consume workspace allowance.
Default limits
| Class | Operations | Per key or person | Per workspace |
|---|---|---|---|
agent_run | POST /api/run, POST /api/run/stream, POST /api/conversations/{id}/run/stream, and starting a job with POST /api/run/job | 20 per 10 seconds | 60 per 60 seconds |
assistant_run | POST /api/assistant/run | 12 per 10 seconds | 40 per 60 seconds |
builder_suggest | POST /api/builder/suggest | 30 per 10 seconds | 60 per 60 seconds |
benchmark | POST /api/builder/benchmark | 6 per 30 seconds | 20 per 60 seconds |
variant | POST /api/builder/variant | 20 per 30 seconds | 40 per 60 seconds |
mcp_call | MCP tool listing and tool calls, and the matching REST reads for keys with MCP access | 60 per 60 seconds | 300 per 60 seconds |
POST /api/run/jobcounts only when it starts a job. Follow-up calls that carry ajobIdare not limited.- The limit is checked before the model is called and before a stream opens, so a limited request has called no model and written no receipt, and a streaming operation reports it as a normal JSON response.
- For an activated agent, a limited run or stream request has still used up its launch ticket.
The 429 response
HTTP/1.1 429 Too Many Requests
Retry-After: 7
X-RateLimit-Limit: 20
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1795166050
{
"error": "rate_limited",
"detail": "Too many requests; slow down and retry shortly.",
"retryAfterSec": 7,
"scope": "user",
"limit": 20
}| Field or header | Meaning |
|---|---|
Retry-After, retryAfterSec | Whole seconds until the window resets. At least 1 and never longer than the window. |
scope | Which bucket refused the request: user is the caller bucket (the key or the person), tenant is the workspace bucket. |
limit, X-RateLimit-Limit | The limit of the bucket that refused the request. |
X-RateLimit-Remaining | Always 0 on this response. |
X-RateLimit-Reset | The Unix time, in seconds, at which the window resets. |
These headers are sent only with a 429. Successful responses do not report the remaining allowance.
MCP calls
- The
mcp_callclass allows 60 calls per 60 seconds for each key and 300 per 60 seconds for the workspace. - It counts
tools/listandtools/callrequests from a key with a current grant. - A limited call gets HTTP
429withRetry-Afterand a JSON-RPC error with code-32000.
{
"jsonrpc": "2.0",
"id": 12,
"error": {
"code": -32000,
"message": "Rate limited: slow down and retry shortly",
"data": { "retryAfterSec": 21, "scope": "user" }
}
}The buckets are shared with REST. While a key has MCP access, its calls to the five matching reads (GET /api/agents, GET /api/agents/{id}, GET /api/dashboard, GET /api/receipts and GET /api/receipts/{id}) draw from the same mcp_call buckets, so switching between MCP and REST does not reset the count. A limited REST read gets 429 rate_limited with Retry-After, retryAfterSec and scope, without the limit field and the X-RateLimit-* headers.
Workspace overrides
A workspace can have its own limits for a class. Settings has no control for this today and API keys cannot change it; contact us if the defaults do not fit. Any key with the read scope can see the overrides in effect with GET /api/tenant/config: a class appears there, under a key named ratelimit. plus the class, only when it has an override.
Other limits
A few operations apply their own caps and answer 429 with a different error code; each is listed with its operation in the reference. These two send no Retry-After header, so choose the wait yourself.
| Operation | Error code | Cap | Back off for |
|---|---|---|---|
POST /api/agent-runtime/ticket | agent_launch_limit | 120 launch tickets per key within the past hour | Minutes |
| External agent operation routes (a pilot) | external_operation_rate_limit | 30 new operations per workspace in any 60 seconds | Several seconds |
agent_launch_limit has a second cause that waiting does not clear. It is returned, on the ticket request or on the call that starts the run, when the stored launch records reach a cap: 20,000 tickets or 10,000 runs for one agent, ten times as many for the workspace. A workspace admin clears it in the web workspace; see Troubleshooting.
Backing off
- Wait at least the number of seconds in
Retry-After, and add a little random jitter so that parallel workers do not retry together. - Read
scope. Withuser, this key is sending too fast: slow this client. Withtenant, the workspace as a whole is at its limit, so other keys and people are part of the load and one client backing off may not be enough. - Pace work instead of bursting. For agent runs the workspace bucket averages one run per second across everyone, so queue larger batches. Runs of activated agents have a lower ceiling for each key: a key can request 120 launch tickets in any hour (see Other limits), which averages one run every 30 seconds.
- Give each integration its own key. Each gets its own caller bucket, and you can see which one is being limited.
- Retrying after a
429 rate_limitedis safe, because the refused request called no model. For an activated agent, request a new launch ticket for every attempt: a ticket that was already used answers200withreplayedset totrueand does not run the agent.
AGENT_ID="3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11"
REQUEST=$(jq -cn --arg agentId "$AGENT_ID" \
--arg prompt "Summarize our returns policy in three bullet points." \
'{agentId: $agentId, prompt: $prompt}')
# One value for this run, kept across attempts.
MODEL_REQUEST="$(date +%s)000.$(uuidgen)"
attempt=0
until [ "$attempt" -ge 5 ]; do
# A launch ticket starts one run, so every attempt needs a new one.
ticket=$(jq -cn --arg agentId "$AGENT_ID" --arg nonce "$(uuidgen)" \
--argjson request "$REQUEST" \
'{agentId: $agentId, purpose: "run", nonce: $nonce, request: $request}' \
| curl -s https://centerofagentic.com/api/agent-runtime/ticket \
-H "Authorization: Bearer $COA_API_KEY" \
-H "Content-Type: application/json" \
-H "X-CoA-Agent-Protocol: agent-active-grants/1" \
-d @- \
| jq -r '.ticketId // empty')
[ -z "$ticket" ] && { echo "No launch ticket issued" >&2; break; }
http_status=$(curl -s -o run.json -D headers.txt -w "%{http_code}" \
https://centerofagentic.com/api/run \
-H "Authorization: Bearer $COA_API_KEY" \
-H "Content-Type: application/json" \
-H "X-CoA-Model-Request: $MODEL_REQUEST" \
-H "X-CoA-Agent-Protocol: agent-active-grants/1" \
-H "X-CoA-Agent-Ticket: $ticket" \
-d "$REQUEST")
[ "$http_status" != "429" ] && break
wait=$(grep -i '^retry-after:' headers.txt | tr -dc '0-9')
sleep "$(( ${wait:-5} + 1 ))"
attempt=$((attempt + 1))
doneThe loop repeats only on 429. Any other status, including a 5xx, ends it, because a run that may have started must not be sent again without checking its receipt. It also stops when no launch ticket is issued, for example because the agent has no active version. See Errors.
Next steps
Something missing or unclear? Tell us and we will improve this page.