Configure a coordinator to delegate work to specialized Agents and observe collaboration through Session Threads.
Multiagent orchestration lets one Agent act as a coordinator that delegates work to other Agents. Each child Agent runs in an independent Session Thread, and the coordinator combines their results into the final response.Use it for complex tasks that can be divided by responsibility, run in parallel, or executed in stages. For one-step work, strictly sequential tasks, or tasks where multiple workers would frequently edit the same files, use a single Agent to keep the workflow simpler.
Multiagent orchestration is built on the Session Thread model. The Agent selected when you create a Session becomes the coordinator. Based on its system prompt, it selects child Agents from the multiagent.agents roster and delegates tasks to them.
Concept
Description
Coordinator
The single coordinating thread in each Session. It breaks down work, selects child Agents, follows up on results, and produces the final response
Child Agent
An Agent in the multiagent.agents roster. It can have its own model, system prompt, tools, MCP servers, and skills
Session Thread
The execution thread for a coordinator or child Agent, with an ID prefixed by sthr_. Each thread has its own conversation history, Agent snapshot, and status
Agent roster
The set of Agents available for delegation. Their versions are resolved and saved when the coordinator is created or updated
Resources, contexts, and configurations within a multiagent Session have the following scopes:
Scope
Behavior
Environment and filesystem
All threads in a Session share the same Environment, Sandbox, and filesystem
Vaults
Bound when the Session is created and available to authorized Agents in that Session
Conversation history
Isolated per Thread. A child Agent does not automatically receive the full context of other threads
Agent configuration
Each Thread uses its own Agent version snapshot, including its model, system prompt, tools, MCP servers, and skills
Event streams
The Session event stream aggregates all threads; Thread endpoints expose the complete event stream for one thread
Parallel child Agents share a filesystem. Define clear file or directory ownership in the coordinator system prompt so that child Agents do not edit the same file concurrently.
Design the roster and coordinator system prompt around task dependencies and responsibility boundaries:
Assign independent research, module implementation, or data collection tasks to different Agents so they can run in parallel.
Split implementation, testing, and review by responsibility. For example, an implementation Agent can write code while a review Agent reads the code and returns an issue list. Route work that needs a stronger model or specialized tools to the appropriate Agent.
Run dependent tasks in stages, such as implementation followed by review. The coordinator uses the review result to decide whether another iteration is needed.
The system prompt should also define each Agent's output format and identify tasks that the coordinator must handle itself.
In the Cloud Agents console, open Agents and create the Agents that will collaborate.
Create or edit the coordinator. In the Multiagent section, select the Agents available for delegation. The console saves the current version of each selected Agent.
In the coordinator system prompt, define task decomposition, delegation criteria, deliverable formats, and conflict handling.
Save the coordinator and use it to create a Session.
The console selector references other Agents. To add the coordinator itself to the roster, use the API or edit the JSON configuration directly and add {"type":"self"}.
References another Agent. id is required and version is optional
Self object
{"type":"self"}
Uses the coordinator's own Agent configuration for a child thread
String shorthand
"agent_00nc01ht8gcn4w8sb7zv"
Equivalent to {"type":"agent","id":"agent_00nc01ht8gcn4w8sb7zv"}
The platform resolves each Agent entry's display name. See Agent schemas for name sources, name field handling, uniqueness requirements, and other validation rules.
Versions determine which Agent configuration runs when work is delegated:
When you specify version, the coordinator pins that version.
When you omit version, the platform resolves the referenced Agent's latest Active version when the coordinator is created or updated, then saves the resolved version in the coordinator version.
Updating a child Agent later does not automatically change a saved coordinator. Update and save the coordinator to adopt the new version.
After you create a Session, the coordinator and roster are frozen as a Session snapshot. Later Agent updates do not affect running Sessions.
For production, verify child Agent versions before updating the coordinator.
Configuring a roster does not force delegation. The coordinator still decides based on its judgment and system prompt. State the delegation criteria explicitly instead of only listing child Agents.See Create Session and Send Session Events.
Send a user.interrupt event to the Session with session_thread_id to interrupt only the target Thread. Omitting session_thread_id requests interruption of the work currently in progress across the Session. Interrupting a Thread does not archive it.
Each Thread uses the tool configuration and permission policy in its own Agent snapshot. A tool call that requires confirmation emits agent.tool_use; reply with user.tool_confirmation and provide tool_use_id and result. A Custom Tool call emits agent.custom_tool_use; after your client executes it, reply with user.custom_tool_result and provide custom_tool_use_id.When actions are pending, the event stream emits session.status_idle with stop_reason.type set to requires_action. stop_reason.event_ids lists the event IDs that need responses. The session_thread_id on the related Agent events identifies the requesting Thread.The following example allows a tool call that requires confirmation:
Do not include session_thread_id in a tool response. The platform uses tool_use_id or custom_tool_use_id to route the response to the originating Thread. If stop_reason.event_ids contains multiple IDs, respond to each one; the current turn remains paused while any action is unresolved. A requires_action idle state means the Session is waiting for input, not that it has completed. Before archiving a child thread, make sure it has no pending tool interaction. See Send Session Events.
A Session does not use an updated Agent configuration
A Session freezes the coordinator and child Agent version snapshots when it is created. After updating a child Agent, update and save the coordinator, then create a new Session. Existing Sessions do not adopt the new configuration.
Common causes include an invalid Agent or version reference, or a multiagent configuration that fails validation. Use the API error message to locate the corresponding field. See Agent schemas for the complete rules.