AI EngineeringInterview preparation
Intermediate·Concept·2 min read

Multi-agent and hierarchical agents

Practice this question

Overview

  • 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

  1. Define role contracts
  2. Partition input and permissions
  3. Coordinate bounded calls
  4. Combine verified outputs
  5. Validate consistency
  6. 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.

Adapted from 13_AI.MD · “Multi-agent and hierarchical agents”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.