Multi-agent is in preview. The API and behavior may change before general availability. Feedback is welcome at support@hcompany.ai.
subagents. At runtime the manager breaks the task into pieces, hands each piece to a subagent, and writes the final answer once it has gathered enough. You launch a manager exactly like any other agent: one session, one answer. The fan-out happens behind it.
Each subagent is a full agent with its own environment, model, skills, and instructions, and runs as its own session, isolated from its siblings. The manager runs them in parallel, so breadth that would be sequential for one agent happens at once.
Multi-agent is especially efficient for parallelizable tasks: researching a question across many sources at once, pairing a fast text-mode searcher with a visual subagent for pages that need real clicks, or having one subagent verify what another found.
Build a manager
A manager is just an agent whosesubagents list names other agents. Create the specialists first, then reference them by name from the manager so each stays reusable and independently inspectable (inline objects also work, for one-offs). Here a research manager delegates to a fast text-mode searcher and a visual verifier.
Create the subagents
Create a fast text-mode searcher for broad lookups and a visual verifier for pages that need real clicks. Write each
description as a capability statement (“Use for…”), since the manager routes on it to pick who handles what, the same way an agent routes on a skill.Create the manager
Now create the manager and link the subagents by name. A manager that only delegates can omit
environments; give it one only if it should also act on a surface itself, as this one does.Run a session
Launch a session against the manager exactly like a single agent; the fan-out to subagents happens behind it. Over raw HTTP, create the session and long-poll
changes until it reaches a terminal state.How a run unfolds
The manager spawns subagents as parallel child sessions, waits for their answers, and may spawn follow-ups to fill gaps or verify findings before synthesizing the single final answer your session receives.What a subagent sees
A subagent works in isolation and is instructed to finish its task on its own:- It has no access to the end user. It cannot ask questions or send messages to you; only the manager surfaces anything. Give it a self-contained task.
- The manager receives only the subagent’s final answer, not its scrollback or intermediate observations. A good subagent answer carries its own data, source URLs, and caveats.
- It can delegate further. A subagent that lists its own
subagentsbecomes a manager for them, nested up to 16 levels deep; a deeper chain or a cycle is rejected with422. Keep trees shallow well before that limit, since deep nesting multiplies sessions and cost.
Observe and control the tree
Each subagent is a real session, so the whole tree is inspectable and steerable:- The manager’s status lists its children in
subagent_session_ids. Retrieve or watch any of them like a normal session. - Filter children by their parent with
GET /sessions?parent_session_id=..., or tag a whole run withgroup_idand list it withGET /sessions?group_id=.... - Force an answer on the manager and the signal cascades: in-flight subagents get a short grace window (about 30s) to wrap up, partial results fold into the manager’s answer, and anything still unfinished is cancelled. Cancelling the manager stops its subagents too, without the grace window.