OpenAI Opens Codex to All with New Agents API
OpenAI Opens Codex to All with New Agents API
OpenAI has quietly flipped the switch on its Agents API, a new service that turns the Codex harness into a REST endpoint. Developers can now spin up persistent AI agents that read files, run commands, and even delegate subtasks—all managed by OpenAI.
The core is a single endpoint: POST /v1/agents/sessions. You create a session, hand it a task, and OpenAI takes care of orchestration, context compression, and recovery. Your app supplies the tools and decides where the agent runs.
What You Get
The API revolves around four ideas: Agent (model + instructions + tools), Environment (a sandbox or your own machine), Session (a long-running instance), and Events (inputs and outputs). The managed harness can run code, connect to external data via MCP, and even spawn subagents. Multi-agent mode is just a flag away, with a cap on concurrent subagents.
Tools come in three flavors: programmatic tool calling, MCP over HTTP, and web search. Environments can be self-hosted or an OpenAI-managed sandbox.
The Fine Print: US-Only, No ZDR
Pricing follows the model you pick, plus standard tool fees and container rates for the sandbox. But there are two big caveats: data residency is limited to the US, and Zero Data Retention (ZDR) is not supported—even if you bring your own sandbox. SDKs cover Python, TS/JS, Go, Java, and Ruby, all under client.beta.agents.sessions.create(...).
Community Buzz: Lock-In or Convenience?
Developers are split. Some worry about vendor lock-in—handing session state and execution to OpenAI feels like a trap. Others see it as a time-saver: no more maintaining sandbox VMs. One tester found three network modes for the sandbox (enabled, disabled, restricted), and in restricted mode, external domains return "Domain forbidden." He also questioned billing: does each session spawn a new environment? Are environments billed for a minimum of an hour? Can you close them early to save cash?
The Bigger Picture
At its heart, the Agents API server-izes the Codex client's harness. It makes long-running, file-reading, task-splitting agents a first-class API for any backend. The trade-off? You give OpenAI your session state and execution environment. For teams that value speed over control, it's a tempting offer. For others, it's a lock-in they'd rather avoid.
Key Points:
- OpenAI launches Agents API, exposing Codex harness via REST
- Single endpoint:
POST /v1/agents/sessions - Managed sessions, sandboxes, and multi-agent support
- Data residency limited to US; no Zero Data Retention
- Pricing: model usage + tool fees + container rates
- Community divided on vendor lock-in vs. convenience