OpenClaw Multi-Agent Orchestration
Multi-agent reduced to three MCP primitives (spawn/send/history), with six modes on top (Hub-Spoke/Pipeline/Hierarchical/Routing/P2P/Fleet). Understanding Hub one-directional dispatch, the subagent-layer sessions_send ban, and why P2P has zero production cases.
A Hub-Spoke code review: the lead spawns three review subagents, an upward sessions_send is shown bouncing off the subagent boundary (blocked), and results flow back only via sessions_history.
Why this local version exists
The three MCP primitives (spawn/send/history), the six modes' token multipliers, and the subagent-layer sessions_send ban (Issue #23359, the root of P2P's zero cases) come from the "OpenClaw 多Agent系统入门" course. No live OpenClaw runs here.
Hub-Spoke multi-agent code review
Replays OpenClaw multi-agent: a lead spawns 3 review subagents; results flow back only via sessions_history — a subagent's sessions_send is banned at the tool-registry level.
Hub-Spoke topology (3–15× tokens)
Hub single-directional dispatch: lead delegates and collects; subagents can't talk directly (P2P has zero production cases).
1. lead sessions_spawn three review subagents (parallel)
2. subagents work in isolated contexts
3. a subagent tries sessions_send to lead → blocked (tool not registered)
4. lead collects via sessions_history (or reads shared/signals)
5. lead synthesizes the three reviews
Three MCP primitives (DB analogy)
What to try
Run the orchestration and watch the lead spawn three subagents in parallel.
Watch the upward sessions_send arrow turn red and bounce — banned at the subagent layer.
See results flow back only via sessions_history before the lead synthesizes.
What this demo proves
You design multi-agent systems by topology and token cost (3–15×), not by piling on agents.
You understand the Hub one-directional architecture and why P2P has zero production cases.
You know the real engineering pitfalls (misplaced allowAgents, rate-limited polling, lost completion).
Primitives
sessions_spawn (INSERT) · sessions_send (UPDATE, lead-only) · sessions_history (SELECT)
Modes
Hub-Spoke / Pipeline / Hierarchical / Routing / P2P / Fleet (1.5–20× tokens)
Best signal
Evidence-driven orchestration design — knows what doesn't work too