Introduction

If you’ve been stitching agent loops by hand—sessions here, a sandbox there, context compaction in a sticky note—OpenAI just opened the door to the same harness that powers Codex. The Agents API is in public beta: one managed runtime for durable cloud agents, with you choosing the model, tools, and where the code actually runs.

No extra platform fee for the API itself. You pay for tokens, tools, and containers the way you already do.

What You Get in the Box

OpenAI runs the agent loop: model calls, tool use, context compaction, and recovery. Your app sends tasks, streams progress, and steers mid-flight. The four building blocks are clean:

  • Agent — model, instructions, tools, and MCP servers
  • Environment — optional sandbox or computer for files, skills, and commands
  • Session — a durable instance that keeps working across turns
  • Events and items — the inputs you send and the outputs that stream back

Create a session, hand it a job, follow events (or webhooks), then continue or steer without rebuilding the whole conversation. That’s the sunny part for long-running creative and engineering workflows.

Sandboxes: Hosted or Yours

Two paths:

  1. OpenAI-hosted sandboxes — OpenAI provisions the box; the agent can run code, touch files, and ship artifacts while you supply packages, skills, and plugins.
  2. Self-hosted / partner sandboxes — bring your own workspace or plug into first-class partners (Blaxel AI, Cloudflare Dev, Daytona, DigitalOcean, E2B, Modal, Oracle Cloud, Runloop AI, Vercel, and friends), including VPC-style setups when you need them.

Either way, the harness stays managed. You focus on what makes the agent yours.

Tools, MCP, and Subagents

Sessions can mix programmatic tool calling, web search, and MCP servers (HTTP transport in the docs examples). Flip on multi_agent and the harness can split work across concurrent subagents—handy when research, coding, and review should fan out instead of queue.

A typical create call targets gpt-6-astra, wires an MCP docs server plus web search, and points at a workspace directory for skills. Requests need the OpenAI-Beta: agents=v1 header (SDKs add it for you).

Pricing Reality Check

Model usage is billed at the selected model’s rates. Built-in tools use their normal prices. Hosted sandboxes use standard container rates—so skim the Containers pricing page before you spin a fleet of overnight boxes. The Agents API itself doesn’t add a separate surcharge.

Worth knowing: data residency for Agents API is US-only right now, and Zero Data Retention isn’t supported—even with a self-hosted sandbox.

Why Creators and Builders Should Care

This is the “stop reinventing the agent loop” release. Incident responders, Slack bots, data analysts, GitHub investigators, document reviewers—OpenAI’s example gallery maps straight onto production shapes. Pair Astra (or another backend) with tools and a sandbox, and you’ve got a durable co-worker that can code, fetch context, and leave artifacts without you babysitting every turn.

Pro Tip

Start with one OpenAI-hosted sandbox and a short task that must write and run a file (their tree-script quickstart is perfect). Prove the event stream end-to-end before you bolt on MCP, multi-agent, and a VPC sandbox. Latency and cost habits show up early.

Conclusion

The Agents API turns Codex’s harness into something you can embed: durable sessions, optional sandboxes, MCP and subagents, billed like the rest of the platform. If your creative stack already leans on agents for research, editing pipelines, or tool-heavy builds, this beta is the cleanest on-ramp OpenAI has shipped yet.

Docs live at developers.openai.com/api/docs/guides/agents-api/overview—and the quickstart is short enough to try before your coffee cools.

—Aurelia ♡