Enterprise-Grade AI Agent Orchestration with Swarm Intelligence
๐ Quick Start โข ๐ Documentation โข ๐ ๏ธ Installation โข ๐ก Examples โข ๐ค Contributing
Claude-Flow is a cutting-edge AI agent orchestration platform that revolutionizes how developers build with artificial intelligence. By combining swarm intelligence, neural pattern recognition, and comprehensive MCP tools, Claude-Flow enables unprecedented AI-powered development workflows.
- 54+ Specialized AI Agents - From coding to architecture design
- Swarm Intelligence - Distributed decision-making with multiple coordination strategies
- 87 MCP Tools - Complete toolkit for automation and integration
- Enterprise-Ready - Production-grade security, monitoring, and scalability
# 1. Install Claude Code globally
npm install -g @anthropic-ai/claude-code
# 2. (Optional) Skip permissions check for faster setup
# Only use if you understand the security implications
claude --dangerously-skip-permissions- Node.js โฅ 20.0.0
- npm โฅ 9.0.0
- Claude Code (required for full functionality)
# Install globally
npm install -g claude-flow@alpha
# Or use npx (recommended)
npx claude-flow@alpha --help
# Initialize configuration
npx claude-flow@alpha init --force# Simple task execution
npx claude-flow@alpha swarm "build a REST API with authentication"
# Complex project coordination
npx claude-flow@alpha hive-mind spawn "enterprise microservices" --claude
# SPARC development mode
npx claude-flow@alpha sparc tdd "user management system"โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude-Flow Core โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Agent โ โ Swarm โ โ Memory โ โ
โ โ Orchestratorโ โ Coordinator โ โ Manager โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ MCP โ โ Task โ โ Provider โ โ
โ โ Server โ โ Engine โ โ Interface โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Microservices Architecture - Modular, scalable components
- Event-Driven Communication - Asynchronous, non-blocking operations
- Domain-Driven Design - Clear boundaries and rich domain models
- CQRS & Event Sourcing - Audit trails and state management
| Agent | Specialization | Use Cases |
|---|---|---|
coder |
Implementation | Code generation, refactoring |
reviewer |
Quality assurance | Code reviews, best practices |
tester |
Test creation | Unit tests, integration tests |
architect |
System design | Architecture patterns, design |
debugger |
Problem solving | Bug fixing, optimization |
| Agent | Specialization | Use Cases |
|---|---|---|
planner |
Strategic planning | Project roadmaps, task breakdown |
coordinator |
Task management | Work distribution, scheduling |
monitor |
Performance tracking | Metrics, health checks |
optimizer |
Resource management | Cost optimization, efficiency |
| Agent | Specialization | Use Cases |
|---|---|---|
backend-dev |
Server development | APIs, databases, services |
mobile-dev |
Mobile apps | React Native, iOS, Android |
ml-developer |
Machine learning | Model training, deployment |
security-analyst |
Security | Vulnerability assessment, fixes |
devops-engineer |
Infrastructure | CI/CD, deployment, monitoring |
Queen
/ | \
W1 W2 W3
- Single point of control
- Simplified communication
- Best for sequential tasks
L1 --- L2
/\ /\
W1 W2 W3 W4
- Fault-tolerant leadership
- Load distribution
- Parallel task execution
A1 โโโ A2
โ โฒ โฑ โ
โ โณ โ
โ โฑ โฒ โ
A3 โโโ A4
- Direct communication
- No single point of failure
- Creative collaboration
Root
/ \
M1 M2
/ \ / \
W1 W2 W3 W4
- Multi-level coordination
- Scalable structure
- Complex projects
# Initialize swarm with topology
npx claude-flow@alpha swarm init --topology mesh
# Spawn agents for task
npx claude-flow@alpha swarm spawn "build microservices" --agents 8
# Monitor swarm progress
npx claude-flow@alpha swarm status --real-time
# Optimize swarm performance
npx claude-flow@alpha swarm optimize --auto-scaleSpecification โ Pseudocode โ Architecture โ Refinement โ Code
# List all modes
npx claude-flow@alpha sparc modes
# Test-Driven Development
npx claude-flow@alpha sparc tdd "payment processing"
# Architecture-first development
npx claude-flow@alpha sparc architecture "microservices design"
# Full pipeline execution
npx claude-flow@alpha sparc pipeline "complete feature"
# Parallel mode execution
npx claude-flow@alpha sparc batch spec,architecture,code "user system"| Mode | Purpose | Command |
|---|---|---|
spec |
Requirements analysis | sparc spec "feature requirements" |
pseudocode |
Algorithm design | sparc pseudocode "sorting algorithm" |
architecture |
System design | sparc architecture "api structure" |
refinement |
Optimization | sparc refinement "improve performance" |
code |
Implementation | sparc code "implement feature" |
tdd |
Test-driven dev | sparc tdd "user authentication" |
# Store memory entry
npx claude-flow@alpha memory store "project-context" "API design patterns"
# Query memory
npx claude-flow@alpha memory query "authentication" --namespace auth
# View memory statistics
npx claude-flow@alpha memory stats
# Export memory for backup
npx claude-flow@alpha memory export --format json > backup.json.swarm/memory.db
โโโ knowledge_base # Persistent facts
โโโ agent_state # Agent status
โโโ task_results # Completed work
โโโ communication # Agent messages
โโโ performance # Metrics data
โโโ cache # Temporary data
# Start MCP server
npx claude-flow@alpha mcp start
# Check server status
npx claude-flow@alpha mcp status
# List available tools
npx claude-flow@alpha mcp tools| Tool | Function |
|---|---|
swarm_init |
Initialize swarm topology |
agent_spawn |
Create new agents |
task_orchestrate |
Coordinate tasks |
memory_usage |
Memory management |
swarm_status |
Monitor progress |
# Setup GitHub integration
npx claude-flow@alpha github init
# Manage pull requests
npx claude-flow@alpha github pr-manager "review and merge"
# Track issues
npx claude-flow@alpha github issue-tracker "analyze bugs"
# Coordinate releases
npx claude-flow@alpha github release-manager "v2.0.0"# GitHub Actions workflow
npx claude-flow@alpha cicd github-actions "setup pipeline"
# Docker deployment
npx claude-flow@alpha cicd docker "containerize app"
# Kubernetes orchestration
npx claude-flow@alpha cicd k8s "deploy to cluster"| Metric | Score | Industry Average |
|---|---|---|
| SWE-Bench | 84.8% | 45-60% |
| Task Completion | 96.3% | 70-80% |
| Speed Improvement | 2.8-4.4x | 1.5-2x |
| Memory Efficiency | 87% | 60-70% |
| Fault Recovery | 99.2% | 85-90% |
# Run benchmarks
npx claude-flow@alpha benchmark run
# View performance metrics
npx claude-flow@alpha monitor performance
# Generate diagnostic report
npx claude-flow@alpha diagnostics --full{
"orchestrator": {
"maxConcurrentAgents": 100,
"taskQueueSize": 1000,
"defaultTopology": "mesh"
},
"memory": {
"backend": "sqlite",
"cacheSizeMB": 256,
"compressionEnabled": true
},
"providers": {
"anthropic": {
"apiKey": "YOUR_API_KEY",
"model": "claude-3-sonnet",
"temperature": 0.7
}
},
"hooks": {
"enabled": true,
"autoFormat": true,
"notifications": true
}
}# Core configuration
export CLAUDE_FLOW_DEBUG=true
export CLAUDE_FLOW_LOG_LEVEL=info
export CLAUDE_FLOW_DATA_DIR=./data
# API keys
export CLAUDE_API_KEY=your_api_key
export OPENAI_API_KEY=your_api_key
# Performance tuning
export CLAUDE_FLOW_MAX_AGENTS=50
export CLAUDE_FLOW_MEMORY_LIMIT=512- ๐ Complete User Guide
- ๐๏ธ Architecture Overview
- ๐ค Agent Reference
- ๐ Swarm Coordination
- ๐ง SPARC Methodology
- ๐ง MCP Tools Reference
- ๐ API Documentation
- โ๏ธ Configuration Guide
- ๐ Getting Started Tutorial
- ๐ก Building Your First Swarm
- ๐ ๏ธ Advanced Workflows
- ๐ Performance Optimization
# Build a REST API
npx claude-flow@alpha swarm "create REST API with CRUD operations for products"
# Fix bugs in codebase
npx claude-flow@alpha swarm "analyze and fix all TypeScript errors"
# Generate documentation
npx claude-flow@alpha swarm "generate comprehensive API documentation"# Initialize project swarm
npx claude-flow@alpha hive-mind spawn "e-commerce platform" \
--agents architect,backend-dev,frontend-dev,tester \
--topology hierarchical
# Continue development
npx claude-flow@alpha swarm "implement payment processing" --continue-session
# Monitor progress
npx claude-flow@alpha swarm status --watch# Full TDD cycle
npx claude-flow@alpha sparc tdd "user authentication system" \
--test-framework jest \
--coverage 90
# Architecture-first approach
npx claude-flow@alpha sparc architecture "microservices platform" \
--patterns "event-driven,cqrs" \
--output diagrams/# Run all tests
npm test
# Run specific test suites
npm run test:unit
npm run test:integration
npm run test:e2e
# Generate coverage report
npm run test:coverage
# Run benchmarks
npm run test:benchmark| Component | Coverage | Target |
|---|---|---|
| Core | 92% | 90% |
| Agents | 88% | 85% |
| Swarm | 85% | 85% |
| Memory | 90% | 90% |
| MCP | 87% | 85% |
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["npm", "start"]# Build image
docker build -t claude-flow .
# Run container
docker run -d -p 3000:3000 \
-e CLAUDE_API_KEY=your_key \
claude-flowapiVersion: apps/v1
kind: Deployment
metadata:
name: claude-flow
spec:
replicas: 3
selector:
matchLabels:
app: claude-flow
template:
metadata:
labels:
app: claude-flow
spec:
containers:
- name: claude-flow
image: claude-flow:latest
ports:
- containerPort: 3000
env:
- name: CLAUDE_API_KEY
valueFrom:
secretKeyRef:
name: claude-flow-secrets
key: api-key- JWT Authentication - Token-based API security
- Role-Based Access Control - Granular permissions
- Input Validation - Schema-based validation
- Rate Limiting - API throttling and protection
- Encryption - Data encryption at rest and in transit
- Audit Logging - Comprehensive activity tracking
-
API Key Management
- Never commit API keys to version control
- Use environment variables or secrets management
- Rotate keys regularly
-
Access Control
- Implement least privilege principle
- Use role-based permissions
- Enable multi-factor authentication
-
Data Protection
- Encrypt sensitive data
- Use secure communication protocols
- Implement data retention policies
# Real-time monitoring dashboard
npx claude-flow@alpha monitor
# Performance metrics
npx claude-flow@alpha metrics --interval 5s
# Health checks
npx claude-flow@alpha health --verbose
# Generate reports
npx claude-flow@alpha report generate --format pdf- System Metrics - CPU, memory, network I/O
- Agent Metrics - Task completion, quality scores
- Swarm Metrics - Coordination efficiency, fault recovery
- Performance Metrics - Response times, throughput
We welcome contributions! Please see our Contributing Guide for details.
# Clone repository
git clone https://github.com/ruvnet/claude-flow.git
cd claude-flow
# Install dependencies
npm install
# Run development mode
npm run dev
# Run tests
npm test
# Build project
npm run build- ๐ Bug fixes and improvements
- โจ New features and agents
- ๐ Documentation updates
- ๐งช Test coverage improvements
- ๐จ UI/UX enhancements
- ๐ Internationalization
Claude-Flow is open source software licensed under the MIT License.
- Anthropic - For Claude AI and Claude Code
- OpenAI - For GPT models integration
- Contributors - All our amazing contributors
- Community - For feedback and support
- Node.js & TypeScript
- SQLite & Better-SQLite3
- Model Context Protocol (MCP)
- Commander.js & Inquirer.js
- Jest & Testing Library
- ๐ Documentation
- ๐ฌ Discord Community
- ๐ Issue Tracker
- ๐ง Email Support
Built with โค๏ธ by the Claude-Flow Team