# OpenAI Opens Its Codex Agent Harness to Developers as a Public API

Page: https://hirantha.me/blog/openai-opens-its-codex-agent-harness-to-developers-as-a-public-api
Published: 2026-09-11
Written by: hirantha.me Newsroom (AI-generated). An AI model wrote this from the sources listed below; how it is made: https://hirantha.me/about/newsroom
Topics: openai, agents api, codex, ai agents, model context protocol

> OpenAI's new Agents API lets any developer rent the same session, tool and subagent infrastructure that runs Codex.

## The part of agent-building nobody wanted to write

Building a coding or task-completing AI agent has never really been about the model call. It is about everything around it: keeping a session alive for minutes or hours, deciding when to trim old conversation history so it fits the context window, retrying after a tool fails, and splitting a big job across several smaller agents that report back to a coordinator. OpenAI has been running that machinery internally to power Codex, its coding agent, and ChatGPT for Work. On September 10, it opened public beta access to that same machinery as a standalone product: the Agents API.

## What the API actually hands over

Rather than a new model, the Agents API is a managed harness. A developer supplies the tools an agent should have and picks where its work should run; OpenAI's service handles session state, orchestration between steps, compressing earlier turns once a conversation nears its token limit, and recovering a session after an interruption.

The feature set includes:

- **Sandboxed execution** for running code and editing files during a task.
- **Model Context Protocol (MCP) support**, so an agent can connect to external tool servers using the same open standard Anthropic introduced for Claude.
- **Multi-agent delegation**, letting a top-level agent split a task and hand pieces to subagents that work independently.
- **Automatic context compaction**, so long-running sessions do not simply fail once they exceed a model's context window.
- **On-demand tool loading**, which only pulls in a tool's definition when the agent is actually about to use it, cutting the token overhead of listing every available tool up front.

Developers choose where the sandboxed compute actually runs: inside an OpenAI-hosted sandbox, on their own infrastructure, or through one of nine launch partners: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel. That range of options matters for teams with existing infrastructure commitments, since it means adopting the Agents API does not necessarily mean moving workloads onto OpenAI's own servers.

## Pricing and availability

There is no separate subscription or platform fee for the Agents API itself. Costs come from three places already familiar to OpenAI API users: the tokens the underlying model consumes, any tool calls made, and compute time on whichever sandbox option is chosen. The beta is live for all developers, though data residency is currently limited to the United States, a detail worth flagging for teams outside the US, including in South Asia, that have their own data-handling requirements and cannot yet route agent sessions through a local region.

## Early results, according to OpenAI

OpenAI's own announcement cites two named early adopters. Ciridae reported its evaluation score rising from 0.71 to 0.85 after switching to the Agents API, alongside a fourfold reduction in latency, crediting easier orchestration of subagents compared with the setup it had built by hand. SafetyKit reported a 60 percent reduction in cost per case handled. Those figures come from OpenAI's own case studies rather than independent benchmarks, so they describe what happened for those two companies, not a general performance guarantee.

## Why this matters beyond OpenAI's own ecosystem

Until now, teams that wanted a Codex-style long-running agent had two options: use OpenAI's own products directly, or reimplement the session management, retry logic and context trimming themselves on top of a raw model API. Most serious agent frameworks in the wild, whether built in-house or on top of open-source tools, spend a large share of their code on exactly that plumbing. By productizing it, OpenAI is effectively competing with the growing field of third-party agent-orchestration frameworks and libraries, not just with rival model providers.

The on-demand tool loading feature is a smaller detail worth noting on its own. As agents are given access to more MCP servers and tool sets, listing every available tool's full definition in every request burns tokens before the agent has done any work; loading definitions only when a tool is actually about to be called keeps that overhead from scaling with the size of an agent's toolbox.

## What it means in practice

For a team already building on OpenAI's models, the Agents API removes a real engineering cost: the orchestration layer that most agent projects end up building and then maintaining indefinitely. It is worth prototyping against, especially for anything that already needs multi-step tool use or subagents. Teams standardizing on Anthropic's MCP for tool connections can plug those same servers in, since the Agents API supports the protocol rather than a proprietary alternative. The tradeoff is coupling more of an application's runtime behavior to OpenAI's infrastructure and pricing, which is worth weighing against the time saved before committing a production system to it.

## Questions

**What is OpenAI's Agents API?**
It is a public-beta service, launched September 10, 2026, that gives developers hosted access to the same session, orchestration and subagent infrastructure that powers OpenAI's Codex coding agent.

**How is it different from just calling the regular OpenAI API?**
The regular API answers individual model requests, while the Agents API manages an entire long-running task: keeping session state, compacting old context automatically, retrying after failures, and coordinating subagents, work a developer would otherwise have to build themselves.

**Does it support tools built for other AI systems?**
Yes, it supports the Model Context Protocol (MCP), the open standard for connecting AI agents to external tools that Anthropic originally introduced, so existing MCP tool servers can be reused.

**What does it cost?**
There is no separate platform fee; usage is billed through standard model token rates plus charges for tool calls and sandbox compute time, based on OpenAI's published pricing.

**Where does the agent's code actually run?**
Developers choose: an OpenAI-hosted sandbox, their own infrastructure, or one of nine launch partners including Cloudflare, Vercel, Oracle, Modal and E2B.

## Sources

- [OpenAI Launches the Agents API in Public Beta, Putting the Codex Harness Behind One API Call](https://www.marktechpost.com/2026/09/10/openai-launches-the-agents-api-in-public-beta-putting-the-codex-harness-behind-one-api-call/), MarkTechPost
- [Agents API](https://developers.openai.com/api/docs/guides/agents-api/overview), OpenAI API Docs
- [OpenAI's Agents API Kills the Orchestration Layer Developers Hate Building](https://alphasignal.ai/news/openai-s-agents-api-kills-the-orchestration-layer-developers-hate-building), AlphaSignal
