Subagents (supervisor-style orchestration)
Notebook· 09.02· 120–150 min· Lesson 73 of 129
The notebook opens in your lab, in a new tab. If your server is stopped, it starts first (a few seconds).
By the end you can
- Wrap specialist agents as tools for a coordinator, first by hand (the docs pattern), then with
mastery.agents.subagent_tool. - Control what a subagent sees (isolated query vs forked history) and what it returns, and measure the token cost of each.
- Dispatch through one
task(agent_name, description)tool with an enum of agent names. - Propagate an
interrupt()from inside a subagent's tool to the outer agent, and resume it. - Migrate a
langgraph-supervisorsetup to subagents.
Before you start
Lesson 09.01; Module 02 (tools, ToolRuntime); Module 08.03 (interrupts).
