Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

Playbooks · Coding tasks

OpenAI's Agents API: the harness is now hosted

Written November 7, 2026

OpenAI put the agent harness behind a URL: POST to /v1/agents/sessions with a model, tools, and an environment. What you still own — and what you now rent.

What shipped

On September 10, 2026, OpenAI introduced the Agents API in public beta, available to all developers. The pitch is one line: build and run cloud agents on the managed Codex runtime, fully run by OpenAI. Instead of installing the runtime and running the agent loop on your own machine, you create a production-ready agent in a single API call by specifying the task, model, tools, and environment. The call is POST /v1/agents/sessions, with the OpenAI-Beta: agents=v1 header, and OpenAI runs the loop.

The API is built around four concepts, as the Agents API overview sets them out:

ConceptWhat it is
AgentThe model, instructions, tools, and MCP servers available to the agent.
EnvironmentAn optional sandbox or computer where the agent accesses files, loads skills, and runs commands.
SessionA durable instance of an agent that works on tasks and responds to input.
Events and itemsThe inputs sent to an agent and the output produced during a session.

What OpenAI runs, and what you still own

OpenAI manages sessions, orchestration, context compaction, and recovery, while your application provides tools and chooses the execution environment. The service automatically compacts earlier context as a session approaches its limit, so a workflow can span several context windows without you writing compaction logic. It can break work into pieces and delegate them to subagents that work in parallel, each holding its own context. The docs' example allows up to four concurrent subagents. Tool search loads relevant tool definitions as needed, and programmatic tool calling lets agents run calls in parallel and combine results in code. The API supports MCP, custom functions, and built-in tools such as web search.

You choose where the agent's compute runs: in an OpenAI-managed sandbox, on your own infrastructure, or with one of nine sandbox partners: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel. The OpenAI-hosted sandbox uses the same sandboxing infrastructure that powers Codex and ChatGPT, and OpenAI provisions and manages it, configured with your files, packages, skills, and plugins. The runtime itself is open-source Codex, so the coordination logic is inspectable even though OpenAI operates it.

What stays yours: the tools, the environment choice, and the call on whether the result is right. The API runs the loop; it does not judge the result.

What it costs

There are no additional fees for using the Agents API itself. You pay for the tokens and tools your agents use, as outlined on OpenAI's pricing page. Model usage is billed at the selected model's API rates, OpenAI tools at their standard rates, and OpenAI-hosted sandboxes at standard container rates. The announcement gives no container prices, so budget the hosted sandbox from the pricing page rather than from a headline figure.

Where the hosted loop fits — and where it does not

The hosted loop fits work that runs for hours and needs to survive across turns: a session keeps its state, so you can continue work without rebuilding the conversation context, and you can delete sessions and published artifacts when you are done. It is a hosted loop, not a replacement for local CLIs. Codex and other local CLIs still exist, and the API is one way to run the same runtime, not the only way.

Two limits matter before you build on it. The API is in public beta, and OpenAI says it will iterate quickly toward general availability, so endpoints, parameters, and the beta header can change. And the API currently supports data residency only in the United States and does not support Zero Data Retention. Choosing a self-hosted sandbox does not make the Agents API ZDR-eligible.

Limits

Related playbooks

Sources

Back to: Coding playbooks hub · Also: November shutdowns: Runloop, Conductor, Moondream · GitHub Agentic Workflows are now GA · Baseten Sandboxes for long-running stateful agents