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

# Example demonstrating how to set up retries with LangDB.

> We will use a deliberately wrong model ID, to trigger retries.

```python theme={null}
"""Example demonstrating how to set up retries with LangDB."""

from agno.agent import Agent
from agno.models.langdb import LangDB

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

# We will use a deliberately wrong model ID, to trigger retries.
wrong_model_id = "langdb-wrong-id"

agent = Agent(
    model=LangDB(
        id=wrong_model_id,
        retries=3,  # Number of times to retry the request.
        delay_between_retries=1,  # Delay between retries in seconds.
        exponential_backoff=True,  # If True, the delay between retries is doubled each time.
    ),
)

agent.print_response("What is the capital of France?")

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

```bash theme={null}
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/90_models/langdb

# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate

python retry.py
```
