The Codex Harness, Offered as an API
On September 10, 2026, OpenAI released the Agents API as a public beta for all developers. It is a managed service for building and running cloud agents. The selling point is reuse. Developers get the same harness and sandbox setup that runs Codex and ChatGPT for Work. The harness handles context, tool use and subagent work. OpenAI hosts it, and the core harness code is open source in the openai/codex repository.
The owner asked us to look at a ChatGPT Agents API. This is the product that name points to. Our score is 7.8 out of 10. It counts five criteria and skips user sentiment, since no review site rates the API yet.
OpenAI Agents API Facts Developers Ask For
- Launch: September 10, 2026, public beta.
- Fee: none for the API itself; tokens and tools billed at API rates.
- Hosted sandbox sizes: 1, 2 or 4 vCPU with 1, 4 or 16 GB of memory.
- Partner sandbox hosts: nine named providers.
- Idle hosted sandboxes can be deleted after one hour.
Sources Behind This Review
| Fact | Detail | Source |
|---|---|---|
| Launch, features, customers | Codex harness, subagents, compaction, partner hosts | OpenAI launch post |
| Hosted sandbox details | Sizes, network modes, artifacts, idle timeout | OpenAI-hosted sandbox docs |
A Session From Call to Output
OpenAI’s launch example walks through one session.
- Create a session with one call. It names the model, the tools, the environment and the task input.
- Attach tools. These can be MCP servers over HTTP, your own functions or built-in tools such as web search.
- Pick an environment. Options are OpenAI’s hosted sandbox, your own machines or a partner sandbox.
- The harness sends tool calls into the sandbox and returns results. Your app receives events as the work runs.
- As the session nears the context limit, the service compacts older context so the agent can keep going.
- If multi-agent work is on, the main agent splits the job and hands parts to subagents. The example caps this at three running at once.
- The agent writes findings to an output folder. Files in that folder stay available after the sandbox closes.
Harness Features OpenAI Lists
Long Sessions and Compaction
OpenAI says agents can run reliably for days. Compaction keeps what the agent needs and drops the rest. Developers can chain work across many context windows without writing their own compaction code.
Subagents
With multi-agent mode, each subagent gets its own context. You set how many can run in parallel.
Tool Search
The agent loads tool definitions only when it needs them. OpenAI says this cuts token use and cost without breaking the model’s cache.
Programmatic Tool Calling
Agents can call tools in parallel, chain steps and filter results in code. Only the relevant output goes back into context.
Versioned Harness
Each model release brings matching harness features. The launch example names a model called gpt-6-astra.
Where the Code Actually Runs
The hosted sandbox is a Linux workspace with Python, Node.js and command-line tools. Work happens in a folder called /workspace.
| Size | vCPU | Memory |
|---|---|---|
| small | 1 | 1 GB |
| medium (default) | 2 | 4 GB |
| large | 4 | 16 GB |
You can preinstall Python, system or npm packages with pinned versions. Files stay between turns while the sandbox lives. Anything saved in /workspace/outputs becomes a fixed artifact when a turn ends and can be downloaded later.
Teams that want their own compute can self-host, including inside a VPC. The launch post also names nine partner sandbox hosts: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel. OpenAI notes they differ in cold start, CPU and GPU options and cost.
What Teams Pay
The Agents API carries no fee of its own. You pay for the tokens your chosen model uses and for the tools the agent calls. The hosted sandbox docs say sandboxes bill at the standard container rates shown under built-in tools on OpenAI’s API pricing page. We did not see a dollar figure on the two pages we opened, so check that pricing page before you budget. Partner sandboxes bill through the partner. Self-hosted compute is your own cost.
Cost Levers in the Design
Three features aim at cost. Tool search keeps unused tool definitions out of context. Programmatic tool calling trims what goes back to the model. Compaction keeps long sessions from growing without limit. SafetyKit, one launch customer, reports a 60% drop in cost per case.
Network, Secrets and Data
Hosted sandboxes have three network modes.
- Enabled: outbound access allowed. This is the default unless a template sets otherwise.
- Disabled: no outbound access.
- Restricted: only named hosts, from 1 to 100 exact host names with no wildcards.
Stdio MCP servers that OpenAI hosts need the enabled mode. Secrets should sit in vault credentials so real values stay outside the sandbox. The API rejects reserved names such as PATH and OPENAI_API_KEY as variables.
The two pages we opened do not state data retention periods, regions or Zero Data Retention terms for the Agents API. Ask OpenAI about those before you send customer data through it.
Beta Rough Edges to Expect
- It is a public beta. OpenAI says it will keep changing it on the way to general release and gives no date.
- A hosted sandbox can be deleted after one hour with no activity or keep-alives. That timeout cannot be changed.
- Closing an event stream does not cancel a task. Delete the session to stop it.
- A 409 error during setup means you should retry a few times.
- Save outputs before you delete a session.
- Agents run on OpenAI models only.
Launch Customers and What They Report
OpenAI lists eight early users. Hypha cut failed agent responses by 86% after splitting the harness from the sandbox. Ciridae saw its evaluation score rise from 0.71 to 0.85 and subagent latency fall fourfold. Nash.ai runs thousands of long agents for delivery networks. Dwelly spreads work over hundreds of agents with no idle servers between peaks. These are vendor-reported figures.
Who Gains and Who Can Skip It
Product teams building research, coding or back-office agents that run for a long time gain the most. They skip building a loop, a sandbox and compaction. Startups already on E2B or Daytona can keep that host and plug it in as the environment.
Some teams need several model vendors in one agent. Others need fixed retention terms today. Both may want to wait for general release or use an open framework.
OpenAI Agents API Next to Agent Frameworks and Sandboxes
| Tool | What you get | Entry price |
|---|---|---|
| OpenAI Agents API | Hosted Codex harness plus sandbox choice | No added fee; tokens and tools |
| OpenAI Agents SDK | Python framework you run yourself | Free open source; pay for tokens |
| Google ADK | Open framework in five languages | Free; hosting from $0.085 per vCPU-hour |
| E2B | Sandboxes billed by the second | Free Hobby tier; Pro $150 a month plus usage |
| Daytona | Fast sandboxes on CPU or GPU | Pay as you go with $200 free compute |
How the API Reached 7.8
Autonomy and integrations score highest. Long sessions, subagents, MCP and nine sandbox hosts are all built in. Pricing scores well because usage carries no extra fee. Setup is fine for developers but still a beta. Trust is the lowest mark, since the pages we read did not cover retention or certifications.
Questions Developers Ask About the Agents API
Is the Agents API the Same as the Agents SDK?
The launch post does not compare them. The SDK is a framework you run. The Agents API is a hosted service that runs the Codex harness for you.
Do I Have to Use OpenAI’s Sandbox?
No. You can use the hosted sandbox, your own machines or one of nine partner hosts.
How Long Can an Agent Run?
OpenAI says days. A hosted sandbox needs activity or keep-alives, or it can be deleted after an hour.
Can I Block the Agent From the Open Web?
Yes. Set network access to disabled, or to restricted with up to 100 allowed hosts.
What Does It Cost on Top of Tokens?
Nothing for the API. Hosted sandboxes and tools bill at the rates on OpenAI’s pricing page.
Is It Generally Available?
No. It is a public beta open to all developers.




User Reviews
Nobody has rated it here yet. Be the first AI Agents Choice user to rate OpenAI Agents API.