OpenAI Agents API Explained: Features, Pricing, Sandboxes and Multi-Agent Workflows
OpenAI Agents API is now in public beta, and it is a bigger change than another model release. Instead of giving developers only a model endpoint, OpenAI is offering the managed agent harness and infrastructure behind Codex: long-running sessions, context management, tool discovery, parallel tool calls, subagents and sandboxed execution.
That matters because the difficult part of building a useful AI agent is often not the prompt. It is everything around the model: keeping context usable for hours, connecting tools without flooding the context window, managing files, isolating code execution, recovering from long tasks and coordinating several workers.
OpenAI announced the Agents API on September 10, 2026. This guide breaks down what is actually new, the early performance claims, pricing, deployment choices and the questions teams should ask before moving production workflows onto it.
What is the OpenAI Agents API?
The Agents API is a developer API for creating and running cloud agents using a managed version of OpenAI’s Codex harness. A developer specifies the task, model, tools and execution environment. OpenAI manages the orchestration layer that keeps the agent working.
The important distinction is between a model API and an agent runtime. A normal model call receives input and returns output. An agent may need to inspect a repository, search documentation, call an MCP server, execute code, write intermediate files, delegate work and continue for hours. That requires state and infrastructure around the model.
OpenAI says the same underlying harness and infrastructure powers Codex. The Agents API makes that layer available to developers rather than requiring every team to build its own orchestration framework.

