Why This Matters
OpenAI is packaging the Codex agent harness into a managed API, taking over the hardest parts of agent infrastructure — session persistence, orchestration, context compaction and recovery — while developers supply tools and pick where code runs. That lowers the barrier to shipping long-running autonomous agents, but also deepens dependence on OpenAI's stack for the agent runtime, not just the model.
Key Takeaways
- The Agents API exposes OpenAI's Codex harness with OpenAI-managed sessions, orchestration, context compaction and recovery.
- Agents can run in a sandbox to execute code, edit files, connect to MCP servers and produce artifacts; developers choose the execution environment.
- Pricing is unbundled: standard model API rates, standard OpenAI tool rates, and container rates for OpenAI-hosted sandboxes.
The Agents API gives your application access to the Codex harness through an OpenAI-managed API.
OpenAI manages sessions, orchestration, context compaction, and recovery while your application provides tools and chooses its execution environment.
Agents can operate in a sandbox where they can execute code, edit files, connect to MCP servers, and produce artifacts.
Pricing
Model usage is billed at the selected model’s API rates. OpenAI tools use their standard rates, and OpenAI-hosted sandboxes use standard container rates.
Try an example
Try these complete examples:
Explore complete applications:
Incident response agent: investigate alerts and request approval for recovery actions.
Slack bot: investigate requests using connected workplace tools.
... continue reading