💡 摘要
Claude-Flow 是一个 AI 编排平台,能够协调部署专门的代理以完成软件工程任务。
🎯 适合人群
🤖 AI 吐槽: “看起来很能打,但别让配置把人劝退。”
风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;文件读写范围与路径穿越风险;依赖锁定与供应链风险。以最小权限运行,并在生产环境启用前审计代码与依赖。
🌊 Claude-Flow v3: Enterprise AI Orchestration Platform
Production-ready multi-agent AI orchestration for Claude Code
Deploy 60+ specialized agents in coordinated swarms with self-learning capabilities, fault-tolerant consensus, and enterprise-grade security.
Getting into the Flow
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.
Self-Learning/Self-Optimizing Agent Architecture
User → Claude-Flow (CLI/MCP) → Router → Swarm → Agents → Memory → LLM Providers
↑ ↓
└──── Learning Loop ←──────┘
flowchart TB subgraph USER["👤 User Layer"] U[User] end subgraph ENTRY["🚪 Entry Layer"] CLI[CLI / MCP Server] AID[AIDefence Security] end subgraph ROUTING["🧭 Routing Layer"] QL[Q-Learning Router] MOE[MoE - 8 Experts] SK[Skills - 42+] HK[Hooks - 17] end subgraph SWARM["🐝 Swarm Coordination"] TOPO[Topologies<br/>mesh/hier/ring/star] CONS[Consensus<br/>Raft/BFT/Gossip/CRDT] CLM[Claims<br/>Human-Agent Coord] end subgraph AGENTS["🤖 60+ Agents"] AG1[coder] AG2[tester] AG3[reviewer] AG4[architect] AG5[security] AG6[...] end subgraph RESOURCES["📦 Resources"] MEM[(Memory<br/>AgentDB)] PROV[Providers<br/>Claude/GPT/Gemini/Ollama] WORK[Workers - 12<br/>ultralearn/audit/optimize] end subgraph RUVECTOR["🧠 RuVector Intelligence Layer"] direction TB subgraph ROW1[" "] SONA[SONA<br/>Self-Optimize<br/><0.05ms] EWC[EWC++<br/>No Forgetting] FLASH[Flash Attention<br/>2.49-7.47x] end subgraph ROW2[" "] HNSW[HNSW<br/>150x-12,500x faster] RB[ReasoningBank<br/>Pattern Store] HYP[Hyperbolic<br/>Poincaré] end subgraph ROW3[" "] LORA[LoRA/Micro<br/>128x compress] QUANT[Int8 Quant<br/>3.92x memory] RL[9 RL Algos<br/>Q/SARSA/PPO/DQN] end end subgraph LEARNING["🔄 Learning Loop"] L1[RETRIEVE] --> L2[JUDGE] --> L3[DISTILL] --> L4[CONSOLIDATE] --> L5[ROUTE] end U --> CLI CLI --> AID AID --> QL & MOE & SK & HK QL & MOE & SK & HK --> TOPO & CONS & CLM TOPO & CONS & CLM --> AG1 & AG2 & AG3 & AG4 & AG5 & AG6 AG1 & AG2 & AG3 & AG4 & AG5 & AG6 --> MEM & PROV & WORK MEM --> SONA & EWC & FLASH SONA & EWC & FLASH --> HNSW & RB & HYP HNSW & RB & HYP --> LORA & QUANT & RL LORA & QUANT & RL --> L1 L5 -.->|loops back| QL style RUVECTOR fill:#1a1a2e,stroke:#e94560,stroke-width:2px style LEARNING fill:#0f3460,stroke:#e94560,stroke-width:2px style USER fill:#16213e,stroke:#0f3460 style ENTRY fill:#1a1a2e,stroke:#0f3460 style ROUTING fill:#1a1a2e,stroke:#0f3460 style SWARM fill:#1a1a2e,stroke:#0f3460 style AGENTS fill:#1a1a2e,stroke:#0f3460 style RESOURCES fill:#1a1a2e,stroke:#0f3460
RuVector Components (npx ruvector):
| Component | Purpose | Performance | |-----------|---------|-------------| | SONA | Self-Optimizing Neural Architecture - learns optimal routing | <0.05ms adaptation | | EWC++ | Elastic Weight Consolidation - prevents catastrophic forgetting | Preserves 95%+ knowledge | | Flash Attention | Optimized attention computation | 2.49x-7.47x speedup | | HNSW | Hierarchical Navigable Small World vector search | 150x-12,500x faster | | ReasoningBank | Pattern storage with trajectory learning | RETRIEVE→JUDGE→DISTILL | | Hyperbolic | Poincaré ball embeddings for hierarchical data | Better code relationships | | LoRA/MicroLoRA | Low-Rank Adaptation for efficient fine-tuning | <3μs adaptation, 383k ops/sec | | Int8 Quantization | Memory-efficient weight storage | 3.92x memory reduction | | SemanticRouter | Semantic task routing with cosine similarity | 34,798 routes/s, 0.029ms | | 9 RL Algorithms | Q-Learning, SARSA, A2C, PPO, DQN, Decision Transformer, etc. | Task-specific learning |
# Install RuVector standalone npx ruvector # Or use via Claude-Flow npx claude-flow@v3alpha hooks intelligence --status
Get Started Fast
# One-line install (recommended) curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/claude-flow@main/scripts/install.sh | bash # Or full setup with MCP + diagnostics curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/claude-flow@main/scripts/install.sh | bash -s -- --full # Or via npx npx claude-flow@alpha init --wizard
Key Capabilities
🤖 60+ Specialized Agents - Ready-to-use AI agents for coding, code review, testing, security audits, documentation, and DevOps. Each agent is optimized for its specific role.
🐝 Coordinated Agent Teams - Run unlimited agents simultaneously in organized swarms. Agents spawn sub-workers, communicate, share context, and divide work automatically using hierarchical (queen/workers) or mesh (peer-to-peer) patterns.
🧠 Learns From Your Workflow - The system remembers what works. Successful patterns are stored and reused, routing similar tasks to the best-performing agents. Gets smarter over time.
🔌 Works With Any LLM - Switch between Claude, GPT, Gemini, Cohere, or local models like Llama. Automatic failover if one provider is unavailable. Smart routing picks the cheapest option that meets quality requirements.
⚡ Plugs Into Claude Code - Native integration via MCP (Model Context Protocol). Use claude-flow commands directly in your Claude Code sessions with full tool access.
🔒 Production-Ready Security - Built-in protection against prompt injection, input validation, path traversal prevention, command injection blocking, and safe credential handling.
🧩 Extensible Plugin System - Add custom capabilities with the plugin SDK. Create workers, hooks, providers, and security modules. Share plugins via the decentralized IPFS marketplace.
A multi-purpose Agent Tool Kit
Every request flows through four layers: from your CLI or Claude Code interface, through intelligent routing, to specialized agents, and finally to LLM providers for reasoning.
| Layer | Components | What It Does | |-------|------------|--------------| | User | Claude Code, CLI | Your interface to control and run commands | | Orchestration | MCP Server, Router, Hooks | Routes requests to the right agents | | Agents | 60+ types | Specialized workers (coder, tester, reviewer...) | | Providers | Anthropic, OpenAI, Google, Ollama | AI models that power reasoning |
Agents organize into swarms led by queens that coordinate work, prevent drift, and reach consensus on decisions—even when some agents fail.
| Layer | Components | What It Does | |-------|------------|--------------| | Coordination | Queen, Swarm, Consensus | Manages agent teams (Raft, Byzantine, Gossip) | | Drift Control | Hierarchical topology, Checkpoints | Prevents agents from going off-task | | Hive Mind | Queen-led hierarchy, Collective memory | Strategic/tactical/adaptive queens coordinate workers | | Consensus | Byzantine, Weighted, Majority | Fault-tolerant decisions (2/3 majority for BFT) |
Hive Mind Capabilities:
- 🐝 Queen Types: Strategic (planning), Tactical (execution), Adaptive (optimization)
- 👷 8 Worker Types: Researcher, Coder, Analyst, Tester, Architect, Reviewer, Op
优点
- 支持超过 60 个专门的代理。
- 具备自学习和自优化能力。
- 与多个 LLM 提供商集成。
- 可扩展的插件系统以实现自定义功能。
缺点
- 复杂的架构可能需要陡峭的学习曲线。
- 依赖外部 LLM 提供商。
- 多个代理可能导致性能开销。
- 如果配置不当,可能存在安全隐患。
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 ruvnet.
