
OpenAI Agents SDK
OpenAI’s lightweight open-source framework for building agents, handoffs, guardrails and tracing in a few primitives.
Best forDevelopers who want the fastest, lightest way to ship a straightforward agent (support triage, a tool-using assistant) with tracing and guardrails included.
Our verdict
The OpenAI Agents SDK is the shortest path from idea to a working agent: four clean primitives, agents, handoffs, guardrails and sessions, plus built-in tracing that would otherwise take weeks to build, and a beta “sandbox agents” mode that gives an agent its own persistent file/shell workspace.
The fastest, lightest way to ship a straightforward agent, four primitives and free tracing; you outgrow it exactly when your workflow needs a real graph engine.
The Agents Index digest
New agents, fresh verdicts, and who's earning the top spots. One short email.

What's great
- Minimal, intuitive primitives (agents, handoffs, guardrails, sessions) get you production-ready quickly, with tracing built in.
- Provider-agnostic, works with 100-plus models through LiteLLM, so you are not locked to a single vendor.
Watch-outs
- Minimalist by design: durable state is limited to
RunState, a snapshot you capture manually after a run pauses for human-in-the-loop approval, not automatic step-by-step checkpointing, and handoffs are linear chains, not a graph, so complex branching or crash-safe mid-run resume become your own code; teams sometimes outgrow it and move to LangGraph. - Tracing and some features are OpenAI-centric, and the project is young and fast-moving (v0.x, latest tag v0.18.3), so APIs can still shift between releases.
Also note: No automatic step-by-step checkpointing, `RunState` only snapshots at human-in-the-loop approval pauses, so you manage durable state yourself outside of that. · Handoffs are linear delegation, not a full graph engine for complex branching or audit trails.
What is OpenAI Agents SDK?
The OpenAI Agents SDK is OpenAI’s open-source framework for building agentic applications, a lightweight, MIT-licensed package that is the production-ready successor to OpenAI’s earlier experimental Swarm project. It gives you a small set of primitives, agents (an LLM with instructions and tools), handoffs (one agent delegating to another), guardrails (input/output validation) and sessions (conversation memory), plus built-in tracing. It ships in both Python and TypeScript/JavaScript, and although it is optimised for OpenAI’s models it is provider-agnostic, working with 100-plus other LLMs through LiteLLM and the Chat Completions API.
What does OpenAI Agents SDK do?
You define one or more agents in code, each with instructions, a model and a set of callable tools, then let the SDK run the agent loop: it calls the model, executes any tool calls, and repeats until the task is done. Handoffs let a triage agent route a request to a specialist agent, carrying the conversation context along; guardrails run validation on inputs and outputs so you can block unsafe or off-topic requests; and sessions persist conversation history between runs. Every step is captured by built-in tracing, which you can view in OpenAI’s dashboard or export to third-party observability tools, making multi-agent flows much easier to debug. The SDK also supports MCP servers for external tools, human-in-the-loop approval, and realtime voice agents over WebSocket. A beta “sandbox agents” mode gives an agent a persistent workspace, it can search and edit files, run shell commands and pick up saved state later, backed by a local Unix or Docker sandbox, or a hosted cloud provider (Modal, Vercel, Runloop and others); that workspace snapshot covers files and shell state only, not the agent’s conversation or handoff state. It is deliberately minimal, four core concepts rather than a large graph engine, so you get from a spec to a working agent quickly, but anything beyond agents-plus-tools-plus-handoffs (a full graph engine, automatic step-by-step checkpointing) is code you write yourself. The framework is free; you pay only for the model API calls it makes.
Key features
- Agents + built-in agent loop: An agent is an LLM configured with instructions and tools; the SDK runs the call-tool-repeat loop for you.
- Handoffs: Agents explicitly delegate to one another, passing conversation context, ideal for triage-and-route patterns.
- Guardrails: Configurable input and output validation to block unsafe or off-topic requests before or after the model runs.
- Sessions & built-in tracing: Persistent conversation memory plus tracing of every step, viewable in OpenAI’s dashboard or exported elsewhere.
- Sandbox agents (beta): A persistent workspace an agent can search, edit files in, and run shell commands against, resumable from saved state, via a local Unix/Docker sandbox or a hosted cloud provider.
What are OpenAI Agents SDK's use cases?
- Customer-support triage: A front-line agent classifies a ticket and hands off to a billing or technical specialist agent with full context.
- Linear task automation: An agent chains a few tool calls, search, fetch, summarise, behind guardrails, shipped to production quickly.
What does OpenAI Agents SDK integrate with?
- OpenAI Responses & Chat Completions API
- 100+ LLMs via LiteLLM
- MCP servers & tools
- OpenAI tracing dashboard / third-party observability
- Sandbox workspaces (Unix-local, Docker, and hosted cloud providers)
Why use OpenAI Agents SDK?
- Fastest path from spec to production for straightforward agents, with just four primitives to learn.
- Built-in tracing and guardrails save weeks of custom scaffolding.
- MIT-licensed and free, in both Python and TypeScript/JavaScript.
- Provider-agnostic, runs 100-plus models via LiteLLM, not only OpenAI’s.
Pros & cons
Pros
- Minimal, intuitive primitives (agents, handoffs, guardrails, sessions) get you production-ready quickly, with tracing built in.
- Provider-agnostic, works with 100-plus models through LiteLLM, so you are not locked to a single vendor.
Cons
- Minimalist by design: durable state is limited to
RunState, a snapshot you capture manually after a run pauses for human-in-the-loop approval, not automatic step-by-step checkpointing, and handoffs are linear chains, not a graph, so complex branching or crash-safe mid-run resume become your own code; teams sometimes outgrow it and move to LangGraph. - Tracing and some features are OpenAI-centric, and the project is young and fast-moving (v0.x, latest tag v0.18.3), so APIs can still shift between releases.
Limitations
- No automatic step-by-step checkpointing,
RunStateonly snapshots at human-in-the-loop approval pauses, so you manage durable state yourself outside of that. - Handoffs are linear delegation, not a full graph engine for complex branching or audit trails.
OpenAI Agents SDK pricing
- Open sourceFree
See current pricing on openai.github.io ↗Compare OpenAI Agents SDK alternatives →
OpenAI Agents SDK specs
Pricing
- Pricing model
- free
- Free tier
- ✓ Yes
Capabilities
- Model / LLM
- OpenAI-first (100+ via LiteLLM)
- Interface
- Library
- Public API
- ✗ No
- Open source
- ✓ Yes
Deployment
- Deployment
- Self-host
OpenAI Agents SDK review
The OpenAI Agents SDK is the shortest path from idea to a working agent: four clean primitives, agents, handoffs, guardrails and sessions, plus built-in tracing that would otherwise take weeks to build, and a beta “sandbox agents” mode that gives an agent its own persistent file/shell workspace. It is MIT-licensed and free, ships in both Python and TypeScript, and despite the OpenAI branding it is genuinely provider-agnostic, running 100-plus models through LiteLLM. The flip side of that minimalism is real: durable state is limited to
RunState, a snapshot you capture manually after a run pauses for human approval, not automatic step-by-step checkpointing, and handoffs are linear chains rather than a graph, anything beyond agents-plus-tools-plus-handoffs becomes code you own, which is why teams with genuinely complex, branching or audit-heavy workflows often graduate to LangGraph. It is also young and moving fast, so expect some API churn, and the tracing experience leans on OpenAI’s dashboard. Pick it for support triage, routing and linear tool-using agents you want in production this week; skip it when your workflow needs deterministic branching, automatic mid-run checkpointing or compliance-grade audit trails.The fastest, lightest way to ship a straightforward agent, four primitives and free tracing; you outgrow it exactly when your workflow needs a real graph engine.
Frequently asked questions
Is the OpenAI Agents SDK free?
Can it use models other than OpenAI’s?
Is it the successor to Swarm?
Does it support JavaScript as well as Python?
Does the SDK support sandboxed agent workspaces?
Get a quote from OpenAI Agents SDK
Tell us what you need. We make the introduction to OpenAI Agents SDK.