Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ruvnet/ruflo/llms.txt

Use this file to discover all available pages before exploring further.

Ruflo reads configuration from three sources that compose at runtime: a JSON config file for structured settings (swarm topology, MCP transport, memory backend), a dotenv file for secrets and runtime flags, and a Claude Code settings file that registers hooks. You can use all three together or just the ones your use case requires — most projects start with only .env and claude-flow.config.json.

Configuration Files

FilePurpose
claude-flow.config.jsonCore config: swarm topology, MCP server, memory backend, provider routing
.envSecret keys, provider API keys, and feature flags (never commit this file)
.claude/settings.jsonHook registration, Claude Code experimental settings, agent-teams flags

Core Configuration Schema

claude-flow.config.json lives at your project root. The full schema with commonly used fields:
{
  "swarm": {
    "topology": "hierarchical",
    "maxAgents": 8,
    "consensus": "raft"
  },
  "mcp": {
    "transport": "stdio",
    "port": 3000,
    "host": "localhost",
    "toolGroups": ["coordination", "memory", "monitoring"]
  },
  "memory": {
    "backend": "hybrid",
    "dimensions": 384,
    "cacheEnabled": true
  },
  "providers": {
    "default": "claude",
    "fallback": "openai"
  }
}
KeyTypeDescription
topology"hierarchical" | "mesh" | "ring" | "star"Agent coordination pattern. hierarchical (default) puts a queen coordinator in charge of workers — recommended for structured coding tasks because it enforces goal alignment at every step.
maxAgentsnumberMaximum simultaneous agents. Keep at 6–8 to minimize coordination overhead and drift surface.
consensus"raft" | "byzantine" | "gossip" | "quorum" | "crdt"Distributed decision algorithm. raft (leader-elected, f < n/2) is the default for strongly consistent state; byzantine (2/3 supermajority, f < n/3) for adversarial environments.
KeyTypeDescription
transport"stdio" | "http" | "websocket"”http” | “websocket”`Transport mode. stdio (default) is used by Claude Code and Codex — no network port is opened. Use http or websocket for editors that connect over a network socket.
portnumberHTTP or WebSocket transport port (default: 3000). Ignored when transport is stdio.
hoststringBind host for HTTP/WebSocket transport (default: "localhost").
toolGroupsstring[]Restrict which tool groups are loaded. Fewer groups = faster startup and lower token usage. Options: coordination, memory, monitoring, github, system.
KeyTypeDescription
backend"hybrid" | "sqlite" | "hnsw"hybrid uses SQLite + HNSW index together. HNSW provides sub-millisecond vector search; SQLite handles relational persistence.
dimensionsnumberEmbedding vector dimensions. Default 384 (matches ONNX MiniLM). OpenAI’s text-embedding-3-large uses 3072.
cacheEnabledbooleanEnable LRU embedding cache. Cache hits return in <1ms.
KeyTypeDescription
default"claude" | "openai" | "google" | "cohere" | "ollama"Primary LLM provider.
fallbackstringProvider to use when the default is unavailable or rate-limited.

Configuration by Use Case

Core CLI only — no ML dependencies, no HNSW, no ONNX. Fastest install (~45 MB, ~15s). Suitable for scripting, plugin authors using CLI_CORE=1, or environments where you don’t need vector memory.
{
  "swarm": {
    "topology": "hierarchical",
    "maxAgents": 4,
    "consensus": "raft"
  },
  "mcp": {
    "port": 3000,
    "toolGroups": ["coordination", "memory"]
  },
  "memory": {
    "backend": "sqlite",
    "cacheEnabled": false
  },
  "providers": {
    "default": "claude"
  }
}
Install with:
npm install -g ruflo@latest --omit=optional
Or use the install script flag:
curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/ruflo@main/scripts/install.sh | bash -s -- --minimal

Install Profiles

ProfileFlagSizeTimeUse Case
Minimal--omit=optional or --minimal~45 MB~15sCore CLI only, no ML/embeddings
Default(none)~340 MB~35s cold-cacheFull install with HNSW, ONNX, neural features
# Minimal install — skips optional dependencies (ML/embeddings)
npm install -g ruflo@latest --omit=optional

# Full install
npm install -g ruflo@latest
The minimal install includes all CLI commands and the MCP server. What’s missing is the local ONNX embedding runtime, HNSW indexing, and neural features. Vector memory falls back to SQLite brute-force search and the OpenAI embedding API (if OPENAI_API_KEY is set) rather than local ONNX SIMD.

CLI Config Commands

Ruflo ships a config subcommand for reading and writing claude-flow.config.json from the terminal:
# List all current configuration values
npx ruflo@latest config list

# Set a configuration key (dot-notation for nested keys)
npx ruflo@latest config set --key swarm.maxAgents --value 6

# Read a single configuration key
npx ruflo@latest config get --key swarm.topology

# Reset all configuration to defaults
npx ruflo@latest config reset --key swarm
Use config set in CI scripts to override topology or provider settings per environment without modifying the committed claude-flow.config.json. The CLI flag takes precedence over the config file: --tools=coordination,memory overrides mcp.toolGroups.

Precedence Order

When the same setting appears in multiple places, Ruflo resolves conflicts in this order (highest wins):
  1. CLI flags (e.g., --transport http, --tools=coordination)
  2. Environment variables (e.g., CLAUDE_FLOW_MCP_PORT)
  3. claude-flow.config.json
  4. Built-in defaults

Next Steps

Environment Variables

Complete reference for API keys, memory paths, MCP settings, and the CLI_CORE fast path.

MCP Server

Start the MCP server, configure transports, register with editors, and explore tool groups.

Build docs developers (and LLMs) love