OpenAI Agents SDK
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
What is OpenAI Agents SDK?
The OpenAI Agents SDK (openai-agents) is a lightweight framework for building multi-agent workflows with tools, handoffs, and guardrails. Respan gives you full observability over every agent run, LLM generation, tool call, and handoff.
Example projects
Setup
Use Respan Gateway instead? Only need Respan api key, easier setup.
Route LLM calls through the Respan gateway to use 250+ models from different providers, while still tracing every agent run.
Install packages
Set environment variables
No OPENAI_API_KEY needed — the Respan gateway handles provider authentication.
Initialize and run
View your trace
Open the Traces page to see your workflow with agent spans, LLM generations, tool calls, and handoffs.
Configuration
Attributes
In Respan()
Set defaults at initialization — these apply to all spans.
With propagate_attributes
Override per-request using a context scope.
Decorators (optional)
Decorators are not required. All agent runs, LLM calls, tool calls, and handoffs are auto-traced by the instrumentor. Use @workflow and @task to add structure when you want to group agent runs into named workflows with nested tasks.
Examples
Tool calls
Tool calls are automatically captured as spans with inputs, outputs, and timing.
Handoffs
Agent-to-agent handoffs are traced with full context.
Streaming
Stream agent responses with real-time text deltas.
Gateway features
The features below require the gateway setup from the expandable section above.
Switch models
Change the model parameter on your agents to use 250+ models from different providers through the same gateway.
See the full model list.