One thing that’s become clear as long-running AI agents move from demo to production: the plumbing is the hard part. Models have gotten capable enough. What kills most agentic workflows is context decay, tool sprawl, and the sheer overhead of keeping an agent on task for hours. OpenAI is betting that developers will pay to have someone else solve that. The company announced the Agents API in public beta on September 10, 2026, putting the same infrastructure behind Codex and ChatGPT for Work into developers’ hands through a straightforward API.
What the Agents API actually does
The core idea is simple: instead of building your own agent harness, you hand that job to OpenAI. A single API call lets you specify the model, tools, and environment, and OpenAI handles the rest. That includes context management across long sessions, subagent coordination, and tool routing. The API runs on the Codex harness, which is open source, so developers can inspect the logic even if they’re not running it themselves.
The API supports MCP, custom functions, and built-in tools like web search. Tool search loads only the relevant tool definitions when needed, which cuts token usage and keeps the model’s cache intact. Programmatic tool calling lets agents run calls in parallel, chain operations, and filter results in code before pushing them back into context. That last part matters a lot for agents working through large datasets or complex multi-step tasks.
Subagents and context compaction
Two features stand out as genuinely useful for production workloads. First, multi-agent support lets the orchestrating agent break a task into independent pieces and assign them to subagents running in parallel. Each subagent keeps its own context window, which means it stays focused instead of getting confused by unrelated work. The main agent pulls results together at the end. You configure this with a single flag and a concurrency limit. No custom orchestration code needed.
Second, automatic context compaction kicks in as a session approaches its context limit. The API compresses earlier context while preserving the information the agent needs to continue. For workflows that span multiple context windows, this is a significant quality-of-life improvement. Building your own compaction logic is tedious and error-prone, and most teams don’t do it well.
Environment options and infrastructure partners
The API gives developers three broad paths for compute. You can use OpenAI’s own hosted sandbox, which runs on the same infrastructure as Codex and ChatGPT. You can run on your own infrastructure. Or you can use one of OpenAI’s sandbox partners.
Those partners include:
- Blaxel, Cloudflare, and Vercel for teams with existing cloud infrastructure preferences
- Daytona, E2B, and Runloop for developer-focused sandbox environments
- DigitalOcean, Modal, and Oracle for specific CPU, GPU, and memory configurations
The hosted sandbox is the fastest path to getting started and is provisioned and managed entirely by OpenAI. It supports custom files, packages, skills, and plugins, so you can configure it to match what your agent actually needs.
Pricing and where this fits in the market
There’s no additional fee to use the Agents API itself. You pay for tokens and tools, the same as you would for any other OpenAI API call. That’s a straightforward model and removes one barrier for developers evaluating whether to build on this versus rolling their own solution.
The competitive context here is real. Anthropic has its own agent infrastructure thinking baked into Claude’s tool use and multi-agent design. Google is pushing hard on long-context models for similar use cases. But neither has shipped something this opinionated about the full infrastructure stack, from context management down to sandboxed execution environments. OpenAI is positioning the Agents API as managed infrastructure, not just a model endpoint, which is a different kind of product.
For developers already using Codex or building on OpenAI’s stack, adopting the Agents API is a low-friction upgrade. For teams that have built custom agent orchestration, the calculus is more interesting. If your homegrown harness is working, there’s no urgent reason to switch. But if you’re spending meaningful engineering time on context bugs, tool failures, or subagent coordination, this is worth a serious look.




