Stackmaven
Launch Published 27d ago ·

OpenAI's Agents API puts the Codex harness behind one call, and the runtime becomes the layer it wants to own

OpenAI's Agents API, now in public beta, exposes the harness that runs Codex: context compaction, tool orchestration, and subagent coordination as a managed service. It offloads the agent loop developers were building, and shifts that runtime onto OpenAI.

By Stackmaven

OpenAI opened its Agents API to all developers in public beta on September 10, and the notable part is not another model. It is the harness. The API exposes the same runtime that powers Codex and ChatGPT for Work: the machinery that manages context, calls tools, and coordinates subagents across a long-running task. For the past two years, that loop has been the part teams wrote and rewrote themselves. OpenAI is now offering to run it for you, and to version it alongside each model launch.

The harness, not the model, is the product

An agent in the API is four pieces: an Agent (a model, instructions, tools, and MCP servers), an optional Environment (a sandbox for file access and command execution), a Session (a durable instance that carries a task and its inputs), and the Events and Items that flow in and out. A single call opens a session against gpt-6-astra by default. Underneath, OpenAI handles the parts that make long-running agents hard: automatic context compaction so a session does not blow its window, a tool-search step that holds token usage down when an agent has many tools, programmatic tool calling for parallel execution, and native multi-agent coordination. Those are the exact problems agent frameworks have been competing to solve. Moving them server-side, behind one endpoint, reframes the harness as the product and the model as a component inside it.

Your sandbox, OpenAI’s orchestration

The compute story is more open than the runtime. An agent’s Environment can run on OpenAI-hosted sandboxes, on your own infrastructure, or on one of nine partners with first-class integrations: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel. That split matters. You can keep code execution on infrastructure you already trust and audit while OpenAI orchestrates the loop above it. Pricing follows the same shape: there is no separate Agents API fee, you pay for tokens, tools, and container time. For teams already on Cloudflare, Vercel, or Modal, the sandbox an agent runs in can be the platform they are already billing against, which lowers the cost of trying it.

What the beta does not do yet

The release ships with real constraints. Data residency is US-only, and there is no Zero Data Retention support yet, which rules the current beta out for teams with strict data-handling or regional requirements. The deeper tradeoff is architectural. Adopting the Agents API means the orchestration layer, the compaction strategy, the tool routing, and the subagent logic live inside OpenAI and change when OpenAI versions them. The Agents SDK that OpenAI already offers is a client-side framework you run and can inspect. The Agents API is the same idea moved server-side as a managed service, which trades some control and portability for not having to maintain the loop.

What it means for developers

The practical question is whether the harness you have built is a liability or an asset. If your agent loop is undifferentiated plumbing, context management, retries, and tool dispatch, then handing it to a maintained runtime removes a class of bugs you were unlikely to win at, and lets you follow OpenAI’s harness improvements without a rewrite at each model launch. If your loop encodes something specific to your product, your own routing, evaluation, or recovery logic, the managed runtime is a weaker fit, and the lock-in is the cost you feel later. The compute-partner model softens that by letting you keep execution on your own infrastructure, but the orchestration decision is the one that is hard to reverse.

What to watch

The signals worth tracking over the next quarter are whether OpenAI adds Zero Data Retention and non-US residency, which would open the API to regulated teams currently shut out, how portable an agent built against this harness proves to be if a team wants to leave, and whether independent testing, rather than OpenAI’s customer examples, which the company does not present as independent benchmarks, shows the managed harness beating a hand-rolled loop on real workloads. The model race gets the headlines, but the runtime is where the next round of lock-in is being drawn. Stackmaven’s follow-up will revisit around December 14.

Sources cited
  1. Introducing the Agents API (OpenAI) openai.com
  2. OpenAI Launches the Agents API in Public Beta, Putting the Codex Harness Behind One API Call (MarkTechPost) www.marktechpost.com
esc