OpenAI Agents API Launches in Public Beta With Managed Codex Harness for All Developers
Codex orchestration infrastructure opens to all developers; US data residency limits apply in beta.

OpenAI on September 10, 2026 opened its Agents API to all developers in public beta, making the same managed orchestration infrastructure that runs Codex and ChatGPT for Work available as a first-class API primitive. For the first time, any developer can run a long-duration AI agent with automatic context management, parallel subagent delegation, and sandbox code execution without writing a single line of harness logic — and without paying any fee beyond standard model token and tool usage.
The Harness Problem That Developers Were Solving Themselves
For most of the past two years, shipping a production AI agent meant solving two distinct problems. The first was the model problem: which foundation model to use, and with what prompting approach. The second was the harness problem: how to keep an agent running for hours or days, what to do when the model's context window fills up, how to route tool calls efficiently, and how to spin up parallel workers when a task could be decomposed. The second problem consumed as much engineering time as the first for most teams.
The Agents API externalizes that second problem entirely. Developers specify the agent's model, instructions, tools, and compute environment in a session creation call; OpenAI manages everything else. The harness handling those details is the same one OpenAI uses internally for Codex, which now handles over two million weekly active users running tasks that can span hours per session.
How the Managed Harness Works
The Agents API organizes around four concepts: an agent (the model, instructions, tools, and MCP server connections), an environment (the sandbox where the agent executes code and writes files), a session (the durable stateful instance of the agent), and events (the streamed outputs the session produces). Once a session is created, the application submits tasks and receives events; the harness loop runs on OpenAI's infrastructure.
Three mechanisms inside the harness address the core problems of long-running agents.
Context compaction handles the context window ceiling that terminates most naive agent loops. As a session approaches its limit, the harness automatically summarizes earlier turns into a compact representation the agent can continue from. Developers building their own agent loops have to implement this summarization logic themselves; the Agents API makes it automatic and server-side. OpenAI's own benchmark testing found that retained reasoning and context compaction raised GPT-5.6 Sol's ARC-AGI-3 score from 13.3 percent to 38.3 percent while reducing output token consumption sixfold — a result demonstrating that harness design, not just model quality, can materially change agent outcomes. (The test was conducted using OpenAI's own Responses API rather than the benchmark's standardized evaluation environment; ARC Prize noted a methodological distinction in response.)
Tool search and programmatic tool calling address the token overhead of large tool catalogs. Rather than loading every available tool definition into every model context, the harness uses a tool search mechanism to load only relevant definitions as they are needed, preserving the prompt cache and reducing token costs. Programmatic tool calling then lets agents run multiple tool calls in parallel, chain operations, and filter results before returning them to the model context — keeping only what is relevant rather than dumping every tool result back into the conversation.
Multi-agent delegation allows the main agent to break a complex task into independent pieces and dispatch them to subagent sessions running concurrently, each with its own context. The main agent coordinates timing and synthesizes results when the subagents complete. Developers configure the maximum concurrency through a parameter — the API documentation shows examples with up to four concurrent subagents. This is what produced the results Ciridae, an early-access customer, described as a 4x latency reduction on subagent-heavy workflows after migrating from a custom orchestration system, along with an evaluation score improvement from 0.71 to 0.85. Those figures are company-supplied and have not been independently reproduced, but the mechanism is architecturally sound: serialized multi-step workflows can parallelize when steps are independent.
Read more: OpenAI Codex persistent mode raises long-running agent safety questions
Three Ways to Run the Harness
The Agents API supports three compute configurations. OpenAI-hosted sandboxes provision and manage the execution environment automatically — the same infrastructure that runs Codex cloud tasks — and are the fastest path to deployment. Self-hosted environments let organizations run agent compute on their own infrastructure while OpenAI manages the harness control plane. Nine ecosystem partners — Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel — offer first-class integrations covering hosted environments, VPC deployments, and configurations with different CPU, GPU, memory, cold-start, and cost profiles.
Pricing follows a transparent model: developers pay the selected model's standard API token rates, standard rates for OpenAI-built tools (web search, code interpreter), and container rates for OpenAI-hosted sandboxes. There is no additional harness or orchestration fee.
How This Compares to Alternatives
The Agents API is not the only managed agent harness available. Anthropic offers Claude Managed Agents as a comparable service — it provides full server-side orchestration including stateful sessions, event-based streaming, automatic compaction, and tool execution, with global data residency options including the European Union. Google's Vertex AI Agent Engine is the other principal managed alternative, offering similar session orchestration built around its Agent Development Kit. Neither service has published pricing benchmarks against the Agents API for equivalent workloads at the time of publication.
OpenAI's own Agents SDK — a distinct, open-source orchestration library — remains available for developers who prefer to host the orchestration loop inside their own application. The SDK preserves portability, allows use of non-OpenAI model providers, and gives developers full visibility into the agent loop with their own tracing and debugging tooling. The Agents API trades that control for simplicity: the loop runs on OpenAI's servers, which means compaction timing, tool call scheduling, and subagent lifecycle management happen where the developer cannot directly observe them.
For teams already running frameworks like LangGraph or CrewAI, the Agents API represents a different architectural philosophy rather than a direct replacement. Those frameworks prioritize provider flexibility and local observability; the Agents API prioritizes operational simplicity and automatic evolution with OpenAI's model releases. The announced co-evolution guarantee — that OpenAI will maintain and improve the harness alongside each model release, with developers getting harness improvements automatically — may be the strongest competitive differentiator if it holds through general availability.
The Limits That Matter Now
Two constraints define the current boundary of the public beta. First, the Agents API supports data residency only in the United States. This is not softened by the sandbox selection: choosing a self-hosted or partner sandbox does not move the API control plane outside the United States. For organizations operating in the European Union, in regulated industries with strict data locality requirements, or in markets where US-headquartered infrastructure creates compliance exposure, this is a hard blocker until OpenAI adds additional residency regions. The Agents SDK, the Responses API, or a self-hosted open-source harness are the currently available alternatives for those deployments.
Second, the Agents API does not support Zero Data Retention during public beta. Zero Data Retention, which causes prompts and completions to be discarded immediately after the API response without logging, is required by many enterprise security policies and by HIPAA-covered workloads. Both limitations are common in new API betas and may be addressed before general availability, but OpenAI has not announced a timeline.
There is also a structural tradeoff in observability that applies regardless of residency: teams that have built internal tracing, session replay, or audit tooling on top of their own agent loops will lose that layer when migrating to the Agents API unless they reconstruct equivalent coverage through the streaming events surface the API exposes.
The Infrastructure Battle Behind the API
The Agents API fits a recognizable pattern in infrastructure history: a provider operates a complex system at scale, discovers what it takes to make that system reliable in production, and then offers that operational knowledge as a managed service to third parties. The Codex harness was not designed as an API product — it was built to run Codex. OpenAI's decision to externalize it is a recognition that the harness is as valuable as the model to teams building serious agent applications.
By managing the harness server-side, OpenAI positions itself to own the orchestration layer regardless of which models developers eventually use — the harness could in principle serve as the coordination layer even as model providers multiply. The open-source codebase at github.com/openai/codex makes the harness inspectable, which addresses the transparency concern partially, but the managed service's control plane remains proprietary infrastructure. Whether the residency and Zero Data Retention limitations are resolved before general availability will determine whether the Agents API can fully displace custom harness implementations in the enterprise deployments where the economic stakes are highest.