🇨🇳 中文版
Swarm Orchestrator 技能
状态: 🟢 本地优先的 AI 智能体编排平台
类型: 自托管,无需外部依赖
隐私: 100% 本地处理(可选的大模型 API 调用除外)
🔒 安全与信任
本技能的功能
- - 本地运行 - 在您的机器上运行(后端 + 前端)
- 无遥测 - 不收集数据
- 无需外部服务器 - 核心功能无需外部依赖
- 可选 API 密钥 - 仅在使用大模型智能体时需要(OpenAI/Claude)
- 开源 - 所有代码可审计
本技能不会做的事
- - ❌ 不向外部服务器发送数据(可选的大模型 API 除外)
- ❌ 不收集分析或遥测数据
- ❌ 不需要账号注册
- ❌ 不会未经许可访问您的文件
- ❌ 不会在您不知情的情况下运行后台进程
数据存储
- - 数据库: SQLite 文件存储在
./data/swarm.db(仅本地) - 日志: 文本文件存储在
./logs/(仅本地) - 缓存: 本地 Redis(仅本地)
- 无云同步 或远程存储
📋 概述
OpenClaw Swarm Orchestrator 是一个本地优先的平台,用于构建和管理多智能体 AI 系统。可以把它想象成协调多个 AI 智能体协同工作的"控制塔"。
核心功能
- - 智能体注册表 - 注册 LLM、工具、人类和自定义智能体
- 任务队列 - 基于优先级的任务分发与依赖管理
- 实时仪表板 - Web UI 监控智能体和任务
- RESTful API - 完整的 REST API 用于程序化控制
- 本地存储 - 所有数据保留在您的机器上
架构
CODEBLOCK0
🚀 安装
前置条件检查
安装前,请验证您已安装:
CODEBLOCK1
方法一:使用 Docker(推荐 - 最简单)
这是最安全的方法 - 所有内容都在容器中运行。
CODEBLOCK2
访问:
- - 前端: http://localhost:3000
- 后端 API: http://localhost:8000
- API 文档: http://localhost:8000/docs
方法二:本地安装(用于开发)
CODEBLOCK3
方法三:从源码安装(最透明)
CODEBLOCK4
⚙️ 配置
最小配置(仅本地)
在项目根目录创建 .env:
CODEBLOCK5
可选:大模型智能体支持
如果您想使用大模型智能体(OpenAI、Anthropic),添加:
CODEBLOCK6
⚠️ 安全提示:
- - 仅在计划使用大模型智能体时添加 API 密钥
- 安全存储
.env 文件(不要提交到 git) - API 密钥永远不会发送到我们的服务器(仅发送到官方大模型提供商)
💻 基本使用
1. 启动系统
CODEBLOCK7
2. 创建您的第一个智能体
通过 Web UI:
- 1. 打开 http://localhost:3000
- 转到"智能体"页面
- 点击"新建智能体"
- 填写:
- 名称:"我的助手"
- 类型:"llm"(或"tool"、"human"、"custom")
- 配置:
{"model": "gpt-4"}(如果使用大模型)
通过 API:
CODEBLOCK8
3. 创建任务
CODEBLOCK9
4. 监控状态
Web 仪表板: http://localhost:3000
API:
# 系统状态
curl http://localhost:8000/api/orchestrator/status
# 列出智能体
curl http://localhost:8000/api/agents
# 列出任务
curl http://localhost:8000/api/tasks
🔧 智能体类型
1. LLM 智能体(需要 API 密钥)
使用外部大模型 API(OpenAI、Anthropic)。
CODEBLOCK11
需要: OPENAI_API_KEY 或 INLINECODE6
2. 工具智能体(仅本地)
执行本地函数/脚本。
CODEBLOCK12
无需外部服务。
3. 人类智能体(仅本地)
人在回路工作流。
CODEBLOCK13
无需外部服务。
4. 自定义智能体(用户定义)
您定义行为。
CODEBLOCK14
无需外部服务。
📊 监控与日志
Web 仪表板
访问 http://localhost:3000:
日志文件
所有日志本地存储:
CODEBLOCK15
🔐 安全最佳实践
1. API 密钥
- - ✅ 存储在
.env 文件中(不在代码中) - ✅ 设置文件权限: INLINECODE8
- ✅ 将
.env 添加到 INLINECODE10 - ✅ 永远不要将 API 密钥提交到 git
2. 网络安全
- - ✅ 防火墙:阻止端口 8000、3000 的外部访问
- ✅ 开发时仅使用 localhost(不是 0.0.0.0)
- ✅ 生产环境启用 HTTPS
3. 数据隐私
- - ✅ 所有数据本地存储在 INLINECODE11
- ✅ 数据库文件权限: INLINECODE12
- ✅ 定期备份: INLINECODE13
🐛 故障排除
后端无法启动
CODEBLOCK16
前端无法启动
CODEBLOCK17
端口冲突
CODEBLOCK18
📚 文档
🤝 支持与社区
- - 问题反馈: https://github.com/ZhenRobotics/openclaw-swarm-orchestrator/issues
- 讨论: https://github.com/ZhenRobotics/openclaw-swarm-orchestrator/discussions
✅ 安装前检查清单
使用本技能前:
- - [ ] 在 GitHub 上查看源代码
- [ ] 验证提交哈希: INLINECODE14
- [ ] 检查
requirements.txt 和 INLINECODE16 - [ ] 阅读上述安全策略
- [ ] 了解数据存储位置
- [ ] 知道需要哪些 API 密钥(如果有)
- [ ] 首先在隔离环境中运行(可选)
版本: 0.1.0
状态: Alpha - 活跃开发中
本地优先: ✅ 所有核心功能离线工作
隐私: ✅ 数据不离开您的机器(可选的大模型调用除外)
🇬🇧 English Version
Swarm Orchestrator Skill
Status: 🟢 Local-First AI Agent Orchestration Platform
Type: Self-hosted, no external dependencies required
Privacy: 100% local processing (except optional LLM API calls)
🔒 Security & Trust
What This Skill Does
- - Runs locally on your machine (backend + frontend)
- No telemetry or data collection
- No external servers required for core functionality
- Optional API keys only needed if you use LLM agents (OpenAI/Claude)
- Open source - all code is auditable
What This Skill Does NOT Do
- - ❌ Does not send data to external servers (except optional LLM APIs)
- ❌ Does not collect analytics or telemetry
- ❌ Does not require account registration
- ❌ Does not access your files without permission
- ❌ Does not run background processes without your knowledge
Data Storage
- - Database: SQLite file in
./data/swarm.db (local only) - Logs: Text files in
./logs/ (local only) - Cache: Redis on localhost (local only)
- No cloud sync or remote storage
📋 Overview
OpenClaw Swarm Orchestrator is a local-first platform for building and managing multi-agent AI systems. Think of it as a "control tower" for coordinating multiple AI agents working together.
Core Features
- - Agent Registry - Register LLM, Tool, Human, and Custom agents
- Task Queue - Priority-based task distribution with dependencies
- Real-time Dashboard - Web UI to monitor agents and tasks
- RESTful API - Complete REST API for programmatic control
- Local Storage - All data stays on your machine
Architecture
CODEBLOCK19
🚀 Installation
Prerequisites Check
Before installing, verify you have:
CODEBLOCK20
Method 1: Using Docker (Recommended - Easiest)
This is the safest method - everything runs in containers.
CODEBLOCK21
Access:
- - Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Method 2: Local Installation (For Development)
CODEBLOCK22
Method 3: From Source (Most Transparent)
CODEBLOCK23
⚙️ Configuration
Minimal Configuration (Local Only)
Create .env in project root:
CODEBLOCK24
Optional: LLM Agent Support
If you want to use LLM agents (OpenAI, Anthropic), add:
CODEBLOCK25
⚠️ Security Note:
- - Only add API keys if you plan to use LLM agents
- Store
.env file securely (not in git) - API keys are never sent to our servers (only to official LLM providers)
💻 Basic Usage
1. Start the System
CODEBLOCK26
2. Create Your First Agent
Via Web UI:
- 1. Open http://localhost:3000
- Go to "Agents" page
- Click "New Agent"
- Fill in:
- Name: "My Assistant"
- Type: "llm" (or "tool", "human", "custom")
- Config:
{"model": "gpt-4"} (if using LLM)
Via API:
CODEBLOCK27
3. Create a Task
CODEBLOCK28
4. Monitor Status
Web Dashboard: http://localhost:3000
API:
# System status
curl http://localhost:8000/api/orchestrator/status
# List agents
curl http://localhost:8000/api/agents
# List tasks
curl http://localhost:8000/api/tasks
🔧 Agent Types
1. LLM Agents (Requires API Key)
Uses external LLM APIs (OpenAI, Anthropic).
CODEBLOCK30
Required: OPENAI_API_KEY or INLINECODE23
2. Tool Agents (Local Only)
Executes local functions/scripts.
CODEBLOCK31
No external services needed.
3. Human Agents (Local Only)
Human-in-the-loop workflows.
CODEBLOCK32
No external services needed.
4. Custom Agents (User-Defined)
You define the behavior.
CODEBLOCK33
No external services needed.
📊 Monitoring & Logs
Web Dashboard
Access at http://localhost:3000:
- - Real-time agent status
- Task queue monitoring
- System statistics
- Execution logs
Log Files
All logs stored locally:
CODEBLOCK34
🔐 Security Best Practices
1. API Keys
- - ✅ Store in
.env file (not in code) - ✅ Set file permissions: INLINECODE25
- ✅ Add
.env to INLINECODE27 - ✅ Never commit API keys to git
2. Network Security
- - ✅ Firewall: Block ports 8000, 3000 from external access
- ✅ Use localhost only (not 0.0.0.0) for development
- ✅ Enable HTTPS in production
3. Data Privacy
- - ✅ All data stored locally in INLINECODE28
- ✅ Database file permissions: INLINECODE29
- ✅ Regular backups: INLINECODE30
🐛 Troubleshooting
Backend won't start
CODEBLOCK35
Frontend won't start
CODEBLOCK36
Port conflicts
CODEBLOCK37
📚 Documentation
- - Main Docs: README.md
- Quick Start: QUICKSTART.md
- API Reference: http://localhost:8000/docs (after starting backend)
🤝 Support & Community
- - Issues: https://github.com/ZhenRobotics/openclaw-swarm-orchestrator/issues
- Discussions: https://github.com/ZhenRobotics/openclaw-swarm-orchestrator/discussions
✅ Pre-Installation Checklist
Before using this skill:
- - [ ] Review source code on GitHub
- [ ] Verify commit hash: INLINECODE31
- [ ] Check
requirements.txt and INLINECODE33 - [ ] Read security policy above
- [ ] Understand data storage locations
- [ ] Know which API keys you need (if any)
- [ ] Run in isolated environment first (optional)
Version: 0.1.0
Status: Alpha - Active Development
Local-First: ✅ All core features work offline
Privacy: ✅ No data leaves your machine (except optional LLM calls)
Built with privacy and transparency in mind. Inspect the code before you trust it.
🇨🇳 中文版
Swarm Orchestrator 技能
状态: 🟢 本地优先的 AI 智能体编排平台
类型: 自托管,无需外部依赖
隐私: 100% 本地处理(可选的大模型 API 调用除外)
🔒 安全与信任
本技能的功能
- - 本地运行 - 在您的机器上运行(后端 + 前端)
- 无遥测 - 不收集数据
- 无需外部服务器 - 核心功能无需外部依赖
- 可选 API 密钥 - 仅在使用大模型智能体时需要(OpenAI/Claude)
- 开源 - 所有代码可审计
本技能不会做的事
- - ❌ 不向外部服务器发送数据(可选的大模型 API 除外)
- ❌ 不收集分析或遥测数据
- ❌ 不需要账号注册
- ❌ 不会未经许可访问您的文件
- ❌ 不会在您不知情的情况下运行后台进程
数据存储
- - 数据库: SQLite 文件存储在 ./data/swarm.db(仅本地)
- 日志: 文本文件存储在 ./logs/(仅本地)
- 缓存: 本地 Redis(仅本地)
- 无云同步 或远程存储
📋 概述
OpenClaw Swarm Orchestrator 是一个本地优先的平台,用于构建和管理多智能体 AI 系统。可以把它想象成协调多个 AI 智能体协同工作的控制塔。
核心功能
- - 智能体注册表 - 注册 LLM、工具、人类和自定义智能体
- 任务队列 - 基于优先级的任务分发与依赖管理
- 实时仪表板 - Web UI 监控智能体和任务
- RESTful API - 完整的 REST API 用于程序化控制
- 本地存储 - 所有数据保留在您的机器上
架构
┌─────────────────┐
│ Web 仪表板 │ http://localhost:3000
│ (React UI) │
└────────┬────────┘
│
┌────────▼────────┐
│ FastAPI 服务器 │ http://localhost:8000
│ (后端 API) │
└────────┬────────┘
│
┌────────▼────────┐
│ 本地存储 │
│ • SQLite 数据库 │ ./data/swarm.db
│ • Redis 缓存 │ localhost:6379
│ • 日志文件 │ ./logs/*.log
└─────────────────┘
🚀 安装
前置条件检查
安装前,请验证您已安装:
bash
Python 3.11+
python --version
Node.js 18+
node --version
Redis
redis-cli ping # 应该返回 PONG
(可选) Docker
docker --version
方法一:使用 Docker(推荐 - 最简单)
这是最安全的方法 - 所有内容都在容器中运行。
bash
1. 克隆仓库(先检查代码!)
git clone https://github.com/ZhenRobotics/openclaw-swarm-orchestrator.git
cd openclaw-swarm-orchestrator
2. 启动前查看 docker-compose.yml
cat docker-compose.yml
3. 启动服务
docker-compose up -d
4. 验证
curl http://localhost:8000/health
应该返回: {status: healthy}
访问:
- - 前端: http://localhost:3000
- 后端 API: http://localhost:8000
- API 文档: http://localhost:8000/docs
方法二:本地安装(用于开发)
bash
1. 通过 npm 安装(审查包后)
npm view openclaw-swarm-orchestrator # 安装前查看
npm install -g openclaw-swarm-orchestrator
2. 验证安装
swarm-orchestrator --version
3. 启动服务(在不同终端中)
终端 1: 启动 Redis
redis-server
终端 2: 启动后端
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload
终端 3: 启动前端
cd frontend
npm install
npm run dev
方法三:从源码安装(最透明)
bash
1. 克隆并检查
git clone https://github.com/ZhenRobotics/openclaw-swarm-orchestrator.git
cd openclaw-swarm-orchestrator
2. 验证提交哈希(安全检查)
git log -1 --format=%H
应该是: acae6e5... (或最新发布标签)
3. 运行前查看代码
cat backend/requirements.txt # 检查依赖
cat package.json # 检查 npm 依赖
cat docker-compose.yml # 检查容器配置
4. 安装依赖
cd backend && pip install -r requirements.txt
cd ../frontend && npm install
5. 运行(详细步骤见方法二)
⚙️ 配置
最小配置(仅本地)
在项目根目录创建 .env:
bash
最小配置 - 无需外部服务
DATABASE_URL=sqlite+aiosqlite:///./data/swarm.db
REDIS_URL=redis://localhost:6379
SECRET_KEY=your-random-secret-key-here
DEBUG=true
可选:大模型智能体支持
如果您想使用大模型智能体(OpenAI、Anthropic),添加:
bash
可选 - 仅在使用大模型智能体时需要
OPENAI
APIKEY=sk-your-key-here
ANTHROPIC
APIKEY=sk-ant-your-key-here
⚠️ 安全提示:
- - 仅在计划使用大模型智能体时添加 API 密钥
- 安全存储 .env 文件(不要提交到 git)
- API 密钥永远不会发送到我们的服务器(仅发送到官方大模型提供商)
💻 基本使用
1. 启动系统
bash
使用 Docker
docker-compose up -d
或手动启动
redis-server &
cd backend && uvicorn app.main:app --reload &
cd frontend && npm run dev &
2. 创建您的第一个智能体
通过 Web UI:
- 1. 打开 http://localhost:3000
- 转到智能体页面
- 点击新建智能体
- 填写:
- 名称:我的助手
- 类型:llm(或tool、human、custom)
- 配置:{model: gpt-4}(如果使用大模型)
通过 API:
bash
curl -X POST http://localhost:8000/api/agents \
-H Content-Type: application/json \
-d {
name: 我的助手,
type: llm,
config: {model: gpt-4}
}
3. 创建任务
bash
curl -X POST http://localhost:8000/api/tasks \
-H Content-Type: application/json \
-d {
title: 分析数据,
description: 处理销售报告,
priority: high
}
4. 监控状态
Web 仪表板: http://localhost:3000
API:
bash
系统状态
curl http://localhost:8000/api/orchestrator/status
列出智能体
curl http://localhost:8000/api/agents
列出任务
curl http://localhost:8000/api/tasks
🔧 智能体类型
1. LLM 智能体(需要 API 密钥)
使用外部大模型 API(OpenAI、Anthropic)。
json
{
name: GPT-4 助手,
type: llm,
config: {
model: gpt-4,
temperature: 0.7
}
}
需要: OPENAIAPIKEY 或 ANTHROPICAPIKEY
2. 工具智能体(仅本地)
执行本地函数/脚本。
json
{
name: 数据处理器,
type: tool,
config: {
scriptpath: ./tools/processdata.py
}
}
无需外部服务。
3. 人类智能体(仅本地)
人在回路工作流。
json
{
name: 管理员