OpenAI has introduced an Agents API that packages the orchestration layer behind its Codex agent harness as a hosted service. The pitch is straightforward: instead of building your own harness around a model call, you call the API and OpenAI manages sessions, orchestration, context compaction, and recovery. Your application supplies the tools and chooses the execution environment.

OpenAI Developers wordmark in its signature typography
OpenAI Developers mark, identifying the vendor behind the hosted Agents API and Codex harnessdevelopers.openai.com

The article's subject is a product launched by OpenAI, and this mark appears on the very documentation page the article draws on. Placed after the opening paragraph, which introduces OpenAI's Agents API, it identifies the vendor that manages sessions, orchestration, context compaction, and recovery while the caller supplies tools and chooses the execution environment.

The Agents API is built around four concepts. An agent is the model, its instructions, the tools it can use, and the MCP servers it can reach. An environment is an optional sandbox or computer where the agent accesses files, loads skills, and runs commands. A session is a durable instance of an agent that works on tasks and responds to input. Events and items are the inputs sent to an agent and the output it produces during a session.

A session follows a clear sequence. The application creates a session and configures the agent; OpenAI provisions its environment. The application gives the agent a task, and user input starts a turn of work once the environment is ready. The application follows progress by streaming output or using webhooks to learn when the agent finishes or needs input. It can then send another task to the same session or guide the agent during its current turn. With an OpenAI-hosted session, the application sends input and receives events while OpenAI runs the agent and provisions and manages its sandbox.

Diagram showing an application starting sessions and receiving events and output from the Agents API while OpenAI runs the managed Codex harness and provisions its sandbox
The Agents API session flow: the application creates and drives sessions while OpenAI runs the managed Codex harness and provisions the sandboxdevelopers.openai.com

This figure maps directly onto the third body paragraph, which walks through the session sequence: creating and configuring a session, OpenAI provisioning the environment, sending a task, streaming output or using webhooks to learn when the agent finishes, and guiding the agent during its turn. The diagram's own description confirms it shows the application starting sessions and receiving events and output while OpenAI runs the harness and provisions the sandbox, so it illustrates exactly the flow the paragraph explains.

What the managed harness provides, according to the documentation, includes running commands and code in a sandbox, applying relevant skills and instructions, connecting to external data through tools or MCP, steering the agent while it works, and summarizing previous work to manage context. Pricing follows the selected model's API rates, with OpenAI tools billed at standard rates and OpenAI-hosted sandboxes at standard container rates.

The environment choice is the main design decision. An OpenAI-hosted sandbox is the default path in the quickstart, letting an agent create and run a directory-tree script without the caller provisioning anything. A self-hosted sandbox is also available, which the documentation lists as an option for running agents in an environment the caller controls. The distinction matters because it changes who owns the execution environment, which in turn affects data locality, network access, and compliance posture.

The documentation also frames the API around concrete use cases rather than abstract capability: an incident-response agent that investigates alerts and requests approval for recovery actions; a Slack bot that investigates requests using connected workplace tools; a data analyst that answers warehouse questions with read-only SQL; a GitHub issue investigator that reproduces reported bugs and shares findings on GitHub; and a document reviewer that reviews documents with policy skills and specialist agents.

Two important caveats. First, the Agents API is not a standalone model product. It is a harness and orchestration layer that runs on top of OpenAI's model catalog, so cost and capability depend on which model an agent is configured to use. Second, the documentation is the only substantive source available for this launch. It establishes what OpenAI says the product does, but it does not provide independent verification, third-party benchmarks, or evidence about reliability, latency, or failure rates in production. The self-hosted sandbox option is listed in the documentation's navigation but is not described in depth in the overview text, so its exact configuration, limits, and security model remain unspecified in the supplied material.