Observe, evaluate, and improve your OpenAI Agents SDK agents
Capture every span the OpenAI Agents SDK already wraps its own run in — agent, generation, function, guardrail, and handoff spans — as structured trace data, not a second tracing layer bolted on top.
What Prefactor records from OpenAI Agents SDK
OpenAI Agents SDK + Prefactor
Observe for OpenAI Agents SDK
Prefactor observes your OpenAI Agents SDK agents in real time — every LLM call, tool invocation, and custom span capture
Open → EvaluateEvaluate for OpenAI Agents SDK
Prefactor evaluates your OpenAI Agents SDK agents — score outcome quality against the captured spans, track drift by com
Open → ObserveAct for OpenAI Agents SDK
Prefactor acts on your OpenAI Agents SDK agents at runtime — block, throttle, sandbox, or escalate a tool call or data a
Open →How the OpenAI Agents SDK integration works
- The SDK already wraps every part of a run in its own span type — agent_span(), generation_span(), function_span(), guardrail_span(), handoff_span() — Prefactor's spans map directly onto these, so nothing needs re-deriving from raw call data.
- Guardrails are the SDK's own real-time enforcement point: they run input/output validation in parallel with the agent and fail fast when a check doesn't pass — the same mechanism a Prefactor runtime policy runs through to hold or block a run before it produces a final response.
- Beyond auto-captured spans, use withSpan to record any custom step you define — an API call, a quality check, a business action.
OpenAI Agents SDK integration FAQ
Do I need a dedicated package for OpenAI Agents SDK?
You can instrument OpenAI Agents SDK today with the framework-agnostic prefactor-core SDK; a dedicated package can be added on request.
What does Prefactor capture from OpenAI Agents SDK?
Prefactor records agent runs, handoffs between agents, tool calls and LLM calls as structured, timestamped spans — so every OpenAI Agents SDK run is captured as trace data you can reconstruct, search and export end to end.
Does Prefactor add latency or change how OpenAI Agents SDK runs?
No. Observability capture is designed to stay off your agent's critical path, so it doesn't alter your OpenAI Agents SDK logic or your users' responses. The only part that acts inline is the optional runtime guardrails you enable per agent — by design, so a high-risk or low-confidence action can be held for human approval before it executes.
Can I evaluate agents built with OpenAI Agents SDK and catch regressions?
Yes. Once runs are captured, eval suites score quality and groundedness on real traffic, drift detection flags behaviour changes after deployment, and versioned eval history catches regressions before they ship — the observe → evaluate → improve loop applied to your OpenAI Agents SDK agents.
Related guides
See it on your OpenAI Agents SDK agents
Book a 15-minute setup and our team gets you tracing in production.