Overview
OpenAI Agents API is a cloud platform for building and running agents, launched in public beta on September 10, 2026 and open to all developers. Its core idea is to expose the same harness and infrastructure that power Codex through a single API call, with agents running in the cloud fully managed by OpenAI while developers focus on tasks, tools and workflows.
Creating a production-grade agent only requires specifying a task, a model (such as gpt-6-astra) and an environment. Three environment options are available: the OpenAI-managed sandbox (the same infrastructure behind Codex and ChatGPT, configurable with files, packages, skills and plugins), self-hosted deployment on your own infrastructure or VPC, and sandbox partners including E2B, Modal, Cloudflare, Vercel, Daytona, DigitalOcean and Oracle.
The underlying Codex harness is open source with its core logic on GitHub. Key capabilities include automatic compaction of long-session context, tool search that loads tool definitions on demand to cut token usage, programmatic parallel and chained tool calls (supporting MCP, custom functions and built-ins like web search), and subagents that split complex tasks into parallel execution with independent contexts.
Key Features
- One-call cloud agents: Specify a task, model and environment to create a production-grade agent; OpenAI maintains the harness so developers focus on tools and workflows.
- Three environment types: The OpenAI-managed sandbox, self-hosted infrastructure, and sandbox partners like E2B, Modal and Cloudflare cover most compliance and deployment needs.
- Long-session context management: Early context is automatically compacted as sessions approach the limit, supporting workflows that span multiple context windows.
- Tool search and programmatic calls: Tool definitions load on demand to reduce token cost, with parallel invocation, chained operations and result filtering across MCP, custom functions and built-ins like web search.
- Parallel subagents: Complex tasks are split across subagents running in parallel with independent contexts, coordinated and merged by the main agent.
- Open-source harness: Built on the open-source Codex harness on GitHub with auditable core logic and versioned access to new capabilities as models ship.
Use Cases
- Automated research and information processing: let cloud agents run ongoing collection, organization and summarization
- Customer service and operations automation: combine tool calls for ticket triage, data verification and workflow approvals
- Long-running data pipelines: cross-window compaction suits hour-scale batch jobs
- Multi-agent systems: subagents decompose complex projects in parallel while the main agent merges results
- Compliance-sensitive deployment: self-hosted or partner sandboxes keep execution inside your own VPC
Pros
- Reuses the battle-tested harness that powers Codex at production scale
- No platform fee, paying only for tokens and tool usage
- Managed, self-hosted and nine sandbox partners cover nearly every deployment need
- Tool search loads definitions on demand, significantly cutting token cost for long tool lists
- Subagent mechanisms parallelize complex tasks with clean context separation
- The open-source harness is auditable, avoiding black-box dependency
Pricing
The public beta is open to all developers with no platform fee; you pay only for tokens and tool usage consumed by agents. Early customer results: Ciridae raised evaluation scores from 0.71 to 0.85 with 4x lower latency, SafetyKit cut per-case cost by 60%, and Hypha reduced failed agent responses by 86%.
Summary
The Agents API marks the shift from assembling agent frameworks to consuming a managed agent platform. It opens the harness Codex hardened in production as an API, with context compaction, tool search and subagents working out of the box, and pricing that charges only for usage. For teams that want production-grade agents quickly, the barrier is now very low; the public beta is worth trying.
Version History
- OpenAI Agents API public beta: the Codex harness opens as a cloud agent API (2026-09-10): The harness and infrastructure behind Codex are exposed via a single API call, with agents fully managed in the cloud. Supports the OpenAI sandbox, self-hosting and partners like E2B, Modal and Cloudflare, with built-in context compaction, tool search, programmatic tool calls and parallel subagents; the harness is open source. The beta is open to all developers with no platform fee, billed per token and tool usage.