OpenAI Opens Codex’s Agent Infrastructure to Developers With New Agents API

The September 10 launch gives developers access to the same type of agent infrastructure OpenAI developed while scaling Codex and ChatGPT for Work. Instead of forcing every developer to build their own system for managing context, tool calls, sessions, recovery and multiple agents, OpenAI now provides that infrastructure through an API.

The move is significant because the AI-agent market is moving beyond simple chat interfaces.

Modern agents are expected to perform multi-step tasks, work with files, call external tools, execute code and continue working for extended periods. Building the model itself is only one part of that process.

The Agents API targets the infrastructure underneath the agent.

Developers can provide the task, model, tools and execution environment while OpenAI manages the agent harness.

What Is the OpenAI Agents API?

The Agents API is a public-beta API for creating and running cloud-based AI agents.

OpenAI describes it as a way to build agents using the Codex harness, with OpenAI managing the underlying orchestration and infrastructure.

In a traditional AI application, developers may have to build large amounts of supporting infrastructure around the model.

That can include:

  • Session management
  • Context management
  • Tool execution
  • Error recovery
  • Long-running task handling
  • Agent orchestration
  • Subagent coordination
  • File and code execution environments

The Agents API is designed to handle many of those responsibilities.

This lets developers spend more time defining what their AI agent should actually do instead of maintaining the infrastructure required to keep it running.

Why the Codex Harness Matters

Codex has become one of OpenAI's major examples of an AI system that can work through complex software tasks rather than simply returning a short answer.

A coding agent needs more than an AI model.

It needs an environment where it can inspect files, run code, use tools, maintain context and recover when something goes wrong.

OpenAI says the Agents API brings the harness and infrastructure behind Codex to developers.

That could make a major difference for companies building their own specialized agents.

Instead of creating an entirely new orchestration system, developers can use OpenAI's managed infrastructure as the foundation and customize the tools, knowledge and workflows on top.

Developers Can Build an Agent With a Single API Call

One of the headline features is the ability to create an agent through a single API call.

Developers specify information such as:

  • The model
  • The task
  • Available tools
  • Agent environment
  • Optional multi-agent configuration
  • Files or other resources the agent can access

OpenAI's example shows an agent using MCP tools, multiple concurrent subagents and an OpenAI-hosted environment.

This does not mean that building a production AI application becomes completely automatic.

Developers still need to design the agent's workflow, permissions, tools and business logic.

The difference is that much of the underlying execution infrastructure is handled by OpenAI.

Long-Running AI Agents Are a Major Focus

One of the biggest challenges with autonomous agents is keeping them useful when tasks become lengthy.

A short chatbot conversation is relatively simple.

A task that continues for hours or days is different.

The system has to preserve important information, manage context limits, recover from failures and continue from the correct point.

OpenAI says the Agents API is designed specifically for these long-running workloads.

Automatic Context Compaction

Long-running agents can eventually reach context limits.

The Agents API includes automatic context management that can compact earlier information while preserving the details the agent needs to continue working.

This means developers do not have to build their own complete context-compaction system for every application.

The agent can continue across multiple context windows while maintaining the information needed for the task.

That feature could be particularly useful for research agents, software-development systems, data-analysis agents and enterprise automation.

Agents Can Use Multiple Tools

An AI agent becomes significantly more useful when it can interact with external systems.

The Agents API supports tools including MCP servers, custom functions and built-in tools such as web search.

This allows developers to build agents that can move beyond generating text.

For example, an agent could potentially:

  1. Receive a business task.
  2. Search relevant information.
  3. Retrieve data from an external system.
  4. Analyze the information.
  5. Run code.
  6. Produce an output.
  7. Save the results.
  8. Continue with another stage of the task.

The exact capabilities depend on the tools and permissions developers provide.

That distinction is important because the Agents API does not automatically give an AI unlimited access to a company's systems.

Developers still control which tools the agent can use.

