插件地址:
https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin[1]
如何配置多 Agent
安装并启用插件
Shell openclaw plugins install "@tencent-weixin/openclaw-weixin"openclaw config set'plugins.entries["openclaw-weixin"].enabled'true --strict-json
分别扫码登录两个微信号
第一次扫码:
Shell openclaw channels login --channel openclaw-weixin
第二次扫码:

取出这两个微信账号的 accountId
先看插件保存的账号索引:
Shell cat ~/.openclaw/openclaw-weixin/accounts.json
当前配置里实际账号为:
JSON ["6782910569e-im-bot","134567e95d3e0-im-bot"]
创建两个 agent
Shell openclaw agents add agent-weixin-a \ --workspace ~/.openclaw/workspace-agent-weixin-a \ --agent-dir ~/.openclaw/agents/agent-weixin-a/agent \ --non-interactiveopenclaw agents add agent-weixin-b \ --workspace ~/.openclaw/workspace-agent-weixin-b \ --agent-dir ~/.openclaw/agents/agent-weixin-b/agent \ --non-interactive
配置文件片段
Jsonc {// 仅保留 openclaw-weixin 多账号 / agent 路由相关配置"plugins":{// 当前完整配置里还有其他 allow 项,这里省略非相关项"entries":{"openclaw-weixin":{"enabled":true}}},"agents":{// 当前完整配置里还有 defaults 和 main,这里只保留相关 agent"list":[{"id":"agent-weixin-a","name":"agent-weixin-a","workspace":"~/.openclaw/workspace-agent-weixin-a","agentDir":"~/.openclaw/agents/agent-weixin-a/agent"},{"id":"agent-weixin-b","name":"agent-weixin-b","workspace":"~/.openclaw/workspace-agent-weixin-b","agentDir":"~/.openclaw/agents/agent-weixin-b/agent"}]},"session":{// 按「Channel账号 + 发消息用户」彻底隔离"dmScope":"per-account-channel-peer"},"channels":{"openclaw-weixin":{"defaultAccount":"6782910569e-im-bot","accounts":{"6782910569e-im-bot":{"name":"WeChat A","enabled":true},"134567e95d3e0-im-bot":{"name":"WeChat B","enabled":true}}}},"bindings":[{"agentId":"agent-weixin-a","match":{"channel":"openclaw-weixin","accountId":"6782910569e-im-bot"}},{"agentId":"agent-weixin-b","match":{"channel":"openclaw-weixin","accountId":"134567e95d3e0-im-bot"}}]}
重启并验证
Shell openclaw gateway restartopenclaw agents list --bindingsopenclaw channels status --probe
引用链接
[1]https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin
夜雨聆风