Skip to main content
Glama

⚒️ AgentForge

铸造 AI 智能体的地方 —— 面向 Claude Code 与 Codex 的编排层

License: MIT Node Based on Ruflo Claude Code Codex

由 Soulcynics404 维护 · Harsshh

快速开始 · 安装 · Claude Code 集成 · 群体协作命令 · MCP 服务器 · 文档


智能体 = 模型 + 执行框架。 模型负责编写;执行框架赋予它工具、记忆、循环、沙箱和控制能力,让它真正能干活。AgentForge 就是那个执行框架 —— 围绕 Claude Code 和 Codex 的执行层,新增 100+ 种专业智能体、协同群体、自学习记忆和企业级安全护栏。让智能体不只是运行,而是协作。

AgentForge 是 Ruflo(原 claude-flow)的活跃维护分支,由 rUv 创建,在 MIT 许可下重新品牌化并独立维护。原始架构的所有功劳归于上游项目及其贡献者。


✨ 你将获得

User ──▶ AgentForge (CLI / MCP) ──▶ Router ──▶ Swarm ──▶ Agents ──▶ Memory ──▶ LLM Providers
                ▲                                                        │
                └────────────────── Learning Loop ◀──────────────────────┘

功能

含义

🧠

自学习记忆

跨会话的 HNSW 向量搜索 —— 智能体记住有效的方法并复用

🐝

协同群体

层级、网状和自适应拓扑,支持 100+ 种专业智能体类型

🔀

智能模型路由

3 层路由:确定性 codemod → Haiku → Sonnet/Opus(花更少,跑更快)

🪝

钩子 + 可观测性

编辑前后钩子、会话生命周期跟踪、12 个后台工作进程

🔌

MCP 服务器

向任何支持 MCP 的客户端(Claude Code、Cursor、Zed…)暴露 300+ 工具

🧩

插件生态

ADR、DDD、安全审计、成本跟踪、浏览器自动化等

🛡️

策略引擎

操作审批、决策账本、企业级安全边界


Related MCP server: hAIveMind MCP Server

📦 安装

要求: Node.js ≥ 20 · npm ≥ 9 · 已安装并认证 Claude Code 或 Codex CLI (智能体通过这些执行框架运行 —— AgentForge 负责协调)

# Run directly (no install)
npx ruflo --version

# Or install globally
npm install -g ruflo

注意: 运行时包名继承自上游(npm 上的 ruflo)。项目身份、品牌和维护归 AgentForge 所有。


🚀 快速开始

1️⃣ 在项目中初始化

cd my-project
npx ruflo init

这将创建:

my-project/
├── .claude/            # Claude Code settings + hook configs
├── .agentforge/        # memory DB, session state
├── .agents/skills/     # cross-agent skill registry
└── CLAUDE.md           # project rules wired for orchestration

2️⃣ 健康检查

npx ruflo doctor --fix      # verifies Node, MCP servers, memory DB, API keys

3️⃣ 启动 Claude Code,然后……直接对话

init 之后,正常打开 Claude Code —— 钩子会自动将任务路由到群体,从成功模式中学习,并在后台协调智能体:

you: "Build a REST API with auth, tests, and docs"
     → planner agent breaks it down
     → coder agents build in parallel
     → reviewer agent checks output
     → memory stores what worked

🔗 与 Claude Code 集成

自动集成(推荐)

npx ruflo init 会配置好一切:MCP 注册、.claude/settings.json 中的钩子、技能和 CLAUDE.md。

手动 MCP 注册

添加到你的 Claude Code MCP 配置(~/.claude.json 或项目 .mcp.json):

{
  "mcpServers": {
    "agentforge": {
      "command": "npx",
      "args": ["ruflo", "mcp", "start"]
    }
  }
}

然后在 Claude Code 中即可直接调用 300+ 工具:memory_search、swarm_init、agent_spawn、task_orchestrate、neural_train 等。

作为 Claude Code 插件安装

# From the Claude Code prompt:
/plugin marketplace add Soulcynics404/AgentForge
/plugin install agentforge@AgentForge

该插件捆绑了斜杠命令(/forge-init、/forge-swarm、/forge-status)以及 plugin/skills/ 中的核心技能集。

与其他智能体集成

执行框架

方式

Codex CLI

npx ruflo init 检测到 Codex 并写入 .agents/config.toml

Cursor / Windsurf

将其 MCP 配置指向同一个 npx ruflo mcp start 服务器

任何 MCP 客户端

同一端点 —— AgentForge 与执行框架无关


🐝 群体协作

# Initialize a swarm with a topology
npx ruflo swarm init --topology hierarchical --max-agents 8

# Spawn specialist agents
npx ruflo agent spawn --type coder    --name backend-dev
npx ruflo agent spawn --type reviewer --name qa-bot
npx ruflo agent spawn --type architect --name system-design

# Orchestrate a task across them
npx ruflo task create --description "Build auth module with tests"
npx ruflo swarm start

# Watch progress
npx ruflo swarm status

拓扑: hierarchical(蜂王主导)· mesh(点对点)· adaptive(自组织)· ring · star

AgentForge 命令创建协调记录 —— 实际的构建工作由你的 Claude Code / Codex 智能体完成。正确的思维模型:

  1. swarm init → 建立协调状态

  2. 你的 Claude Code 会话执行实际工作(写代码、跑测试)

  3. memory store → 保存有效的方法供下次使用

调用群体命令后不要停下 —— 继续工作;执行框架在你构建的同时进行协调。


🧠 记忆系统

# Store a pattern that worked
npx ruflo memory store --key "auth-pattern" --value "JWT+refresh rotation" --namespace patterns

# Search past learnings before starting new work
npx ruflo memory query "authentication best approach"

# Session persistence
npx ruflo session save && npx ruflo session resume --latest

记忆使用基于 SQLite/RVF 存储的 HNSW 向量搜索 —— 即使关键词不同,语义相似的模式也能浮现出来。


🖥️ MCP 服务器

将 AgentForge 作为独立的 MCP 服务器运行,任何 MCP 客户端均可使用:

npx ruflo mcp start              # stdio mode (default)
npx ruflo mcp start --port 3000  # HTTP/SSE mode
npx ruflo mcp tools              # list all exposed tools

工具族:memory_*、swarm_*、agent_*、task_*、neural_*、hooks_*、policy_*、performance_* —— 完整目录。


📚 文档

文档

内容

用户指南

完整参考:功能、存储格式、编程 API

插件技能

内置技能库(agentdb、browser、neural、dual-mode…)

架构

智能体指令与分工模型

更新日志

发布历史

上游文档

github.com/ruvnet/ruflo


🤝 贡献

欢迎提交 Issue 和 PR!对于重大变更,请先开一个 Issue。上游贡献请提交到 ruvnet/ruflo;本分支跟踪上游,专注于品牌、打包和社区维护。

📄 许可证

MIT —— 原始代码 © 2024–2026 ruvnet。分支维护与重新品牌化 © 2026 Harsshh(Soulcynics404)。

⚒️ 锻造更智能。一起交付。

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers