Use this file to discover all available pages before exploring further.
A swarm is a group of specialised agents that collaborate on a single objective. Instead of one agent attempting a complex task end-to-end — and drifting from the original goal as context grows — the swarm decomposes work across typed agents, coordinates their outputs through a chosen topology, and reaches agreement via a consensus algorithm. The result is implementations that stay aligned with their specifications even when dozens of agents are working in parallel.Ruflo’s swarm coordinator is built on the UnifiedSwarmCoordinator (ADR-003), the single canonical engine that consolidates four legacy coordination systems into one.
Every agent is connected to every other. Fully peer-to-peer.
Distributed parallel work where agents need to share intermediate results
ring
Agents pass tasks sequentially around a ring. Each agent consumes the previous agent’s output.
Pipeline workflows (e.g. generate → test → review → document)
star
A central hub dispatches tasks to spoke agents and collects results. Simple fan-out.
Simple parallelisable tasks with no inter-agent dependencies
Hierarchical is the recommended topology for software development tasks. The coordinator validates each output against the original goal and catches divergence early — before it compounds across agents.
For most tasks, hive-mind spawn is the right entry point. It initialises a queen-led hierarchical swarm, decomposes the objective into sub-tasks, assigns them to appropriate worker types, and manages the full lifecycle:
# Start a hive-mind swarm with a plain-English objectivenpx ruflo@latest hive-mind spawn "Implement user authentication"# Customise topology and agent countnpx ruflo@latest hive-mind spawn "Build REST API" --topology mesh --max-agents 8# Use a strategic queen for high-level planning tasksnpx ruflo@latest hive-mind spawn "Design microservices architecture" \ --queen-type strategic --consensus byzantine# Check status of a running hive-mindnpx ruflo@latest hive-mind status# View collective memory and task metricsnpx ruflo@latest hive-mind metrics
When you need direct control over swarm lifecycle:
# Initialise a swarm with explicit topology and agent countnpx ruflo@latest swarm init --topology hierarchical --max-agents 6# Check which agents are active and what they're doingnpx ruflo@latest swarm status# Stop the swarm cleanly (agents flush memory before exit)npx ruflo@latest swarm stop
The @claude-flow/swarm package (ADR-003) exports a single canonical coordinator. Use createUnifiedSwarmCoordinator — the factory function that handles sensible defaults:
The package also exports QueenCoordinator, TopologyManager, MessageBus, AgentPool, RaftConsensus, ByzantineConsensus, and GossipConsensus for lower-level composition. See the @claude-flow/swarm source for the full type surface.
When Ruflo is registered as an MCP server, these swarm tools are callable from Claude Code:
Tool
Description
swarm_init
Initialise a swarm with a given topology, max agents, and consensus algorithm
swarm_status
Return the current status of all active swarms, agent counts, and task queues
Use swarm_init with topology=hierarchical, maxAgents=6, then assign the authentication refactor task to the swarm.
MCP tools (swarm_init, swarm_status, etc.) are only available after running npx ruflo init and registering the MCP server with claude mcp add ruflo -- npx ruflo@latest mcp start. The Claude Code Plugin (lite) path does not register the MCP server.