Installation
Quick Start
What Gets Traced
The integration captures events from the OpenAI Agents SDK’s built-in tracing system:- Agent runs — trace-level events with workflow name and metadata
- LLM generations — model, input messages, output, token usage (input_tokens/output_tokens)
- Tool/function calls — function name, input arguments, output, duration, and errors
- Handoffs — from/to agent names for multi-agent workflows (TypeScript only)
- Errors — captured with error type and message in event properties
- Finish reason — extracted from response status or generation output (
ai.finish_reason) - Extended token categories — cached tokens (
ai.usage.cached_tokens) and reasoning/thoughts tokens (ai.usage.thoughts_tokens) for OpenAI o1/o3 models
Configuration
Identify Users
Associate a user identity with optional traits for analytics:Track Signals
Attach feedback, labels, or other signals to an existing event:Multi-Agent Workflows
The integration automatically captures handoffs between agents:Flushing and Shutdown
Always callflush() before your process exits to ensure all telemetry is shipped:
Known Limitations (Python)
- Handoffs are not individually captured in the Python SDK. The TypeScript SDK captures full span trees including handoffs.
- Multi-response traces: In multi-agent workflows with handoffs, only the last response’s data survives per trace.