OpenAI Unveils Agents API in Public Beta: Bringing Scalable AI Agent Infrastructure to All Developers
OpenAI has released its Agents API in public beta, offering developers access to the robust, scalable infrastructure powering ChatGPT Work and Codex for building sophisticated AI agents.

In a significant move poised to reshape how developers build and deploy intelligent automation, OpenAI officially launched its Agents API in public beta on September 10, 2026. This release opens up the sophisticated agent infrastructure that has been internally powering products like ChatGPT Work and the Codex programming assistant, making it accessible to a broader developer community. The Agents API aims to abstract away much of the complexity involved in orchestrating long-running, multi-step AI agents, allowing developers to focus on the core logic and unique capabilities of their applications rather than the underlying plumbing.
The announcement underscores OpenAI's commitment to democratizing advanced AI capabilities and accelerating the development of autonomous systems. With this API, developers can now tap into a managed service that handles session management, context compaction, tool utilization, and multi-agent orchestration – critical components for building robust and reliable AI agents that can operate for extended periods. This marks a pivotal moment for enterprises and startups alike, as the barrier to entry for creating powerful, production-ready AI agents is substantially lowered.
1. The Core Offering: Codex Harness as a Managed Service
At the heart of the new Agents API is the battle-tested 'Codex harness,' the same underlying architecture that enables OpenAI's advanced coding assistant and other agentic features within ChatGPT. Historically, building a truly effective AI agent involved piecing together numerous components: a robust agent runtime, mechanisms for context and session management, integrations for various tools and external data sources, and reliable execution environments. This often led to significant engineering overhead, with developers spending more time on infrastructure than on the agent's actual problem-solving capabilities.
OpenAI's Agents API fundamentally shifts this paradigm by offering the Codex harness as a managed service. This means OpenAI takes on the responsibility of hosting and maintaining the intricate orchestration layer, including managing agent sessions, ensuring context persistence across long interactions, and facilitating recovery from errors. Developers can now define an agent's task, specify the model it should use, integrate necessary tools, and choose its compute environment with a single API call. This reduction in engineering complexity is expected to dramatically decrease the time required to move an AI agent from a proof-of-concept to a production-ready system.
The API is currently available in public beta and is accessed via a specific beta header (OpenAI-Beta: agents=v1). It's designed to be model-agnostic, already wired to support models like GPT-6 Astra, indicating its role as a foundational layer for current and future OpenAI models.
2. Key Capabilities for Advanced Agent Development
The Agents API is packed with features designed to facilitate the creation of highly capable and long-running AI agents. These capabilities address some of the most challenging aspects of agent development:
- Automatic Context Compaction: A perennial challenge for long-running agents is managing the context window of underlying language models. As conversations and tasks progress, the amount of information an agent needs to keep track of can quickly exceed token limits. The Agents API intelligently compresses earlier content as the conversation approaches the context window limit, allowing agents to maintain relevant context and run continuously for hours or even days without losing track.
- Efficient Tool Discovery and Programmatic Tool Calling: Agents often need to interact with external systems and data. The API supports dynamic tool search, loading only relevant tool definitions as needed to optimize token usage and cost. Furthermore, it enables programmatic tool calling, allowing agents to execute multiple tool calls in parallel, chain operations, and filter or combine results in code. This significantly enhances an agent's ability to work with large volumes of data and integrate seamlessly with existing software ecosystems, including support for the Model Context Protocol (MCP) and custom functions.
- Multi-Agent Collaboration: For highly complex tasks, the Agents API facilitates multi-agent orchestration. A primary agent can decompose a large problem into smaller subtasks and delegate them to specialized subagents. Each subagent operates with its own independent context, and the main agent then aggregates their findings to synthesize a comprehensive solution. This parallelization of work can drastically improve efficiency and tackle problems that would be intractable for a single agent.
- Flexible Execution Environments: Developers have multiple options for where their agents execute code and interact with files. They can choose an OpenAI-managed sandbox for quick setup and scalability, deploy agents on their own infrastructure for maximum control, or leverage environments provided by partner sandboxes. Initial partners include prominent names like Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel, offering a range of compute configurations and VPC deployment options.
3. Impact on the Developer Ecosystem and Use Cases
The release of the Agents API is expected to have a profound impact on the developer ecosystem. By providing a managed, scalable foundation, OpenAI is enabling developers to bypass much of the complex infrastructure work previously required for agent development. This means more developers can now build sophisticated AI agents with less effort, potentially leading to a surge in innovative AI-powered applications.
Potential use cases span a wide array of industries and functions:
- Automated Workflows: Agents can automate multi-step business processes, from processing documents and analyzing data to managing customer support tickets across various platforms like CRMs, ERPs, and communication tools.
- Software Development and Operations: Developers can build agents for autonomous testing, site reliability engineering (SRE), product engineering, migrations, CI/CD pipelines, and infrastructure automation. The ability to execute code and interact with file systems in sandboxed environments is particularly powerful here.
- Research and Data Analysis: Agents can conduct in-depth research, synthesize information from multiple sources, and perform complex data analysis tasks, acting as intelligent co-pilots for researchers and analysts.
- Cybersecurity: Incident response, threat hunting, compliance audits, and privileged access management are areas where intelligent agents can provide significant value by monitoring systems, identifying anomalies, and even initiating recovery actions.
- Personalized AI Assistants: Beyond general chatbots, developers can create highly specialized and context-aware AI assistants tailored to specific user needs or organizational roles.
The API's pricing model is also developer-friendly, with no additional fees for using the Agents API itself. Developers are billed only for the tokens consumed by the models, the usage of OpenAI tools, and standard container rates if opting for OpenAI-hosted sandboxes. This transparent pricing encourages experimentation and widespread adoption.
Comparison Overview
| Feature/Aspect | OpenAI Agents API | Traditional Agent Development |
|---|---|---|
| Infrastructure Management | Managed by OpenAI (Codex harness, session, orchestration, recovery) | Manual setup and maintenance of job queues, state databases, sandboxes, retry policies |
| Development Focus | Focus on agent logic, tools, and workflows | Significant effort on infrastructure plumbing and maintenance |
| Context Management | Automatic context compaction for long sessions | Manual or custom implementation of context handling to avoid token limits |
| Tool Integration | Efficient tool discovery, programmatic parallel calling, MCP support | Manual integration and orchestration of individual tools |
| Multi-Agent Support | Built-in orchestration for subagents and complex workflows | Requires custom implementation for multi-agent coordination |
| Execution Environments | Choice of OpenAI-hosted, self-hosted, or partner sandboxes | Requires setting up and securing own sandboxes or environments |
| Time to Production | Significantly reduced | Often bottlenecked by infrastructure issues |
| Cost Structure | Billed for model tokens, tool usage, and container time (if OpenAI-hosted) | Costs for infrastructure, development time, and model usage |
Frequently Asked Questions (FAQ)
Q: What is the OpenAI Agents API?
The OpenAI Agents API is a new public beta offering that provides developers with access to the scalable, managed infrastructure (the Codex harness) that powers OpenAI's internal AI agents, such as those in ChatGPT Work. It simplifies the development of long-running, multi-step AI agents by handling core orchestration, context management, and execution environments.
Q: What are the main benefits for developers?
Developers can significantly reduce engineering overhead by leveraging OpenAI's managed infrastructure. Key benefits include automatic context management, efficient tool integration, built-in multi-agent collaboration, and flexible execution environments, all of which accelerate the development and deployment of robust AI agents.
Q: How is the Agents API priced?
There are no additional fees specifically for using the Agents API itself. Developers are charged based on the standard rates for the underlying language models (tokens consumed), the usage of any OpenAI tools, and container rates if they choose to utilize OpenAI-hosted sandboxes for agent execution.
Q: Can I use my own infrastructure with the Agents API?
Yes, the Agents API offers flexible execution environments. While OpenAI provides managed sandboxes, developers can also choose to run their agents on their own infrastructure or through supported third-party sandbox partners, providing control over compute configurations and data handling.
Try Our Developer Utilities
Simplify your engineering workflows with our free browser-native tools: