AGENTCONN
O

// Agent profile

OpenAI Agents API

Coding Paid

About OpenAI Agents API

The OpenAI Agents API is a managed cloud service that exposes the same orchestration layer powering Codex as a developer-facing API. Instead of building your own agent loop, you define an Agent (model, instructions, tools, MCP servers), attach an optional sandbox Environment, create a Session, and stream Events. The harness handles context compaction, parallel tool calling, tool search, and multi-agent delegation automatically. MCP servers connect via HTTP transport as a first-class tool type, and agents accept AGENTS.md-format instructions and skills for capability packaging. Sandbox options include OpenAI's hosted environment, self-hosted via codex exec-server over WebSocket, or partner integrations with Cloudflare, E2B, Modal, Vercel, and others. There is no separate API fee — you pay for model tokens and container time; the orchestration layer itself is free. Launched in public beta September 10, 2026.

Key Features

  • Hosted agent runtime — the same orchestration layer that powers Codex, offered as a managed service
  • MCP server support — connect any MCP server via HTTP transport as a first-class tool type
  • Automatic context compaction — summarizes earlier exchanges as sessions near the context limit
  • Multi-agent delegation — subagents with independent context, configurable concurrency
  • Flexible sandboxes — OpenAI-hosted, self-hosted via codex exec-server, or partner integrations (Cloudflare, E2B, Modal, Vercel)
  • Tool search — on-demand tool loading to reduce token cost while preserving cache hits
  • Parallel tool calling — agents chain tool operations without round-tripping to the client
  • Skills and AGENTS.md — first-class support for the emerging agent capability packaging standard
  • No orchestration fee — pay only for model tokens and container time

Overview

The OpenAI Agents API is a hosted agent runtime launched in public beta on September 10, 2026. It packages the orchestration infrastructure behind Codex — sessions, sandboxes, tool execution, context management, and multi-agent coordination — as a managed API. You define what your agent can do; OpenAI runs the loop.

The API is built around four primitives: the Agent (model, instructions, tools, MCP servers), the Environment (optional sandbox for code execution), the Session (durable agent instance with saved configuration and state), and Events/Items (inputs and outputs streamed between your application and the harness).

Key Capabilities

Managed orchestration: The harness handles context compaction (automatic summarization as sessions grow), tool search (on-demand tool loading to reduce token overhead), parallel tool calling, and subagent delegation. Your application sends input and receives events — the infrastructure complexity is abstracted away.

MCP as a first-class primitive: MCP servers connect via HTTP transport and are declared alongside other tools in the agent definition. The API ships with examples connecting to OpenAI’s own documentation MCP server, establishing MCP as the standard integration mechanism rather than an afterthought.

Flexible execution environments: Run agent sandboxes on OpenAI’s hosted infrastructure (the same environment Codex uses), on your own servers via codex exec-server over WebSocket, or through partner integrations with Cloudflare, E2B, Modal, Vercel, Daytona, DigitalOcean, Oracle, Runloop, and others.

Skills and AGENTS.md: The API adopts the same capability packaging vocabulary emerging across major agent platforms — skills as reusable agent capability units, and AGENTS.md as the instruction format. This aligns with a broader convergence where Claude Code (CLAUDE.md, SKILL.md), OpenAI (AGENTS.md, skills), and Google’s agent tooling share nearly identical schemas for describing what an agent can do.

Use Cases

The Agents API targets teams building production agent systems who want orchestration handled for them: customer service automation with multi-agent routing, code generation pipelines with sandboxed execution, research agents that coordinate specialist subagents, and document processing workflows requiring tool chaining. Early adopters report significant improvements — evaluation score jumps from 0.71 to 0.85, 60% cost-per-case reductions, and 86% fewer failed responses compared to custom orchestration.

Considerations

The API is in public beta and evolving. Pricing is token-based with no separate orchestration fee — OpenAI bets that managed orchestration drives enough token consumption to justify the infrastructure cost. The partner sandbox ecosystem is broad but each integration has its own setup requirements. Teams already running custom agent loops should evaluate whether the managed context compaction and tool search justify the migration cost versus their existing orchestration.

Who It’s For

Backend teams and platform engineers building production agent systems who want the orchestration layer handled for them. Particularly valuable for teams that need sandboxed code execution, multi-agent coordination, or MCP integrations without building and maintaining that infrastructure in-house. Complements the open-source OpenAI Agents SDK (Python) — the SDK is for self-hosted orchestration, the API is for managed orchestration.

Similar Agents