Agent orchestration platform for Claude-Code that enables autonomous code writing, editing, testing, and optimization across recursive workflows
Claude-Flow is the ultimate multi-terminal orchestration platform that revolutionizes how you work with Claude Code. Imagine coordinating dozens of AI agents simultaneously, each working on different aspects of your project while sharing knowledge through an intelligent memory bank.
🔥 One command to rule them all:
npx claude-flow
- Deploy a full AI agent coordination system in seconds!
# 🚀 Get started in 30 seconds
npx claude-flow init
npx claude-flow start
# 🤖 Spawn a research team
npx claude-flow agent spawn researcher --name "Senior Researcher"
npx claude-flow agent spawn analyst --name "Data Analyst"
npx claude-flow agent spawn implementer --name "Code Developer"
# 📋 Create and execute tasks
npx claude-flow task create research "Research AI optimization techniques"
npx claude-flow task list
# 📊 Monitor in real-time
npx claude-flow status
npx claude-flow monitor
🤖 Multi-Agent OrchestrationCoordinate dozens of AI agents with different specializations, each running in isolated terminal sessions with intelligent load balancing. |
🧠 Intelligent Memory BankAdvanced CRDT-based memory system with SQLite performance and Markdown readability. Agents learn and share knowledge across sessions. |
⚡ Enhanced Claude IntegrationSpawn Claude instances with comprehensive Claude-Flow guidance, teaching them to use memory, coordination, and system commands effectively. |
🎯 Smart Task SchedulingPriority-based task queues with dependency resolution, deadlock detection, and automatic retry with exponential backoff. |
🔒 Enterprise SecurityToken-based authentication, rate limiting, circuit breakers, audit logging, and role-based access control. |
🌐 MCP IntegrationFull Model Context Protocol support with stdio and HTTP transports, enabling seamless integration with external tools. |
# Install and run in one command
npx claude-flow
# Or install globally for repeated use
npm install -g claude-flow
claude-flow --version
# Install via Deno
deno install --allow-all --name claude-flow \
https://raw.githubusercontent.com/ruvnet/claude-code-flow/main/src/cli/index.ts
# Or run directly
deno run --allow-all \
https://raw.githubusercontent.com/ruvnet/claude-code-flow/main/src/cli/index.ts
git clone https://github.com/ruvnet/claude-code-flow.git
cd claude-code-flow
deno task build && deno task install
Comprehensive documentation is available to help you get the most out of Claude-Flow:
npx claude-flow init
This creates:
CLAUDE.md
- Claude Code configurationmemory-bank.md
- Memory system documentationcoordination.md
- Agent coordination documentationnpx claude-flow start
# Or run as daemon
npx claude-flow start --daemon
# Spawn different agent types with specific capabilities
npx claude-flow agent spawn researcher --name "Research Assistant" --priority 8
npx claude-flow agent spawn implementer --name "Code Developer" --priority 7
npx claude-flow agent spawn analyst --name "Data Analyst" --priority 6
npx claude-flow agent spawn coordinator --name "Project Manager" --priority 9
# List all active agents
npx claude-flow agent list
# Get detailed information about an agent
npx claude-flow agent info agent-123
# Create tasks with different priorities
npx claude-flow task create research "Analyze authentication best practices" --priority 8
npx claude-flow task create implementation "Build JWT authentication" --priority 9
npx claude-flow task create analysis "Review security vulnerabilities" --priority 10
# Create task with dependencies
npx claude-flow task create implementation "Build user management" \
--priority 7 --deps task-123,task-456
# Assign tasks to agents
npx claude-flow task assign task-123 agent-456
# List all tasks
npx claude-flow task list
npx claude-flow task list --verbose # Show detailed task information
# Check specific task status
npx claude-flow task status task-123
# Cancel a task
npx claude-flow task cancel task-789
# Spawn Claude with enhanced Claude-Flow guidance
npx claude-flow claude spawn "implement user authentication" --research --parallel
# Backend-only mode with high coverage
npx claude-flow claude spawn "create REST API" --mode backend-only --coverage 95
# Frontend development with feature commits
npx claude-flow claude spawn "build React components" --mode frontend-only --commit feature
# Full stack with all options
npx claude-flow claude spawn "build complete app" --research --parallel --coverage 90 --verbose
# Execute batch workflow
npx claude-flow claude batch examples/claude-workflow.json --dry-run
Enhanced Claude Instances receive:
npx claude-flow
command syntax# Check system health
npx claude-flow status
# Real-time monitoring
npx claude-flow monitor
# View MCP tools
npx claude-flow mcp tools
Claude-Flow uses a modular architecture with the following components:
Default configuration file (claude-flow.config.json
):
{
"orchestrator": {
"maxConcurrentAgents": 10,
"taskQueueSize": 100,
"healthCheckInterval": 30000,
"shutdownTimeout": 30000
},
"terminal": {
"type": "auto",
"poolSize": 5,
"recycleAfter": 10,
"healthCheckInterval": 60000,
"commandTimeout": 300000
},
"memory": {
"backend": "hybrid",
"cacheSizeMB": 100,
"syncInterval": 5000,
"conflictResolution": "crdt",
"retentionDays": 30
},
"coordination": {
"maxRetries": 3,
"retryDelay": 1000,
"deadlockDetection": true,
"resourceTimeout": 60000,
"messageTimeout": 30000
},
"mcp": {
"transport": "stdio",
"port": 3000,
"tlsEnabled": false
},
"logging": {
"level": "info",
"format": "json",
"destination": "console"
}
}
Claude-Flow supports multiple agent types:
Claude-Flow provides a comprehensive CLI for managing your AI orchestration system. For detailed command documentation, see the CLI Reference.
-c, --config <path>
: Path to configuration file-v, --verbose
: Enable verbose logging--log-level <level>
: Set log level (debug, info, warn, error)--version
: Show version information--help
: Show help for any commandinit
- Initialize Claude Code Integrationnpx claude-flow init [options]
-f, --force Overwrite existing files
-m, --minimal Create minimal configuration files
Creates CLAUDE.md, memory-bank.md, coordination.md, and folder structure.
start
- Start Orchestration Systemnpx claude-flow start [options]
-d, --daemon Run as daemon in background
-p, --port <port> MCP server port (default: 3000)
status
- Show System Statusnpx claude-flow status [options]
-v, --verbose Show detailed status information
agent
- Manage AI Agentsnpx claude-flow agent <subcommand>
spawn <type> Spawn a new agent (researcher/implementer/analyst/coordinator)
--name <name> Agent name
--priority <1-10> Agent priority
--max-tasks <n> Max concurrent tasks
list List all active agents
info <agent-id> Get detailed agent information
terminate <agent-id> Terminate an agent
task
- Manage Tasksnpx claude-flow task <subcommand>
create <type> <desc> Create a new task
--priority <1-10> Task priority
--deps <task-ids> Comma-separated dependency IDs
list List all tasks
--verbose Show task descriptions
status <task-id> Get task status
cancel <task-id> Cancel a task
workflow <file> Execute workflow from file
--async Run workflow asynchronously
memory
- Manage Memory Banknpx claude-flow memory <subcommand>
query <search> Search memory entries
--namespace <ns> Filter by namespace
--limit <n> Limit results
store <key> <value> Store information
--namespace <ns> Target namespace
export <file> Export memory to file
import <file> Import memory from file
stats Show memory statistics
cleanup Clean up old entries
--days <n> Entries older than n days
mcp
- MCP Server Managementnpx claude-flow mcp <subcommand>
status Show MCP server status
tools List available MCP tools
config Show MCP configuration
logs View MCP server logs
--lines <n> Number of log lines (default: 50)
monitor
- Real-time Monitoringnpx claude-flow monitor [options]
-i, --interval <seconds> Update interval (default: 2)
-c, --compact Compact view mode
-f, --focus <component> Focus on specific component
claude
- Spawn Claude Instances with Enhanced Guidance 🆕npx claude-flow claude <subcommand>
spawn <task> Spawn Claude with enhanced Claude-Flow guidance
-t, --tools <tools> Allowed tools (comma-separated)
--no-permissions Use --dangerously-skip-permissions flag
-c, --config <file> MCP config file path
-m, --mode <mode> Development mode (full/backend-only/frontend-only/api-only)
--parallel Enable parallel execution with multi-agent support
--research Enable web research with WebFetchTool
--coverage <n> Test coverage target percentage (default: 80)
--commit <freq> Commit frequency (phase/feature/manual)
-v, --verbose Enable verbose output
-d, --dry-run Show what would be executed without running
batch <workflow-file> Execute multiple Claude instances from workflow
--dry-run Show what would be executed without running
Each spawned Claude instance receives comprehensive guidance including:
npx claude-flow memory store/query
)npx claude-flow status/monitor
)config
- Configuration Managementnpx claude-flow config <subcommand>
show Show current configuration
get <path> Get specific config value
set <path> <value> Set config value
init [file] Initialize config file
validate <file> Validate config file
session
- Session Managementnpx claude-flow session <subcommand>
list List active sessions
info <session-id> Get session information
terminate <session-id> End a session
workflow
- Workflow Executionnpx claude-flow workflow <file> [options]
--validate Validate workflow without executing
--async Run workflow asynchronously
--watch Watch workflow progress
help
- Get Helpnpx claude-flow help [command]
Complete Agent & Task Workflow:
# Initialize and start the system
npx claude-flow init
npx claude-flow start --daemon
# Spawn a team of agents
npx claude-flow agent spawn researcher --name "Senior Researcher" --priority 8
npx claude-flow agent spawn analyst --name "Data Analyst" --priority 7
npx claude-flow agent spawn implementer --name "Lead Developer" --priority 9
# Create research task
TASK1=$(npx claude-flow task create research "Analyze authentication patterns" --priority 8 | grep "Task ID" | awk '{print $3}')
# Create analysis task dependent on research
TASK2=$(npx claude-flow task create analysis "Security audit findings" --priority 7 --deps $TASK1 | grep "Task ID" | awk '{print $3}')
# Create implementation task dependent on analysis
TASK3=$(npx claude-flow task create implementation "Build secure auth system" --priority 9 --deps $TASK2 | grep "Task ID" | awk '{print $3}')
# Assign tasks to appropriate agents
npx claude-flow task assign $TASK1 $(npx claude-flow agent list | grep researcher | awk '{print $2}')
npx claude-flow task assign $TASK2 $(npx claude-flow agent list | grep analyst | awk '{print $2}')
npx claude-flow task assign $TASK3 $(npx claude-flow agent list | grep implementer | awk '{print $2}')
# Monitor the workflow
npx claude-flow monitor
Code Development Workflow:
npx claude-flow agent spawn implementer --name "Backend Dev" --max-tasks 3
npx claude-flow agent spawn implementer --name "Frontend Dev" --max-tasks 3
npx claude-flow agent spawn coordinator --name "Tech Lead"
npx claude-flow workflow development-pipeline.json --watch
Enhanced Claude Spawn Examples:
# Backend API development with high test coverage
npx claude-flow claude spawn "build REST API with authentication" \
--mode backend-only --coverage 95 --commit feature
# Frontend development with research capabilities
npx claude-flow claude spawn "create responsive dashboard" \
--mode frontend-only --research --verbose
# Full-stack development with parallel execution
npx claude-flow claude spawn "implement user management system" \
--parallel --coverage 90 --commit phase
# API design focus with custom tools
npx claude-flow claude spawn "design GraphQL schema" \
--mode api-only --tools "View,Edit,GrepTool,LS"
Workflow Execution:
# Execute a predefined workflow
npx claude-flow workflow examples/development-config.json
# Execute workflow with monitoring
npx claude-flow workflow examples/research-workflow.json --watch
# Validate workflow before execution
npx claude-flow workflow my-workflow.json --validate
Create a workflow file (example-workflow.json
):
{
"name": "Research and Analysis Workflow",
"tasks": [
{
"id": "research-1",
"type": "research",
"description": "Research quantum computing basics",
"assignTo": "researcher"
},
{
"id": "analyze-1",
"type": "analysis",
"description": "Analyze research findings",
"dependencies": ["research-1"],
"assignTo": "analyst"
},
{
"id": "report-1",
"type": "report",
"description": "Generate summary report",
"dependencies": ["analyze-1"],
"assignTo": "coordinator"
}
]
}
Execute the workflow:
claude-flow task workflow example-workflow.json
git clone https://github.com/ruvnet/claude-code-flow.git
cd claude-flow
deno task dev
deno task test
deno task build
Claude-Flow can also be used programmatically:
import { Orchestrator } from 'claude-flow';
const orchestrator = new Orchestrator(config);
await orchestrator.initialize();
// Spawn an agent
const sessionId = await orchestrator.spawnAgent({
id: 'agent-1',
name: 'Research Agent',
type: 'researcher',
// ... other properties
});
// Create and assign a task
await orchestrator.assignTask({
id: 'task-1',
type: 'research',
description: 'Research AI trends',
// ... other properties
});
Contributions are welcome! Please read our Contributing Guide for details.
MIT License - see LICENSE file for details.
Claude-Flow seamlessly integrates with Claude Code through the CLAUDE.md
file created by npx claude-flow init
. This enables:
Use with Claude Code:
# Initialize integration
npx claude-flow init
# Spawn Claude with enhanced Claude-Flow guidance
npx claude-flow claude spawn "your task here" --research --parallel
# Claude receives:
# - Instructions on using npx claude-flow commands
# - Memory operations (store/query)
# - Agent coordination capabilities
# - Mode-specific development guidance
init
command)We welcome contributions! See our Contributing Guide for:
MIT License - see LICENSE file for details.
Built with ❤️ by rUv for the Claude community