CCDV-P · Advanced Agent Architecture and Orchestration
Multi-agent patterns in production and how they fail at the seams
An invoice reconciliation system uses a supervisor that hands work to five subagents. In production, some invoices are processed twice, some never, and the supervisor reports “all done” even when a subagent returned an empty error. Nobody touched the model: the failures live at the seams between agents.
Which pattern for what
In multi-agent orchestration you judge patterns by what they cost and how they fail:
| Pattern | Fits when | How it fails |
|---|---|---|
| Supervisor/worker | the task splits into parts that are handed out and merged | the supervisor becomes a bottleneck or merges incomplete results badly |
| Parallel subagents | the parts are independent | write conflicts, multiplied cost, results arriving out of order |
| Hierarchies deeper than two levels | very separate domains | context is lost at every handoff and each level adds latency and cost |
| One agent with good tools | most cases | context fills up on very long tasks |
The starting rule is the same as in Foundations: you don’t add agents without a measured problem that justifies it.
Delegation and context boundaries
Each subagent runs in its own context window. That’s an advantage (the supervisor isn’t flooded with noise) and a risk (the subagent knows nothing it wasn’t given). Context isolation demands an explicit contract:
- What it receives: the task, the data it needs and the definition of done. Not “whatever was said before”.
- What it returns: a short structured result with a status (success, partial, error) and the reason for any error. An error that comes back as free text or as an empty list is mistaken for “no results”.
- What it may do: only the tools for its task.
A subagent that fails silently is the most common cause of supervisors reporting false success.
Communication and repeated work
When agents share state (a queue, a database, a file), writes must be idempotent and tasks must carry an identifier: if a worker dies and the task is reassigned, it isn’t processed twice. Results are merged by task ID, not by arrival order.
Human-in-the-loop and approvals
An approval flow asks a person to authorize what the system shouldn’t decide alone: irreversible actions, large amounts, external communications. It has three parts: the point where the agent stops, what the person sees (the proposed action and the evidence, not the whole history) and what happens if nobody answers (wait, escalate or cancel; never proceed). Asking for approval on everything breeds fatigue and rubber-stamping.
The usual traps
- Adding agents to “separate concerns” with no evidence that one agent isn’t enough.
- Handing the subagent the whole history so it “has context”.
- Letting subagent errors disappear or turn into empty results.
- Parallelizing tasks that write to the same resource.
- Human approval at every step, or at none.
On the exam
If the scenario shows a lost result, a duplicate or false success, look for the option that fixes the contract between agents: structured results with status and cause, task IDs and idempotency. Discard “add another agent to check the first one” when the problem is communication, and “pass more context” when the problem is isolation.
Quick question
A practice exam question on this domain. It counts towards your progress.
A market-intelligence assistant answers questions such as "How is competitor X positioned across five regions?" A single agent researches the regions one after another, so a typical question takes eleven minutes, mostly waiting on web searches. Its context also fills with raw search results from the early regions, and the answers about the last regions are noticeably weaker.
The regional research tasks do not depend on one another. Only the final comparison needs the findings of all five, and the product team wants answers in about three minutes.
How should the team restructure the system?