Will it run?
Products

OpenAI releases Agents API to public beta with same harness that powers Codex

By Marco Vane Clawpit staff
OpenAI releases Agents API to public beta with same harness that powers Codex

The company launched the Agents API into public beta yesterday (Thursday), giving developers access to the infrastructure that runs Codex without having to build it themselves. OpenAI hosts and maintains the harness — the orchestration layer that manages context, tools and sub-agents — while developers choose where the agent's compute runs: in OpenAI's managed environment, on their own infrastructure, or through one of the partners.

Four concepts and one session

The official documentation organizes the API around four components: Agent (the model, instructions, tools and MCP servers), Environment (an optional sandbox for files, skills and commands), Session (a durable instance that executes tasks and responds to input), and Events and Items (the inbound and outbound stream). A session proceeds in four stages: creation with a task, tracking via streaming or webhooks, then continuation to a new task or steering of the current turn. The example in the announcement demonstrates an incident-investigation agent created in a single call, using the gpt-6-astra model, an MCP tool for observability, and multi-agent support with up to three parallel sub-agents.

Three execution options, no sandbox required

The central architectural choice is the Environment. OpenAI offers a managed environment built on the Codex and ChatGPT sandbox infrastructure, configurable with files, packages, skills and plugins. A second option is self-hosted: run codex exec-server locally, register it with a scoped key and connect over WebSocket, with all connections outbound only. A third option is partners: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel are already integrated at the first-party level. The API also supports running without any sandbox at all.

What the harness handles on its own

OpenAI maintains the harness alongside the models, with a versioned release at every model launch. Three core capabilities: long sessions — the API automatically compresses prior context as the limit approaches, without the developer writing compression logic; efficient tool use — definitions are loaded only when needed (lazy loading), saving tokens and cost while preserving the model's cache; programmatic calls — enable parallel execution and chaining, and the agent filters or merges results in code so only relevant information returns to context. MCP, custom functions and built-in tools such as web search are supported. Multi-agent support lets complex tasks be split into independent sub-agents with separate context, while the primary agent coordinates and merges results.

Positioning against the SDK and Responses API

OpenAI's official comparison places three runtime options: the Agents SDK for developers who want full control in their own code, the Responses API for short one-off tasks, and the Agents API for long-running tasks that require managed infrastructure, automatic context compression and sub-agent orchestration. The company cites early customer results but has not published quantitative benchmarks or comparisons against open alternatives. Data is stored in the US only, and Zero Data Retention is not supported at this stage.