OpenAI Agents SDK 新增沙盒支持:定义 Agent 交付工作的标准方式 ✍ Jason Liu🕐 2026-04-16📦 11.4 KB 🟢 已读 𝕏 文章列表 文章介绍了 OpenAI 在 Agents SDK 中新增的一体化沙盒支持功能。作者通过对比早期的 Structured Outputs 和自定义 Shell 工具,阐述了内置原生工具在模型分布和性能上的优势。新功能通过分离编排层与计算层,利用隔离环境安全地处理代码执行、文件操作和浏览器自动化等任务,确保 Agent 能够交付可追踪、可恢复且安全的工作成果,如 PR、迁移和数据分析报告。 OpenAISandboxAgents SDKFunction Calling代码执行DevOps计算机使用安全隔离Agent开发 # Sandboxes are coming to the Agents SDK **作者**: jason liu **日期**: 2026-04-15T17:33:19.000Z **来源**: [https://x.com/jxnlco/status/2044469127696556153](https://x.com/jxnlco/status/2044469127696556153) ---  Today OpenAI is adding first-party sandbox support to the Agents SDK. Developers do not build agents just to answer questions. They build them to deliver work. And real work needs a place to happen: somewhere it can be tracked, resumed, inspected, and kept on course over time.  building agents By the end of this post, you'll understand: What it means for the Agents SDK to be in distribution. - We used to beg models for JSON until function calling gave us a real place to put it. - Built-in tools like shell work better than hand-rolled bash or shell lookalikes. - Compaction and memory are not prompt tricks. They work best when they are part of the harness. Why "everything is computer," but not every task needs one.Some tasks should stay lightweight. - Some tasks need files, processes, browsers, credentials, or persistent state. - Isolation matters when model-generated code can read files, run commands, or touch credentials. - Separating orchestration from compute lets you choose the right amount of computer for the job. How sandboxes help agents leave behind real work.Pull requests, migrations, and vibe-coded apps. - Data rooms turned into memos, spreadsheets, and evidence tables. - Artifacts like PDFs, decks, charts, and reports. - Browser workflows, app debugging, and computer use. - Autonomous research runs, including GPU-backed experiments. If you just want to see the docs, you can check them out here: https://developers.openai.com/api/docs/guides/agents/sandboxes ## What does it mean to be in distribution? Remember structured outputs before structured outputs? Structured outputs Before function calling, you had to beg for JSON. You asked for things in quotes, maybe in a code block, maybe in XML, maybe in something else, and then figured out where in the prompt you could stuff examples and all that good stuff. > "Please return only JSON in <json> tags. No commentary. No markdown. No explanation." I was one of the creators of Instructor, and a lot of that work came from thinking about what it means to be in distribution for the model. At the time, a lot of the work was basically about using function calling to trick the model into giving me JSON. Eventually we got function calling, which was the first time there was actually a place we could expect JSON. We used that heavily. Later, we got things like output schemas, and things got a lot better and a lot more reliable. There was less tricking the model and more using interfaces the model actually understood well. That is what I mean by being in distribution. Shell tool Being in distribution is also as simple as using the right tools. We now have our own batch of raw tools, our own compaction tools, and our own memory tools, and those have been reinforced into the system. That might sound like a small difference, but maybe we name our tool bash and somebody else names their tool shell. That can actually matter for performance. > With shell access, you can spend a lot of time debating whether the tool should be called run_command, bash, or shell, what the docstring should say, and how to prompt it to be more creative with piping, composition, and interacting with other Unix commands. A lot of that can be captured much more cleanly by using OpenAI's built-in shell capability instead. The point is not just convenience. The point is that the model already understands that tool shape better. Compaction and prompt caching On Twitter, I have seen a lot of people talk about how much they love Codex's ability to compact and keep going. Not only is it not a prompt trick, it is a real path in the harness, and it is in distribution to these models. The same thing applies to memory and prompt caching. Long-running agents need to carry state forward without replaying the whole world every turn, and prompt caching matters because it improves price performance. All of these things add up to incredibly good price performance across long-running tasks. It is not only about fitting more into context. It is about making the work cheaper, faster, and less brittle. Where is this headed? I'm not really sure, but I know that by using an in-distribution harness, you can see where the puck is going with us, rather than having to chase it from behind. ## Why is everything computer? There have been a lot of conversations lately about how coding agents are actually the precursor to a much broader set of knowledge-work skills. Code is the easiest way to learn this because it gives you a very concrete environment to act in. Coding Becomes Knowledge Work That can start with something as simple as running a Python script. Then it graduates to writing tools that call Playwrightto control a browser, generate Excel spreadsheets with common Python libraries like openpyxl or XlsxWriter, or generate slides that export to PDF and PowerPoint with Slidev. As things get even more advanced, computer use and browser use let the agent do even more, whether that is in a browser or its own Linux box. Separating orchestration vs compute That also does not mean every single task you want an agent to do needs to be provisioned with 2 GB of RAM. By separating the computer, or in this case the sandbox, from the agent orchestration layer, you get the benefits of using AI while still having the flexibility to mount a sandbox only when you need it. You can think without turning the laptop on every time. The computer is there when the work actually requires it. Isolation and security That separation matters for security too. You are much less likely to leak something like your OpenAI API credentials on the machine running the agent if the code is actually executing inside a separate sandbox. We effectively separate the brain and the hands. This matters because agentic code execution is not theoretical anymore. If the agent can read files, run commands, install packages, open browsers, and keep going over a long task, then the execution boundary becomes part of the product. You do not want that boundary to be an accident of whatever machine happened to run the agent loop. Some tasks need no sandbox. Some need one small workspace. Some are better served by many isolated workspaces. The important part is that the harness can decide what needs compute, while the sandbox defines what that compute is allowed to touch. ## What are the applications of sandboxes? The point of a sandbox is not just that the agent can run commands. The point is that the agent can leave behind work. The way I think about this is: what is the work that needs to get done, where does it need to get done, and what should the agent leave behind? Once you know the deliverable, it becomes much easier to scaffold the agent, build evals around it, and move forward. Code generation for pull requests, migrations, and vibe coding Code generation gets much more useful when the agent can work inside the repo instead of describing changes from the outside. Give it a real checkout, shell and filesystem tools, validation commands, and a resumable workspace where it can leave behind a patch or pull request. Sample prompt: > The repo is cloned at repo/. Read AGENTS.md, make the smallest safe change, run tests, and prepare a PR summary. If there is an app, serve it and use the browser to verify it. Data room extraction Data rooms are where a messy folder becomes a real work product. Mount the PDFs, spreadsheets, contracts, filings, or exports, then ask the agent to turn unstructured data into a memo, evidence table, workbook, risk register, or database. The workspace does not have to be local either: it can mount S3, Google Cloud Storage, Azure Blob Storage, or Cloudflare R2 and inspect only what it needs. Sample prompt: > Read everything in data-room/. Create output/customers.xlsx with two tabs: Contracts and Risks. Include source files for every row. Creating artifacts like PDFs, spreadsheets, and more Artifacts are the part I keep coming back to because the output of an agent does not have to be a string. It can be a spreadsheet, PDF, dataset, chart, report, PowerPoint, or folder of generated files, and skills make those outputs much easier to produce reliably. Sample prompt: > Use the Slidev skill to turn brief.md and figures/ into a short investor update deck. Write the source to output/deck/, export output/investor-update.pdf, and list the files created. Computer use and browser use for debugging A generated app is only really useful once someone can run it. If the sandbox can expose a port, the agent can build a Vite app, serve it, open it in a browser, click around, take screenshots, and fix what it sees. Sample prompt: > Use user.json and task.md to complete the browser workflow. Fill out the form, upload files from attachments/, stop if anything is ambiguous, then call mark_task_done with the confirmation number. Autonomous research, including GPUs Autonomous research needs somewhere to accumulate evidence, attempts, and intermediate results. The sandbox can hold data, scripts, logs, evaluation outputs, and a durable run ledger; compaction, memory, and resumability keep the work alive when it needs to fan out, pause, or continue later. Sample prompt: > Run a parameter-golf search over experiments/. Fan out GPU-backed candidates, write every attempt to runs/ledger.csv, keep the best valid runs in output/best-runs.json, and write a short memo on what mattered. ## Meeting you where you are today, taking you to where we will be tomorrow The thing I want you to take away is pretty simple: use the Agents SDK because it helps you build toward where agents are going, not where they are today. Build something that might not 100% work today and in five or six months, not only might that agent work, it might work well, because the capabilities underneath it keep getting better. You get those benefits because you are separating the harness from execution, investing in sandbox infrastructure, and using a harness that is in distribution to the models. That is why I keep coming back to the work you want to deliver, not just how the work gets done. If you build ambitiously, we will do our best to meet you where you are and help take you to where we all need to be. If you want to learn more about how customers are using it check out our blog: https://openai.com/index/the-next-evolution-of-the-agents-sdk/ ## 相关链接 - [jason liu](https://x.com/jxnlco) - [@jxnlco](https://x.com/jxnlco) - [51K](https://x.com/jxnlco/status/2044469127696556153/analytics) - [https://developers.openai.com/api/docs/guides/agents/sandboxes](https://developers.openai.com/api/docs/guides/agents/sandboxes) - [Playwright](https://playwright.dev/) - [openpyxl](https://openpyxl.readthedocs.io/) - [XlsxWriter](https://xlsxwriter.readthedocs.io/) - [Slidev](https://sli.dev/) - [https://openai.com/index/the-next-evolution-of-the-agents-sdk/](https://openai.com/index/the-next-evolution-of-the-agents-sdk/) - [Upgrade to Premium](https://x.com/i/premium_sign_up) - [1:33 AM · Apr 16, 2026](https://x.com/jxnlco/status/2044469127696556153) - [51.1K Views](https://x.com/jxnlco/status/2044469127696556153/analytics) - [View quotes](https://x.com/jxnlco/status/2044469127696556153/quotes) --- *导出时间: 2026/4/16 15:09:57*
O OpenAI Agents SDK 重大升级:Harness 与 Sandbox 架构分离 OpenAI 于 2026 年 4 月 15 日升级 Agents SDK,核心是将 Harness 和 Sandbox 做进 SDK 并实现架构分离。新架构将 Agent Loop 托管化,解耦计算与控制逻辑,支持 100+ 模型及多云 Sandbox 环境。对比 Anthropic 的工具箱路线,OpenAI 选择了全托管方案,降低开发门槛。 技术 › LLM ✍ Jason Zhu🕐 2026-04-17 OpenAIAgents SDKAgentAnthropicSandbox架构设计MCP开发工具
B BestBlogs 早报 · 07-29|MCP 无状态化与多智能体编排成本 本期早报探讨 MCP 协议的无状态核心变化与 Claude 的生产化接入,分析 Codex 与 ChatGPT Work 共用的执行框架差异,并审视多智能体并行中上下文搬运的隐性成本“编排器的税”。同时涵盖图工程、vLLM 商业化及 Uber 零增长架构等速览内容。 技术 › LLM ✍ ginobefun🕐 2026-07-29 MCPAgentOpenAI架构多智能体上下文Claude早报DevOps工程化
6 6 个检查项——手把手带你发布自己的 Agent 产品 文章探讨了将本地 Agent Demo 转化为可商业化产品的六大工程挑战:会话记忆持久化、工具调用沙箱隔离、调用链路追踪、模型成本控制、前后端一体化交付以及技术栈与框架的灵活性。作者以腾讯云 EdgeOne Makers 平台为例,演示了如何高效解决这些工程化难题,实现 Agent 应用的快速开发与部署。 技术 › Agent ✍ 泊舟🕐 2026-07-10 Agent开发EdgeOne Makers工程化部署ClaudeDevOps架构设计
角 角色重构——工程师从「写代码的人」变成「编排 Agent 的人」 本文探讨了在 AI 时代,工程师角色的根本性转变。通过 OpenAI、Spotify 等案例,指出工程师正从「写代码的人」转变为「编排 Agent 的人」。文章详细阐述了新角色的四个维度:设计约束、编写 Spec、构建 Harness 和审阅产出。团队结构也随之重组,从按技术栈分工转向按 Spec/Review/Harness 流程分工。 技术 › Harness Engineering ✍ SagaSu🕐 2026-07-09 AIAgent角色重构OpenAISpec工程师HarnessDevOps生产力
全 全网 Codex Skill 指南:精选资源与安装教程 本文系统梳理了 Codex 的 Skill 生态,指出安装核心 Skill(如 create-plan、gh-fix-ci)是将其从聊天机器人升级为工程团队的关键。文章汇总了必 Star 的官方与社区仓库,按场景(规划、CI/CD、测试、前端等)分类精选了神级 Skill,并提供了保姆级的安装与调用教程,最后分享了自定义 Skill 及进阶组合玩法,帮助开发者最大化利用 AI 编程工具。 技术 › Codex ✍ AYi🕐 2026-06-17 CodexOpenAIAIEngineeringSkill教程DevOpsCI/CD自动化工具效率编程助手
全 全网 Codex Skill 指南:精选、安装与进阶玩法 文章指出 Skill 是将 Codex 从聊天机器人转化为高效工程师团队的关键。作者整理了核心资源仓库、按场景分类的神级 Skill(如 create-plan、gh-fix-ci),并提供了保姆级安装教程与进阶组合技,帮助用户通过标准化的 SOP 提升开发效能。 技术 › Codex ✍ AYi🕐 2026-06-07 CodexSkillOpenAIAIagent工程化DevOps教程资源整理
普 普通人用Codex的第一个完整工作流 文章介绍了新手使用 Codex(AI 编程工具)时的正确姿势。作者指出新手常因将 Codex 视为“许愿池”而陷入不敢用的困境,并提出了一个完整的工作流:从看目录、定计划、执行小任务、跑验证、看 Diff 到自我 Review。文章强调不要急于求成,而应通过设定边界、交付小任务来建立信任,并提供了可直接复用的 Prompt 模板。 技术 › Codex ✍ Oldeng🕐 2026-05-25 AI编程工作流提示词DevOps最佳实践代码审查教学OpenAI
迁 迁移至 AGS 的云端开发工作流 作者分享了如何使用 AGS(Agent Git Service)替代 GitHub 作为主要开发环境的实践。通过将开发环境完全迁移至云服务器,结合 dev agent 和双驱动的交互模式,实现了无需本地依赖的高效开发工作流,并介绍了正在开发的 VAS(虚拟代理服务器)项目,旨在将该工作流整合到语音交互界面中。 技术 › Agent ✍ 郭宇🕐 2026-05-25 AGSDevOps云端开发WorkflowAgentOpenAICodex郭宇
O OpenAI Agent SDK 解析:Harness/Compute 分离架构 文章详细解读了 OpenAI Agents SDK 的新架构设计,即 Harness(可信层)与 Compute(计算层)分离模式。该架构将凭证管理与代码执行隔离,不仅解决了长时程 Agent 的安全与稳定性痛点,还实现了状态持久化、跨平台部署及简易审计,被视为企业级 Agent 开发的教科书级设计。 技术 › Agent ✍ 烟花老师🕐 2026-05-06 OpenAIAgentSDK架构设计安全隔离沙箱LLM开发工具Harness Engineering
C Codex CLI /goal 模式详解:OpenAI 官方 Ralph Loop 的自主迭代引擎 文章详细介绍了 OpenAI 在 Codex CLI v0.128.0 中引入的实验性功能 /goal。该功能基于 Ralph Loop 理念,使 Codex 能从单次对话转变为自主规划、持续迭代、自我修正的代理,直至完成高层次目标。文章对比了 /goal 模式与正常模式的区别,列举了适用场景如长周期重构和无人值守开发,并指出该模式能显著提升任务完成度和工程质量,但需注意 Token 消耗。 技术 › Codex ✍ 雪踏乌云🕐 2026-05-03 OpenAICodexAgent开发工具自动化Ralph LoopCLIAI编程迭代DevOps
C Codex 实测:7 个并行 25 分钟干完 3 天活 文章对比了作者每月 $600 的 AI 编程工具开销,重点评测了 OpenAI 的 Codex。结论显示,Codex 在资源消耗上远低于 Claude Code,且支持多路并行,大幅提升效率。作者详细介绍了安装配置、权限管理、任务分配策略及 Superpowers 等实用工具,指出除了爬虫逆向外,Codex 已完全具备平替 CC 的能力。 技术 › 工具与效率 ✍ 百年 AI×出海🕐 2026-05-03 AI编程CodexClaude Code工作流自动化效能提升DevOpsOpenAIGPT-5.5
O OpenAI开源Symphony:给每一个任务配一个永不下班的AI员工 OpenAI开源了Symphony项目,旨在解决AI Agent规模化管理的瓶颈。该系统将Linear任务看板转化为AI控制中枢,为每个活跃任务分配独立的Agent持续工作,直至交付。文章详细阐述了其架构、工作流及“管理任务而非Agent”的核心理念,标志着软件开发经济学在AI时代的变革。 技术 › Harness Engineering ✍ 向阳乔木🕐 2026-04-29 OpenAISymphonyCodexAI AgentLinearDevOps自动化工程效能开源