> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Retries

> Demonstrates team retry configuration for transient run errors.

```python retries.py theme={null}
"""
Retries
=============================

Demonstrates team retry configuration for transient run errors.
"""

from agno.agent import Agent
from agno.team import Team
from agno.tools.websearch import WebSearchTools

# ---------------------------------------------------------------------------
# Create Members
# ---------------------------------------------------------------------------
sarah = Agent(
    name="Sarah",
    role="Data Researcher",
    tools=[WebSearchTools()],
    instructions="Focus on gathering and analyzing data",
)

mike = Agent(
    name="Mike",
    role="Technical Writer",
    instructions="Create clear, concise summaries",
)

# ---------------------------------------------------------------------------
# Create Team
# ---------------------------------------------------------------------------
team = Team(
    members=[sarah, mike],
    retries=3,
    delay_between_retries=1,
    exponential_backoff=True,
)

# ---------------------------------------------------------------------------
# Run Team
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    team.print_response(
        "Search for latest news about the latest AI models",
        stream=True,
    )
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno ddgs openai
```

**2. Export your OpenAI API key**

```bash Mac/Linux theme={null}
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

Save the code above as `retries.py`, then run:

```bash theme={null}
python retries.py
```

Full source: [cookbook/03\_teams/14\_run\_control/retries.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/03_teams/14_run_control/retries.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.