OpenAI Agents API enters public beta, opens Codex coordination harness to all developers
OpenAI abstracted the internal Codex harness into a public API; a single call now launches persistent sessions running for hours across sandboxes, with execution environments supported on self-hosted infra or partners including Blaxel, Cloudflare, DigitalOcean, Oracle, Runloop, and Vercel.
On September 10, 2026, OpenAI moved the Agents API to public beta, opening up the same coordination harness that drives Codex to all developers. The API is organized around four core resources: an Agent that defines the model, instructions, tools, and MCP servers available to it; an Environment that is an optional sandbox or computer where files and commands run; a Session, a durable instance of an agent that works across turns; and Events and items that record inputs and outputs over the session's lifetime. The harness automatically provides session management, context compaction, subagent delegation, tool use, mid-task steering, and session resumption. Execution can take place in an OpenAI-hosted sandbox, in a self-hosted environment, or in a partner environment. OpenAI lists Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel as partners, with support for private networks, custom secret storage, and tunable CPU, GPU, and memory configurations tailored to cost and cold-start. OpenAI stresses that there is no separate Agents API platform fee: developers pay only for selected-model tokens, tool operations, and OpenAI-hosted sandbox compute. When a session approaches the context window limit, the harness automatically compacts earlier data while preserving key details. Tool search loads tool definitions on demand to curb token spend and protect cache memory. Programmatic tool calling lets agents execute calls in parallel, chain operations, and filter datasets in code. The API supports the Model Context Protocol, custom functions, and web search. The orchestration layer coordinates multi-agent delegation: a primary agent divides complex tasks into segments and assigns them to independent subagents running in parallel, each keeping an isolated context to prevent distraction before returning final outputs to the main coordinator. One caveat worth flagging: OpenAI's data controls page lists the Agents API as United-States-only residency and not eligible for Zero Data Retention, even when execution happens in a self-hosted sandbox.