Skip to content
Tech Interview Prep
Technical interview guide

Multi-Agent Systems & Orchestration

Coordinating multiple specialized LLM agents to handle work that's too complex or too poorly-decomposed for a single agent loop.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: ReAct, Toolformer, Reflexion, CAMEL, AutoGen, MetaGPT, AgentVerse, ChatDev, autonomous-agent survey, W3C Trace Context, Model Cards, NIST GenAI, and OWASP Excessive Agency/Prompt Injection references reviewed 2026-09-04.

Overview

Curated: · Written: · Reviewed:

Multi-Agent Systems & Orchestration

In one line

Several model-driven roles coordinated through an explicit graph, with typed contracts, budgets and server-side authority. Reach for it only when context, capability, trust domain, independent evidence or parallelism separates the work, and the composed result beats a measured single-agent or deterministic baseline.

Key definitions

  • Dependency graph: tasks as nodes, data or control dependencies as edges; a node starts when all its inbound edges have finished.
  • Critical path: the longest dependency chain by duration; it sets the minimum wall-clock time, however many workers run.
  • Task contract: objective, non-goals, input artifact IDs, output schema, allowed tools, side-effect policy, budget, deadline, idempotency key.
  • Ambiguous commit: a side-effecting call whose outcome is unknown because the response was lost or timed out.
  • Saga: a record of completed external effects plus explicit compensations, each a new authorized action that can itself fail.
  • Livelock: agents keep handing work back and forth with no state change and no terminal decision.

Formulas and complexity

Tmakespan=max⁡p∈P∑v∈pdvT_{\mathrm{makespan}} = \max_{p \in P} \sum_{v \in p} d_v Croute=Nreview⋅creview+Nauto⋅pmisroute⋅cmisrouteC_{\mathrm{route}} = N_{\mathrm{review}} \cdot c_{\mathrm{review}} + N_{\mathrm{auto}} \cdot p_{\mathrm{misroute}} \cdot c_{\mathrm{misroute}}

Hypothetical worked example: at a 0.6 threshold, 2,000 × $2.50 + 8,000 × 0.04 × $30 = $14,600 per day. At 0.4, 800 × $2.50 + 9,200 × 0.11 × $30 = $32,360 per day. Quote the total cost per threshold, not the threshold that sounds safer.

How it works

  1. The orchestrator validates the graph first: every node has an owner, deadline, retry rule, completion criterion and budget.
  2. A node starts when its dependencies finish. Independent nodes run concurrently up to the concurrency limit.
  3. Workers return typed statuses: complete, fail, decline, clarify or partial. A validator and a postcondition decide completion, not the agent's stated confidence.
  4. Each tool call is checked by the gateway against the token presented on that call, scoped to the user's resources.
  5. Budgets and cycle caps are enforced by the orchestrator. Exhaustion is a typed terminal state, not a hang.
Orchestrator fetch_schema fetch_rows validate_schema profile draft_report publish Gateway: per-call authz

When to use and when not to

SituationChooseWhy
Fixed steps with testable inputsDeterministic workflowNo model call per step, replayable
One context fits and tools sufficeSingle agent with better toolsOne prompt, one failure mode
Disjoint large contexts or trust domainsMulti-agentIsolation limits blast radius
Critics that need independent evidenceMulti-agent with distinct criteriaErrors do not correlate
Voting over a shared model, prompt and contextNot multi-agentErrors correlate; the measured gain may be near zero
Consequential writes without idempotencyNot yetRetries duplicate effects

Traps interviewers probe

  1. Counting schema-valid output as complete. Fix: derive success from a postcondition, such as rows written or a non-empty result checked against the source. Empty results from a 429 or a bad page become typed failures.
  2. Caching a delegated token by role. Fix: key the cache by user and resource scope, or exchange per request. The gateway authorizes whatever token arrives on each call.
  3. Retrying an ambiguous write with a fresh key. Fix: persist the idempotency key in workflow state before the call, check authoritative state after a timeout, and retry with the same key.
  4. Resetting depth counters in each child agent. Fix: pass remaining depth, fan-out and budget down from the root request so the limit covers the whole tree.
  5. Read-modify-write on shared JSON. Fix: append atomically in the database, or use a version check on the update. Lost updates raise no error.

Interview tips

Open with the baseline: "I start with one agent and better tools, and add an agent only where context, trust, evidence or parallelism separates the work."

Expect these follow-ups:

  • Why not one agent with better tools?
  • Walk me through your handoff format.
  • Two agents keep passing work back. What happens?
  • A refund call times out. Now what?
  • The final answer is wrong. Which agent failed?

30-second outline: state the baseline and the separation that justifies a second agent. Describe the graph, with typed contracts, budgets and a terminal state for each cycle. Name where authority is enforced: server-side allowlists and per-call token checks. Finish with the measured trade-off: success, p95 latency and cost per successful task against the baseline.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.