Skip to main content
Cascade provides auto-instrumentation for the OpenAI Agents SDK. A single function call translates the framework’s native events into Cascade spans with no changes to your existing agent code.

Setup

from cascade import init_tracing
from cascade.integrations import instrument_openai_agents

init_tracing(project="my_openai_agent")
instrument_openai_agents()

# Existing OpenAI Agents code - no changes needed
from agents import Agent, Runner

agent = Agent(name="MyAgent", ...)
result = Runner.run_sync(agent, "Hello")
Requires the openai-agents package:
pip install openai-agents

What gets traced automatically

The integration automatically captures:
  • Agent spans: with agent names
  • LLM generation spans: with model, prompt, completion, and token usage
  • Function/tool calls: with input and output values
  • Guardrail checks: safety and validation guardrails
  • Agent handoffs: with from/to agent info