> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.respan.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://www.respan.ai/docs/_mcp/server.

# Agno (gateway)

> Set up Agno with the Respan gateway.

Route Agno's underlying OpenAI-compatible LLM calls through the Respan gateway to use 1000+ models from different providers. Only your Respan API key is needed when provider access is configured in Respan.

## Setup

#### Install packages

```bash
pip install agno openai
```

#### Set environment variables

```bash
export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
export RESPAN_BASE_URL="https://api.respan.ai/api"
```

No `OPENAI_API_KEY` is needed when the request is routed through the Respan gateway.

#### Point Agno to the Respan gateway

```python
import os

from agno.agent import Agent
from agno.models.openai import OpenAIChat

respan_api_key = os.environ["RESPAN_API_KEY"]
respan_base_url = os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api")

agent = Agent(
    name="Gateway Agent",
    model=OpenAIChat(
        id="gpt-5-mini",
        api_key=respan_api_key,
        base_url=respan_base_url,
    ),
    instructions="Keep the answer short and concrete.",
)

result = agent.run("Name two practical uses for distributed tracing.")
print(result.content)
```

## Switch models

Change the `id` passed to `OpenAIChat` to use another OpenAI model through the same gateway-backed endpoint.

```python
agent = Agent(
    model=OpenAIChat(
        id="gpt-5.5",
        api_key=os.environ["RESPAN_API_KEY"],
        base_url=os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api"),
    ),
)
```

> **Note**
>
> `OpenAIChat` is Agno's OpenAI-compatible adapter. This page avoids showing Claude or Gemini inside that OpenAI-named adapter; use the Respan API or OpenAI SDK gateway pages for provider-neutral Claude and Gemini examples.

See the [full model list](https://platform.respan.ai/platform/models).