# OpenAI Agents API

OpenAI's managed Codex harness, exposed as an API for long-running agents

**Verdict: conditional.** OpenAI's Agents API is the runtime OpenAI itself rates lowest in integration effort of the three it compares: it exposes the managed Codex harness with durable sessions, context compaction, subagents and hosted or partner sandboxes, and charges no fee beyond tokens, tools and container time. Conditional because it is a public beta that currently offers US-only data residency and no Zero Data Retention. Right for product teams already building on the OpenAI API; wrong for workloads that require ZDR or data residency outside the US. Last verified 2026-10-15.

The OpenAI Agents API, released in public beta to all developers on September 10, 2026, gives an application access to the Codex harness through an OpenAI-managed API. OpenAI runs the agent loop on its own infrastructure, coordinating model calls, tool use and context, and handles session orchestration, context compaction and recovery. The API is organised around four concepts: an Agent (the model, instructions, tools and MCP servers available to it), an optional Environment (a sandbox or computer where the agent accesses files, loads skills and runs commands), a Session (a durable instance of an agent that works on tasks and responds to input) and the events and items exchanged during a session. Sessions can stream progress, continue work across turns, connect developers' own tools and MCP servers, and delegate subtasks to subagents. Agents can run in an OpenAI-hosted sandbox, in a self-hosted sandbox, or with no sandbox, and OpenAI names Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel as sandbox partners. On September 29, 2026 OpenAI added computer use to the API: agents can complete tasks in an OpenAI-hosted browser, with website access approvals and sign-in handled by your application. OpenAI's changelog adds three October changes: on October 9, 2026 OpenAI-hosted sandboxes can be pre-warmed before they are attached to a session, and hosted sandbox compute is now billed during active turns; on October 16, 2026 OpenAI added Ultrafast mode to the Agents API and said hosted sandboxes now include the Artifact SDK and skills for creating and editing spreadsheets, presentations and Word documents. OpenAI's own runtime comparison rates its integration effort Low, against Medium for the Agents SDK and High for the Responses API. Requests require the OpenAI-Beta: agents=v1 header and an application API key granted api.agents.read, api.agents.write and api.responses.write scopes, and the quickstart shows Python, JavaScript, Go, Java, Ruby and cURL. OpenAI charges no additional fee for the API itself: model usage bills at the selected model's API rates, OpenAI tools at their standard rates, and OpenAI-hosted sandboxes at standard container rates. It currently supports data residency only in the United States and does not support Zero Data Retention.

## Strengths

- Long-running tasks where OpenAI manages the agent and saves its progress, which is the use OpenAI's runtime comparison assigns to the Agents API
- Shipping an agent without building the loop: OpenAI handles session orchestration, context compaction and recovery on its own infrastructure
- Code execution and file work in an OpenAI-hosted sandbox, in your own infrastructure, or with a partner sandbox such as E2B, Modal, Daytona or Vercel
- Extending agents with your own tools and MCP servers, plus skills loaded from the environment
- Splitting complex work across subagents, which OpenAI's docs describe as breaking work into subtasks and delegating to subagents
- Teams already on OpenAI API billing, since OpenAI says there are no additional fees beyond the tokens and tools agents use
- Workloads that require Zero Data Retention, which the Agents API currently does not support
- Data that must stay outside the United States, since data residency is currently supported only in the US
- Production systems that cannot absorb beta changes: it launched as a public beta and every request requires the OpenAI-Beta: agents=v1 header
- Keeping the agent loop inside your own application, a use OpenAI's runtime comparison assigns to the Agents SDK, which runs inside your application
- Budgeting from token prices alone, since OpenAI-hosted sandboxes bill separately at standard container rates, and since October 9, 2026 that sandbox compute is billed during active turns

## Pricing

- Model: paid
- Public beta: Usage-based, no platform fee

Website: https://developers.openai.com/api/docs/guides/agents-api/overview

## Sources

- [OpenAI Developer Community, Introducing the Agents API and hosted sandboxes (official)](https://community.openai.com/t/introducing-the-agents-api-and-hosted-sandboxes/1396481)
- [OpenAI API changelog, 5 November 2026 (GPT-6 Cyber)](https://developers.openai.com/api/docs/changelog)
- [OpenAI API docs, agents runtime comparison (official)](https://developers.openai.com/api/docs/guides/agents)
- [OpenAI API pricing](https://developers.openai.com/api/docs/pricing)
- [OpenAI Agents API overview](https://developers.openai.com/api/docs/guides/agents-api/overview)
- [OpenAI API docs, Agents API quickstart (official)](https://developers.openai.com/api/docs/guides/agents-api/quickstart)

Canonical: https://neomanex.com/directory/openai-agents-api
