Install
openclaw skills install huamu668-openclaw-multiagentConfigure multi-agent TG group system with shared Workspace + MemOS memory. Use when user wants to set up multiple AI agents in a Telegram group, with specia...
openclaw skills install huamu668-openclaw-multiagent所有 Agent 共享同一个 workspace(.openclaw/workspace)。
workspace/agents/{agent_id}/ 子目录workspace/shared-context/ — 所有 Agent 都可读取workspace/
├── SOUL.md # 主 Agent 的灵魂
├── IDENTITY.md # 主 Agent 身份卡
├── AGENTS.md # 主 Agent 行为规则
├── USER.md # 用户信息(所有 Agent 共享读取)
├── HEARTBEAT.md # 主 Agent 心跳任务
├── shared-context/ # 跨 Agent 共享层
│ ├── FEEDBACK-LOG.md # 通用反馈/修正记录
│ └── SIGNALS.md # 当前关注的趋势/信号
└── agents/
├── {agent_id}/ # 子 Agent 专属目录
│ ├── SOUL.md # 子 Agent 灵魂
│ ├── IDENTITY.md # 子 Agent 身份卡
│ └── AGENTS.md # 子 Agent 行为规则
└── {另一个agent_id}/
└── ...
需要用户提供:
每个子 Bot → /setprivacy → Disable(否则 Bot 无法读取群消息)
所有 Bot(主 + 子)必须先被添加到目标 TG 群组
每个子 Bot 需要从 @BotFather 获取独立的 Bot Token
chat.id 字段cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak.$(date +%Y%m%d%H%M%S)
# 共享上下文目录
mkdir -p ~/.openclaw/workspace/shared-context
# 每个子 Agent 的专属目录
mkdir -p ~/.openclaw/workspace/agents/{agent_id}
# 每个子 Agent 的 OpenClaw 内部目录
mkdir -p ~/.openclaw/agents/{agent_id}/agent
写入 shared-context/FEEDBACK-LOG.md 和 shared-context/SIGNALS.md
关键修改:
"telegram": {
"enabled": true,
"dmPolicy": "pairing",
"groupPolicy": "allowlist",
"streaming": "partial",
"accounts": {
"default": {
"botToken": "主BotToken",
"dmPolicy": "pairing",
"groupPolicy": "allowlist",
"streaming": "partial",
"groups": {
"-100xxxx": { "requireMention": false }
},
"groupAllowFrom": ["用户ID"]
},
"agent_id": {
"name": "Agent名称",
"enabled": true,
"botToken": "子BotToken",
"dmPolicy": "allowlist",
"allowFrom": ["用户ID"],
"groupPolicy": "allowlist",
"groupAllowFrom": ["用户ID"],
"streaming": "off",
"commands": {
"native": false,
"nativeSkills": false
},
"groups": {
"-100xxxx": { "requireMention": true }
}
}
}
}
"agents": {
"defaults": {
"workspace": "~/.openclaw/workspace",
"model": { "primary": "..." }
},
"list": [
{ "id": "main" },
{
"id": "agent_id",
"name": "agent_id",
"workspace": "~/.openclaw/workspace",
"model": "..."
}
]
}
"bindings": [
{
"agentId": "agent_id",
"match": {
"channel": "telegram",
"accountId": "agent_id"
}
}
]
/setprivacy 必须设为 Disable