OpenAI is making it easier for developers to build AI agents that can do more than generate a response.
On September 10, OpenAI introduced the Agents API in public beta. The API gives developers access to the same Codex-based harness and infrastructure OpenAI uses for long-running agents, with support for tools, sandboxes, context management, and multi-agent workflows. :contentReference[oaicite:0]{index=0}
This is different from simply calling an AI model
A normal API call looks something like this:
You send a prompt → the model generates a response → your application decides what happens next.
An agent works through a longer task.
It may need to inspect files, call tools, run code, collect information, make several decisions, and continue working after the first response.
That is the problem OpenAI is trying to solve with the Agents API.
Instead of building the entire agent loop yourself, developers can create a session, give the agent instructions and tools, and let OpenAI manage much of the underlying orchestration. :contentReference[oaicite:1]{index=1}
What can an Agents API agent actually do?
The API is designed for tasks that take multiple steps.
An agent can work inside a sandbox where it can execute code, edit files, connect to MCP servers and produce artifacts. The application can then stream progress, receive events, and continue the same session with additional instructions. :contentReference[oaicite:2]{index=2}
For example, imagine giving an agent this task:
"Investigate why our API's error rate increased, check the relevant logs, inspect recent changes, and save your findings."
That isn't one model response.
The agent has to gather information, use tools, reason about the evidence, and produce a result.
That's the kind of workflow the new API is built around.
OpenAI is managing the agent runtime
One of the biggest differences is that OpenAI manages the underlying Codex harness for the Agents API.
That harness handles things such as sessions, orchestration, context compaction and recovery, while developers define what the agent should do and which tools it can use. :contentReference[oaicite:3]{index=3}
Long-running tasks are particularly important here.
When an agent works for a long time, it can eventually run into context limits. OpenAI says the Agents API can automatically compact earlier context so the session can continue without developers having to build that mechanism themselves. :contentReference[oaicite:4]{index=4}
Agents can use more than one tool
Tools are a major part of the API.
Agents can use MCP servers, custom functions and built-in capabilities such as web search. OpenAI also provides tool-search and programmatic tool-calling features so agents can load relevant tools when needed and run multiple operations as part of a workflow. :contentReference[oaicite:5]{index=5}
This matters because an agent becomes much more useful when it can actually interact with the systems around it.
A customer-support agent might need a database.
An engineering agent might need GitHub and a terminal.
An operations agent might need monitoring data and deployment tools.
The model provides the reasoning, while the tools give it a way to act.
Multi-agent workflows are built in
The Agents API also supports multiple agents working on different parts of the same problem.
OpenAI's example allows a main agent to delegate tasks to subagents that can work in parallel, then combine their findings. :contentReference[oaicite:6]{index=6}
For example:
Main agent
Investigate a production incident.
Subagent 1
Check deployment changes.
Subagent 2
Analyze application errors.
Subagent 3
Investigate dependency changes.
The main agent can then bring those results together instead of trying to do every investigation sequentially.
This kind of setup can be useful for research, incident response, analysis and coding tasks where the work naturally breaks into separate pieces.
Developers still choose where the agent runs
OpenAI isn't forcing every agent to run in one environment.
The Agents API supports OpenAI-hosted sandboxes as well as other execution environments, including self-hosted infrastructure and integrations with several sandbox providers. :contentReference[oaicite:7]{index=7}
That gives teams more control over the compute, storage and deployment setup behind their agents.
For an experiment, a managed sandbox may be enough.
For a production system with stricter infrastructure requirements, a company may prefer to run the execution environment itself.
Agents API vs Agents SDK vs Responses API
These products can sound very similar, but they serve different levels of control.
The Agents API is aimed at long-running agents where OpenAI manages the Codex-based runtime and session infrastructure.
The Agents SDK is more code-first. Developers keep control of the agent loop, tools, handoffs, deployment and runtime integration.
The Responses API sits at a lower level and is useful when developers want to work directly with model responses and build more of the agent system themselves. :contentReference[oaicite:8]{index=8}
So the choice is essentially about how much of the agent infrastructure you want OpenAI to manage.
What this means for developers
The interesting part of the Agents API isn't simply that OpenAI added another API.
It shows where AI application development is heading.
Developers are moving from:
Prompt → Response
toward:
Task → Planning → Tools → Actions → Results
That changes the engineering problem.
Building an agent is no longer just about writing a good prompt. Developers also have to think about tool permissions, execution environments, state, authentication, observability, failures and how much freedom an agent should actually have.
OpenAI's own agent documentation now treats runtime, tools, sessions, events and execution environments as separate parts of an agent system. :contentReference[oaicite:9]{index=9}
The bigger picture
OpenAI's Agents API is still in public beta, so the platform will continue to change as developers use it in real applications. :contentReference[oaicite:10]{index=10}
But the direction is straightforward.
AI models are becoming components inside larger software systems rather than the entire system themselves.
The model reasons.
The tools provide access.
The sandbox provides a place to work.
The session keeps the task moving.
And the agent coordinates the whole process.
That is a much more ambitious model of what an AI application can be.
For developers, the next challenge isn't simply learning how to call an LLM.
It's learning how to build software around one that can actually do things.



