OpenAI Agents API public beta launch
TL;DR
OpenAI launched the Agents API in public beta, providing a managed harness and flexible compute environments so developers can build production‑ready, long‑running LLM agents with a single API call.
One‑call agent creation
The Agents API lets you instantiate a complete agent by sending a single request that specifies the task description, the underlying model, the set of tools the agent may use, and the execution environment. This eliminates the need to stitch together separate calls for context management, tool loading, and execution orchestration.
Choose the compute environment that fits your workload
- OpenAI‑hosted sandboxes – Secure, pre‑provisioned environments that mirror the infrastructure behind Codex and ChatGPT. OpenAI provisions files, packages, and plugins, and handles scaling and security.
- Self‑hosted or partner sandboxes – Deploy agents in your own VPC or on partner platforms such as Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel. These integrations support custom storage, secret management, and a range of CPU/GPU/memory configurations, allowing you to match performance, cold‑start latency, and cost to your use case.
Harness features that keep agents reliable over long sessions
Automatic context compaction
When an agent’s session approaches the model’s context limit, the API automatically compacts earlier messages, preserving essential information while freeing tokens for new interactions. This enables workflows that span multiple context windows without custom compaction logic.
Efficient tool usage via tool search and programmatic calling
- Tool search loads only the tool definitions required for the current step, reducing token consumption and cost while keeping the model’s cache warm.
- Programmatic tool calling supports parallel execution, chaining, and result filtering, allowing agents to process large data volumes and return only relevant results. The API supports MCP, custom functions, and built‑in tools such as web search.
Parallelism with subagents
The multi‑agent capability lets a primary agent decompose a complex task into independent sub‑tasks, each handled by a dedicated subagent with its own context. The main agent coordinates results, accelerating research, analysis, and coding tasks that benefit from parallel execution.
Open‑source Codex harness under the hood
The Agents API is built on the publicly available Codex harness, which coordinates model calls, tool invocations, and context management. OpenAI maintains and updates the harness, while developers can inspect the source code on GitHub to understand its behavior and contribute improvements.
Pricing and availability
The Agents API is in public beta and incurs no extra service fees; you only pay for the tokens processed and any external tools used, as detailed on OpenAI’s pricing page. OpenAI invites developers to provide feedback during the beta to shape the path toward general availability.
Why this matters
By exposing the same production‑grade harness that powers Codex and ChatGPT for Work, the Agents API removes the engineering overhead of building reliable, long‑running agents. Developers can focus on domain‑specific tools, knowledge bases, and workflows, accelerating the creation of sophisticated AI assistants that operate autonomously over days or weeks.
Sources
- OriginalIntroducing the Agents API