OpenAI Adds Tool Search and Programmatic Tool Calling

Another important part of the Agents API is how agents interact with large tool collections.

When an application gives an agent access to many tools, loading every tool definition into the model's context can become expensive and inefficient.

OpenAI says its Agents API can use tool search to load relevant tool definitions when they are needed.

The API also supports programmatic tool calling.

This can allow agents to execute tool calls in parallel, chain operations and process results before returning only the relevant information to the model.

For applications with large tool libraries, that could reduce unnecessary context usage and make complex workflows more practical.

Agents Can Work Together Through Subagents

The new API also includes support for multi-agent workflows.

A primary agent can delegate different parts of a complex task to subagents.

For example, a research application could divide a large assignment into separate tasks:

Main agent → Research subagent → Data-analysis subagent → Verification subagent → Final synthesis

Each subagent can maintain its own context while the main agent coordinates the overall process.

OpenAI says the Agents API supports parallel subagents, with the example documentation showing multiple concurrent subagents.

This could be useful when a task naturally breaks into independent pieces.

Why Multi-Agent Systems Matter

A single AI agent attempting to perform every part of a complicated workflow may become difficult to manage.

Breaking the task into specialized subagents can provide a cleaner architecture.

One agent can focus on research.

Another can analyze data.

Another can inspect code.

Another can verify the results.

The main agent can then combine their work.

This approach is becoming increasingly common across agentic AI development, and OpenAI is now building multi-agent support directly into its managed infrastructure.

OpenAI Introduces Hosted Sandboxes

The Agents API also introduces OpenAI-hosted sandboxes.

These environments allow agents to run code, work with files and produce artifacts while OpenAI manages the underlying sandbox infrastructure.

Developers can configure the environment with files, packages, skills and plugins needed by their agent.

This is important because many useful agents need somewhere to execute their work.

A coding agent needs an environment for code.

A data-analysis agent may need Python packages and files.

A document-processing agent may need access to files and supporting tools.

The sandbox provides that execution layer.

Developers Are Not Locked Into OpenAI's Sandbox

OpenAI is also allowing developers to choose other execution environments.

The Agents API supports OpenAI-managed environments, developer-controlled infrastructure and integrations with sandbox partners.

OpenAI lists ecosystem integrations including:

  • Cloudflare
  • Vercel
  • Modal
  • E2B
  • Daytona
  • DigitalOcean
  • Oracle
  • Runloop
  • Blaxel

This gives developers more flexibility over where agent workloads execute.

For enterprise applications, this can be particularly important because organizations may have requirements around networking, data residency, infrastructure control and security.

Agents API Supports MCP

The launch also reinforces OpenAI's support for the Model Context Protocol (MCP).

MCP provides a standardized way for AI applications to connect models with external tools and data sources.

OpenAI's Agents API documentation includes MCP as a supported tool type.

This means developers can design agents that connect to MCP-compatible services rather than creating every integration from scratch.

MCP is becoming an important part of the agent ecosystem because AI systems increasingly need to interact with software outside the model itself.

An AI model may provide the reasoning, but external tools provide the ability to actually perform work.

The API Is Built on an Open-Source Foundation

Although OpenAI manages the Agents API infrastructure, the company says the Codex harness behind it is based on an open-source foundation.

OpenAI says developers can inspect and learn from the core logic responsible for coordinating model calls, tools and context.

That gives the project a different character from a completely closed agent runtime.

Developers can use OpenAI's managed service while also having visibility into the underlying open-source foundation.

There Are No Additional Agents API Fees

OpenAI says the Agents API itself does not add an additional fee.

Developers instead pay for the tokens and tools their agents consume according to the applicable API pricing.

However, this does not mean running agents is free.

Long-running agents can consume significant model tokens and tool resources.

Hosted sandbox usage can also have infrastructure costs.

Developers therefore need to monitor both model and execution costs when building production systems.

What Developers Can Build With Agents API

