OpenAI Agents API

Hosted agent runtime from OpenAI that gives developers the Codex harness, sandboxes, subagents and context compaction through one API.

No added fee; model tokens and tool use billed at API ratesManaged API for building and running long-lived cloud agents
7.8/10 our score

Be the first to rate OpenAI Agents API

Visit website
OpenAI Agents API

OpenAI Agents API Review

DeveloperOpenAI
Websiteopenai.com/index/introducing-the-agents-api
Agent typeManaged API for building and running long-lived cloud agents
Best forDevelopers who want agents that run for hours or days, write files and run code, without building their own agent loop, sandbox or compaction logic.
Fit noteTeams that must run on a model other than OpenAI's may find an open framework a better fit, since the harness is tied to OpenAI models.
Pricing modelPay for tokens and tools; no separate fee for the API
Starting priceNo added fee; model tokens and tool use billed at API rates
Pricing detailsOpenAI charges nothing extra for the Agents API. You pay the model's token rates and the tools your agents use. Hosted sandboxes bill at the standard container rates listed under built-in tools on the API pricing page. Partner or self-hosted sandboxes are billed by that provider or by you.
Free planNo
Free trialNo
ChannelsREST API and OpenAI SDKs
What it does on its ownOne call creates a session with a model, tools, an environment and a task. The managed harness sends tool calls to the sandbox, compacts context near the limit and can split work across subagents with their own context. Agents save files as they go and can keep running for days.
IntegrationsMCP servers over HTTP, custom functions, built-in web search, partner sandboxes from Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel, self-hosted compute including VPCs
PlatformsCloud API
Compliance and securitySandbox network modes (enabled, disabled, restricted to up to 100 hosts) and vault-held secrets; the pages we read list no retention terms or certifications for the API
Details last verified15 November 2026
CategoriesAgent Frameworks for Developers, Coding & Software Development, No-Code Agent Builders
7.8/10

OpenAI Agents API Score

Our editorial score across six weighted criteria, based on OpenAI Agents API’s published documentation, pricing and public user ratings. How we score

  • Autonomy8.5

    Agents plan, run code, spawn subagents and keep sessions alive for days with automatic compaction.

  • Ease of Setup7.0

    One API call starts a session, but it is a developer beta with no no-code builder.

  • Pricing Value7.5

    No fee on top of tokens and tools, though sandbox rates live on a separate page.

  • Integrations8.5

    MCP, custom functions, web search and nine partner sandbox hosts are supported.

  • Trust and Security6.5

    Network allowlists and vault secrets exist, but the pages we read give no retention or certification details.

The Codex Harness, Offered as an API

On September 10, 2026, OpenAI released the Agents API as a public beta for all developers. It is a managed service for building and running cloud agents. The selling point is reuse. Developers get the same harness and sandbox setup that runs Codex and ChatGPT for Work. The harness handles context, tool use and subagent work. OpenAI hosts it, and the core harness code is open source in the openai/codex repository.

The owner asked us to look at a ChatGPT Agents API. This is the product that name points to. Our score is 7.8 out of 10. It counts five criteria and skips user sentiment, since no review site rates the API yet.

OpenAI Agents API Facts Developers Ask For

  • Launch: September 10, 2026, public beta.
  • Fee: none for the API itself; tokens and tools billed at API rates.
  • Hosted sandbox sizes: 1, 2 or 4 vCPU with 1, 4 or 16 GB of memory.
  • Partner sandbox hosts: nine named providers.
  • Idle hosted sandboxes can be deleted after one hour.

Sources Behind This Review

FactDetailSource
Launch, features, customersCodex harness, subagents, compaction, partner hostsOpenAI launch post
Hosted sandbox detailsSizes, network modes, artifacts, idle timeoutOpenAI-hosted sandbox docs

A Session From Call to Output

OpenAI’s launch example walks through one session.

  1. Create a session with one call. It names the model, the tools, the environment and the task input.
  2. Attach tools. These can be MCP servers over HTTP, your own functions or built-in tools such as web search.
  3. Pick an environment. Options are OpenAI’s hosted sandbox, your own machines or a partner sandbox.
  4. The harness sends tool calls into the sandbox and returns results. Your app receives events as the work runs.
  5. As the session nears the context limit, the service compacts older context so the agent can keep going.
  6. If multi-agent work is on, the main agent splits the job and hands parts to subagents. The example caps this at three running at once.
  7. The agent writes findings to an output folder. Files in that folder stay available after the sandbox closes.

Harness Features OpenAI Lists

Long Sessions and Compaction

OpenAI says agents can run reliably for days. Compaction keeps what the agent needs and drops the rest. Developers can chain work across many context windows without writing their own compaction code.

Subagents

With multi-agent mode, each subagent gets its own context. You set how many can run in parallel.

Tool Search

The agent loads tool definitions only when it needs them. OpenAI says this cuts token use and cost without breaking the model’s cache.

Programmatic Tool Calling

Agents can call tools in parallel, chain steps and filter results in code. Only the relevant output goes back into context.

Versioned Harness

Each model release brings matching harness features. The launch example names a model called gpt-6-astra.

Where the Code Actually Runs

The hosted sandbox is a Linux workspace with Python, Node.js and command-line tools. Work happens in a folder called /workspace.

SizevCPUMemory
small11 GB
medium (default)24 GB
large416 GB

