# OpenAI launches Agents API to run the Codex harness as a managed service

> Source: <https://runtimewire.com/article/openai-agents-api-managed-codex-harness>
> Published: 2026-09-10 19:50:23+00:00

# OpenAI launches Agents API to run the Codex harness as a managed service

**The public beta manages context and subagents while letting developers use OpenAI, partner, or self-hosted sandboxes.**

        By [Ryan Merket](/author/ryan-merket)
        · Published 

Primary source: [OpenAI Developers on X](https://x.com/OpenAIDevs/status/2098130570048045453)

## Why it matters

OpenAI is turning the software around its models into a managed platform, competing for the orchestration and compute spending that agent startups currently capture.

OpenAI launched the [Agents API](https://openai.com/index/introducing-the-agents-api/) on September 10th, putting the harness and cloud infrastructure behind Codex into a managed service for developers building long-running agents.

[https://x.com/OpenAIDevs/status/2098130570048045453](https://x.com/OpenAIDevs/status/2098130570048045453)

The API, available in public beta, coordinates model calls, tool use and context while an agent works. Developers specify a task, model, tools and execution environment, and OpenAI runs the agent loop on its infrastructure. The [OpenAI Developers account (@OpenAIDevs)](https://x.com/OpenAIDevs/status/2098130570048045453) described the pitch plainly: OpenAI will handle orchestration, long-running sessions and context management.

That moves OpenAI further into the infrastructure layer around its models. Developers have spent the past several years assembling agent loops from model calls, tool schemas, state stores, retry logic and sandbox providers. The Agents API packages much of that work behind one interface, giving OpenAI control over another consequential layer of the application stack.

OpenAI says developers can create an agent with a single API call. Its launch example assigns a model, connects an MCP server, enables as many as three concurrent subagents and gives the system an OpenAI-hosted environment. A session can preserve state between turns, delegate work and publish files from the sandbox as downloadable artifacts.

### OpenAI takes over the agent loop

The managed harness can compact earlier context as a session approaches its limit, preserving selected information so work can continue across multiple context windows. Tool search loads relevant tool definitions when needed, while programmatic tool calling can run operations in parallel and filter results before returning them to the model's context.

Multi-agent support lets a main agent break a task into separate assignments and send them to subagents running with their own context. The main agent then coordinates the results. That orchestration is useful for coding, research and analysis workloads where independent work can happen simultaneously, and it removes another piece of infrastructure developers would otherwise have to write and monitor.

The release extends a product direction OpenAI set in April, when it added native sandbox execution and a more capable harness to the [Agents SDK](https://openai.com/index/the-next-evolution-of-the-agents-sdk/). The SDK left developers responsible for operating the agent process. The new API offers OpenAI-operated sessions and infrastructure while retaining a choice of execution environments.

OpenAI is making that managed route more central as it retires earlier agent products. In June, OpenAI said Agent Builder and its Evals products would be removed from the platform after November 30th, directing code-based workflows toward the Agents SDK. The Agents API gives those developers a managed deployment option without returning to the visual workflow product OpenAI is winding down.

### Developers can choose where code runs

Developers can run agent code in an [OpenAI-hosted sandbox](https://developers.openai.com/api/docs/guides/agents-api/environments/openai-hosted), on their own infrastructure, or through an integrated sandbox provider. OpenAI named Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel as launch partners.

The separation between the harness and the sandbox is an important part of the design. OpenAI operates the model-facing loop, while developers can keep code execution and files inside their own infrastructure or virtual private cloud. Available configurations vary by provider and include different CPU, GPU, memory, file-storage and secret-storage options.

OpenAI's hosted sandbox can run code, install packages, work with supplied files and produce artifacts. Network access is enabled by default unless a template policy changes it, though developers can disable outbound access or restrict it to an allowlist. Files remain available across turns while the sandbox exists, and completed output artifacts remain downloadable after the sandbox expires. An inactive hosted sandbox can be deleted after one hour.

That flexibility still leaves OpenAI in the session path. The [Agents API documentation](https://developers.openai.com/api/docs/guides/agents-api/overview) says the service currently supports data residency only in the United States and does not support Zero Data Retention. Using a self-hosted sandbox does not make an Agents API workload eligible for Zero Data Retention, a material constraint for developers handling regulated or highly sensitive data.

OpenAI says there is no separate fee for the Agents API itself. Developers pay for model tokens and tools, while OpenAI-hosted sandboxes are billed at standard container rates with model usage charged separately. The distinction matters: OpenAI has removed a line item for orchestration, though running persistent agents still accumulates model, tool and compute costs.

The core Codex harness remains [open source](https://github.com/openai/codex), giving developers access to the logic that coordinates models, tools and context. OpenAI's commercial bet is that many teams will inspect that code and still prefer to pay OpenAI to operate it. The [quickstart](https://developers.openai.com/api/docs/guides/agents-api/quickstart) is available to all developers during the public beta.
