HuggingFace's Multi-Agent Communication Topology Selection
TRIGGER
Full-context sharing between all LLM agents creates token cost that scales quadratically with participants and rounds, while also producing information overload that dilutes focus on the most relevant prior arguments.
APPROACH
Consilium implemented three selectable communication topologies for multi-agent coordination. Input: user-selected topology preference + agent configuration. Output: coordinated agent responses with topology-appropriate context sharing. Full-context (all agents see all messages—maximum information, highest cost), Ring (each agent only sees previous agent's response—linear context growth), and Star (all messages route through lead analyst as central coordinator—controlled information flow). Users select topology based on their cost/quality tradeoff.
PATTERN
“Full context sharing between agents scales O(n²)—your costs will explode with 4+ agents. Ring topology trades global awareness for O(n) cost; star topology adds latency but filters noise before it reaches specialists.”
✓ WORKS WHEN
- More than 3 agents participate (topology overhead justified by context savings)
- Ring: sequential refinement task where each agent builds on previous (draft → critique → revision)
- Star: heterogeneous agent capabilities where coordinator can route to relevant specialists
- Token budget is constrained and full-context would exceed limits within 2-3 rounds
- Discussion quality matters more than speed (topology adds orchestration latency)
✗ FAILS WHEN
- Only 2 agents participating (topology overhead exceeds benefit)
- Agents need to reference specific earlier arguments from non-adjacent participants
- Real-time response required—topology routing adds sequential latency
- Full context fits comfortably in window and cost is acceptable
- Task requires agents to detect contradictions across the full conversation history