OpenAI has introduced the Agents API in public beta, extending the harness and infrastructure behind Codex and ChatGPT for Work to any developer who wants to build long-running cloud agents. The pitch is simple: one API call to create a production-ready agent by specifying the task, model, tools, and environment, with OpenAI hosting and maintaining the harness while the developer supplies the environment, tools, knowledge, and workflows.
What the API provides
The managed harness handles context, tool use, and subagent coordination. Recent harness improvements include automatic context compaction as a session approaches its limit, preserving the information an agent needs to continue without requiring developers to build their own compaction logic. Tool search loads relevant tool definitions on demand, reducing token usage and cost while preserving the model's cache. Programmatic tool calling lets agents run calls in parallel, chain related operations, and filter or combine results in code before bringing only the relevant results back into context.
The API also supports MCP, custom functions, and built-in tools such as web search. Multi-agent support lets a main agent break a complex task into independent pieces and delegate them to subagents that work in parallel, each with its own context, while the main agent coordinates the work and assembles the results.
Sandbox choices
Developers can choose the compute environment: an OpenAI-managed sandbox, their own infrastructure, or one of several sandbox partners. The OpenAI-hosted sandbox uses the same sandboxing infrastructure that powers Codex and ChatGPT, giving the agent a secure environment to run code, work with files, and produce artifacts. The API is available in public beta to all developers with no additional fees beyond the tokens and tools the agents use.
Early customer reports
OpenAI highlighted several early adopters. One financial-services company reported a 60% reduction in cost per case, lower latency, and improved token efficiency after migrating a case-review workflow, while maintaining existing performance. A company in the same sector said separating the agent harness from the sandbox reduced failed agent responses by 86%. Another user noted that the API handled bursty workloads well, letting them fan out work across hundreds of agents, run them asynchronously, and collect the results later without keeping infrastructure idle between peaks. Nash, which deploys thousands of long-running agents across global logistics networks, described the API as giving it the durable session and orchestration layer needed for agents operating continuously in production.
Why this matters
The Agents API is an attempt to make durable, production-oriented agents easier to build without every team reinventing harness logic, context management, and session recovery. For developers, the relevant trade-off is between faster setup and dependence on OpenAI's managed runtime. The questions that remain are how the beta evolves toward general availability, how the hosted sandbox compares with self-hosted options on cost and control, and whether the long-running agent pattern holds up at scale outside the early adopter stories OpenAI is highlighting.