agents/apiTHE ENCYCLOPEDIA
Core concepts

Multi-agent orchestration

Understand independent contexts, parallel work, coordination, and when a single agent is enough.

Main agent
Independent subtasks
Subagent results
Combined answer

Independent work can run concurrently

Subagents have their own context and can work in parallel. A main agent assigns scoped tasks and combines their results. Reviewing different documents or investigating independent causes can benefit from this structure.

Enable orchestration

Set agent.multi_agent.enabled to true and choose max_concurrent_subagents. The harness provides tools to create, message, wait for, and interrupt subagents. You do not need to manually declare those orchestration tools.

Example
// Inside the agent configuration
multi_agent: {
  enabled: true,
  max_concurrent_subagents: 2
}

Keep dependent work ordered

A downstream task that requires an upstream result should wait for that result. Multiple agents editing the same files need coordination. Separate context does not imply a separate safe workspace. Give each agent an expected output and clear scope.

Evaluate the tradeoff

More agents can increase token consumption and coordination overhead. Compare total usage, completion time, and output quality against a single-agent baseline. Use subagents because tasks separate cleanly, not because a larger agent count sounds more capable.

Read the official reference

Check the source for current API fields, account requirements, and service limits.

OpenAI: multi-agent

23 matching topics

What is the OpenAI Agents API?FoundationsAgents API vs Agents SDK vs Responses APIComparisonsAgents API quickstartGetting startedSessions, turns & durable stateCore conceptsHosted vs self-hosted sandboxesInfrastructureConnect MCP servers to Agents APITools & integrationsFunction calling & application toolsTools & integrationsMulti-agent orchestrationCore conceptsStreaming, webhooks & event handlingIntegration guidesFiles, outputs & published artifactsCore conceptsVaults & MCP authenticationTools & integrationsAgent security & credential boundariesProductionTracing, usage & debuggingProductionAgents API pricing & cost planningProductionOpenAI Agents API with PythonGetting startedAgents API with TypeScript & Next.jsIntegration guidesWhat is the OpenAI Agents SDK?FoundationsResponses API in the agent stackFoundationsAgent Skills & SKILL.mdTools & integrationsProgrammatic Tool CallingTools & integrationsRAG, file search & vector storesTools & integrationsWeb search & source citationsTools & integrationsChatKit & Agent BuilderIntegration guides
K to open Esc to close