OpenAI Agents API features at a glance
| Feature | What it does | Why it matters |
|---|---|---|
| Long-running sessions | Maintains work across extended tasks and multiple context windows | Useful for coding, research and operations that cannot finish in one model call |
| Automatic context compaction | Compresses earlier context as a session approaches its limit | Reduces the need to build custom summarization and memory logic |
| Tool search | Loads relevant tool definitions when needed | Can reduce unnecessary token usage when an agent has many tools |
| Programmatic tool calling | Supports parallel calls, chaining and processing results in code | Helps agents handle large tool workloads more efficiently |
| MCP support | Connects Model Context Protocol servers as tools | Makes existing MCP ecosystems easier to reuse |
| Multi-agent support | Delegates independent tasks to subagents | Parallelizes suitable research, analysis and coding jobs |
| Hosted sandbox | Provides an OpenAI-managed execution environment | Removes part of the infrastructure burden for code and file work |
| External environments | Supports developer infrastructure and sandbox partners | Lets teams choose where execution and sensitive resources live |
Why the OpenAI Agents API is different from a basic LLM API
Agent applications have gradually accumulated their own infrastructure stacks. Teams build queues, session stores, tool routers, browser workers, code sandboxes, context compression, retry logic and observability. The result can become more complicated than the model integration itself.
The Agents API moves a significant portion of that orchestration into a managed service. OpenAI describes it as a harness that it can update alongside its models. In practical terms, a model upgrade may no longer require a team to redesign as much of its surrounding agent loop.
This does not mean application architecture disappears. Developers still decide which tools an agent can use, which secrets it can access, what data enters its context, what actions require approval and where execution happens. Those boundaries become more important as agents gain autonomy.
Long-running agents and automatic context compaction
A common agent failure appears after a task has been running for a long time. The conversation grows, tool outputs accumulate and the context becomes expensive or exceeds the model limit. Developers then have to decide what to summarize, discard or store elsewhere.
OpenAI says the Agents API automatically compacts earlier context as a session approaches its context limit while preserving information needed to continue. This allows workflows to span multiple context windows.
For developers, the benefit is less custom memory plumbing. But automatic compaction should still be tested on the workload that matters. A coding agent may need exact error messages or file decisions from much earlier in a session. A financial workflow may require an auditable record rather than a compressed representation. Managed context is useful, but it should not be confused with permanent application memory or compliance-grade recordkeeping.
Tool search, MCP and programmatic tool calling
Modern agents can have dozens or hundreds of available actions. Sending every tool definition with every model request consumes tokens and can make tool selection harder.
OpenAI’s tool search is designed to load relevant tool definitions as needed. The API also supports programmatic tool calling, which can execute calls in parallel, chain operations and process or filter results before bringing the useful information back into the model context.
The Agents API supports MCP, custom functions and built-in tools such as web search. MCP is particularly important because developers can expose an existing service through a standardized tool interface rather than write a new integration specifically for one agent framework.
For teams already experimenting with MCP in local agents, this makes the Agents API more interesting than a closed tool ecosystem. The key production question remains permissions: an MCP connection that can read logs is very different from one that can deploy code, move money or delete customer data.
Multi-agent workflows: where subagents can help
Multi-agent support lets a primary agent divide a job into independent pieces and send them to subagents. Each subagent keeps its own context, while the primary agent coordinates the work and combines the results.
This architecture is most useful when tasks genuinely run in parallel. Consider an incident investigation. One subagent can inspect deployment changes, another can analyze errors and another can review dependency health. For a software project, separate workers could examine tests, documentation and implementation.
Parallelism is not automatically better. More subagents can mean more token usage, duplicated work and harder debugging. Sequential tasks with strong dependencies may gain little. Developers should benchmark the whole workflow rather than assume that an agent swarm is faster or cheaper.
Early performance and cost claims
OpenAI’s launch announcement includes several customer-reported results. They are useful signals, but they are not independent benchmarks and should be treated as case studies rather than universal expectations.
| Company | Reported result | What changed |
|---|---|---|
| Ciridae | Evaluation score increased from 0.71 to 0.85; 4x latency reduction | Used subagent support and orchestration |
| SafetyKit | 60% reduction in cost per case | Migrated a case-review workflow |
| Hypha | 86% reduction in failed agent responses | Separated the agent harness from the sandbox |
| Dwelly | Reported ability to fan out work across hundreds of agents | Used asynchronous execution for bursty workloads |
The Ciridae numbers are especially notable because the evaluation score moved by 0.14 while latency reportedly fell fourfold. That suggests orchestration can materially affect an agent system even when the underlying model is not the only variable.
However, teams should reproduce measurements using their own tasks. Agent workloads differ dramatically in tool latency, context size, failure modes and approval requirements.
OpenAI Agents API pricing
OpenAI says there is no additional Agents API fee during the public beta. Developers pay for the model tokens and tools their agents consume.
That sounds simple, but agent costs can be less predictable than chatbot costs. A single user request may trigger several subagents, repeated tool calls and a long session. A workflow that parallelizes aggressively can reduce wall-clock time while increasing total model consumption.
Teams should therefore measure cost per completed task, not just price per million tokens. Useful production metrics include tokens per successful task, tool calls per task, retries, subagent count, execution duration and cost of failed runs.
Where can an Agents API agent run?
OpenAI gives developers several environment choices. The fastest starting point is an OpenAI-hosted sandbox. OpenAI provisions the environment so the agent can execute code, work with files and create artifacts.
Developers can also use their own infrastructure or supported ecosystem providers. OpenAI lists partners including Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel. Depending on the provider, teams can choose different CPU, GPU, memory, storage, cold-start and deployment characteristics, including options that fit a VPC.
This separation between harness and environment is important for enterprise deployments. A company may want OpenAI to manage orchestration while keeping execution, files or secrets inside a controlled environment.
Security: the feature developers should not treat as an afterthought
Giving an AI model a long-running session, code execution and external tools expands what it can accomplish. It also expands the consequences of a mistake.
Developers should use least-privilege credentials, isolate environments, keep destructive tools behind explicit approval where practical, validate tool arguments, restrict network access and maintain independent logs of consequential actions. Sensitive secrets should not be placed in prompts when a scoped secret-management mechanism can provide them directly to the required tool.
This is especially relevant after recent industry attention around unexpected agent behavior. AI Tech Ledger’s analysis of OpenAI rogue AI agent incidents explains why sandbox and permission boundaries matter when systems can act rather than merely answer questions.
OpenAI Agents API vs building your own agent harness
| Consideration | Managed Agents API | Custom harness |
|---|---|---|
| Setup speed | Faster starting point | More engineering required |
| Context management | Built-in compaction | Team controls implementation |
| Multi-agent orchestration | Built in | Must be designed or adopted from another framework |
| Infrastructure control | Flexible environment choices, but managed harness | Maximum orchestration control |
| Maintenance | OpenAI updates harness | Team owns updates and compatibility |
| Vendor dependency | Higher at orchestration layer | Can be lower with model-neutral architecture |
The decision is not simply managed versus self-hosted. Because the execution environment can be separated from the harness and MCP can expose external tools, teams can build hybrid architectures. The bigger architectural question is how much of the orchestration layer they are comfortable coupling to one provider.
Who should try the OpenAI Agents API?
The strongest candidates are teams already spending significant engineering time on long-running agent infrastructure. Coding agents, research pipelines, incident-response assistants, compliance review, document operations and other multi-step workflows may benefit from durable sessions and tool orchestration.
It is less compelling for a simple chatbot, summarizer or one-shot extraction endpoint. If an application needs one model call and two predictable functions, adding a full agent runtime may increase complexity rather than remove it.
Developers comparing models for these workloads can also read AI Tech Ledger’s GPT-6 Astra vs Claude Fable 5.1 benchmark comparison. For open-source alternatives, see the site’s coverage of DeepSeek V4.1 Flash.
Practical checklist before moving an agent to production
- Define the task boundary. Write down what the agent is allowed to do and what it must never do autonomously.
- Start with minimum permissions. Give each tool only the access needed for its function.
- Measure completed-task economics. Track total tokens, tools, retries and subagents instead of looking only at per-token prices.
- Test context compaction. Run tasks long enough to cross context boundaries and verify that critical information survives.
- Benchmark single-agent against multi-agent. Parallel workers should earn their additional complexity and cost.
- Choose the environment deliberately. Decide which files, code, secrets and network resources may live in a hosted sandbox and which must remain under your control.
- Keep independent audit logs. Do not rely only on an agent’s own summary of what it did.
- Plan for beta changes. The API is in public beta, so production integrations should expect iteration.
What the launch means for the AI agent market
The Agents API reflects a broader shift in AI development. Model quality is still important, but the competitive layer is moving upward into harnesses, tools, sandboxes, memory and orchestration.
That is why the launch is relevant even to developers who do not immediately adopt it. OpenAI is effectively arguing that the reusable product is no longer only the intelligence of GPT-6 Astra; it is also the machinery that lets that intelligence keep working reliably over long tasks.
If managed harnesses become the normal way to build agents, developers may write less custom loop code. At the same time, governance becomes more important because a managed agent can potentially reach more tools and run for much longer than a conventional API request.
FAQ
Is the OpenAI Agents API available now?
Yes. OpenAI launched it in public beta on September 10, 2026 and says it is available to all developers.
Does the Agents API cost extra?
OpenAI says there is no additional fee for the Agents API during public beta. Developers still pay for the tokens and tools used by their agents.
Does the Agents API support MCP?
Yes. OpenAI says agents can use MCP servers, custom functions and built-in tools such as web search.
Can Agents API workflows use multiple agents?
Yes. The API supports subagents that can work on independent tasks in parallel while a primary agent coordinates the result.
Do agents have to run inside OpenAI?
No. OpenAI offers its own hosted sandbox, but developers can choose their own infrastructure or supported sandbox partners for the execution environment.
Is this a replacement for every normal API call?
No. Simple chat, extraction or single-step tasks may still be better served by a direct model API. Agents API is aimed at workflows that need persistent context, tools, execution or multi-step orchestration.
Bottom line
OpenAI Agents API packages much of the infrastructure developers have been assembling around autonomous AI systems into one managed layer. Its most meaningful features are not flashy prompts: they are durable sessions, context compaction, tool search, programmatic calls, MCP integration, environment choice and parallel subagents.
The early customer numbers are promising, including reported reductions in latency, cost and failed responses, but they remain vendor-published case studies. The sensible approach is to test the API on a real workload, compare it with the current stack and measure reliability and total cost per successful task.
For developers who have spent months maintaining agent orchestration, the public beta is worth evaluating. For simpler applications, a direct model call may remain the cleaner solution.
Sources: OpenAI’s September 10 Agents API announcement and linked OpenAI developer documentation. Community discussion was also reviewed to identify developer questions around deployment boundaries and agent infrastructure.