Skip to content

vibehat/claude-flow

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2,358 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŠ Claude-Flow v2.0.0 Alpha: AI Orchestration Platform

๐ŸŒŸ Star on GitHub ๐Ÿ“ฆ Alpha Release โšก Claude Code ๐Ÿ›๏ธ Agentics Foundation ๐Ÿ Hive-Mind ๐Ÿง  Neural ๐Ÿ›ก๏ธ MIT License

Enterprise-Grade AI Agent Orchestration with Swarm Intelligence

๐Ÿš€ Quick Start โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿ› ๏ธ Installation โ€ข ๐Ÿ’ก Examples โ€ข ๐Ÿค Contributing


๐ŸŽฏ Overview

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.

๐ŸŒŸ Key Highlights

  • 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

๐Ÿš€ Quick Start

# 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

Prerequisites

  • Node.js โ‰ฅ 20.0.0
  • npm โ‰ฅ 9.0.0
  • Claude Code (required for full functionality)

Installation

# 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

Basic Usage

# 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"

๐Ÿ—๏ธ Architecture

System Components

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Claude-Flow Core                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                           โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚   Agent     โ”‚  โ”‚   Swarm     โ”‚  โ”‚   Memory    โ”‚     โ”‚
โ”‚  โ”‚ Orchestratorโ”‚  โ”‚ Coordinator โ”‚  โ”‚   Manager   โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚                                                           โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚     MCP     โ”‚  โ”‚    Task     โ”‚  โ”‚   Provider  โ”‚     โ”‚
โ”‚  โ”‚   Server    โ”‚  โ”‚   Engine    โ”‚  โ”‚  Interface  โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚                                                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core Design Patterns

  • 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 Types

Development Agents

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

Coordination Agents

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

Specialized Agents

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

View all 54+ agents โ†’

๐Ÿ Swarm Intelligence

Coordination Topologies

1. Centralized (Queen-Led)

      Queen
    /   |   \
   W1   W2   W3
  • Single point of control
  • Simplified communication
  • Best for sequential tasks

2. Distributed (Multi-Leader)

   L1 --- L2
   /\     /\
  W1 W2  W3 W4
  • Fault-tolerant leadership
  • Load distribution
  • Parallel task execution

3. Mesh (Peer-to-Peer)

   A1 โ”€โ”€โ”€ A2
   โ”‚ โ•ฒ   โ•ฑ โ”‚
   โ”‚   โ•ณ   โ”‚
   โ”‚ โ•ฑ   โ•ฒ โ”‚
   A3 โ”€โ”€โ”€ A4
  • Direct communication
  • No single point of failure
  • Creative collaboration

4. Hierarchical (Tree)

       Root
      /    \
    M1      M2
   /  \    /  \
  W1  W2  W3  W4
  • Multi-level coordination
  • Scalable structure
  • Complex projects

Swarm Commands

# 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-scale

๐Ÿง  SPARC Development Environment

SPARC Methodology

Specification โ†’ Pseudocode โ†’ Architecture โ†’ Refinement โ†’ Code

Available SPARC Modes

# 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"

SPARC Mode Examples

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"

๐Ÿ’พ Memory Management

Distributed Memory System

# 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

Memory Architecture

.swarm/memory.db
โ”œโ”€โ”€ knowledge_base     # Persistent facts
โ”œโ”€โ”€ agent_state       # Agent status
โ”œโ”€โ”€ task_results      # Completed work
โ”œโ”€โ”€ communication     # Agent messages
โ”œโ”€โ”€ performance       # Metrics data
โ””โ”€โ”€ cache            # Temporary data

๐Ÿ”ง MCP Integration

MCP Server Setup

# 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

Available 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

View all 87 MCP tools โ†’

๐Ÿ”— Integrations

GitHub Integration

# 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"

CI/CD Integration

# 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"

๐Ÿ“Š Performance Metrics

Benchmark Results

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%

Performance Commands

# 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

๐Ÿ› ๏ธ Configuration

Configuration File

{
  "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
  }
}

Environment Variables

# 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

๐Ÿ“š Documentation

Core Documentation

Tutorials & Examples

Development

๐Ÿ’ก Examples

Simple Task Execution

# 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"

Complex Project Coordination

# 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

SPARC Development Workflow

# 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/

๐Ÿงช Testing

Running Tests

# 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

Test Coverage

Component Coverage Target
Core 92% 90%
Agents 88% 85%
Swarm 85% 85%
Memory 90% 90%
MCP 87% 85%

๐Ÿš€ Deployment

Docker Deployment

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-flow

Kubernetes Deployment

apiVersion: 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

๐Ÿ”’ Security

Security Features

  • 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

Security Best Practices

  1. API Key Management

    • Never commit API keys to version control
    • Use environment variables or secrets management
    • Rotate keys regularly
  2. Access Control

    • Implement least privilege principle
    • Use role-based permissions
    • Enable multi-factor authentication
  3. Data Protection

    • Encrypt sensitive data
    • Use secure communication protocols
    • Implement data retention policies

๐Ÿ“ˆ Monitoring & Analytics

Built-in Monitoring

# 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

Metrics Collection

  • System Metrics - CPU, memory, network I/O
  • Agent Metrics - Task completion, quality scores
  • Swarm Metrics - Coordination efficiency, fault recovery
  • Performance Metrics - Response times, throughput

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# 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

Contribution Areas

  • ๐Ÿ› Bug fixes and improvements
  • โœจ New features and agents
  • ๐Ÿ“š Documentation updates
  • ๐Ÿงช Test coverage improvements
  • ๐ŸŽจ UI/UX enhancements
  • ๐ŸŒ Internationalization

๐Ÿ“ License

Claude-Flow is open source software licensed under the MIT License.

๐Ÿ™ Acknowledgments

Special Thanks

  • Anthropic - For Claude AI and Claude Code
  • OpenAI - For GPT models integration
  • Contributors - All our amazing contributors
  • Community - For feedback and support

Technologies Used

  • Node.js & TypeScript
  • SQLite & Better-SQLite3
  • Model Context Protocol (MCP)
  • Commander.js & Inquirer.js
  • Jest & Testing Library

๐Ÿ“ฎ Support & Contact

Get Help

Stay Updated


Built with โค๏ธ by the Claude-Flow Team

โฌ† Back to Top

About

Claude-Flow v2.0.0 Alpha represents a leap in AI-powered development orchestration. Built from the ground up with enterprise-grade architecture, advanced swarm intelligence, and seamless Claude Code integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 43.0%
  • JavaScript 33.2%
  • Python 21.3%
  • Shell 1.3%
  • HTML 0.6%
  • CSS 0.5%
  • Other 0.1%