OpenAI's Agents API: the Codex harness behind one API call
The orchestration, compaction, subagents and sandboxes you'd have hand-built are now a hosted service — you pay only tokens, tools and container time.

Copy markdown
What you stop building
The Agents API bundles session orchestration, automatic context compaction for long runs, on-demand tool search, and subagent delegation behind one endpoint — the same Codex harness OpenAI runs internally. If you've been hand-rolling agent loops, retries, and crash recovery, that code becomes a managed service you call instead of maintain.
Nine sandbox partners, or bring your own
Agent code runs inside an Environment — an isolated sandbox for files, skills, and shell commands. OpenAI ships its own hosted sandbox plus self-hosted VPC, and plugs into Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel. You decide where untrusted agent commands actually execute.
Priced as usage, not a platform tax
There's no separate Agents API fee: you pay for model tokens, the tools your agent calls, and sandbox container time. That simplifies the build-vs-buy call — unless you already run orchestration and sandboxing at scale, the hosted harness undercuts maintaining your own.
The receipts (vendor numbers)
Early users report real deltas: Ciridae saw a 4x latency drop on subagent flows and an eval score climb from 0.71 to 0.85; Hypha cut failed agent responses by 86% after splitting work across subagents; SafetyKit shaved 60% off cost per case. All vendor-supplied, so read them as directional, not benchmarks.
Build this weekend: an agent you can close your laptop on
A Session is a durable instance — it keeps working and survives disconnects, so a long research or refactor job won't die with your process. Point it at a hosted sandbox, hand it MCP tools, and you've got a crash-surviving background agent in roughly one API call. Anthropic shipped its own managed-agents equivalent the same day, so the pattern is now table stakes across labs.