OpenAI opened the Agents API to every developer on September 10, 2026, and the line that stopped me sat in the documentation rather than the announcement: data residency is United States only, and Zero Data Retention is not supported. I already run an agent loop on my own laptop — Claude Code on a schedule, writing files, calling scripts, touching nothing I have not read first. The OpenAI Agents API offers to lift that loop off my machine and run it as a managed service with no platform fee attached. Five checks decided how seriously I took the offer this week, and price was not the first one.
In this article
- What the OpenAI Agents API actually replaces
- Who runs the harness when the sandbox is mine
- Why a zero-fee API is not a cheap one
- Where US-only retention ends the conversation
- What stays on my laptop this month
The OpenAI Agents API Is Codex With the Wiring Removed
The OpenAI Agents API is the Codex harness sold as a service, and that is the whole pitch. OpenAI’s own guide describes it as access to the Codex harness through an OpenAI-managed API, with OpenAI handling sessions, orchestration, context compaction and recovery. You supply tools and an execution environment. Everything between the model call and the tool result — the loop most agent projects spend their first month rebuilding badly — now belongs to OpenAI.
Four objects carry the design, and they are worth knowing before judging the OpenAI Agents API on anything else:
- Agent — the model, its instructions, its tools and its MCP servers
- Environment — an optional sandbox where commands run and files live
- Session — a durable instance that keeps state across turns
- Events — the streaming inputs and outputs produced during a run
The environment is optional in name only. OpenAI’s documentation states that without one, the built-in Bash and apply-patch tools, workspace files and executor MCPs are all unavailable. An OpenAI Agents API call with no environment attached is a chat completion with better plumbing, which is not what anybody is here for.
OpenAI Runs the Harness Even When the Sandbox Is Mine
Self-hosting the sandbox does not mean self-hosting the agent, and this is the detail I expect most write-ups to blur. Under the self-hosted setup, you run codex exec-server inside your own environment — a laptop, a container, a remote box. That executor registers with a restricted API key, opens an outbound WebSocket, and then runs shell commands, reads and writes files and calls local MCP servers when the harness tells it to.
The harness is still OpenAI’s. Your machine becomes the hands; the decisions stay in their datacenter. That is a defensible engineering trade and it is also the opposite of what “self-hosted” usually signals to a one-person shop reading a feature list quickly.
The alternative environments are OpenAI’s own sandbox, the same infrastructure behind Codex and ChatGPT, or a partner: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel all ship setup guides. That partner list is the strongest signal in the launch. Nine infrastructure vendors do not write integration docs for a product they expect to stay small.
What I run today sits at the other end of that spectrum. My Claude Code automation executes the loop locally, and when my connection drops mid-task the process is still mine to inspect, kill or restart. With the OpenAI Agents API the loop survives my laptop closing, which is genuinely better — right up until the moment I want to know why it did something.
The OpenAI Agents API Adds No Fee and Still Is Not Free
There is no charge for the OpenAI Agents API itself, which is precisely why the bill is hard to forecast. Model usage bills at the selected model’s normal API rates, built-in tools at standard rates, and OpenAI-hosted sandboxes at standard container rates. Three meters, none of them flat.
The documentation examples run on GPT-6 Astra, and OpenAI’s pricing page lists that model at $10 per million input tokens and $50 per million output, with prompts above 272K input tokens charged at 2x input and 1.5x output for the whole request. A long agent session is, by construction, a long-context session.
A managed agent loop means the component deciding how many tokens I spend is the one component I cannot read.
That is the part I keep returning to. The harness summarizes earlier work automatically as a session approaches its context limit, so I never write compaction logic — and I also never see the policy that decides when to compact, how aggressively, or what gets dropped. On a task that runs for six hours, that policy is the difference between a two-dollar job and a forty-dollar one.
When I wrote about the checks I wanted before GPT-6 Astra reached wider release, my rule was that an upgrade has to clear roughly three times its cost before it replaces something already working. The OpenAI Agents API cannot be measured against that rule yet, because nobody outside OpenAI has published a full-session invoice.
US-Only Residency Ends the Conversation for Client Work
The residency terms settle this for me before any benchmark gets a vote. OpenAI’s documentation is direct: the Agents API currently supports data residency only in the United States and does not support Zero Data Retention. It goes further and says that choosing a self-hosted sandbox does not make the API eligible for ZDR either, which closes the obvious workaround before anyone tries it.
Every consulting contract I sign has language about where client material may be processed and how long it may persist. A retained session for an agent that has been reading a client’s files is a broader exposure than a retained chat transcript, because the session contains the file contents, the commands and the intermediate reasoning. That is why NDA-covered drafts already go to Ollama with Nous Hermes 4 on my own hardware rather than to any hosted endpoint.
None of this makes the OpenAI Agents API careless. Public beta terms get revised, and ZDR support has landed on other OpenAI surfaces after launch. It does mean the product ships today for teams whose data can sit in the US and be retained, and I am not one of them. The agent security rules I wrote for my own laptop start from what an agent can reach rather than what it can reason about, and a managed harness does not change that arithmetic.
What Stays on My Laptop This Month
Nothing moves, and the reasons are specific rather than reflexive. Claude Code keeps my file automation and this publishing system because the loop is local and legible. Google Antigravity stays in beta beside it. Claude keeps long-form strategy drafts, Perplexity keeps cited client research, and anything under NDA keeps running through Ollama.
Four things I will track before revisiting the OpenAI Agents API:
- Whether ZDR and non-US residency arrive before the beta label comes off
- Whether anyone publishes a full-session cost breakdown rather than a per-token rate
- Whether the compaction policy becomes inspectable or stays a black box
- Whether the nine partner sandboxes hold their integrations past the first quarter
The honest summary is that the OpenAI Agents API solves a problem I do not have. I am not rebuilding an agent loop; I am running one that works. The teams this was built for are the ones with a product to attach agents to and a US-resident data posture to attach them with, and for them the OpenAI Agents API removes a month of undifferentiated engineering in an afternoon.
For me, this is a bookmark rather than a migration. I will re-read the residency terms when the beta label drops, watch for the first independent write-up that includes a real bill, and keep my agent loop on hardware I can unplug. The managed version is better engineering than anything I would build alone — it is just not addressed to me yet.
Sources
- OpenAI — Introducing the Agents API
- OpenAI — Agents API overview
- OpenAI — Agents API architecture
- OpenAI — Self-hosted sandboxes
- OpenAI — API pricing
AI-assisted research and drafting. Reviewed and published by ToolMint.