An agent tree organizes multi-agent control through parent, child, and sibling relationships. A router selects a specialist with transfer_to_agent; the specialist inherits the conversation context, completes the task, and can transfer follow-up work elsewhere. section 9.5.3
Build the structure around explicit ownership and permitted movement:
- Register specialists in a parent's sub_agents list; assigning sub_agents automatically records each child's parent. section 9.5.3
- Require unique agent names within each tree and reject an agent that already has another parent. section 9.5.3
- Allow transfers to children, the parent, and optionally siblings; disallow_transfer_to_peers restricts a specialist to upward movement. section 9.5.3
Router with specialist agents
Create a router with math and search children. A calculation request transfers to math, which can return to router or transfer to search when peer movement is enabled. Setting disallow_transfer_to_peers=True leaves math with router as its only target.
