What's the difference between the Claude Agent SDK and the OpenAI Agents SDK?

The Claude Agent SDK runs only Claude models as Claude Code’s own loop, tools, permissions, sessions, hooks, and subagents, packaged as a library; the OpenAI Agents SDK runs OpenAI’s Responses API by default, reaching other providers only through its beta LiteLLM or Any-LLM adapters, and organizes work through handoffs and guardrails instead of hooks and subagents. A hook is a callback at a point in Claude’s loop, before or after a tool call; a handoff moves the whole conversation to a different agent, and a guardrail is a separate check on that agent’s input or output.

Tracing differs the same way the loops do. Claude’s SDK emits real OpenTelemetry, turned on with CLAUDE_CODE_ENABLE_TELEMETRY, though its spans are still behind a beta flag and carry Claude Code’s own names rather than the OpenTelemetry GenAI conventions. The OpenAI SDK traces by default too, but into OpenAI’s own backend; reaching anywhere else needs a trace processor added with add_trace_processor, not an OTel exporter.

published

sources

keep reading

More on this.

Try Tessary on Cloud.

free · 10,000 traces a month · 1 GB · 30-day retention · $10 one-time credit for triage and RCA · no credit card