OpenAI Agents API: Codex Harness Now in Public Beta
OpenAI opened its Agents API in public beta on Sept 10, putting the managed Codex harness behind one API call. What it does, how sandboxes work, and pricing.
OpenAI is trying to turn the plumbing behind its own coding agent into a product other developers can rent. On September 10, 2026, the company opened its Agents API in public beta to all developers, exposing the same managed harness that powers Codex — the orchestration layer that handles long-running sessions, context management, and recovery — behind a single API call. The pitch is that developers supply the tools and choose where the agent runs, and OpenAI runs everything in between.
What the Agents API actually does
An “agent,” in OpenAI’s framing, is a model that runs in a loop: it plans, calls tools, reads the results, and keeps going until a task is finished. Building that loop reliably is harder than it looks. A production agent has to keep a coherent session alive across many turns, decide what to keep in context and what to drop as the conversation grows past the model’s window, and pick itself back up when a step fails or a container dies mid-task.
The Agents API bundles that machinery. According to OpenAI, the service provides a managed Codex harness while the company handles session orchestration, context compaction, and recovery. That is the same set of problems OpenAI solved internally to ship Codex, its cloud software-engineering agent; the Agents API repackages the solution so outside developers do not have to rebuild it. Developers bring their own tools — functions the agent can call, plus OpenAI-provided tools — and select an execution environment.
The design point is division of labor. The developer owns the task definition and the tool surface; OpenAI owns the difficult, stateful middle. That is a meaningful shift from the earlier pattern, where teams stitched together their own control loops on top of raw model calls and re-implemented context management, retries, and state persistence themselves.
Sandboxes: hosted or bring-your-own
Agents built on the API run inside sandboxes — isolated environments where the model can execute code and use tools without touching the host system. OpenAI gives developers two paths. They can run agents in OpenAI-hosted sandboxes, fully managed by the company, or connect a sandbox from their own infrastructure or a supported provider.
The launch partner list for external sandboxes is long: OpenAI named Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel. That breadth matters for teams that need agents to run close to their existing data, inside a specific cloud, or under compliance rules that forbid sending workloads to a third party’s managed environment. Isolation is not just a convenience here — running model-generated code in a contained environment is a core safety control, a topic we cover in AI agent sandboxing explained.
Pricing: no toll on the API itself
OpenAI said the Agents API adds no fee of its own. Developers pay for model usage at the selected model’s normal API rates, plus standard charges for OpenAI-provided tools and for container usage. In other words, the harness is free; the compute it drives is not.
That structure is consistent with how OpenAI has been positioning its platform this year. The company has spent 2026 pushing prices down across its lineup — the GPT-5.6 family (Sol at $4 input / $20 output per million tokens, Terra at $2 / $12, and Luna at $0.20 / $1.20) is generally available, and the flagship GPT-6 Astra shipped on September 3 into the API, ChatGPT Work, and Codex. We wrote about the broader price pressure in OpenAI’s GPT-5.6 price cut and the AI price war and detailed the new flagship in the GPT-6 Astra launch. By making the orchestration layer free and billing only tokens and tools, OpenAI lowers the cost of committing to its stack while keeping the meter running on the part that actually consumes GPUs.
Why OpenAI is shipping this now
The Agents API arrives during what the industry has started calling “model fatigue” — a stretch in which OpenAI, Anthropic, Google, and Meta all shipped new models within days of each other. OpenAI released GPT-6 Astra on September 3; Anthropic followed with new coding and knowledge-work models; Meta and Google pushed updates of their own. OpenAI chief executive Sam Altman told CNBC that “we’re all moving to faster cadences,” attributing part of the acceleration to teams returning from summer.
But raw model quality is no longer the whole contest. The frontier labs are increasingly competing on the scaffolding around the models — the agent frameworks, tool protocols, and managed runtimes that determine how easily a capable model can be turned into a product. Anthropic has pushed hard on the Model Context Protocol and enterprise agent tooling; the industry has coalesced around emerging standards like the one we described in the ARD agent standard for enterprise AI. The Agents API is OpenAI’s answer: rather than publish a framework and let developers assemble it, OpenAI is offering the assembled system as a hosted service.
There is also a competitive lock-in dimension. Agents are stateful and long-running by nature; once a team builds on OpenAI’s session management, context handling, and recovery semantics, moving to a rival harness means re-engineering the hardest parts of the system. Managing that state — deciding what an agent remembers within a session and across sessions — is one of the field’s open problems, as we explored in AI agent memory: short-term vs. long-term.
The developer’s tradeoff
For most teams, the Agents API removes weeks of undifferentiated engineering. Session persistence, context compaction, and failure recovery are genuinely hard to get right, and OpenAI has already run this harness at scale inside Codex. The multi-provider sandbox support is the strongest signal that OpenAI understood the objection to a fully managed service — that developers do not want their agents’ execution locked to a single vendor’s environment — and built an escape hatch in from day one.
The tradeoff is that the control loop itself becomes a black box. Teams that need to inspect or customize how context is compacted, how retries are sequenced, or how sessions are checkpointed will have less visibility than they would with a framework they run themselves. And because billing flows through OpenAI’s models by default, the economics favor staying inside the OpenAI ecosystem even where the sandbox can live elsewhere.
What it means
The Agents API is a bet that the next phase of the AI platform war is about operations, not just intelligence. Model benchmarks are converging and prices are falling; the differentiator is increasingly how cheaply and reliably a developer can turn a model into a working agent. By giving away the orchestration layer and charging only for tokens, tools, and containers, OpenAI is trying to make its platform the default substrate for agent development — and to capture the recurring compute spend that agents, which run in loops and can burn tokens for minutes or hours per task, generate.
The winners, near term, are developers who have been hand-rolling agent infrastructure; they get to delete a large chunk of code and inherit a battle-tested runtime. The multi-cloud sandbox partners — Cloudflare, Vercel, Oracle, and the rest — win a share of execution workloads and a reason to stay in OpenAI’s orbit. The clearest loser is the standalone agent-framework category: open-source and commercial orchestration layers now compete against a free, hosted service from the company that also sells the models.
Watch three things next. First, whether Anthropic and Google respond with comparable managed harnesses, which would confirm that the runtime, not the model, is the new battleground. Second, how the “no additional fee” pricing holds up once real agent workloads — which can be far more token-hungry than chat — start driving bills. Third, whether enterprises trust a black-box control loop for production systems, or whether the demand for inspectable, self-hosted agent infrastructure grows in reaction. The public beta answers the “can OpenAI ship it” question; the harder question is who ends up owning the agent runtime layer for the rest of the industry.
Keep reading
Chisato · · 5 min read Massachusetts AI Safety Bill: Anthropic vs OpenAI
Anthropic backs strict Massachusetts AI safety rules while OpenAI and Google push a narrower version. Here's what the bill requires and why it matters.
Chisato · · 6 min read DOJ Backs OpenAI in NYT Copyright Case: Fair Use
The Justice Department told a federal judge that training LLMs on copyrighted text is fair use, citing national security. What the filing means for the AI copyright fight.
Chisato · · 4 min read McKinsey State of AI 2026: Agents Scale, Trust Lags
McKinsey's 2026 survey finds enterprises scaling AI agents from 27% to 40% of firms, with a third skipping software purchases to build in-house — but governance trails.