Skip to content

Introducing the Agents API

Read the Portuguese translation →

Author: OpenAI · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: Introducing the Agents API · Channel: OpenAI · 02:02 · Watch on YouTube

Topics: AI agents, Prompt and context engineering

The Agents API provides a hosted version of the Codex harness, handling orchestration, sessions, and context management for applications. The video demonstrates an incident-investigation agent that connects to tools through MCPs, follows a runbook skill, and runs in an environment chosen by the developer. Programmatic tool calling helps process large logs, while multi-agent orchestration can divide independent tasks. Compaction supports long-running sessions, and the completed investigation can be delivered as a shareable report without requiring developers to build or maintain the agent infrastructure.

  • The Agents API handles orchestration, sessions, and context management.
  • Developers can connect tools through MCPs and provide instructions through a skill.
  • Developers control the execution environment and the tools available to the agent.
  • The agent can use an OpenAI sandbox, a third-party provider, or the developer’s own infrastructure.
  • Programmatic tool calling can filter logs in code and reduce the need to pass raw data through the context window.
  • Multi-agent orchestration can delegate separate investigation tasks to sub-agents.
  • Compaction summarizes prior work to help an agent continue a long-running investigation.
  • Investigation findings can be packaged into a shareable report with a likely root cause, supporting evidence, and next steps.
Start Chapter Summary
00:00 Introducing the Agents API The API provides hosted agent infrastructure, including orchestration, sessions, and context management.
00:30 Setting up an incident investigation agent The example agent uses connected tools, a runbook skill, and a developer-controlled execution environment.
01:00 Handling large investigations Programmatic tool calling filters logs, and multi-agent orchestration can delegate independent investigation tasks.
01:32 Continuing work and sharing findings Compaction supports long-running sessions, and the agent can produce a shareable report without custom agent infrastructure.

Today, we’re launching the Agents API to handle that infrastructure for you. — 00:00

We can connect all of our necessary tools through MCPs and give the agent our investigation runbook via a skill. — 00:30

With programmatic tool calling, the agent can process those logs and filter the results in code — 01:00

It gives the model a summary of all prior work completed so the agent can continue its investigation. — 01:32

We’re excited to bring you an ever-improving harness behind one API. — 02:02

Agents API, OpenAI, Codex, MCP, skill, tool calling programático, multi-agent orchestration, compaction

00:00 Getting a long-running agent into production takes a lot of work, even with a capable model. You need to connect tools, track progress, manage context, and secure and maintain the infrastructure around it. Today, we’re launching the Agents API to handle that infrastructure for you. The Agents API brings a hosted version of the Codex harness to your applications. OpenAI handles orchestration, sessions, and context management so that you can stay focused on building. Let’s look at an example. Suppose we want to build an agent that helps investigate

00:30 incidents in our production stack. It would need access to observability data and recent code changes, along with our team’s instructions for how to handle an outage. We can connect all of our necessary tools through MCPs and give the agent our investigation runbook via a skill. You control the agent’s execution environment and the tools it has access to. That includes connecting a sandbox, whether it’s through OpenAI, a third-party provider, or using your own infrastructure. In a situation like this, we’d also

01:00 be working through a ton of logs, likely more than we could fit in the model’s context window. With programmatic tool calling, the agent can process those logs and filter the results in code, meaning fewer tokens spent passing around raw data and more spent on the information the agent needs. For the largest tasks, independent work can be delegated via multi-agent orchestration. In this case, we might want one sub-agent to examine recent changes, another to check telemetry, and then have the lead agent unify their findings.

01:32 But even in a single agent session, long-running context windows still work really well with compaction. It gives the model a summary of all prior work completed so the agent can continue its investigation. Once the work is complete, the findings should be served as a report that the on-call team can review, a likely root cause, the supporting evidence, and suggested next steps bundled into a single shareable file. And there we have it. With the Agents API, we were able to drive an entire workflow without building or maintaining any

02:02 of our own agent infrastructure. Infrastructure that will continue to get better alongside new models and new capabilities. We’re excited to bring you an ever-improving harness behind one API. Happy building.