For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
    • Overview
  • Tracing
  • Gateway
      • OpenAI Agents
      • Claude Agent SDK
      • Vercel AI SDK
      • Pydantic AI
      • CrewAI
      • Haystack
      • LangChain
      • LangGraph
      • Langflow
      • LlamaIndex
      • AutoGen
      • DSPy
      • Google ADK
      • Smolagents
      • Strands Agents
      • AgentSpec
      • Guardrails
      • Agno
      • MCP
      • BeeAI
      • Pipecat
      • Superagent
  • Others
  • Migrating
    • Braintrust
    • Portkey
    • Langfuse
LogoLogo
DiscordPlatform
On this page
  • Setup
  • Switch models
GatewayAgent Frameworks

Agno (gateway)

Was this page helpful?
Previous

MCP (gateway)

Next
Built with

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

Setup

1

Install packages

$pip install respan-ai respan-instrumentation-agno agno openai
2

Set environment variables

$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.

3

Point Agno to the Respan gateway

1import os
2
3from agno.agent import Agent
4from agno.models.openai import OpenAIChat
5from respan import Respan, workflow
6from respan_instrumentation_agno import AgnoInstrumentor
7
8respan_api_key = os.environ["RESPAN_API_KEY"]
9respan_base_url = os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api")
10
11respan = Respan(
12 api_key=respan_api_key,
13 base_url=respan_base_url,
14 app_name="agno-gateway",
15 instrumentations=[AgnoInstrumentor()],
16)
17
18agent = Agent(
19 name="Gateway Agent",
20 model=OpenAIChat(
21 id="gpt-4o-mini",
22 api_key=respan_api_key,
23 base_url=respan_base_url,
24 ),
25 instructions="Keep the answer short and concrete.",
26)
27
28@workflow(name="agno_gateway")
29def run_gateway_agent() -> str:
30 result = agent.run("Name two practical uses for distributed tracing.")
31 return str(result.content)
32
33print(run_gateway_agent())
34respan.flush()

Switch models

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

1agent = Agent(
2 model=OpenAIChat(
3 id="claude-sonnet-4-5-20250929",
4 api_key=os.environ["RESPAN_API_KEY"],
5 base_url=os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api"),
6 ),
7)

See the full model list.