OpenAI Agents API: Managed Codex Harness for Enterprise Builders
On September 10, 2026, OpenAI opened public beta access to its Agents API, making the managed Codex harness available to all developers. The API eliminates the orchestration, context management, and session infrastructure that has kept many enterprise AI agent projects stuck in development rather than production.
The release landed the same morning as GPT-6 Astra and ChatGPT for Financial Services, part of a coordinated push by OpenAI into enterprise AI infrastructure. For teams building agents at scale, the Agents API is the layer most likely to change day-to-day engineering work.
What the OpenAI Agents API Actually Is
OpenAI’s own framing is precise: “The Agents API gives your application access to the Codex harness through an OpenAI-managed API. OpenAI manages sessions, orchestration, context compaction, and recovery while your application provides tools and chooses its execution environment.”
The Codex harness is the same infrastructure that powers Codex and ChatGPT for Work. Until September 10, it was internal to OpenAI. Now it is an API call available to any developer with an API key.
The underlying model is a clean division of labor. Developers specify the task, model, tools, and MCP servers. OpenAI runs everything that keeps the agent alive and productive across a long session: session state tracking, automatic context compaction as the window fills, tool-call routing, subagent coordination, and failure recovery. The result is that creating a new agent session means specifying intent once and receiving a working agent back.
Here is the simplified structure of that single call in the TypeScript SDK:
const session = await client.beta.agents.sessions.create({
agent: {
model: "gpt-6-astra",
instructions: "Answer technical questions accurately using web search.",
tools: [
{ type: "web_search" },
{ type: "programmatic_tool_calling" },
],
multi_agent: { enabled: true, max_concurrent_subagents: 4 },
},
environment: {
type: "self_hosted",
workspace_directory: "/workspace",
},
input: [{
role: "user",
content: [{ type: "input_text", text: "Your task here." }],
}],
});
Three Execution Environments for Enterprise Flexibility
The API is managed at the harness layer but flexible at the compute layer. Enterprise teams choose from three paths based on their data governance and infrastructure requirements.
OpenAI-hosted sandboxes use the same sandboxing infrastructure behind Codex. Developers supply files, install packages, and define capability directories; OpenAI provisions and manages the rest. This path is the lowest-friction option for teams that can accept US data residency.
Self-hosted infrastructure keeps compute inside the developer’s own servers or VPC. The developer provides the execution environment and tools; OpenAI still runs the harness on top. This path satisfies most regulatory data locality requirements.
Partner sandboxes span nine named providers: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel. Each partner supports different CPU, GPU, and memory configurations, storage models, and VPC deployment options.
| Environment | Who manages compute | Who manages harness | Billing |
|---|---|---|---|
| OpenAI-hosted sandbox | OpenAI | OpenAI | Standard container rates |
| Self-hosted | Developer or internal team | OpenAI | Developer’s own cost |
| Partner sandbox (9 options) | Named partner | OpenAI | Partner’s rates |
What the Managed Harness Handles
The managed Codex harness takes on several jobs that typically become separate engineering projects inside enterprise AI teams:
Session state
The API retains session state across turns. Developers can continue work or steer the agent mid-task without rebuilding conversation context. Sessions are durable, which means long-running workflows that span hours remain coherent.
Automatic context compaction
When a session approaches its context limit, the harness automatically compacts earlier context, preserving the information the agent needs to continue. This is the core reason long-horizon tasks now work reliably without manual developer intervention. Previously, teams had to build their own summarization, compression, and context management logic.
Multi-agent delegation
Agents can break complex tasks into independent pieces and delegate them to subagents that work in parallel. Current documentation samples cap concurrency at 3 to 4 subagents per session. This matches the pattern that enterprise teams building research pipelines, audit workflows, and multi-step data processing already need.
Tool and MCP coordination
The API supports MCP servers, custom functions, and built-in tools including web search. A programmatic tool-calling option lets the agent discover and invoke tools without requiring the developer to write explicit routing logic.
Recovery
The harness manages error recovery so transient failures do not require full session restarts. This reduces the operational burden on enterprise engineering teams monitoring agent fleets.
Pricing: No New Line Item
For enterprise finance teams evaluating the API, the pricing model is simple. OpenAI’s announcement states directly: “There are no additional fees for using the Agents API; you simply pay for the tokens and tools your agents use.”
Three lines appear on the bill: model tokens at the selected model’s API rates, tools at their standard rates, and container time if the agent runs in an OpenAI-hosted sandbox. Self-hosted and partner environments move the third line to whoever runs the box.
The default model in current examples is GPT-6 Astra, released the same day. OpenAI has stated it will provide versioned access to the harness with each model launch, so the harness does not require a manual update when new models ship.
The Enterprise Calculus: Why This Changes Agent Deployment
The Agents API addresses a specific gap that has kept enterprise AI agent deployments from reaching production at scale. Building an agent that completes a single task in isolation is straightforward. Building one that runs for hours, manages its context window, coordinates with subagents, invokes a dozen tools, and recovers from failures without human supervision is a meaningful infrastructure project.
Enterprise teams that have built internal agent harnesses consistently report that harness maintenance competes directly with product development time. Each new model release requires updating the harness to use new capabilities. The Agents API externalizes that maintenance cost. As OpenAI’s documentation frames it: “Taking advantage of new model capabilities often means reworking your harness, taking valuable time away from improving your application.”
InfoWorld analysis notes the API “packages orchestration, context management, and execution infrastructure into a single API, aiming to speed production deployments while raising fresh lock-in concerns.” The lock-in question is real and worth acknowledging: enterprise teams that migrate their agent session logic into the OpenAI-managed harness become dependent on OpenAI for session continuity, context management, and recovery behavior. The Codex harness is open source, which provides some visibility into the mechanism, but the managed service itself is not.
Data residency and ZDR constraints
The US-only data residency and absence of Zero Data Retention support are the primary constraints for regulated industries. Financial services, healthcare, government, and European enterprises with strict data sovereignty requirements will need to evaluate the self-hosted or VPC-deployed partner options rather than relying on OpenAI-hosted sandboxes. Choosing a self-hosted sandbox does not make the API ZDR-eligible, which is an important detail for compliance teams.
The Broader Signal: Harness as Product
The Agents API confirms a pattern running through 2026: the harness is the product. Model quality has converged enough across frontier providers that the infrastructure surrounding the model, the session management, context compaction, and orchestration layer, is where differentiation increasingly lives.
OpenAI’s move is to make its harness the default for any developer who wants to skip building that layer themselves. The pricing (no harness fee), the timing (same day as a new frontier model), and the architecture (open-source harness, managed service on top) are each deliberate.
For enterprise teams deciding whether to build their own agent infrastructure, adopt an existing framework such as LangGraph or AutoGen, or use a managed API, the Agents API adds a third option that trades control for speed. Teams that need VPC deployment or ZDR-eligible compliance retain the self-hosted and partner-sandbox paths. Teams that need working agents quickly and can accept US data residency can start with the managed option and migrate if requirements change.
The API is in public beta. OpenAI has stated it will iterate based on developer feedback before general availability. Enterprise teams evaluating production adoption should build against the public beta now to assess fit, but should plan for the API surface to evolve before GA, particularly around session limits, ZDR expansion, and geographic data residency.
What Enterprise AI Teams Should Do Now
For teams that have been delaying agent deployment because harness development felt like too much undifferentiated engineering work, the Agents API removes that excuse. The quickstart lets a developer have a working agent session running in minutes.
For teams already running internal harnesses: evaluate whether the managed API can absorb your session management logic while your infrastructure team keeps compute in its own environment through the self-hosted or partner-sandbox options.
For teams in regulated industries: the self-hosted path with a VPC-compatible partner sandbox from the nine named providers is the practical route. The managed harness still handles orchestration; only the compute environment changes.
Understanding how enterprise AI agent adoption actually plays out at scale helps frame where the Agents API fits in a larger deployment roadmap. Teams that are thinking through agentic GTM infrastructure will find the session management and multi-agent delegation capabilities directly relevant to revenue workflow automation.
For organizations ready to move from pilots to production agent infrastructure, Enera works with enterprise teams to design and deploy agentic systems that fit within existing governance and compliance requirements.
Sources used in this article:
- OpenAI Agents API Documentation (official, September 10, 2026)
- OpenAI Developer Community Announcement (official, September 10, 2026)
- InfoWorld: OpenAI launches managed Agents API (September 11, 2026)
- CellCog: The Agents API: OpenAI Just Made the Harness a Product (September 11, 2026)
- tbreak: OpenAI Agents API: Codex harness for developers (September 11, 2026)