Files
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

7.6 KiB

theme, title, info, author, transition, mdc, lineNumbers, monaco, aspectRatio, canvasWidth, layout, class
theme title info author transition mdc lineNumbers monaco aspectRatio canvasWidth layout class
seriph Lesson 41 — When Is Multi-Agent Actually Better Than One Agent? English video course for AI Agents in Depth Bojie Li slide-left true false false 16/9 980 cover cover
Expand · Chapter 10 · Multi-Agent Collaboration

When Is Multi-Agent Actually Better Than One Agent?

Information gain, parallelism, verification, budgets, and cost

Lesson 41 of 42 · 18 minutes · When Is Multi-Agent Truly Better; Parallel Coordination; Budget Awareness

layout: center class: text-center

The central question
What does collaboration add that a single Agent with the same compute could not obtain?

Why this problem matters

New evidence

Execution, rendering, browsing, and independent observations change the answer.

Parallel time

Independent searches reduce wall-clock latency when resources allow.

Cost

Multi-Agent systems may spend several times—or an order of magnitude—more tokens.


Three ideas to keep in view

Information gain

The verifier observes something unavailable at generation time

Single settlement

One success can resolve the task and stop siblings

Budget awareness

Strategy changes with remaining steps and task value


The book's visual model

Parallel web research architecture
Parallel web research architecture

More voices vs. More observations

More voices

  • Same text
  • Same evidence
  • More samples and debate

More observations

  • Independent tools
  • Execution or visual feedback
  • Parallel environment interaction
The advantage comes from information—not the number of Agent labels.

Settle once; cancel the rest

jobs = spawn_parallel(search_shards)
for result in as_completed(jobs):
    evidence.merge(result.receipts)
    if verifier.sufficient(evidence):
        cancel_all(jobs); break

Test the claim

10-63 min

Run parallel web research with independent browsers

Observe: Cited evidence, browser isolation, parallel speedup, timeout handling, and cleanup

Demo budget: 3 minutes · one contiguous terminal block

class: course-terminal

Live demo

Switching to the terminal

$ cd chapter10/parallel-web-research && python demo.py
Run the command(s), narrate decisions, and point to the observation—not just the output.

What the evidence supports

Finding 1

Debate over identical evidence often matches a single Agent at equal compute.

Finding 2

External feedback can nearly double performance because it adds observations.

Finding 3

Parallel speedup is real only when setup, contention, and cancellation costs are included.


layout: center

Where the claim stops

Boundary condition

A speedup on one site and network condition does not prove lower total cost or better answer quality for every research task.

layout: center

Engineering takeaway

Design rule

Add an Agent only when it owns a distinct observation, permission boundary, artifact, or parallelizable environment interaction.

Continue the experiment


layout: center class: text-center

Pause and apply

Your turn

What new information does your proposed second Agent obtain that the first Agent cannot?

layout: center class: text-center

Next · Lesson 42
Engineer against coordination failures—and examine what appears when Agent populations become societies.