You can preinstall Python, system or npm packages with pinned versions. Files stay between turns while the sandbox lives. Anything saved in /workspace/outputs becomes a fixed artifact when a turn ends and can be downloaded later.

Teams that want their own compute can self-host, including inside a VPC. The launch post also names nine partner sandbox hosts: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel. OpenAI notes they differ in cold start, CPU and GPU options and cost.

What Teams Pay

The Agents API carries no fee of its own. You pay for the tokens your chosen model uses and for the tools the agent calls. The hosted sandbox docs say sandboxes bill at the standard container rates shown under built-in tools on OpenAI’s API pricing page. We did not see a dollar figure on the two pages we opened, so check that pricing page before you budget. Partner sandboxes bill through the partner. Self-hosted compute is your own cost.

Cost Levers in the Design

Three features aim at cost. Tool search keeps unused tool definitions out of context. Programmatic tool calling trims what goes back to the model. Compaction keeps long sessions from growing without limit. SafetyKit, one launch customer, reports a 60% drop in cost per case.

Network, Secrets and Data

Hosted sandboxes have three network modes.

  • Enabled: outbound access allowed. This is the default unless a template sets otherwise.
  • Disabled: no outbound access.
  • Restricted: only named hosts, from 1 to 100 exact host names with no wildcards.

Stdio MCP servers that OpenAI hosts need the enabled mode. Secrets should sit in vault credentials so real values stay outside the sandbox. The API rejects reserved names such as PATH and OPENAI_API_KEY as variables.

The two pages we opened do not state data retention periods, regions or Zero Data Retention terms for the Agents API. Ask OpenAI about those before you send customer data through it.

Beta Rough Edges to Expect

  • It is a public beta. OpenAI says it will keep changing it on the way to general release and gives no date.
  • A hosted sandbox can be deleted after one hour with no activity or keep-alives. That timeout cannot be changed.
  • Closing an event stream does not cancel a task. Delete the session to stop it.
  • A 409 error during setup means you should retry a few times.
  • Save outputs before you delete a session.
  • Agents run on OpenAI models only.

Launch Customers and What They Report

OpenAI lists eight early users. Hypha cut failed agent responses by 86% after splitting the harness from the sandbox. Ciridae saw its evaluation score rise from 0.71 to 0.85 and subagent latency fall fourfold. Nash.ai runs thousands of long agents for delivery networks. Dwelly spreads work over hundreds of agents with no idle servers between peaks. These are vendor-reported figures.

Who Gains and Who Can Skip It

Product teams building research, coding or back-office agents that run for a long time gain the most. They skip building a loop, a sandbox and compaction. Startups already on E2B or Daytona can keep that host and plug it in as the environment.

Some teams need several model vendors in one agent. Others need fixed retention terms today. Both may want to wait for general release or use an open framework.

OpenAI Agents API Next to Agent Frameworks and Sandboxes

ToolWhat you getEntry price
OpenAI Agents APIHosted Codex harness plus sandbox choiceNo added fee; tokens and tools
OpenAI Agents SDKPython framework you run yourselfFree open source; pay for tokens
Google ADKOpen framework in five languagesFree; hosting from $0.085 per vCPU-hour
E2BSandboxes billed by the secondFree Hobby tier; Pro $150 a month plus usage
DaytonaFast sandboxes on CPU or GPUPay as you go with $200 free compute

How the API Reached 7.8

Autonomy and integrations score highest. Long sessions, subagents, MCP and nine sandbox hosts are all built in. Pricing scores well because usage carries no extra fee. Setup is fine for developers but still a beta. Trust is the lowest mark, since the pages we read did not cover retention or certifications.

Questions Developers Ask About the Agents API

Is the Agents API the Same as the Agents SDK?

The launch post does not compare them. The SDK is a framework you run. The Agents API is a hosted service that runs the Codex harness for you.

Do I Have to Use OpenAI’s Sandbox?

No. You can use the hosted sandbox, your own machines or one of nine partner hosts.

How Long Can an Agent Run?

OpenAI says days. A hosted sandbox needs activity or keep-alives, or it can be deleted after an hour.

Can I Block the Agent From the Open Web?

Yes. Set network access to disabled, or to restricted with up to 100 allowed hosts.

What Does It Cost on Top of Tokens?

Nothing for the API. Hosted sandboxes and tools bill at the rates on OpenAI’s pricing page.

Is It Generally Available?

No. It is a public beta open to all developers.

Guides Related to OpenAI Agents API

Features

  • Codex harness run as a managed service | OpenAI-hosted sandboxes in small, medium and large sizes | Nine named partner sandbox providers or your own compute | Subagents with separate context and a concurrency cap | Automatic context compaction for long sessions | Tool search that loads tool definitions on demand | Programmatic tool calling with parallel and chained calls | Output files kept as artifacts after the sandbox ends

Strengths and Areas to Improve

Strengths

  • No extra fee beyond tokens and tools | Same harness that runs Codex | Wide choice of sandbox hosts | Network can be locked to named hosts | Harness core code is open source

Areas to Improve

  • Public beta with no general release date | Sandbox rates sit on a separate pricing page | Idle sandboxes are deleted after one hour | Pages we read list no data retention terms | No user review score yet

User Reviews

Nobody has rated it here yet. Be the first AI Agents Choice user to rate OpenAI Agents API.

Write a Review