Skip to content
Agent Orchestration
Command

/swarm-init

Initialize a Claude Flow swarm with specified topology and configuration.

From plugin
ruflo
80k196 skills169 agents196 commands3 MCP
> /plugin marketplace add ruvnet/ruflo

Command definition

swarm-init.md

swarm init

Initialize a Claude Flow swarm with specified topology and configuration.

Usage

npx claude-flow swarm init [options]

Options

  • `--topology, -t <type>` - Swarm topology: mesh, hierarchical, ring, star (default: hierarchical)
  • `--max-agents, -m <number>` - Maximum number of agents (default: 8)
  • `--strategy, -s <type>` - Execution strategy: balanced, parallel, sequential (default: parallel)
  • `--auto-spawn` - Automatically spawn agents based on task complexity
  • `--memory` - Enable cross-session memory persistence
  • `--github` - Enable GitHub integration features

Examples

Basic initialization

npx claude-flow swarm init

Mesh topology for research

npx claude-flow swarm init --topology mesh --max-agents 5 --strategy balanced

Hierarchical for development

npx claude-flow swarm init --topology hierarchical --max-agents 10 --strategy parallel --auto-spawn

GitHub-focused swarm

npx claude-flow swarm init --topology star --github --memory

Topologies

Mesh

  • All agents connect to all others
  • Best for: Research, exploration, brainstorming
  • Communication: High overhead, maximum information sharing

Hierarchical

  • Tree structure with clear command chain
  • Best for: Development, structured tasks, large projects
  • Communication: Efficient, clear responsibilities

Ring

  • Agents connect in a circle
  • Best for: Pipeline processing, sequential workflows
  • Communication: Low overhead, ordered processing

Star

  • Central coordinator with satellite agents
  • Best for: Simple tasks, centralized control
  • Communication: Minimal overhead, clear coordination

Integration with Claude Code

Once initialized, use MCP tools in Claude Code:

mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 8 }

See Also

  • `agent spawn` - Create swarm agents
  • `task orchestrate` - Coordinate task execution
  • `swarm status` - Check swarm state
  • `swarm monitor` - Real-time monitoring
Read more
@ruvnet
Ships withruflo

📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves A 14-chapter guide: from the basic idea to a first useful task, then memory, agent teams, plugins, cost and verification. Agent = Model + Harness.

80k200 skills169 agents3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
80.4k
Star history of ruvnet/ruflo on GitHub, a chart by star-history.com

Other commands on ruflo.

agent-types

agent-types

Command

Complete guide to all 54 available agent types in Claude Flow.

@ruvnet@ruvnetInstall Command
COMMAND_COMPLIANCE_REPORT

COMMAND_COMPLIANCE_REP…

Command

Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools…

@ruvnet@ruvnetInstall Command
bottleneck-detect

bottleneck-detect

Command

Analyze performance bottlenecks in swarm operations and suggest optimizations.

@ruvnet@ruvnetInstall Command

More commands from other plugins.

ask

ask

Command

This compatibility command keeps `/oh-my-claudecode:ask` available without loading the full `ask` skill description in every…

@yeachan-heo@yeachan-heoInstall Command