Dashboard

OpenAI Agents API Opens Up the Codex Harness

OpenAI's Agents API puts the Codex harness behind one API call, with hosted or bring-your-own sandboxes and no platform fee. What it replaces and what it really costs.

Michaela Zello
Michaela Zello
Product Marketing Manager
11 September 20261 min read

OpenAI Agents API Opens Up the Codex Harness

Two years ago the way to build an agent on OpenAI was the Assistants API, which was retired after never quite becoming the thing people built production systems on. The replacement arrived on 10 September 2026: the Agents API, now in public beta, which hands developers the same harness that runs Codex and lets OpenAI operate the loop.

The short version: you describe what the agent should do and which tools it may use, OpenAI runs the orchestration, the long-running session and the context management on its own infrastructure, and you pay for tokens and tools with no additional API fee on top.

What 'harness' means here

The agent loop is the unglamorous part of agent engineering and the part that eats months. Deciding when to call a tool, what to keep in context as a session grows, how to resume after a crash, where the code actually executes. Teams that have built this know it is most of the work and none of the differentiation. If you want the concept without the marketing, we covered what an agent harness is separately.

OpenAI's pitch is that you rent theirs. You keep control over what the agent is allowed to do and where its code runs; they run the coordination.

Hosted sandboxes, and the escape hatch

The second half of the announcement is execution environments. Inside an OpenAI-hosted sandbox an agent can run code, work with files and produce artifacts, and you can seed it with your own files, install packages and add skills. Sandboxes come with configurable CPU, GPU and memory, plus file and secret storage.

Crucially, the hosted sandbox is not the only option. OpenAI lists first-class integrations with outside sandbox providers, including Blaxel AI, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle Cloud, Runloop AI and Vercel, and supports running inside your own VPC. That matters more than it sounds. The reason a lot of teams never shipped an agent was not the model, it was that nobody would sign off on arbitrary generated code executing somewhere they could not audit. A VPC-deployed sandbox is the answer to a compliance question, not a technical one.

What it costs

No additional fees for the Agents API itself. You pay for the tokens and tools your agents consume, and OpenAI-hosted sandboxes bill at standard container rates on top, separately from model usage.

Zero platform fee is a real number and also an incomplete one. Agents are expensive because they are chatty, not because of per-call overhead: a long session re-reads its own context repeatedly, and the bill grows with the square of your patience. Before you leave one running on a schedule, set a ceiling. Our notes on setting spending limits for AI agents and on reducing AI API costs both apply here unchanged.

Whether this is your problem

If you are wiring an agent into a product and you have been maintaining your own loop, this is worth an afternoon. If you are building with an AI app builder and have never written a tool-call handler, this is infrastructure aimed one layer below you, and the right response is to note it and move on.

The pattern to watch is the one both OpenAI and Cursor moved on in the same week: orchestration is becoming a hosted product rather than something every team rebuilds. That is good for shipping speed and it quietly relocates a chunk of your architecture into someone else's runtime. Worth pricing that in alongside the zero platform fee. The API changelog is the place to watch as beta limits change, and our guide to keeping up with AI releases covers how to triage announcements like this without reading all of them.

How did this land?

About the author

Michaela Zello
Michaela Zello

Product Marketing Manager

Michaela translates releases into plain language. Launches, product insights, and the occasional strong opinion about roadmaps.

Share

Get the next post in your inbox

One email a month. Product updates, engineering posts, and the best of Built with Swarmz.

I agree to receive emails about AI building tips and Swarmz product news. Unsubscribe any time.