Module VI — Multi-Agent Orchestration & Coordination
Phase 4 · MULTI-AGENT — Module VI
Status: Authored & Empirically Verified.
Lecture Components: 6 FHD 1080p master videos + Lab L6.
Canonical Core Axiom:
ARTIFACT ≠ STATE ≠ CONTEXT ≠ MEMORY
1. Control Topologies & Architectural Coordination
Industrial multi-agent systems coordinate work across explicit topological execution structures:
Sequential ──► Parallel ──► Hierarchical ──► Competitive ──► Conditional ──► Event-Driven
Multi-agent coordination is not conversational turn-taking; it is deterministic distributed systems execution:
- Centralized Orchestration: A designated orchestrator coordinates scheduling, state transitions, and dependency validation. Single point of truth, bounded coordination overhead, but potential supervisor bottleneck.
- Decentralized Choreography: Autonomous agents coordinate peer-to-peer via event buses and pub/sub topics. High decoupling and fault isolation, but introduces complex distributed consensus and partial failure hazards.
- Hierarchical Delegation: Supervisor-worker trees with strict depth limits and bounded worker pools to prevent unbounded recursive agent spawning.
2. Information Crossing Agent Boundaries
Every handoff across agent boundaries must strictly segregate four transfer classes:
┌──────────────────┐ Artifact Passing ┌──────────────────┐
│ ├───────────────────────►│ │
│ │ State Transfer │ │
│ AGENT A ├───────────────────────►│ AGENT B │
│ │ Context Transfer │ │
│ ├───────────────────────►│ │
│ │ Memory Transfer │ │
│ ├───────────────────────►│ │
└──────────────────┘ └──────────────────┘
- Artifact Passing: Transfer of explicit, verifiable outputs (code diffs, structured JSON payloads, execution logs, test outputs). Retains unique identity, cryptographic provenance, and task relation.
- State Transfer: Transfer of authoritative operational parameters required for downstream continuation (current phase, task pointer, validated variables, resource locks, completion status). State is deterministic and machine-readable, not narrative prose.
- Context Transfer: Strictly bounded, transient material assembled specifically for the receiving agent's active inference window (task instructions, active constraints, selected evidence). Context transfer is strictly bounded; never forward unbounded conversation histories.
- Memory Transfer: Retrieval or exchange of historical observations, prior attempts, or cross-session learnings. *Memory transfer does not grant operational authority.* Retrieved memories cannot silently become active state, verified evidence, or binding instructions.
3. Cross-Agent Propagation Risks & Authority Preservation
When information traverses agent hops, transmission errors accumulate:
INITIAL INFERENCE (Tentative hypothesis by Agent A)
↓
HANDOFF SUMMARY (Loss of probabilistic hedging)
↓
MINOR DISTORTION (Rephrased as definitive statement)
↓
SECOND AGENT ACCEPTS IT (Treated as premise by Agent B)
↓
NEXT HANDOFF (Forwarded to Agent C)
↓
DISTORTION BECOMES ASSUMPTION (Firm architectural constraint)
Failure Vectors Across Handoffs:
- Semantic Drift: Incremental rephrasing mutates rigid constraints into loose recommendations.
- Stale-State Propagation: Downstream agents execute against superseded premises invalidated upstream.
- Context Contamination: Irrelevant intermediate reasoning leaks into clean downstream inference windows.
- Authority Flattening: Collapsing evidence, state, memory, and inferences into uniform untyped text (*"X happened"*).
- Provenance Loss: Originating tools, timestamps, and agent identities are stripped from assertions.
Core Authority Principle:
Information must preserve both content and authority class across agent boundaries:
-VERIFIED EVIDENCE→ handoff →VERIFIED EVIDENCE*(backed by test output, hashes, or tool returns)*
-AGENT INFERENCE→ handoff →AGENT INFERENCE*(must NOT silently convert into verified evidence)*
-RETRIEVED MEMORY→ handoff →RETRIEVED MEMORY*(must NOT silently convert into current state)*
4. Curricular Components
- 06-01 — Centralized vs. Decentralized Orchestration: The Orchestration Topology Spectrum; Centralized Control vs Peer-to-Peer Choreography; Coordination Overhead and Fault Isolation.
- 06-02 — Static DAGs vs. Dynamic Execution Graphs: Compile-time DAGs vs dynamic execution graphs; Kahn's topological sorting in $O(V + E)$ time; runtime graph mutation and cycle rejection.
- 06-03 — Event-Driven Agent Buses & Asynchronous Message Passing: Decoupled agent communication via in-memory pub/sub; non-blocking delivery channels; Dead Letter Queues (DLQ) and event fan-out.
- 06-04 — Deadlock, Livelock & Starvation in Agent Swarms: Distributed concurrency hazards; Coffman conditions; wait-for resource cycle detection; randomized backoff and anti-starvation fences.
- 06-05 — Consensus Protocols & Distributed Agreement: Quorum consensus; majority voting ($\frac{N}{2} + 1$); conflict arbitration policies; two-phase commit across agent states.
- 06-06 — Orchestrator-Worker & Hierarchical Delegation: Supervisor bottleneck mitigation; bounded goroutine worker pools; recursive delegation depth limits; blast-radius containment.
5. Associated Capstone Lab
- Lab L6:
../labs/L6-dynamic-dag-orchestrator.md— Pure Go implementation of a Dynamic DAG Engine ($O(V + E)$ Kahn's Algorithm), Bounded Goroutine Worker Pool, In-Memory Event Bus with DLQ, and Quorum Conflict Arbitration.