OpenAI launches Agents API public beta with Codex-grade harness
OpenAI just launched the public beta of its Agents API, giving developers access to the exact same harness and infrastructure powering Codex. You can spin up production-ready agents via a single API call with automatic context compaction, parallel subagents, and managed sandboxes at no added fee beyond standard token costs.

If you have tried building autonomous agents over the past year, you know the pain: managing runaway context windows, wrestling with sandbox environments, and spending weeks writing glue code just to coordinate two subagents.
OpenAI just launched its new Agents API in public beta, effectively opening up the internal harness and infrastructure that powers Codex and ChatGPT for Work to all developers.
Best of all, there are no extra platform fees attached to the API. You only pay for the underlying model tokens and tool usage.
The Codex harness in a single call
Instead of stitching together half a dozen libraries, developers can now spin up a production-ready agent in a single API call by specifying the task, model, tools, and execution environment.
OpenAI hosts and maintains the orchestration harness, while developers get flexible compute options. You can run agents inside an OpenAI-managed sandbox, inside your own infrastructure, or through partner networks.
For the partner ecosystem, OpenAI teamed up with providers including Cloudflare, DigitalOcean, Vercel, Modal, Daytona, E2B, Blaxel, Oracle, and Runloop. This lets teams pick their own CPU, GPU, memory, and cold-start profiles, or keep workloads within their own VPC.
Built-in compaction and parallel subagents
To make agents reliable across long sessions, OpenAI baked in several core optimizations learned from running Codex at scale.
The API features automatic context compaction, which compresses earlier conversation turns when a session approaches token limits without losing critical context. You no longer have to roll your own memory trimming scripts.
There is also tool search, which dynamically loads tool definitions only when needed. This saves token spend and protects the model cache from bloating. Agents can also chain programmatic tool calls in parallel and filter intermediate results before bringing them back into context.
For complex jobs, multi-agent support allows a primary agent to break tasks down and dispatch parallel subagents, each running with its own isolated context window. The system supports Anthropic-promoted MCP, custom functions, and built-in web search. The underlying Codex harness has also been made open source for inspection.
Why it matters
Building dependable, multi-hour agents has long been an engineering nightmare disguised as a prompt problem. By packaging battle-tested context compaction and sandbox isolation into a single managed endpoint, OpenAI is eliminating massive chunks of boilerplate code for developers.
The platform play here is clever. OpenAI is giving away the orchestration harness for free, partnering with external cloud providers instead of forcing developers into a walled garden, and open-sourcing the core logic. This makes it friction-free to adopt while capturing the real prize: massive token consumption from autonomous agent loops.
Still, teams should proceed with caution on the billing front. Long-running, multi-agent workflows with parallel subagents can burn through tokens at terrifying speeds if loops aren't tightly constrained. And while the harness itself is open, leaning heavily on OpenAI's proprietary agent abstractions makes switching to competing frontier models far more painful down the road.
Sources (1)
- openai.com(opens in a new tab)Originalopenai.com