/ 目录 / 演练场 / swarmclaw
● 社区 swarmclawai ⚡ 即开即用

swarmclaw

作者 swarmclawai · swarmclawai/swarmclaw

自托管多智能体运行时 — 编排 Claude Code / Codex / OpenCode / 原生子智能体、持久化内存、定时任务、MCP 集成、23+ LLM 提供商。

SwarmClaw 是一个本地运行 AI 智能体团队的控制平面。接入 LLM(Claude、GPT、Gemini、OpenRouter、Ollama 等),附加 MCP 服务器作为工具,调度自主循环,并通过混合召回 + 图遍历实现内存持久化。提供 macOS/Windows/Linux 桌面安装程序,也支持 Docker Compose。

为什么要用

核心特性

实时演示

实际使用效果

swarmclaw.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "swarmclaw": {
      "command": "npx",
      "args": [
        "-y",
        "swarmclaw"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "swarmclaw": {
      "command": "npx",
      "args": [
        "-y",
        "swarmclaw"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "swarmclaw": {
      "command": "npx",
      "args": [
        "-y",
        "swarmclaw"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "swarmclaw": {
      "command": "npx",
      "args": [
        "-y",
        "swarmclaw"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "swarmclaw",
      "command": "npx",
      "args": [
        "-y",
        "swarmclaw"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "swarmclaw": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "swarmclaw"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add swarmclaw -- npx -y swarmclaw

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: swarmclaw

用 SwarmClaw 运行持续在线的研究智能体

👤 研究人员、竞争情报分析师 ⏱ ~45 min advanced

何时使用: 你想要一个每天唤醒、运行研究循环、并将结果写入某处的智能体。

前置条件
  • SwarmClaw 已安装 — 一键桌面安装程序或 npm i -g @swarmclawai/swarmclaw
  • 首次运行访问密钥 — 在 http://localhost:3456 初次启动时生成
步骤
  1. 定义智能体
    创建一个 SwarmClaw 智能体 'daily-ai-news',provider=Claude,memory=enabled,schedule='every day 08:00'。✓ 已复制
    → 智能体已注册
  2. 通过 MCP 附加工具
    附加 firecrawl + notion MCPs,使智能体可以抓取并将结果写入 Notion。✓ 已复制
    → 工具已连接
  3. 让它运行
    启用定时任务。每周查看内存,看看它学到了什么。✓ 已复制
    → 每日 Notion 页面出现

结果: 一个后台研究助手。

注意事项
  • 长循环中 LLM 成本螺旋式上升 — 在智能体配置中设置每次会话的代币预算;超出时发出警报
搭配使用: firecrawl

用 SwarmClaw 在多个模型间委派编码任务

👤 希望每个子任务都有质量与速度权衡的工程师 ⏱ ~60 min advanced

何时使用: 一个功能有规划(Opus)、批量编码(Sonnet)和抛光(Codex)阶段。

步骤
  1. 定义流程
    创建一个工作流:planner=Claude Opus、coder=Claude Sonnet via Claude Code、reviewer=Codex。通过转录进行交接。✓ 已复制
    → 工作流在 UI 中可见
  2. 在任务上运行
    在功能规范 [paste] 上运行工作流。观察交接过程。✓ 已复制
    → 每个阶段完成后最终的 PR 建议

结果: 功能的每个阶段都用正确的工具。

搭配使用: github

用 SwarmClaw 构建一个记忆丰富的个人助手

👤 不喜欢每次会话都重新解释上下文的高级用户 ⏱ ~30 min intermediate

何时使用: 你的 ChatGPT/Claude 会话丧失了你想在几天内保留的上下文。

步骤
  1. 启用混合内存
    创建一个长期会话 'assistant',具有混合内存(vector + graph)。将所有先前的转录导入内存。✓ 已复制
    → 内存已填充
  2. 提问并让它回忆
    上周二关于定价会话中我的开放问题是什么?✓ 已复制
    → 带有源会话引用的回忆项目

结果: 一个真正能记住的助手。

组合

与其他 MCP 搭配,撬动十倍杠杆

swarmclaw + claude-code

SwarmClaw 编排;Claude Code 是循环中的编码器

通过 swarmclaw 工作流将 'implement-feature' 步骤委派给 Claude Code。✓ 已复制
swarmclaw + firecrawl

定时抓取 + 内存增强分析

日常智能体:抓取竞争对手页面、与内存对比、标记更改。✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
create_agent name, provider, memory?, schedule? 引导一个新智能体 0
attach_mcp agent_id, mcp_config 给智能体提供工具 0
run_session agent_id, input 临时调用 LLM tokens
schedule_agent agent_id, cron 长期运行的自主性 0
memory_query agent_id, query 检查智能体内存 0

成本与限制

运行它的成本

API 配额
你的 LLM 提供商强制执行的任何配额
每次调用 Token 数
带有内存检索的多轮会话:每步 3-30k
费用
免费自托管;LLM 代币成本由你承担
提示
设置严格的每次会话预算;自主循环可能在不知不觉中消费

安全

权限、密钥、影响范围

凭据存储: LLM 密钥在本地数据目录中加密;首次运行访问密钥保护 UI
数据出站: 发送到每个配置的 LLM 提供商 + 附加的 MCPs
切勿授予: 在没有身份验证的情况下向互联网暴露 UI — 默认仅限 localhost

故障排查

常见错误与修复

安装后 UI 无法访问

SwarmClaw 绑定到 127.0.0.1:3456;确保没有其他东西占用该端口。lsof -i :3456

智能体循环在后台消费代币

禁用其定时任务并检查最后的转录;在重新启用前为智能体设置代币预算

MCP 服务器在 swarmclaw 下启动失败

首先手动测试 MCP 命令(使用 f/mcptools);swarmclaw 使用相同的调用

验证: mcp tools -- <your-mcp-cmd>

替代方案

swarmclaw 对比其他方案

替代方案何时用它替代权衡
n8n-workflow-builder你想要确定性的工作流自动化而不是智能体循环不够自主;没有 LLM 内存
LangGraph / Autogen你想在自己的应用中进行代码优先的编排你要托管并编写所有内容

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills