diff --git a/README.md b/README.md index 371aaf1491..96bd2479d7 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,118 @@ Claude-Flow is a comprehensive AI agent orchestration framework that transforms Claude Code into a powerful multi-agent development platform. It enables teams to deploy, coordinate, and optimize specialized AI agents working together on complex software engineering tasks. +### Architecture Flow + +```mermaid +flowchart TB + subgraph User["User Layer"] + CC[Claude Code] + CLI[CLI Commands] + end + + subgraph Orchestration["Orchestration Layer"] + MCP[MCP Server
27+ Tools] + Router[Intelligent Router
3-Tier Model Selection] + Hooks[Self-Learning Hooks
27 Lifecycle Events] + end + + subgraph Coordination["Coordination Layer"] + Queen[Queen Coordinator] + Swarm[Swarm Topologies
Mesh • Hierarchical • Ring • Star] + Consensus[Consensus Protocols
Raft • Byzantine • Gossip • CRDT] + end + + subgraph Agents["Agent Layer (54+)"] + Core[Core Agents
coder • reviewer • tester] + Specialized[Specialized Agents
security • performance • ml] + GitHub[GitHub Agents
pr-manager • issue-tracker] + end + + subgraph Intelligence["Intelligence Layer"] + SONA[SONA Neural
Self-Optimizing Architecture] + MoE[Mixture of Experts
8 Specialized Experts] + ReasoningBank[ReasoningBank
Pattern Learning] + end + + subgraph Memory["Memory Layer"] + HNSW[HNSW Index
150x-12,500x Faster] + AgentDB[AgentDB
Vector Storage] + Cache[LRU Cache
Cross-Session] + end + + subgraph Providers["Provider Layer"] + Anthropic[Anthropic
Claude 3.5/4] + OpenAI[OpenAI
GPT-4o/o1] + Google[Google
Gemini 2.0] + Local[Local
Ollama/Llama] + end + + CC --> MCP + CLI --> MCP + MCP --> Router + Router --> Hooks + Hooks --> Queen + Queen --> Swarm + Swarm --> Consensus + Consensus --> Core + Consensus --> Specialized + Consensus --> GitHub + Core --> SONA + Specialized --> MoE + GitHub --> ReasoningBank + SONA --> HNSW + MoE --> AgentDB + ReasoningBank --> Cache + HNSW --> Anthropic + AgentDB --> OpenAI + Cache --> Google + Cache --> Local + + style User fill:#e1f5fe + style Orchestration fill:#f3e5f5 + style Coordination fill:#fff3e0 + style Agents fill:#e8f5e9 + style Intelligence fill:#fce4ec + style Memory fill:#e0f2f1 + style Providers fill:#fff8e1 +``` + +### Data Flow + +```mermaid +sequenceDiagram + participant U as User/Claude Code + participant R as Router (3-Tier) + participant S as Swarm + participant A as Agents + participant M as Memory (HNSW) + participant L as LLM Provider + + U->>R: Task Request + R->>R: Complexity Analysis + alt Simple Transform + R->>U: Agent Booster (WASM) <1ms + else Medium Complexity + R->>S: Route to Haiku/Sonnet + S->>A: Spawn Agents + A->>M: Query Patterns + M->>A: Similar Patterns (150x faster) + A->>L: LLM Request + L->>A: Response + A->>M: Store New Pattern + A->>S: Result + S->>U: Synthesized Output + else High Complexity + R->>S: Route to Opus + S->>A: Spawn Specialized Swarm + A->>A: Byzantine Consensus + A->>M: Deep Pattern Search + A->>L: Multi-turn Reasoning + A->>S: Coordinated Result + S->>U: Final Output + end +``` + ### Claude Code: With vs Without Claude-Flow | Capability | Claude Code Alone | Claude Code + Claude-Flow |