Tokens-per-minute rate limiting
Retry rate-limited requests by setting retries, delay_between_retries, and exponential_backoff on the agent.
If a provider rate-limits your agent, configure retries:
from agno.agent import Agent
from agno.models.openai import OpenAIChat
agent = Agent(
model=OpenAIChat(id="gpt-5.4-mini"),
retries=3,
delay_between_retries=2,
exponential_backoff=True,
)
agent.print_response("Tell me about a breaking news story from New York.", stream=True)retries defaults to 0, so setting exponential_backoff or delay_between_retries alone has no effect. Set retries to the number of retry attempts you want.
| Parameter | Default | Description |
|---|---|---|
retries | 0 | Number of retries after a failed run |
delay_between_retries | 1 | Delay in seconds before each retry |
exponential_backoff | False | Double the delay after each failed attempt |
OpenAI applies tier-based rate limits. See the OpenAI rate limit docs for the limits on your account.