Multi-agent and hierarchical agents
Practice this questionOverview
- Multi-agent systems involve several model-driven roles cooperating.
- Hierarchical systems organize those roles into levels of coordinators and workers.
- Multiple ordinary functions in a workflow are not automatically multiple agents.
Why this matters
Specialized responsibilities or parallel independent work can justify separate model contexts and tool scopes.
An everyday example
A company organizes managers and departments, with clear reporting responsibilities.
A technical example
Policy analyst retrieves terms, document analyst checks evidence completeness, and a coordinator creates a review packet.
How it works
- Define role contracts
- Partition input and permissions
- Coordinate bounded calls
- Combine verified outputs
- Validate consistency
- Stop.
Architecture and flow
Coordinator → scoped specialists → typed outputs → consistency check → response.
The insurance assistant example
Build a claim review packet, but keep final claim approval in the authoritative workflow.
When to use it
Independently measurable tasks, different tool/privacy scopes, and proven quality gains over one agent.
When to avoid it
Avoid role-play teams for simple CRUD or sequential tasks that regular functions handle.
Interview answer
“I add multiple agents only when specialization or controlled parallel work improves measured outcomes enough to justify coordination cost.”
Benefits, trade-offs, and production considerations
- More agents create more calls and possible inconsistencies.
- Set a shared budget, limit delegation depth, prevent cycles, and avoid treating consensus among models as proof.