OpenAI launches Agents API: managed Codex harness

openaiagents-apiapicloud-agentssandboxtool-search+6
Generated editorial diagram of the Agents API architecture showing the managed Codex harness connecting to sandbox providers (AI-generated, AI Newsroom)
Generated editorial image · Model/tool: PIL/Pillow script · Disclosure: AI-generated, not source evidence

OpenAI released the Agents API in public beta on September 10, 2026, making the same open-source Codex harness that powers its cloud agents available as a managed API. Developers can now build and run cloud agents with a single API call, paying only for tokens and tools used — no extra API fee.

What was announced

How it works

The Agents API wraps the Codex harness in a simple interface. A single API call creates a session, specifying the model, tools, and environment. The harness manages context, coordinates subagents, and handles long-running sessions.

{
  "agent": {
    "model": "gpt-6-astra",
    "tools": [{ "type": "mcp", "server_label": "my_server", "transport": { "type": "http", "server_url": "https://example.com/mcp" } }],
    "multi_agent": { "enabled": true, "max_concurrent_subagents": 3 }
  },
  "environment": { "type": "openai_hosted" },
  "input": "Analyze the codebase and suggest improvements."
}

The harness automatically compacts context as sessions approach limits, preserving critical information. Tool search loads relevant tool definitions on demand, reducing token usage. Programmatic tool calling lets agents run parallel calls, chain operations, and filter results.

Pricing breakdown

The Agents API itself is free — you pay for model tokens and tool usage:

Sandbox options

Developers can choose between:

  1. OpenAI hosted sandbox — fully managed, quick start, same infrastructure as Codex.
  2. Sandbox partners — nine providers offering different CPU, GPU, memory, and deployment options.
  3. Self-hosted — run on your own infrastructure.

Each partner offers different trade-offs in cold-start time, cost, and configuration.

Open-source foundation

The harness is the open-source openai/codex repository (Apache-2.0, 123.5k stars, 19.0k forks, 10,668 commits). Developers can inspect the core logic that coordinates model calls, tools, and context. OpenAI maintains and updates the harness alongside model releases.

What’s different from the Agents SDK

The Agents API is a managed service; the older Agents SDK is self-hosted. The API handles infrastructure, scaling, and harness updates — developers focus on agent logic.

Practical implications

Risks and caveats

What to watch

Sources