OpenAI’s new Agents API is not just another agent SDK. It is a managed runtime for building long-running cloud agents with the same Codex harness OpenAI uses for its own coding and work products.
Released in public beta on September 10, 2026, the API handles agent orchestration, context management, tool use and subagents while letting developers choose where the agent actually works: an OpenAI-hosted sandbox, their own infrastructure or an integrated sandbox provider.
The important change is operational. Developers have already been able to build agents with the Responses API and OpenAI Agents SDK. Agents API moves more of the runtime itself into a managed service: durable sessions, an evolving Codex harness, long-context compaction, tool discovery, subagent coordination and execution-environment plumbing.
Availability: public beta, available to all developers. OpenAI says there is no additional platform fee for using Agents API itself; customers pay for the model tokens, tools and execution resources their agents use.
Methodology note: this is a research-based explainer using OpenAI’s September 10 launch announcement, current API reference, Agents SDK documentation and API pricing information checked on September 16, 2026. We are not presenting it as a hands-on benchmark of the beta service.
What did OpenAI launch?
Agents API exposes the agent harness behind Codex as a managed API. You define the task, model, tools and environment; OpenAI runs and maintains the harness that coordinates model calls, context, tools and optional subagents.
That matters because the hard part of a production agent is no longer just “call a model, then call a tool.” Long-running agents need to preserve useful context, recover across many turns, work with files and artifacts, manage execution environments and avoid flooding every model request with every available tool definition.
OpenAI’s launch announcement highlights three pieces of that harness in particular:
- Long-session context management: the service can compact earlier context as a session approaches its context limit so work can continue across multiple context windows.
- Tool search and programmatic tool calling: relevant tool definitions can be loaded when needed rather than stuffing a large tool surface into every request; tool calls can also be coordinated in code.
- Subagents: a main agent can split suitable work into parallel subagents, each with its own context, then coordinate the results.
Agents API vs Responses API vs Agents SDK
These products overlap, but they are not the same layer.
| Option | Who owns the agent loop? | Best fit |
|---|---|---|
| Responses API | You own the orchestration, tool dispatch and application state | Shorter or custom flows where you want low-level control |
| Agents SDK | Your application runs the SDK runtime; the SDK manages turns, tools, guardrails, handoffs and sessions | Developers who want a lightweight open-source runtime and control over application orchestration |
| Agents API | OpenAI manages the Codex-based harness and managed agent session | Long-running cloud agents where managed context, tools, subagents and execution-environment infrastructure reduce operational work |
The current Agents SDK documentation says the SDK uses the Responses API by default for OpenAI models. Its value is the higher-level runtime: Agent plus Runner manages turns, tool execution, guardrails, handoffs and sessions. The new Agents API goes a step further by letting OpenAI operate and evolve the Codex harness for the managed session.
That means Agents API is not automatically the right choice for every agent. If your workflow is short-lived, highly custom or already has a mature orchestration layer, directly using Responses API—or using Agents SDK in your own runtime—may remain simpler.
Managed sessions are the core abstraction
The API reference exposes managed agent sessions under /agents/sessions. A session can be created with an inline agent configuration or a saved reusable agent, an execution environment, optional initial input and optional vault access.
Current session states include idle, in progress, requires action and failed. Sessions can emit streamed events, and the API exposes session artifacts, subagents, turns and items for inspection.
This is an important distinction from treating every model response as a disposable request. The managed session becomes the durable unit around the agent’s work.
You still choose where the agent runs code
OpenAI manages the agent harness, but the compute environment remains a design choice. The launch supports three broad approaches:
- OpenAI-hosted environment: OpenAI provisions the sandbox used for files, code, packages and artifacts.
- Your own infrastructure: keep execution in an environment you operate.
- Sandbox partner: use one of the launch integrations such as Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop or Vercel.
OpenAI-hosted environment templates can preconfigure files, packages, environment variables, skills, plugins, setup commands and network policy. The API reference also exposes network allowlisting and reusable environment templates that provision a fresh environment for each session.
This separation is one of the more important architectural decisions in the launch: managed agent harness does not have to mean OpenAI-hosted execution. Teams can outsource the reasoning/orchestration layer while keeping code execution or sensitive workspace state in infrastructure that fits their security and compliance model.
How tools work: MCP, functions, built-ins and tool search
Agents API supports MCP, custom functions and built-in tools such as web search. The launch also adds two ideas aimed at large tool surfaces.
Tool search
Instead of loading every tool definition into every model turn, tool search can bring relevant tool definitions into context when they are needed. OpenAI says this can reduce token usage and cost while avoiding unnecessary disruption to the model’s cache.
Programmatic tool calling
The agent can coordinate eligible calls in generated code: running work in parallel, chaining operations and filtering or combining tool results before bringing only the useful data back into model context.
This becomes useful when an agent has access to dozens or hundreds of capabilities. It is less about adding more tools than about making a large tool surface economically and operationally manageable.
How subagents change the orchestration model
Multi-agent support is built into the new API rather than being something every developer has to recreate in application code. The main agent can create subagents for independent pieces of a task, each with its own context, while the parent coordinates the result.
The API reference exposes subagents, their turns and their items, which also makes the structure more observable than a black-box prompt that merely says “delegate this.”
That does not mean every task should use subagents. Our AI Agents in 2026 guide treats multi-agent architecture as the highest level on an autonomy ladder because parallel agents multiply model activity, coordination and possible failure paths. Use them when the work can be decomposed into genuinely valuable independent tasks.
OpenAI Agents API pricing
There is no separate Agents API platform fee during the public beta. OpenAI says you pay for the model tokens and tools your agent uses.
If you choose an OpenAI-hosted execution environment, sandbox/container usage is an additional cost. OpenAI’s current API pricing lists hosted containers by memory size, starting at $0.03 for a 1 GB container session and reaching $1.92 for 64 GB, billed in 20-minute session increments. Model usage is billed separately at the selected model’s API rate.
That means “Agents API has no additional fee” does not mean a long-running cloud agent is free beyond tokens. A real cost model needs to include:
- model input, cached input and output tokens;
- paid built-in tools such as web search where applicable;
- OpenAI-hosted container time or the cost of your chosen external environment;
- the extra model/tool usage generated by subagents, retries and long-running exploration.
For cost-sensitive production systems, tool search, tight stop conditions and deliberate environment lifecycle management matter as much as choosing a cheaper model.
What the launch does not remove
A managed harness removes infrastructure work. It does not remove agent engineering.
- Permissions still need to be scoped. The fact that the harness can use MCP or external functions does not mean the agent should receive broad write access.
- Network policy still matters. Hosted containers can be configured with network controls; teams should treat egress as part of the security boundary.
- Prompt injection still matters. A managed harness cannot make untrusted webpages, files or tool output trustworthy.
- Evals still matter. Long-running agents need behavioral testing for task success, tool use, failure recovery and stop behavior.
- Beta means change. The API is explicitly in public beta, so surface area, defaults and supported capabilities can evolve before general availability.
Who should use Agents API?
| Use case | Agents API fit | Why |
|---|---|---|
| Long-running coding or repo work | Strong | Managed harness, files, shell-capable environments, artifacts and context management |
| Parallel research or analysis | Strong when decomposition is valuable | Built-in subagents plus independent context |
| Agent with a very large tool catalog | Strong | Tool search and programmatic tool calling can keep context smaller |
| Short single-turn tool call | Often unnecessary | Responses API may be simpler |
| Application with a mature custom agent runtime | Depends | The migration is valuable only if the managed harness replaces meaningful operational work |
| Need to keep execution on your infrastructure | Still possible | The harness and execution environment are separate choices |
What should existing Agents SDK users do?
Do not treat this launch as an automatic migration notice.
The Agents SDK remains actively documented as a lightweight, production-ready runtime with tools, guardrails, handoffs, sessions, tracing and sandbox-agent support. It is especially attractive when you want the orchestration runtime in your application and want to customize exactly how it behaves.
Agents API is more compelling when the operational burden of long sessions, context management, evolving model harnesses, subagents and cloud execution is something you want OpenAI to manage.
A sensible migration test is therefore not “Is Agents API newer?” but “Which part of our current agent infrastructure could we delete if we moved to the managed harness?” If the answer is “very little,” there may be no urgency to migrate.
What changes for the agent ecosystem?
The broader significance is that agent infrastructure is becoming a product category of its own. Models are only one layer. The surrounding harness—context, tools, subagents, sandboxes, files, artifacts, network access and observability—is increasingly something developers can buy as managed infrastructure instead of assembling themselves.
For OpenAI, Agents API also creates a clearer continuum:
- Responses API for lower-level model and tool control;
- Agents SDK for an open-source application-side runtime;
- Agents API for an OpenAI-managed Codex-style cloud harness.
AI-XBlog assessment
The Agents API is most interesting for teams whose problem is no longer “How do we call a tool from a model?” but “How do we keep a complex agent working reliably for hours or days without owning every piece of the runtime?”
For those teams, a managed Codex harness, long-session context handling, tool search, subagents and flexible execution environments can remove a meaningful amount of undifferentiated infrastructure work.
For smaller or deterministic workflows, the opposite conclusion can be equally useful: the new API is not a reason to turn a simple automation into a long-running agent. Use the least complex runtime that solves the actual task.
Primary sources
- OpenAI — Introducing the Agents API, September 10, 2026
- OpenAI API Reference — Create an agent session
- OpenAI API Reference — Agents
- OpenAI API Reference — Agent environment templates
- OpenAI Agents SDK documentation
- OpenAI — API pricing
Source check: September 16, 2026. Agents API is in public beta, so availability, pricing, defaults and supported capabilities may change before general availability.
