Ch 4 — Coordination & Cooperation

Task markets, allocation, voting, joint work, norms, and emergent vs engineered teamwork
Foundations
flag
Goal
arrow_forward
call_split
Split
arrow_forward
person_search
Assign
arrow_forward
sync
Sync
arrow_forward
merge
Merge
arrow_forward
verified
Verify
-
Click play or press Space to begin...
Step- / 8
groups
The Coordination Problem
Many agents, one outcome
What Changes with N>1
With multiple agents, individual rationality does not guarantee global feasibility: double booking, conflicting tool calls, duplicated work, or deadlock waiting on replies. Coordination selects who does what, when, and with which resources. Cooperation assumes aligned interests; competition needs rules and incentives. Your stack must expose allocations (who owns a task), synchronization points (barriers), and conflict resolution (priority, auction, human arbiter).
Pattern
global_goal → subtasks allocate + sync // Measure contention
Key insight: If two agents can both call the same external API, you need an exclusion rule or idempotency keys.
gavel
Contract Net & Task Markets
Announce, bid, award
Classic pattern
The contract net protocol: a manager announces a task; workers submit bids (capability, cost, time); the manager awards a contract. Variants power logistics and cloud schedulers. For LLM agents, bids might encode confidence, estimated tokens, or required tools. Keep awards logged so you can explain why agent B won. Watch for collusion or herding if bids are just paraphrases of the same LLM policy.
Pattern
CFP(task) → BID*( ) AWARD(agent, SLA) // Timeout unresponsive bidders
Key insight: Explicit awards create accountability — critical for audits and debugging.
hub
Centralized vs Decentralized Allocation
Orchestrator vs emergent assignment
Trade-offs
A central allocator sees more context and can enforce policy but risks bottlenecks. Decentralized agents pick work from a queue using local rules (skill tags, load). Many production systems use a hybrid: orchestrator for critical paths, workers pulling from a prioritized backlog otherwise. Encode task state (OPEN/CLAIMED/DONE) in a store all agents respect.
Pattern
orchestrator.assign() or queue.claim(lease) // Heartbeat leases
Key insight: Use leases on claimed tasks to recover from crashed agents.
how_to_vote
Voting & Aggregation
When opinions must become one decision
Social choice lite
For decisions that are not decomposable (pick architecture A vs B), agents may vote or score options. Simple majority can ignore minorities; weighted votes reflect expertise or risk ownership. In LLM ensembles, aggregation might be majority tool choice or a meta-critic ranking plans. Document quorum rules and tie-breakers (human, risk-averse default, roll back).
Pattern
ballots → aggregate() quorum + tie_policy // Log dissent
Key insight: Votes without recorded dissent hide useful risk signals.
handshake
Shared Plans & Joint Intentions
Teamwork semantics
Mental teamwork
Research on teamwork (e.g., Cohen & Levesque on joint intentions, SharedPlans formalisms) stresses mutual belief, commitment to the joint goal, and helping when teammates fail. Practically, represent a team task graph with explicit dependencies and a fallback owner for each node. LLM role-play is not enough — persist the graph where all agents read the same truth.
Pattern
joint_goal + roles dependency edges fallback agent per node // Reconcile on failure
Key insight: Joint work needs visible dependencies, not just a shared chat transcript.
shield
Commitments, Norms & Policies
Soft law inside the system
Governance layer
Beyond protocols, agents follow norms: obligations, prohibitions, sanctions. Implement norms as policy-as-code checked before tool execution (OPA-style) or as prompt constitutions backed by validators. Multi-agent systems amplify policy errors — one rogue agent can trigger many downstream calls. Centralize authorization for sensitive acts even if planning is distributed.
Pattern
before(tool_call): policy.allow(ctx) // Deny beats prompt
Key insight: Norms should be enforceable, not merely suggested in system messages.
bubble_chart
Emergent vs Engineered Coordination
Stigmergy and swarms
When to let go
Sometimes coordination is indirect: agents leave traces in an environment others react to (stigmergy). Useful for exploration and creative search; risky for compliance tasks. Engineered coordination uses explicit workflows. Blend them: allow emergent ideation inside a bounded sandbox, then funnel winners through a gate with schema validation and human approval.
Pattern
explore: blackboard + diversity commit: workflow gate // Never skip the gate for prod
Key insight: Emergence is a feature in R&D; in production, gates are mandatory.
route
Roadmap
Toward planning & negotiation
What is next
You now have architectures, communication, and coordination patterns. Chapter 5 dives into multi-agent planning and negotiation when tasks interact, resources clash, and information is private. Bring your protocol diagrams and allocation rules — they constrain which plans are even legal.
Pattern
Ch5: plans + privacy Ch6: incentives // Keep maps updated
Key insight: Good coordination reduces the search space for planners — fewer meaningless joint outcomes.