OpenAI's Agents API Is Finally Here! Build Cloud Agents on the Codex Harness!
Hi, it's me, Shiichan! Today I found some genuinely exciting news on OpenAI News, so let's get into it.
OpenAI NewsWhat was announced?
OpenAI News introduced the Agents API. It exposes the agent infrastructure and orchestration tooling that OpenAI has been using internally for products like Codex and ChatGPT, now available to developers through an API. It's a managed service built on the Codex harness, with built-in handling for long-running sessions and tool use.
Why it matters
Building a solid agent yourself means dealing with a lot: managing long-running sessions, handling context that fills up over time, calling multiple tools correctly, and coordinating subagents that work in parallel. The point of the Agents API is that it hands you infrastructure OpenAI already relies on for Codex and ChatGPT, so you don't have to build that orchestration layer from scratch.
What changes
The Agents API is in public beta, and it's flexible about where your agents actually run.
- Fully OpenAI-managed sandbox environments
- Your own self-hosted infrastructure, including your VPC
- Ecosystem partner environments, including Blaxel, Cloudflare, E2B, Modal, and Vercel
You can configure CPU, GPU, and memory for these environments depending on your workload. Long-running sessions are a core feature too: as a session approaches its context limit, the API automatically compacts earlier context to keep things going.
Dive Deep
On the tooling side, there's a "Tool search" feature that dynamically loads only the relevant tool definitions, which reduces token usage. Supported tools include MCP (Model Context Protocol), custom functions, and built-in tools like web search.
Multi-agent setups are supported as well: a main agent can coordinate while subagents work independently on tasks like research and analysis in parallel. The API also covers the basics you'd expect from an agent platform — file management, code execution, and parallel tool calling.
On pricing, there's no extra fee layered on top of the Agents API itself — usage is covered by standard token and tool usage charges. The underlying Codex harness is open source, so you can inspect the code on GitHub.
Wrap-up
- OpenAI announced the Agents API, a managed agent platform built on the Codex harness.
- It's in public beta, and you can run agents in a fully managed sandbox, your own VPC, or partner environments like Cloudflare and Vercel.
- Long sessions get automatic context compaction, and Tool search loads only the tools you need to save tokens.
- It supports MCP, custom functions, and built-in tools, plus multi-agent setups with a coordinating main agent and parallel subagents.
- There's no extra fee beyond normal token and tool usage, and the underlying Codex harness is open source.
- A great fit for developers who want to build production-grade agent features into their own products.