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

BeeAI (gateway)

Was this page helpful?
Previous

Pipecat (gateway)

Next
Built with

Route BeeAI’s underlying LLM calls through the Respan gateway to use 250+ models from different providers. Only your RESPAN_API_KEY is needed — no separate provider keys required.

Setup

1

Install packages

$pip install respan-ai openinference-instrumentation-beeai beeai-framework
2

Set environment variables

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
$export OPENAI_API_KEY="YOUR_RESPAN_API_KEY"
$export OPENAI_BASE_URL="https://api.respan.ai/api"

No real OpenAI key needed — the Respan gateway handles provider authentication.

3

Initialize and run

1import os
2
3os.environ["OPENAI_API_KEY"] = os.environ["RESPAN_API_KEY"]
4os.environ["OPENAI_BASE_URL"] = "https://api.respan.ai/api"
5
6from beeai import Agent
7
8agent = Agent(
9 model="gpt-4.1-nano",
10 instructions="You are a helpful research assistant.",
11)
12
13print(agent.run("Tell me about recursion."))

Switch models

Change the model parameter to use 250+ models from different providers through the same gateway.

1agent = Agent(model="claude-sonnet-4-5-20250929", instructions="...")
2agent = Agent(model="gemini-2.5-flash", instructions="...")

See the full model list.