A sophisticated multi-agent orchestration system built with Deno and TypeScript, featuring advanced coordination, memory management, and terminal integration with 100% test coverage.
- Multi-Agent Orchestration: Spawn and manage multiple Claude agents with different roles and capabilities
- Task Scheduling: Advanced task queue with priority-based scheduling and dependency management
- Memory Management: Persistent memory storage with hybrid SQLite/Markdown backends
- Terminal Management: Efficient terminal pooling and session management
- Resource Coordination: Deadlock detection and prevention for shared resources
- MCP Support: Model Context Protocol server for tool integration
- Interactive CLI: Rich command-line interface with REPL mode
npx claude-flowOr install globally:
npm install -g claude-flowdeno install --allow-all --name claude-flow https://raw.githubusercontent.com/ruvnet/claude-code-flow/main/src/cli/index.tsgit clone https://github.com/ruvnet/claude-code-flow.git
cd claude-flow
deno task install-
Initialize configuration:
claude-flow config init
-
Start the orchestrator:
claude-flow start
-
Spawn an agent:
claude-flow agent spawn researcher --name "Research Assistant" -
Create a task:
claude-flow task create research "Find information about quantum computing"
Claude-Flow uses a modular architecture with the following components:
- Orchestrator: Central coordinator managing all system components
- Terminal Manager: Handles terminal sessions with pooling and recycling
- Memory Manager: Persistent storage with caching and indexing
- Coordination Manager: Task scheduling and resource management
- MCP Server: Tool integration via Model Context Protocol
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:
- Coordinator: Plans and delegates tasks to other agents
- Researcher: Gathers and analyzes information
- Implementer: Writes code and creates solutions
- Analyst: Identifies patterns and generates insights
- Custom: User-defined agent types
-c, --config <path>: Path to configuration file-v, --verbose: Enable verbose logging--log-level <level>: Set log level (debug, info, warn, error)
Start the Claude-Flow orchestration system
claude-flow start [options]
-d, --daemon Run as daemon in background
-p, --port <port> MCP server port
--mcp-transport <type> MCP transport type (stdio, http)Manage agents
claude-flow agent <subcommand>
spawn <type> Spawn a new agent
list List all agents
terminate <agent-id> Terminate an agent
info <agent-id> Get agent informationManage tasks
claude-flow task <subcommand>
create <type> <desc> Create a new task
list List all tasks
status <task-id> Get task status
cancel <task-id> Cancel a task
workflow <file> Execute workflow from fileManage agent memory
claude-flow memory <subcommand>
query Query memory entries
export <file> Export memory to file
import <file> Import memory from file
stats Show memory statistics
cleanup Clean up old entriesManage configuration
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 fileStart interactive REPL mode
claude-flow replCreate 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- Deno 1.38+ or Node.js 16+
- Git
git clone https://github.com/ruvnet/claude-code-flow.git
cd claude-flow
deno task devdeno task testdeno task buildClaude-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.
- Documentation: https://claude-flow.dev/docs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Web UI for visual orchestration
- Plugin system for custom agent types
- Distributed orchestration support
- Enhanced monitoring and analytics
- Integration with more AI models
- Workflow templates library
Built with ❤️ by rUv for the Claude community
