↓ Skip to main content
  1. Archive/

CS329Z Lecture 8: When Multiple Agents Are Worth the Coordination

Author
AI Assistant
Curated for Pradithya Aria Pura · AI-written summary of the source material
Stanford CS329Z: Engineering AI Agents - This article is part of a series.
Part : This Article

The strongest argument for multiple agents is not that a group sounds smarter. It is that a task contains separable work that can benefit from parallel execution, specialist tools, or focused contexts. CS329Z’s eighth lecture makes that case, then spends as much time on the costs: messages, duplicated work, information loss, integration, and conflicting changes.

Key insights
#

  1. Multiple agents help when work can be separated; they impose communication, integration, and error-propagation costs.
  2. Orchestration chooses the team topology, communication moves information, and coordination keeps interdependent work consistent.
  3. Handoffs and agent-as-tool calls differ in who retains control and how much context moves.
  4. Shared task state, workspace isolation, and tests matter as much as messages between agents.
  5. Failure analysis should inspect commitments and integration, not only each agent’s final text.

Decide whether the work can be divided
#

Criteria for choosing single-agent or multi-agent systems

Source: CS329Z Lecture 8, PDF page 14.

The lecture recommends a single agent when steps are tightly dependent, agents would need to edit the same state, or one agent already meets quality, cost, and latency goals. Multiple agents are more plausible when subtasks can progress with little synchronization, contexts can be divided, and each contributor can own a clear output. Even a single agent can run independent tool calls concurrently; parallelism alone does not require a multi-agent architecture.

The assigned scaling study compares architectures across tasks and shows why “more agents” cannot be assumed to improve results. The slides give a useful cost ordering: single agent, then orchestrated teams, then decentralized swarms. The right topology depends on the task and on the cost of coordination.

The benefits listed in the lecture are parallel work, specialization, focused context, and broader exploration. The costs are just as concrete: delegation consumes tokens, handoffs omit details, workers can duplicate or overwrite work, and one bad result can mislead the team. The slides therefore recommend a strong single-agent baseline before adding a team.

Orchestration, communication, coordination
#

Central orchestrator architecture dispatching three worker agents

Source: CS329Z Lecture 8, PDF page 19.

The four topologies have distinct bottlenecks. Independent agents can explore separately but cannot use each other’s partial findings. A central orchestrator simplifies assignment and integration, yet can become a communication bottleneck. A swarm allows broad peer exchange but raises coordination cost. A hybrid combines central oversight with limited peer communication. Dynamic team-selection methods such as DyLAN try to assemble an appropriate set of agents for the task rather than using a fixed roster.

The lecture separates three concepts that are often blurred. Orchestration determines who works on what: independent agents with an aggregator, a central orchestrator, a decentralized swarm, or a hybrid. Communication moves information: direct handoffs, calling another agent as a tool, a shared message board, or a remote-agent protocol such as A2A. Coordination ensures that the work fits together: task ledgers, shared memory, isolated worktrees, ownership rules, and integration steps.

Coordination infrastructure: task ledger, shared memory, worktree isolation, and roles

Source: CS329Z Lecture 8, PDF page 52.

The distinction is concrete in a coding task. A handoff can tell another agent what to do, but it does not prevent two agents from editing the same file. A task ledger can show which issue is claimed. Separate Git worktrees can prevent simultaneous writes to one checkout. Tests and a final integrator determine whether the contributions actually work together. The lecture’s case study of an engineering swarm stresses precisely these operational details.

The communication section goes beyond chat. AutoGen can express sequential, nested, or group conversations. A handoff transfers the active task and relevant context to a new agent; an agent-as-tool call gives a bounded request to a specialist while the caller retains control. Message boards allow many participants to read and write shared updates. A2A adds discoverable agent cards and traceable remote tasks. Each channel changes what information is visible and who is responsible for the next decision.

Coordination adds a second layer. A task ledger records objective, assignments, dependencies, blockers, and progress. Shared memory can preserve lessons from prior team runs. Separate worktrees stop agents from editing the same checkout simultaneously, with explicit merge and test steps for integration. The lecture also names role division, resource division, and negotiation as ways to avoid collisions before they become failures.

Failure is often organizational
#

The assigned MAST study analyzes failures in multi-agent traces. The lecture connects this to coordination problems: agents may agree too readily, pursue incompatible goals, lose important context at a handoff, or let one bad intermediate result contaminate the rest. Extra discussion can consume tokens without producing better decisions.

The failure discussion separates system-design problems, inter-agent problems, and verification problems. CooperBench’s collaborative coding tasks expose a “curse of coordination”: more communication can create conflicts rather than resolve them. The slides also describe conformity, where agents converge on similar ideas instead of exploring distinct ones, and incompatible goals, where each participant follows a different target.

The engineering-swarm case study ties the lecture together: specialists claim tasks, share progress through a Git-backed task folder, work in isolated checkouts, and rely on strong regression tests to judge integration. Its lesson is organizational: parallel execution works when contributions are separable and the system can tell whether the combined result is correct.

I would use a multi-agent system only after writing down the decomposition: each task’s owner, inputs, output contract, allowed resources, synchronization points, and final integration check. If that cannot be stated clearly, the architecture is likely to amplify ambiguity rather than solve it.

Further reading
#

Stanford CS329Z: Engineering AI Agents - This article is part of a series.
Part : This Article

Related