OpenAI Agents SDK
Minimal open-source Python and TypeScript framework for building agents with handoffs, guardrails, sessions and sandboxed code execution, usable with non-OpenAI models.
Overview
Swarm was the experiment. This is the production version, and the design principle has held: enough features to be worth using, few enough primitives to learn in an afternoon. An Agent is a model with instructions and tools. Handoffs let one agent pass control to another. Guardrails validate what goes in and what comes back out. Sessions carry memory across turns. Tracing is built in. That is most of the surface area, and the restraint is the whole point.
April 2026 was the update that changed the calculus. Sandboxed execution shipped, giving agents an isolated environment for shell commands, file writes and package installs, alongside a configurable memory layer and snapshotting so a session can be saved and rehydrated later. MCP server support and AGENTS.md conventions mean tool definitions travel rather than being welded to one runtime. It also talks to more than a hundred non-OpenAI models through Chat Completions, so the lock-in worry is smaller than the name implies, though new capabilities reach Python well before TypeScript.
Where it stops is durability and orchestration. Nothing checkpoints, so a two hour agent run that fails at ninety minutes starts over, which is precisely why Temporal shipped a GA integration for this SDK in March 2026. Teams that need branching control flow and replayable state will still want LangGraph. Teams that need a clean tool-calling agent with guardrails and an audit trail should start here, accept the 0.x version number and keep an eye on the roadmap: Agent Builder was announced in October 2025 and deprecated by June 2026, which is fast even by this market's standards.
Key Features
- ✓ Four primitives and little else: Agents with instructions and tools, handoffs between agents, guardrails on inputs and outputs, plus Sessions for memory across turns
- ✓ Native sandboxed execution added in the April 2026 release, giving agents an isolated workspace for shell commands, file writes and package installs without touching the host
- ✓ An inspectable agent loop with configurable memory, snapshotting and rehydration, so you can see and replace exactly what the model receives each turn
- ✓ Provider agnostic in practice: Responses API, Chat Completions and more than a hundred third-party models
- ✓ MCP server support and AGENTS.md conventions, so tool definitions travel to other MCP-aware clients instead of being trapped in one runtime
- ✓ Realtime and voice agents including gpt-realtime-2.1, with function tool schemas generated from Python type hints
Where it holds
- • The abstraction tax is close to zero. You can read the whole library in an afternoon and there is no hidden prompt assembly sitting between you and the model.
- • Handoffs are a cleaner mental model for multi-agent work than most graph DSLs, and schema generation from type hints removes an entire class of tedious bugs.
- • Provider agnosticism is real rather than a README claim, which makes the lock-in objection weaker than the vendor name suggests.
Where it breaks
- • Still pre-1.0 at 0.22.0 in August 2026, roughly eighteen months after launch, and minor releases have broken working code.
- • The April 2026 sandbox and agent loop work landed in Python first with TypeScript to follow, so Node teams are running a lagging feature set.
- • Deliberately thin means no durability. There is no checkpointer, so a long run that dies is a long run you pay for twice unless you wrap it in something like Temporal.
- • OpenAI's agent product line has moved three times in eighteen months, from Swarm to AgentKit's visual builder to SDK-first, and Agent Builder going dark on 30 November 2026 is a fair warning about betting on the tooling around the library.
My Take
There is no durable state here, and that is the first thing to understand. You get agents, handoffs, guardrails and Sessions, then the library gets out of the way, which is a relief after a week spent inside a graph DSL. The April 2026 release added real sandboxes so agent-generated code runs in an isolated workspace instead of on your machine, and it drives more than a hundred non-OpenAI models through Chat Completions. Still 0.22.0 in August 2026 though, with TypeScript trailing Python on the newest primitives and Agent Builder going dark on 30 November, so wrap it in Temporal if the run has to survive a restart.
Quick Info
- Pricing:
- open-source
- Openness:
- Open source
- Licence:
- MIT
- Starting at:
- MIT-licensed and free. Your entire cost is model tokens plus any hosted tools the agent calls, and because it speaks the Chat Completions API it runs against 100-plus non-OpenAI models if you want to price shop. Budget for platform churn rather than for the library: OpenAI notified Agent Builder users on 3 June 2026 that the visual builder leaves the platform on 30 November 2026, naming the Agents SDK as the migration path for anything that should live as code. ChatKit is not part of that deprecation. Checked August 2026.
- Added:
- Aug 2026
- Updated:
- Aug 2026
Use Cases
Judge it on your own work
The notes above say where OpenAI Agents SDK holds and where it breaks. The fastest check is your own workload.
Visit website ↗Alternatives to OpenAI Agents SDK
LangGraph
open-sourceLow-level orchestration framework for stateful, long-running LLM agents, with checkpointing, human-in-the-loop pauses and a managed deployment tier through LangSmith.
AgentScope
open-sourceApache 2.0 agent framework from Alibaba Tongyi Lab's SysML team. Version 2.0 folded the separate Runtime project into the core, so sandboxing, agent serving and observability now ship as one...
LlamaIndex
freemiumOpen-source Python and TypeScript framework for RAG and agentic workflows, paired with LlamaCloud for document parsing, extraction and managed indexes.
OpenClaw
freeOpen-source AI agent framework for building autonomous AI systems that can interact with tools, APIs, and environments.