Documentation Index
Fetch the complete documentation index at: https://spacesail.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
This example demonstrates how to configure a team with exponential backoff retry logic. When agents encounter errors or rate limits, the team will automatically retry with increasing delays between attempts.
Code
cookbook/examples/teams/basic/team_exponential_backoff.py
from agno.agent import Agent
from agno.team import Team
from agno.tools.duckduckgo import DuckDuckGoTools
# Create a research team
team = Team(
members=[
Agent(
name="Sarah",
role="Data Researcher",
tools=[DuckDuckGoTools()],
instructions="Focus on gathering and analyzing data",
),
Agent(
name="Mike",
role="Technical Writer",
instructions="Create clear, concise summaries",
),
],
retries=3,
exponential_backoff=True,
)
team.print_response(
"Search for latest news about the latest AI models",
stream=True,
)
Usage
Create a virtual environment
Open the Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Install required libraries
Set environment variables
export OPENAI_API_KEY=****
Run the agent
python cookbook/examples/teams/basic/team_exponential_backoff.py