OpenAI Agents SDK
The OpenAI Agents SDK is OpenAI's open-source (MIT-licensed) framework for building agents and multi-agent workflows in Python and TypeScript. Its documentation describes it as "a production-ready upgrade of our previous experimentation for agents, Swarm", built on a deliberately small set of primitives: agents, handoffs (or agents used as tools) and guardrails, with sessions, tracing, Model Context Protocol support, sandbox agents, realtime and voice agents, and human-in-the-loop approval layered on top. As of October 6, 2026 the latest Python release on GitHub is v0.23.1, dated October 2, 2026. The SDK remains pre-1.0, and minor releases have carried behaviour changes.
Core Primitives
| Primitive | What it does |
|---|---|
| Agents | "LLMs equipped with instructions and tools"; the SDK runs the loop of model call, tool execution and continuation. |
| Handoffs / agents as tools | Let an agent delegate to another agent, either by transferring the conversation or by calling the other agent as a tool and keeping control. |
| Guardrails | Validate agent inputs and outputs; a triggered tripwire raises an exception and halts the run. |
| Sessions | Maintain conversation history automatically across runs, with pluggable storage. |
| Tracing | Records LLM generations, tool calls, handoffs, guardrails and custom events for every run. |
The stated design goals are "enough features to be worth using, but few enough primitives to make it quick to learn" and sensible defaults that can be customized.
Guardrails come in three kinds. Input guardrails check the initial user input and apply to the first agent in a chain; output guardrails check the final output of the last agent; tool guardrails wrap individual function tools and can skip a call, replace its output or raise a tripwire. Input guardrails run concurrently with the agent by default for latency, which means the agent may begin work before a tripwire fires; a blocking mode runs them to completion first.
Sessions are backed by SQLite out of the box, with documented backends for Redis, SQLAlchemy-supported databases, MongoDB, Dapr state stores and OpenAI's Conversations API, plus wrappers that add encryption with a time-to-live or Responses-API compaction to another backend.
Tracing is enabled by default and exports to OpenAI's backend. It can be disabled by environment variable, in code or per run, and redirected or duplicated to third-party processors; the documentation lists integrations including Weights & Biases, Arize Phoenix, MLflow, Braintrust, LangSmith and Langfuse. Tracing is unavailable to organizations operating under a Zero Data Retention policy with OpenAI.
Sandbox Agents
The largest 2026 addition is Sandbox Agents, introduced as a beta feature in version 0.14.0. A SandboxAgent gives the model "a persistent workspace where it can search large document sets, edit files, run commands, generate artifacts, and pick work back up from saved sandbox state." A Manifest declares the files, repositories, directories and mounts present when a session starts, and built-in capabilities supply shell access, filesystem editing, image inspection, skills, memory and compaction.
Execution is delegated to a sandbox client, which separates the agent loop from the machine that runs its commands. The documented clients are a Unix-local client, Docker, and hosted providers Blaxel, Cloudflare, Daytona, E2B, Modal, Runloop and Vercel. The local client is intended for trusted development only: the documentation warns that on Linux it "adds no OS-level confinement to commands" and directs untrusted workloads to Docker or a hosted sandbox. The same decoupling of harness and compute is described under agent sandbox and managed agents.
MCP and Tools
Tools fall into three groups: Python or TypeScript functions, MCP servers, and tools hosted by OpenAI. For MCP the SDK supports four connection modes: hosted MCP tools, where the whole tool round-trip runs on OpenAI's infrastructure; Streamable HTTP servers the application connects to itself; stdio servers launched as local subprocesses; and the older HTTP-with-SSE transport, which the documentation flags as deprecated by the MCP project and recommends only for legacy servers. Approval policies (always, never, or per tool), static and dynamic tool filtering, and tool-list caching are built in. Approval policies put a human in the loop before a consequential tool call.
Languages and Model Support
The Python package requires Python 3.10 or newer. The separate TypeScript SDK (openai-agents-js, also MIT) supports Node.js 22 or later, Deno and Bun, with Cloudflare Workers support labelled experimental, and covers the same concepts including sandbox and realtime agents. Although the SDK is built around OpenAI's Responses API, the Python README describes it as provider-agnostic, with support for more than 100 other LLMs. Features that depend on OpenAI infrastructure, such as hosted tools and hosted MCP, do not carry over to other providers.
Notable 2026 Changes
From the project's release notes and GitHub releases:
- 0.14.0 — Sandbox Agents introduced (beta), with local and containerized backends and memory support.
- 0.15.0 — model refusals surface as a
ModelRefusalErrorinstead of empty output. - 0.16.0 and 0.17.0 — sandbox boundary hardening, including rejection of symlinks pointing outside archives.
- 0.19.0 — a programmatic tool-calling tool for Responses models.
- 0.20.0 (August 11, 2026) — default model changed to
gpt-5.6-luna; MCP v2 support added with v1 compatibility retained; resumable input staging. - 0.21.0 (August 15, 2026) — moved to version 3 of the OpenAI Python library.
- 0.22.0 (August 19, 2026) — tool output rejected by an output guardrail is replaced with fixed withheld text; failed or incomplete Responses calls raise errors.
- 0.23.0 (October 1, 2026) — configurable MCP listing page limits, opt-in Docker removal protection for sandboxes, and further hardening of streaming callbacks and nested agent state.
Default models and failure semantics have both changed within 2026, so pinning versions and reading release notes before upgrading is advisable. For a side-by-side with Google's framework see OpenAI Agents SDK vs Google ADK.
Further Reading
- OpenAI Agents SDK documentation — OpenAI, 2026
- openai-agents-python repository — GitHub, 2026
- openai-agents-python releases — GitHub, October 2026
- Release process and changelog — OpenAI Agents SDK documentation, 2026
- Sandbox agents quickstart — OpenAI Agents SDK documentation, 2026
- Sandbox clients — OpenAI Agents SDK documentation, 2026
- Model Context Protocol (MCP) — OpenAI Agents SDK documentation, 2026
- Guardrails — OpenAI Agents SDK documentation, 2026
- Tracing — OpenAI Agents SDK documentation, 2026
- openai-agents-js repository — GitHub, 2026