OpenAI has opened the Agents API in public beta for developers building cloud agents. A request can specify a task, model, tools, and execution environment. OpenAI describes the harness as the same one behind Codex. The goal is not simply a longer prompt: it is to let an agent work with files and tools in a persistent environment. Read OpenAI’s Agents API announcement.

OpenAI official mark
OpenAI official mark; click to open the announcement.

What the API provides

An agent combines task input, a model, tools, and an environment. Tools can include MCP servers, custom functions, and built-in capabilities. Developers can choose an OpenAI-hosted sandbox, their own infrastructure, or a partner environment listed in the announcement. The harness also provides long-session context compaction, on-demand tool search, programmatic parallel calls, and subagent delegation. It supplies orchestration and runtime; developers still own their business logic, permissions, and user experience.

A useful first prototype

Start with a bounded workflow whose results can be audited. For example, investigate why a service’s error rate rose in the last 30 minutes: let the main agent read monitoring data, assign separate checks for deployments, logs, and dependency changes, and save evidence and recommendations in a specified folder. Before connecting tools, set the environment boundary, permitted tools, file permissions, run-time limit, and human approval points. Do not rely on a model’s final answer alone for payments, production changes, or external messages.

From quickstart to integration

  1. Read the Agents API overview and Quickstart; confirm the current SDK, model ID, and session-creation interface.
  2. Configure one test task with the minimum tools and an isolated environment. Do not begin with full production credentials.
  3. Define structured output for findings, evidence links, actions taken, unresolved questions, and actions needing approval.
  4. Test errors, timeouts, duplicate execution, and recovery after interruption. Track token and tool costs.

The public beta may change. OpenAI says there is no additional Agents API platform fee, but developers still pay for model tokens and tools. Budget separately for compute and services supplied by hosted environments or partners.

When it helps—and when to build your own

A managed harness may reduce engineering work if your application needs long sessions, tool routing, file workspaces, or parallel subtasks. Building your own runtime may be preferable when you need complete control over execution, data residency, audit logs, or provider choice. OpenAI says the underlying Codex harness has public source code, but the Agents API itself is managed by OpenAI; open source for the harness does not make the hosted service or every execution environment open source.