/ 目錄 / 演練場 / swarmclaw
● 社群 swarmclawai ⚡ 即開即用

swarmclaw

作者 swarmclawai · swarmclawai/swarmclaw

自架式多代理執行時環境 — 編排 Claude Code / Codex / OpenCode / 原生子代理,持久記憶、排程、MCP 整合、23+ 語言模型供應商。

SwarmClaw 是一個本地運行 AI 代理團隊的控制平面。接入語言模型(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. 定義代理
    Create a SwarmClaw agent 'daily-ai-news' with provider=Claude, memory=enabled, schedule='every day 08:00'。✓ 已複製
    → 代理已註冊
  2. 透過 MCP 附加工具
    Attach firecrawl + notion MCPs so the agent can scrape and write results to Notion。✓ 已複製
    → 工具已連接
  3. 讓它執行
    Enable the schedule。Review memory weekly to see what it's learned。✓ 已複製
    → 每日出現 Notion 頁面

結果: 一個背景研究隊友。

注意事項
  • 長迴圈上的語言模型成本螺旋 — 在代理設定中設定按工作階段的語元預算;在超支時發出警告
搭配使用: firecrawl

使用 SwarmClaw 在多個模型之間委派程式碼撰寫工作

👤 希望按子任務進行品質與速度權衡的工程師 ⏱ ~60 min advanced

何時使用: 一個功能有計劃(Opus)、批量程式碼撰寫(Sonnet)和打磨(Codex)階段。

步驟
  1. 定義管道
    Create a workflow: planner=Claude Opus, coder=Claude Sonnet via Claude Code, reviewer=Codex。Handoffs via transcript。✓ 已複製
    → 工作流程在 UI 中可見
  2. 在任務上執行
    Run the workflow on feature spec [paste]。Watch the handoffs。✓ 已複製
    → 每個階段貢獻後的最終 PR 提案

結果: 單一功能的每個階段的合適工具。

搭配使用: github

使用 SwarmClaw 建立記憶豐富的個人助理

👤 不喜歡每次工作階段都重新解釋背景的進階使用者 ⏱ ~30 min intermediate

何時使用: 你的 ChatGPT/Claude 工作階段失去了你想在幾天內保留的背景。

步驟
  1. 啟用混合記憶
    Create a long-lived session 'assistant' with hybrid memory (vector + graph)。Pipe all prior transcripts into the memory。✓ 已複製
    → 記憶已填充
  2. 詢問並讓它回憶
    What were my open questions from last Tuesday's session about pricing?✓ 已複製
    → 帶有源工作階段引文的回憶項目

結果: 一個真正記得的助理。

組合

與其他 MCP 搭配,撬動十倍槓桿

swarmclaw + claude-code

SwarmClaw 編排;Claude Code 是迴圈中的程式碼撰寫器

Delegate the 'implement-feature' step to Claude Code via the swarmclaw workflow。✓ 已複製
swarmclaw + firecrawl

排程抓取 + 記憶充實分析

Daily agent: scrape competitor pages, diff against memory, flag changes。✓ 已複製

工具

此 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 配額
任何你的語言模型供應商強制執行的
每次呼叫 Token 數
具有記憶檢索的多回合工作階段:每步 3-30k
費用
免費自架;語言模型語元成本由你承擔
提示
設定硬性按工作階段預算;自主迴圈可以無聲地花費

安全

權限、密鑰、影響範圍

憑證儲存: 語言模型金鑰在本地資料目錄中加密;首次執行存取金鑰保護 UI
資料出站: 至每個已設定的語言模型供應商 + 附加的 MCPs
切勿授予: 在沒有驗證的情況下向網際網路暴露 UI — 預設僅限 localhost

故障排查

常見錯誤與修復

安裝後 UI 無法存取

SwarmClaw binds to 127.0.0.1:3456;ensure nothing else owns that port。lsof -i :3456

代理迴圈在背景中消耗語元

停用其排程並檢查最後的文本;在重新啟用之前在代理上設定語元預算

MCP 伺服器在 swarmclaw 下無法啟動

先手動測試 MCP 命令(使用 f/mcptools);swarmclaw uses the same invocation

驗證: mcp tools -- <your-mcp-cmd>

替代方案

swarmclaw 對比其他方案

替代方案何時用它替代權衡
n8n-workflow-builder你想要確定性工作流程自動化而不是代理迴圈不那麼代理化;沒有語言模型記憶
LangGraph / Autogen你想要在自己的應用程式中進行程式碼優先編排你主機託管 + 撰寫所有內容

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills