OpenAI has opened the OpenAI Agents API in public beta, giving developers access to the managed Codex harness for building and running long-lived AI agents, according to OpenAI’s announcement.
The API handles the parts of an agent system that usually become an infrastructure project: session state, orchestration, context compaction and recovery. Developers choose the model, tools and execution environment, while OpenAI runs the harness.
OpenAI Agents API handles the agent loop
The API supports OpenAI-hosted sandboxes, a developer’s own infrastructure and environments supplied by partner providers. OpenAI lists Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel as ecosystem partners.

The environments can provide different CPU, GPU, memory, storage and networking arrangements.
Developers can connect MCP servers, custom functions and built-in tools such as web search. Tool search loads definitions when they are needed, while programmatic tool calling lets an agent run calls in parallel and return only the useful results to its context.
Long-running sessions and parallel agents
The managed harness automatically compacts earlier context as a session approaches its limit. That lets an agent continue across multiple context windows without developers building their own summarisation system.
Multi-agent support allows a primary agent to delegate independent tasks to subagents working in parallel. Each subagent keeps its own context, with the main agent coordinating the results. Investing.com reports that Ciridae raised its evaluation score from 0.71 to 0.85 and cut latency fourfold while using the API for subagent workflows.
The API itself has no additional fee during the beta. Developers pay for model tokens, tools and OpenAI-hosted container usage at the applicable rates. OpenAI says it plans to refine the service before general availability.
For UAE developers, the execution choices are useful for teams that need to keep workloads in their own infrastructure or VPC. OpenAI’s documentation currently lists data residency as US-only and says the Agents API does not support Zero Data Retention, so regulated workloads need that limitation considered before deployment.
The Agents API is separate from the open-source Agents SDK: OpenAI runs the harness for the API, while teams operate the SDK and its orchestration themselves. The open-source Codex harness remains available for inspection, which is a little more visibility than a black box usually offers.
What is the OpenAI Agents API?
It is a managed API that gives developers access to the Codex harness for running long-lived agents with tools, sessions and sandbox environments.
Does the OpenAI Agents API have a separate fee?
No. OpenAI says developers pay for model tokens, tools and OpenAI-hosted container usage at the applicable rates.
Can developers use their own infrastructure?
Yes. Developers can connect self-hosted infrastructure, a VPC deployment or a supported sandbox provider.


















