← Back to AI Tools

OpenAI Agents API: Managed Cloud Agents

OpenAI opened the Agents API in public beta on 10 September 2026 and says it brings the same harness and infrastructure that powers Codex to developers through a simple, flexible API: you can create a production-ready agent in a single API call by specifying the task, model, tools and environment, with OpenAI hosting and maintaining the harness while you choose the compute environment, in an OpenAI-managed sandbox, on your own infrastructure or with sandbox partners including Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel; OpenAI says it ships context compaction, tool search, programmatic tool calling and multi-agent subagent collaboration, and supports MCP, custom functions and built-in tools such as web search.

Tool Overview

Features, steps and FAQ below

Features

  • ✓ Cloud agents in one API call: OpenAI says you can specify the task, model, tools and environment to create a production-ready agent in a single API call, with OpenAI hosting and maintaining the Codex harness and infrastructure
  • ✓ Choose your environment: OpenAI says you can run in an OpenAI-managed sandbox, on your own infrastructure, or with sandbox partners including Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel
  • ✓ Context compaction for long sessions: OpenAI says the Agents API automatically compacts earlier context as a session approaches its context limit, preserving what the agent needs to continue without developers implementing their own compaction logic
  • ✓ Efficient tool use: OpenAI says tool search loads relevant tool definitions as needed to reduce token usage and cost while preserving the model's cache, and programmatic tool calling runs calls in parallel, chains related operations and filters or combines results in code
  • ✓ Multi-agent and an open foundation: OpenAI says complex tasks can be broken into parallel subagents that each maintain their own context while the main agent coordinates results, and that the API is powered by the open-source Codex harness that OpenAI operates and maintains

How to Use

  1. Read the Agents API overview and quickstart in the developer docs and get public-beta access
  2. Create a session with a single API call, specifying the task, model, tools (including MCP and built-in tools) and multi-agent settings
  3. Choose the compute environment: an OpenAI-hosted sandbox, your own infrastructure, or a partner sandbox integration
  4. Enable context compaction, tool search and programmatic tool calling as needed; OpenAI says there are no additional fees for using the Agents API, only charges for the tokens and tools your agents use

FAQ

What is the Agents API?

OpenAI says the Agents API is its managed cloud agent API, in public beta, that brings the same harness and infrastructure that powers Codex to developers for building agents that reach into their own tools and data.

How is it billed?

OpenAI says there are no additional fees for using the Agents API; you simply pay for the tokens and tools your agents use.

Can I choose where my agents run?

OpenAI says yes: you can run in an OpenAI-managed sandbox, on your own infrastructure, or with partner sandbox integrations from Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel.

How does it support long-running tasks?

OpenAI says the Agents API automatically compacts earlier context as a session approaches its context limit, uses tool search to reduce token usage, and supports programmatic tool calling so agents can work through large volumes of data in code.

Does it support multi-agent work?

OpenAI says yes: complex tasks can be broken into parallel subagents that each maintain their own context, with the main agent coordinating and bringing results together.

Official Source

https://openai.com/index/introducing-the-agents-api