Claude-Flow v2 Alpha is an enterprise-grade AI orchestration platform that reimagines how developers build with AI. By combining hive-mind swarm intelligence, neural pattern recognition, and 87 advanced MCP tools, Claude-Flow enables unprecedented AI-powered development workflows.
- 🐝 Hive-Mind Intelligence: Queen-led AI coordination with specialized worker agents
- 🧠 Neural Networks: 27+ cognitive models with WASM SIMD acceleration
- 🔧 87 MCP Tools: Comprehensive toolkit for swarm orchestration, memory, and automation
- 🔄 Dynamic Agent Architecture (DAA): Self-organizing agents with fault tolerance
- 💾 SQLite Memory System: Persistent
.swarm/memory.db
with 12 specialized tables - 🪝 Advanced Hooks System: Automated workflows with pre/post operation hooks
- 📊 GitHub Integration: 6 specialized modes for repository management
🔥 Revolutionary AI Coordination: Build faster, smarter, and more efficiently with AI-powered development orchestration
- Node.js 18+ (LTS recommended)
- npm 9+ or equivalent package manager
- Windows users: See Windows Installation Guide for special instructions
# 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
💡 Windows Note: If you encounter SQLite errors, Claude Flow will automatically use in-memory storage. For persistent storage options, see our Windows guide.
# 1. Initialize Claude Flow with enhanced MCP setup (auto-configures permissions!)
npx claude-flow@alpha init --force
# 2. Explore all revolutionary capabilities
npx claude-flow@alpha --help
# 3a. Quick AI coordination (recommended for most tasks)
npx claude-flow@alpha swarm "build me a REST API" --claude
# 3b. OR launch the full hive-mind system (for complex projects)
npx claude-flow@alpha hive-mind wizard
npx claude-flow@alpha hive-mind spawn "build enterprise system" --claude
Feature | swarm Command |
hive-mind Command |
---|---|---|
Best For | Quick tasks, single objectives | Complex projects, persistent sessions |
Setup | Instant - no configuration needed | Interactive wizard setup |
Session | Temporary coordination | Persistent with resume capability |
Memory | Task-scoped | Project-wide with SQLite storage |
Agents | Auto-spawned for task | Manual control with specializations |
Use When | "Build X", "Fix Y", "Analyze Z" | Multi-feature projects, team coordination |
Quick Rule: Start with swarm
for most tasks. Use hive-mind
when you need persistent sessions or complex multi-agent coordination.
Confused about .hive-mind
and .swarm
directories? Not sure when to create new hives? Here are the most common workflow patterns:
# Initialize once per feature/task
npx claude-flow@alpha init --force
npx claude-flow@alpha hive-mind spawn "Implement user authentication" --claude
# Continue working on SAME feature (reuse existing hive)
npx claude-flow@alpha hive-mind status
npx claude-flow@alpha memory query "authentication" --recent
npx claude-flow@alpha swarm "Add password reset functionality" --continue-session
# Project-level initialization (once per project)
npx claude-flow@alpha init --force --project-name "my-app"
# Feature 1: Authentication (new hive)
npx claude-flow@alpha hive-mind spawn "auth-system" --namespace auth --claude
# Feature 2: User management (separate hive)
npx claude-flow@alpha hive-mind spawn "user-management" --namespace users --claude
# Resume Feature 1 later (use session ID from spawn output)
npx claude-flow@alpha hive-mind resume session-xxxxx-xxxxx
# Start research session
npx claude-flow@alpha hive-mind spawn "Research microservices patterns" --agents researcher,analyst --claude
# Continue research in SAME session
npx claude-flow@alpha memory stats # See what's been learned
npx claude-flow@alpha swarm "Deep dive into API gateway patterns" --continue-session
Situation | Action | Command |
---|---|---|
Same objective/feature | Continue existing hive | npx claude-flow@alpha hive-mind resume <session-id> |
New feature in same project | Create new hive with namespace | npx claude-flow@alpha hive-mind spawn "new-feature" --namespace feature-name |
Completely different project | New directory + init | mkdir new-project && cd new-project && npx claude-flow@alpha init |
Experimenting/testing | Temporary hive | npx claude-flow@alpha hive-mind spawn "experiment" --temp |
Don't panic if directories seem empty! Claude-Flow uses SQLite databases that may not show files in directory listings:
# Check what's actually stored (even if directories look empty)
npx claude-flow@alpha memory stats # See memory data
npx claude-flow@alpha memory list # List all namespaces
npx claude-flow@alpha hive-mind status # See active hives
# Your project structure after initialization:
# .hive-mind/ <- Contains config.json + SQLite session data
# .swarm/ <- Contains memory.db (SQLite database)
# memory/ <- Agent-specific memories (created when agents spawn)
# coordination/ <- Active workflow files (created during tasks)
# See what you were working on
npx claude-flow@alpha hive-mind status
npx claude-flow@alpha memory query --recent --limit 5
# List all sessions to find the one you want
npx claude-flow@alpha hive-mind sessions
# Resume specific session by ID
npx claude-flow@alpha hive-mind resume session-xxxxx-xxxxx
Claude-Flow v2.0.0 introduces a powerful hooks system that automates coordination and enhances every operation:
# Hooks automatically trigger on operations
npx claude-flow@alpha init --force # Auto-configures MCP servers & hooks
pre-task
: Auto-assigns agents based on task complexitypre-search
: Caches searches for improved performancepre-edit
: Validates files and prepares resourcespre-command
: Security validation before execution
post-edit
: Auto-formats code using language-specific toolspost-task
: Trains neural patterns from successful operationspost-command
: Updates memory with operation contextnotification
: Real-time progress updates
session-start
: Restores previous context automaticallysession-end
: Generates summaries and persists statesession-restore
: Loads memory from previous sessions
// .claude/settings.json (auto-configured)
{
"hooks": {
"preEditHook": {
"command": "npx",
"args": ["claude-flow", "hooks", "pre-edit", "--file", "${file}", "--auto-assign-agents", "true"],
"alwaysRun": false
},
"postEditHook": {
"command": "npx",
"args": ["claude-flow", "hooks", "post-edit", "--file", "${file}", "--format", "true"],
"alwaysRun": true
},
"sessionEndHook": {
"command": "npx",
"args": ["claude-flow", "hooks", "session-end", "--generate-summary", "true"],
"alwaysRun": true
}
}
}
Hooks integrate seamlessly with Claude Code's workflow:
- Automatic Triggering: Hooks fire automatically during Claude Code operations
- Context Awareness: Each hook receives relevant context (file paths, commands, etc.)
- Non-Blocking: Hooks run asynchronously to maintain performance
- Configurable: Enable/disable specific hooks as needed
# Manual hook execution
npx claude-flow hooks pre-task --description "Build REST API" --auto-spawn-agents
# Post-edit with formatting
npx claude-flow hooks post-edit --file "src/api.js" --format --train-neural
# Session management
npx claude-flow hooks session-end --generate-summary --persist-state
If you're experiencing issues with ${file}
or ${command}
variables not working in your hooks (common with Claude Code 1.0.51+), use the fix-hook-variables
command:
# Fix all found settings.json files
npx claude-flow@alpha fix-hook-variables
# Fix specific file
npx claude-flow@alpha fix-hook-variables .claude/settings.json
# Create test configuration
npx claude-flow@alpha fix-hook-variables --test
This command automatically transforms legacy variable syntax to working environment variables:
${file}
→$CLAUDE_EDITED_FILE
${command}
→$CLAUDE_COMMAND
${tool}
→$CLAUDE_TOOL
Claude-Flow v2.0.0 introduces groundbreaking hive-mind architecture where a Queen AI coordinates specialized worker agents in perfect harmony.
# Deploy intelligent swarm coordination
npx claude-flow@alpha swarm "Build a full-stack application" --strategy development
# Launch hive-mind with specific specializations
npx claude-flow@alpha hive-mind spawn "Create microservices architecture" --agents 8 --claude
- 👑 Queen Agent: Master coordinator and decision maker
- 🏗️ Architect Agents: System design and technical architecture
- 💻 Coder Agents: Implementation and development
- 🧪 Tester Agents: Quality assurance and validation
- 📊 Analyst Agents: Data analysis and insights
- 🔍 Researcher Agents: Information gathering and analysis
- 🛡️ Security Agents: Security auditing and compliance
- 🚀 DevOps Agents: Deployment and infrastructure
# Neural pattern recognition and training
npx claude-flow@alpha neural train --pattern coordination --epochs 50
npx claude-flow@alpha neural predict --model cognitive-analysis
npx claude-flow@alpha cognitive analyze --behavior "development workflow"
# Cross-session memory management with SQLite persistence
npx claude-flow@alpha memory store "project-context" "Full-stack app requirements"
npx claude-flow@alpha memory query "authentication" --namespace sparc
npx claude-flow@alpha memory stats # Shows 12 specialized tables
npx claude-flow@alpha memory export backup.json --namespace default
npx claude-flow@alpha memory import project-memory.json
🪟 Windows Users: SQLite will automatically fallback to in-memory storage if native modules fail. All features work normally, but data won't persist between sessions. See Windows guide for persistent storage options.
# Advanced workflow automation
npx claude-flow@alpha workflow create --name "CI/CD Pipeline" --parallel
npx claude-flow@alpha batch process --items "test,build,deploy" --concurrent
npx claude-flow@alpha pipeline create --config advanced-deployment.json
Powered by 27+ neural models optimized with WASM SIMD acceleration:
# Train coordination patterns
npx claude-flow@alpha neural train --pattern coordination --data "workflow.json"
# Real-time predictions
npx claude-flow@alpha neural predict --model task-optimizer --input "current-state.json"
# Analyze cognitive behavior
npx claude-flow@alpha cognitive analyze --behavior "development-patterns"
- Pattern Recognition: Learns from successful operations
- Adaptive Learning: Improves performance over time
- Transfer Learning: Apply knowledge across domains
- Model Compression: Efficient storage and execution
- Ensemble Models: Combine multiple neural networks
- Explainable AI: Understand decision-making process
Complete programmatic control over agent lifecycle and coordination:
# Create specialized agents
npx claude-flow@alpha daa agent-create --type "specialized-researcher" \
--capabilities "[\"deep-analysis\", \"pattern-recognition\"]" \
--resources "{\"memory\": 2048, \"compute\": \"high\"}"
# Match capabilities to tasks
npx claude-flow@alpha daa capability-match \
--task-requirements "[\"security-analysis\", \"performance-optimization\"]"
# Manage agent lifecycle
npx claude-flow@alpha daa lifecycle-manage --agentId "agent-123" --action "scale-up"
- Resource Allocation: Dynamic CPU/memory management
- Inter-Agent Communication: Message passing and coordination
- Consensus Mechanisms: Democratic decision making
- Fault Tolerance: Self-healing with automatic recovery
- Performance Optimization: Real-time bottleneck resolution
swarm_init
,agent_spawn
,task_orchestrate
swarm_monitor
,topology_optimize
,load_balance
coordination_sync
,swarm_scale
,swarm_destroy
neural_train
,neural_predict
,pattern_recognize
cognitive_analyze
,learning_adapt
,neural_compress
ensemble_create
,transfer_learn
,neural_explain
memory_usage
,memory_search
,memory_persist
memory_namespace
,memory_backup
,memory_restore
memory_compress
,memory_sync
,memory_analytics
- SQLite Backend: Persistent
.swarm/memory.db
with 12 specialized tables
performance_report
,bottleneck_analyze
,token_usage
benchmark_run
,metrics_collect
,trend_analysis
health_check
,diagnostic_run
,usage_stats
workflow_create
,workflow_execute
,workflow_export
automation_setup
,pipeline_create
,scheduler_manage
trigger_setup
,batch_process
,parallel_execute
github_repo_analyze
,github_pr_manage
,github_issue_track
github_release_coord
,github_workflow_auto
,github_code_review
daa_agent_create
,daa_capability_match
,daa_resource_alloc
daa_lifecycle_manage
,daa_communication
,daa_consensus
security_scan
,backup_create
,restore_system
config_manage
,features_detect
,log_analysis
# GitHub workflow orchestration and coordination
npx claude-flow@alpha github gh-coordinator analyze --analysis-type security
npx claude-flow@alpha github pr-manager review --multi-reviewer --ai-powered
npx claude-flow@alpha github release-manager coord --version 2.0.0 --auto-changelog
npx claude-flow@alpha github repo-architect optimize --structure-analysis
npx claude-flow@alpha github issue-tracker manage --project-coordination
npx claude-flow@alpha github sync-coordinator align --multi-package
v2.0.0 Alpha automatically configures MCP servers for seamless Claude Code integration:
# Automatic MCP integration (happens during init)
✅ claude-flow MCP server configured
✅ ruv-swarm MCP server configured
✅ 87 tools available in Claude Code
✅ --dangerously-skip-permissions set as default
# Advanced SPARC development with neural enhancement
npx claude-flow@alpha sparc mode --type "neural-tdd" --auto-learn
npx claude-flow@alpha sparc workflow --phases "all" --ai-guided --memory-enhanced
- 27+ Cognitive Models: Adaptive learning from successful operations
- Pattern Analysis: Real-time behavior analysis and optimization
- Decision Tracking: Complete audit trail of AI decisions
- Performance Learning: Continuous improvement from past executions
# Automatic error recovery and optimization
npx claude-flow@alpha health check --components all --auto-heal
npx claude-flow@alpha fault tolerance --strategy retry-with-learning
npx claude-flow@alpha bottleneck analyze --auto-optimize
- SQLite Persistence: Robust
.swarm/memory.db
storage with 12 specialized tables - Cross-Session Persistence: Remember context across Claude Code sessions
- Namespace Management: Organized memory with hierarchical access
- Enhanced Schema: Agent interactions, training data, performance metrics, and more
- Memory Compression: Efficient storage of large coordination contexts
- Distributed Sync: Share memory across multiple AI instances
- ✅ 84.8% SWE-Bench Solve Rate: Superior problem-solving through hive-mind coordination
- ✅ 32.3% Token Reduction: Efficient task breakdown reduces costs significantly
- ✅ 2.8-4.4x Speed Improvement: Parallel coordination maximizes throughput
- ✅ 87 MCP Tools: Most comprehensive AI tool suite available
- ✅ Zero-Config Setup: Automatic MCP integration with Claude Code
# Check memory system performance
npx claude-flow@alpha memory stats
npx claude-flow@alpha memory list
# Test GitHub coordination modes
npx claude-flow@alpha github gh-coordinator --help
npx claude-flow@alpha github pr-manager --help
# Workflow orchestration
npx claude-flow@alpha workflow create --name "Development Pipeline" --parallel
# Deploy complete development swarm
npx claude-flow@alpha hive-mind spawn "Build e-commerce platform with React, Node.js, and PostgreSQL" \
--agents 10 \
--strategy parallel \
--memory-namespace ecommerce
# Monitor progress in real-time
npx claude-flow@alpha swarm monitor --dashboard --real-time
# Deploy research swarm with neural enhancement
npx claude-flow@alpha swarm "Research AI safety in autonomous systems" \
--strategy research \
--neural-patterns enabled \
--memory-compression high
# Analyze results with cognitive computing
npx claude-flow@alpha cognitive analyze --target research-results
# Automated security analysis with AI coordination
npx claude-flow@alpha github gh-coordinator analyze --analysis-type security --target ./src
npx claude-flow@alpha github repo-architect optimize --security-focused --compliance SOC2
npx claude-flow@alpha hive-mind spawn "security audit and compliance review" --claude
┌─────────────────────────────────────────────────────────┐
│ 👑 Queen Agent │
│ (Master Coordinator) │
├─────────────────────────────────────────────────────────┤
│ 🏗️ Architect │ 💻 Coder │ 🧪 Tester │ 🔍 Research │ 🛡️ Security │
│ Agent │ Agent │ Agent │ Agent │ Agent │
├─────────────────────────────────────────────────────────┤
│ 🧠 Neural Pattern Recognition Layer │
├─────────────────────────────────────────────────────────┤
│ 💾 Distributed Memory System │
├─────────────────────────────────────────────────────────┤
│ ⚡ 87 MCP Tools Integration Layer │
├─────────────────────────────────────────────────────────┤
│ 🛡️ Claude Code Integration │
└─────────────────────────────────────────────────────────┘
- Hierarchical: Queen-led with specialized worker agents
- Mesh: Peer-to-peer coordination for complex tasks
- Hybrid: Dynamic strategy selection based on task complexity
- Neural-Enhanced: AI-optimized coordination patterns
# Global installation (recommended for testing)
npm install -g claude-flow@alpha
# Or use NPX for instant testing
npx claude-flow@alpha init --force
# Verify installation
claude-flow --version # Should show 2.0.0-alpha.53
# Initialize with full alpha features
npx claude-flow@alpha init --force --hive-mind --neural-enhanced
# Configure Claude Code integration
npx claude-flow@alpha mcp setup --auto-permissions --87-tools
# Test hive-mind coordination
npx claude-flow@alpha hive-mind test --agents 5 --coordination-test
For complete command documentation, run:
npx claude-flow@alpha --help # Main help
npx claude-flow@alpha help <command> # Detailed command help
Key Commands:
- Hive-Mind:
hive-mind wizard
,hive-mind spawn
,hive-mind status
- Neural:
neural train
,neural predict
,cognitive analyze
- Memory:
memory store
,memory query
,memory stats
,memory export/import
- GitHub:
github <mode>
(6 specialized modes available) - Workflows:
workflow create
,batch process
,pipeline create
- Complete API Reference - Comprehensive API documentation
- CLI Commands Guide - All command-line options
- Architecture Overview - System design and internals
- Examples Directory - Code examples and demos
- 🔒 Git Checkpoint System - Automatic Git checkpoints for Claude Code sessions
- 📊 Real Performance Tracking - Actual metrics collection and analysis
- 🪟 Windows Installation - Special instructions for Windows users
- MCP Server Setup - Model Context Protocol configuration
- Claude Code Integration - Enhanced AI workflows
- GitHub Workflows - Repository automation
MIT License - see LICENSE for details.
Alpha Disclaimer: This is an alpha release intended for testing and feedback. Use in production environments is not recommended.
- 🧠 Hive-Mind Architecture: Inspired by natural swarm intelligence
- ⚡ Neural Computing: Advanced AI coordination patterns
- 🛡️ Claude Code Integration: Seamless AI development workflow
- 🚀 Performance Optimization: 2.8-4.4x speed improvements through parallel coordination
npx claude-flow@alpha init --force
Join the alpha testing revolution!
Built with ❤️ by rUv | Powered by Revolutionary AI
v2.0.0 Alpha - The Future of AI Orchestration