The platform could support a wide range of applications.

AI Research Agents

Research agents could collect information from approved sources, analyze it and create reports.

Software Engineering Agents

Coding agents could inspect repositories, modify files, run tests and produce development artifacts.

This complements the broader movement toward autonomous coding already covered on TheInfoBytes, including Zoho Catalyst 3.0's agent-ready development platform.

Business Automation Agents

Companies could build agents that process documents, investigate operational problems and connect multiple business systems.

Data Analysis Agents

Agents could retrieve information, run calculations and produce analytical outputs without requiring every step to be manually executed.

Customer-Service Agents

Developers could build specialized agents that combine company knowledge with tools for customer support and internal operations.

The important point is that the Agents API is infrastructure rather than a single end-user application.

Its purpose is to let developers build their own agent experiences.

How Agents API Differs From a Normal AI API

A conventional model API generally gives an application access to a model.

The application developer is responsible for constructing the rest of the workflow.

A simplified architecture might look like:

Application → Model API → Response

An agent application is more complicated:

Application → Agent → Model → Tools → Environment → Files → Subagents → More Tools

The Agents API attempts to manage much of the middle layer.

This is why the launch is strategically important.

OpenAI is not simply releasing another model endpoint.

It is offering a managed infrastructure layer for autonomous AI applications.

OpenAI Is Moving From Models Toward Agent Infrastructure

The launch follows a broader pattern in OpenAI's recent product development.

The company has been expanding from individual AI models toward complete systems for work, coding, data analysis and automation.

The Agents API fits directly into that strategy.

The same day, OpenAI also introduced its Data agent for ChatGPT Work, designed to connect company data with conversational analysis and interactive dashboards.

It also launched ChatGPT for Financial Services, targeting specialized professional workflows.

These products point toward a broader shift.

Instead of asking users to figure out how to use a general-purpose model, AI companies are increasingly packaging models, tools, data access and execution infrastructure into specialized workflows.

What This Means for AI Developers

For developers, the Agents API could reduce one of the biggest barriers to creating reliable autonomous systems.

Building an AI agent prototype is relatively easy.

Building an agent that can continue working for hours, manage tools, recover from errors and maintain context is much harder.

The infrastructure required to do that can become a major engineering project.

OpenAI is now offering that infrastructure as a managed service.

That could allow smaller development teams to experiment with sophisticated agents without first building their own complete agent runtime.

What Developers Still Need to Manage

The Agents API does not eliminate the need for engineering.

Developers still have to decide:

  • Which model should run the agent?
  • Which tools should it access?
  • What permissions should those tools have?
  • Which data can it read?
  • Which actions require approval?
  • How should failures be handled?
  • How should agent outputs be validated?
  • How much autonomy should be allowed?
  • How much should each task cost?

These decisions become especially important when agents can modify files, execute code or interact with external systems.

More capable agent infrastructure also means more responsibility for the applications built on top of it.

The Bigger Shift in AI Agent Development

The most important part of the Agents API is not simply that OpenAI has created another developer product.

It is the decision to turn the infrastructure behind Codex into a platform.

For years, developers have had to build their own orchestration layers around AI models.

Now companies such as OpenAI are increasingly offering managed agent runtimes that handle the difficult operational pieces.

That could accelerate the development of specialized AI agents.

Instead of every startup building its own context-management and orchestration system, developers can focus on the domain-specific part that actually differentiates their product.

The result could be a new generation of applications where AI agents do more than answer questions.

They could research, analyze, code, use software tools, work with files, delegate tasks and continue operating across long sessions.

OpenAI's Agents API is designed to provide the infrastructure behind that shift.

Frequently Asked Questions

What is OpenAI Agents API?

OpenAI Agents API is a public-beta developer platform for building and running long-running AI agents using the Codex agent harness and managed infrastructure.

Is the OpenAI Agents API available now?

Yes. OpenAI says the Agents API is available in public beta to all developers.