OpenAI Agents SDK升級,提供沙盒執行與自訂harness,助開發者建構長時程Agent
AI 語音朗讀 · Edge TTS
OpenAI Agents SDK升級,提供沙盒執行與自訂harness,助開發者建構長時程Agent。
OpenAI於2026年4月15日發布Agents SDK更新版,針對現有框架從原型到生產的權衡(如模型無關框架未充分利用前沿模型能力、模型供應商SDK缺乏harness可見度、管理型Agent API限制執行環境與敏感資料存取),推出標準化基礎設施,讓Agent能安全檢視檔案、執行指令、編輯程式碼,並處理長時程任務。
harness升級強化Agent迴圈
Agents SDK的harness更適合處理文件、檔案與系統的Agent,新增可配置記憶體、沙盒感知協調、類似Codex的檔案系統工具,以及與前沿Agent系統常見原語法整合,包括:
- 透過MCP的工具使用
- 透過skills的漸進式揭露
- 透過AGENTS.md的自訂指令
- 使用shell工具的程式碼執行
- 使用apply patch工具的檔案編輯
harness持續融入新Agent模式,讓開發者少花時間更新核心基礎設施,多聚焦領域特定邏輯;它對齊前沿模型的最佳執行模式,提升長時程或跨多工具系統任務的可靠性和效能,避免偏離模型自然運作模式。
原生沙盒執行支援自訂環境
Agents SDK原生支援沙盒執行,讓Agent在受控電腦環境中存取所需檔案、工具與依賴;開發者可自帶沙盒,或使用內建支援如Blaxel、Cloudflare、Daytona、E2B、Modal、Runloop與Vercel。
引入Manifest抽象描述Agent工作空間,可掛載本地檔案、定義輸出目錄,並從AWS S3、Google Cloud Storage、Azure Blob Storage、Cloudflare R2等儲存提供者引入資料,從本地原型到生產部署皆一致;這為模型提供可預測工作空間,維持長時程任務組織。
分離harness與運算提升安全與擴展
將harness與運算分離,假設提示注入與資料外洩風險,將憑證排除在模型生成程式碼執行的環境外。
- 提升耐久性:外部化Agent狀態,即使沙盒容器遺失也能透過內建快照與再水合,從最後檢查點在新建容器恢復。
- 強化擴展:單一或多沙盒、僅需時呼叫沙盒、將子Agent路由至隔離環境、跨容器平行化加速執行。
客戶回饋與實際應用
測試客戶Oscar Health的員工工程師暨AI技術領袖Rachael Burns表示:「更新Agents SDK讓我們將關鍵臨床記錄工作流程自動化,過去方法無法可靠處理;不僅提取正確中繼資料,還精準理解長複雜記錄中各就診邊界,加速了解患者每次就診狀況,提升會員照護體驗。」
定價可用性與未來規劃
新功能對所有API客戶通用可用,按token與工具使用計標準API定價。
Python版率先推出TypeScript支援,未來新增程式碼模式與子Agent;持續擴展沙盒提供者、整合與插件方式,減少自訂基礎設施,保留開發者對環境的彈性控制。
Build long-running agents with more control over agent execution.
— OpenAI Developers (@OpenAIDevs) April 15, 2026
New capabilities in the Agents SDK:
• Run agents in controlled sandboxes
• Inspect and customize the open-source harness
• Control when memories are created and where they’re stored pic.twitter.com/zPyuLup6b6
Bring your own environment.
— OpenAI Developers (@OpenAIDevs) April 15, 2026
The Agents SDK now supports sandbox execution with providers including @Cloudflare, @Vercel, @modal, @e2b, and more.
Keep files, credentials, and execution state in your environment while passing approved context to the model. pic.twitter.com/oVaJ3GtESx
Improve agent performance with a harness that keeps long-running agents on track.
— OpenAI Developers (@OpenAIDevs) April 15, 2026
It manages the agent loop across tools, context, and traces. The sandbox preserves working state across pauses, retries, and resumptions. pic.twitter.com/UlApucIwDa
Customize the Agents SDK to fit your stack.
— OpenAI Developers (@OpenAIDevs) April 15, 2026
Use it out of the box, or adapt the models, tools, instructions, and orchestration logic your agent needs.
The Agents SDK capabilities are available to all API customers.https://t.co/zAKInNclhX
