Skip to main content

Quick Overview

In this product announcement and technical walkthrough, Charlie Guo, Developer Experience Engineer at OpenAI, introduces the Agents API. The video explains the operational challenges of deploying AI agents in production and demonstrates how OpenAI's hosted harness manages orchestration, tooling, and execution environments.

Key Points

  • 1.OpenAI has launched the Agents API to provide a hosted version of the Codex harness for running long-running production agents.
  • 2.The Agents API manages backend infrastructure including orchestration, execution sessions, and context management.
  • 3.Developers can run agents in OpenAI-hosted sandboxes, third-party sandboxes, or their own self-hosted environments while connecting tools via MCP plugins and skills.
  • 4.Programmatic tool calling allows agents to filter large datasets in code, drastically reducing token consumption compared to direct tool calls.
  • 5.The system supports multi-agent delegation to run sub-tasks in parallel and uses context compaction to sustain long-running investigations.

Summary

Charlie Guo, Developer Experience Engineer at OpenAI, introduces the Agents API, a platform feature designed to manage the infrastructure needed for long-running AI agents in production. Deploying agents typically demands connecting external tools, managing context, maintaining execution sessions, and securing compute environments. The Agents API addresses this by bringing a hosted version of the Codex harness directly to developer applications, handling orchestration, session persistence, and context management out of the box.

To demonstrate the platform, Guo walks through an automated incident investigation workflow for an on-call engineering stack. The agent requires access to observability telemetry, repository change logs, and operational runbooks. Developers configure these capabilities by attaching Model Context Protocol plugins for services like Datadog and GitHub, alongside markdown-based investigation runbooks supplied as skills. The execution environment can be configured to run in an OpenAI-hosted sandbox, a third-party sandbox, or custom self-hosted infrastructure.

When analyzing high-volume telemetry, raw logs can easily overwhelm a model's context window. The demonstration highlights programmatic tool calling, where the agent writes and executes code inside the sandbox to process and filter raw records. In the example shown, direct tool calling required 170,126 tool-result tokens to inspect logs, whereas programmatic tool calling filtered 5,000 log records down to 42 matching errors using only 11 tool-result tokens.

For more complex investigations, the Agents API supports multi-agent orchestration. A primary agent delegates independent diagnostic tasks to specialized sub-agents running concurrently, such as having one sub-agent inspect git pull requests while another analyzes latency metrics. Once the sub-agents finish their tasks, the lead agent reconciles the results. In extended workflows, context compaction summarizes earlier turns so the session stays within manageable token limits while preserving relevant details.

At the conclusion of the workflow, the agent compiles its findings into a comprehensive incident report document. The generated report includes the identified root cause, supporting telemetry graphs and error timestamps, and suggested mitigation steps for human engineers. Guo notes that the underlying harness will continue to improve as OpenAI introduces newer models and platform capabilities.

Hosted Infrastructure and Harness

Building production-grade agents requires managing complex infrastructure, including session orchestration, tool connections, and context tracking. The Agents API handles these tasks by providing a hosted execution harness based on the Codex harness, letting developers focus on application logic rather than backend plumbing.

Sandboxes and Tool Integration

Developers maintain full control over the execution environment and available tools. The API supports sandboxes hosted directly by OpenAI, third-party sandbox providers, or self-hosted environments, while integrating external tools and runbooks through Model Context Protocol plugins and skills.

Token Optimization and Multi-Agent Workflows

To handle large volumes of data such as server logs, programmatic tool calling enables code execution to filter results before they enter the model context, reducing token usage. For complex investigations, a lead agent can spawn parallel sub-agents to analyze code changes and telemetry independently before consolidating findings.

Context Compaction and Report Generation

For long-running sessions, context compaction generates summaries of completed steps so the model retains critical history without exceeding context limits. Once the investigation finishes, the agent can compile evidence, root cause analysis, and remediation steps into a structured shareable report.

The Bottom Line

The presentation demonstrates how the OpenAI Agents API simplifies agent development by abstracting away execution sandboxes, context management, and session orchestration. It establishes that techniques like programmatic tool calling and context compaction significantly improve efficiency and token economics during heavy analytical tasks. While the API handles backend coordination and tool integration, developers remain responsible for supplying the domain-specific runbooks, tool permissions, and mitigation decisions.

FAQ

What is the OpenAI Agents API and what does it provide to developers?

The Agents API is an OpenAI platform feature that provides a hosted version of the Codex harness, managing agent orchestration, context management, and execution sessions for production applications.

What sandbox environments are supported by the OpenAI Agents API?

The API supports OpenAI-hosted sandboxes, third-party provider sandboxes, and self-hosted developer infrastructure.

How does programmatic tool calling reduce token usage in the OpenAI Agents API?

Programmatic tool calling allows the agent to execute code within the sandbox to process and filter large datasets, returning only summarized or matching results rather than loading entire raw datasets into the model context.

How does multi-agent orchestration work during an incident investigation workflow?

A lead agent can spawn multiple sub-agents to perform parallel tasks, such as reviewing code diffs and checking telemetry metrics, and then reconcile the individual findings into a single diagnosis.

What role does context compaction play in long-running agent sessions?

Context compaction summarizes completed prior steps in the session history, allowing the agent to proceed with its investigation without exceeding the model context window.

Worth watching for

Software engineers and AI developers looking to build, deploy, and scale autonomous or multi-agent workflows in production without managing custom harness infrastructure.

  • openai
  • agents-api
  • artificial-intelligence
  • software-engineering
  • orchestration