The next evolution of the Agents SDK
TL;DR · AI 摘要
OpenAI 升级 Agents SDK,提供原生沙箱执行、文件操作和长周期任务支持,强化安全与可扩展性。
核心要点
- 新 SDK 支持代理在受控沙箱中操作文件、运行命令和编辑代码
- 分离执行引擎与计算环境,提升安全性、持久性与扩展能力
- 专为 OpenAI 模型优化的原生代理框架,优于通用或托管方案
The next evolution of the Agents SDK | OpenAI
[](http://openai.com/)
Log inTry ChatGPT(opens in a new window)
- Research
- Products
- Business
- Developers
- Company
- Foundation(opens in a new window)
Try ChatGPT(opens in a new window)Login
OpenAI
Table of contents
April 15, 2026
The next evolution of the Agents SDK
The updated Agents SDK helps developers build agents that can inspect files, run commands, edit code, and work on long-horizon tasks within controlled sandbox environments.
Loading…
Share
We’re introducing new capabilities to the Agents SDK(opens in a new window) that give developers standardized infrastructure that is easy to get started with and is built correctly for OpenAI models: a model-native harness that lets agents work across files and tools on a computer, plus native sandbox execution for running that work safely.
For example, developers can give an agent a controlled workspace, explicit instructions, and the tools it needs to inspect evidence:
#### Python
1# pip install "openai-agents>=0.14.0"23import asyncio4import tempfile5from pathlib import Path67from agents import Runner8from agents.run import RunConfig9from agents.sandbox import Manifest, SandboxAgent, SandboxRunConfig10from agents.sandbox.entries import LocalDir11from agents.sandbox.sandboxes import UnixLocalSandboxClient121314async def main() -> None:15 with tempfile.TemporaryDirectory() as tmp:16 dataroom = Path(tmp) / "dataroom"17 dataroom.mkdir()18 (dataroom / "metrics.md").write_text(19 """# Annual metrics2021| Year | Revenue | Operating income | Operating cash flow |22| --- | ---: | ---: | ---: |23| FY2025 | $124.3M | $18.6M | $24.1M |24| FY2024 | $98.7M | $12.4M | $17.9M |25""",26 encoding="utf-8",27 )2829 agent = SandboxAgent(30 name="Dataroom Analyst",31 model="gpt-5.4",32 instructions="Answer using only files in data/. Cite source filenames.",33 default_manifest=Manifest(entries={"data": LocalDir(src=dataroom)}),34 )3536 result = await Runner.run(37 agent,38 "Compare FY2025 revenue, operating income, and operating cash flow with FY2024.",39 run_config=RunConfig(40 sandbox=SandboxRunConfig(client=UnixLocalSandboxClient()),41 ),42 )43 print(result.final_output)444546if __name__ == "__main__":47 asyncio.run(main())48
Developers need more than the best models to build useful agents—they need systems that support how agents inspect files, run commands, write code, and keep working across many steps.
The systems that exist today come with tradeoffs as teams move from prototypes to production. Model-agnostic frameworks are flexible but do not fully utilize frontier models capabilities ; model-provider SDKs can be closer to the model but often lack enough visibility into the harness; and managed agent APIs can simplify deployment but constrain where agents run and how they access sensitive data.
Here’s what some of the customers who tested the new SDK with us had to say:
Oscar Health Actively LexisNexis FurtherAI Thomson Reuters Zoom Tomoro AI
“The updated Agents SDK made it production-viable for us to automate a critical clinical records workflow that previous approaches couldn’t handle reliably enough. For us, the difference was not just extracting the right metadata, but correctly understanding the boundaries of each encounter in long, complex records. As a result, we can more quickly understand what's happening for each patient in a given visit, helping members with their care needs and improving their experience with us.”
— Rachael Burns, Staff Engineer & AI Tech Lead, Oscar Health
A more capable harness for the agent loop
With today’s release, the Agents SDK harness becomes more capable for agents that work with documents, files, and systems. It now has configurable memory, sandbox-aware orchestration, Codex-like filesystem tools, and standardized integrations with primitives that are becoming common in frontier agent systems.
These primitives include tool use via MCP(opens in a new window), progressive disclosure via skills(opens in a new window), custom instructions via AGENTS.md(opens in a new window), code execution using the shell(opens in a new window) tool, file edits using the apply patch(opens in a new window) tool, and more. The harness will continue to incorporate new agentic patterns and primitives over time, so developers can spend less time on core infrastructure updates and more time on the domain-specific logic that makes their agents useful.
The harness also helps developers unlock more of a frontier model’s capability by aligning execution with the way those models perform best. That keeps agents closer to the model’s natural operating pattern, improving reliability and performance on complex tasks—particularly when work is long-running or coordinated across a diverse set of tools and systems.
In addition, we realize each product is unique and rarely fits neatly into a mold. We designed Agents SDK to support this diversity. Developers get a harness that’s turnkey yet flexible—making it easy to adapt it to their own stack—including tool use, memory, and sandbox environment.
Native sandbox execution
The updated Agents SDK supports sandbox execution natively, so agents can run in controlled computer environments with the files, tools, and dependencies they need for a task.
Many useful agents need a workspace where they can read and write files, install dependencies, run code, and use tools safely. Native sandbox support gives developers that execution layer out of the box, instead of forcing them to piece it together themselves.
Developers can bring their own sandbox or use built-in support for Blaxel, Cloudflare, Daytona, E2B, Modal, Runloop, and Vercel.
To make those environments portable across providers, the SDK also introduces a Manifest abstraction for describing the agent’s workspace. Developers can mount local files, define output directories, and bring in data from storage providers including AWS S3, Google Cloud Storage, Azure Blob Storage, and Cloudflare R2.
This gives developers a consistent way to shape the agent’s environment from local prototype to production deployment. It also gives the model a predictable workspace: where to find inputs, where to write outputs, and how to keep work organized across a long-running task.

Separating harness from compute for security, durability, and scale
Agent systems should be designed assuming prompt-injection and exfiltration attempts. Separating harness and compute helps keep credentials out of environments where model-generated code executes.
It also enables durable execution. When the agent’s state is externalized, losing a sandbox container does not mean losing the run. With built-in snapshotting and rehydration, the Agents SDK can restore the agent’s state in a fresh container and continue from the last checkpoint if the original environment fails or expires.
Finally, it makes agents more scalable. Agent runs can use one sandbox or many, invoke sandboxes only when needed, route subagents to isolated environments, and parallelize work across containers for faster execution.
Pricing and availability
These new Agents SDK capabilities are generally available to all customers via the API and use standard API pricing, based on tokens and tool use.
What’s next
As we continue to develop the Agents SDK, we’ll keep expanding what developers can build with it, making it easier to bring more capable agents into production with less custom infrastructure, while preserving the flexibility and control developers need to fit agents into their own environments.
The new harness and sandbox capabilities are launching first in Python, with TypeScript support planned for a future release. We’re also working to bring additional agent capabilities, including code mode and subagents, to both Python and TypeScript.
In addition, we want to help bring the broader agent ecosystem together over time, with support for more sandbox providers, more integrations, and more ways for developers to plug the SDK into the tools and systems they already use.
Author
OpenAI
Keep reading

Codex now offers pay-as-you-go pricing for teams Product Apr 2, 2026

Powering Product Discovery in ChatGPT Product Mar 24, 2026

Introducing GPT-5.4 mini and nano Company Mar 17, 2026
Our Research
Latest Advancements
Safety
ChatGPT
- Explore ChatGPT(opens in a new window)
- Business
- Enterprise
- Education
- Pricing(opens in a new window)
- Download(opens in a new window)
Sora
API Platform
- Platform Overview
- Pricing
- API log in(opens in a new window)
- Documentation(opens in a new window)
- Developer Forum(opens in a new window)
For Business
Company
Support
More
Terms & Policies
(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)
OpenAI © 2015–2026 Manage Cookies
English United States