From 086ba40e6b1b660d60d7da85e08fbb9d7f486599 Mon Sep 17 00:00:00 2001 From: OpenClaw Backup Date: Sat, 28 Mar 2026 20:56:37 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=96=B0=E5=A2=9E=20OpenClaw=20?= =?UTF-8?q?=E5=A4=9A=E5=BE=AE=E4=BF=A1=E9=85=8D=E7=BD=AE=E6=95=99=E7=A8=8B?= =?UTF-8?q?=202026-03-28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/openclaw-multi-wechat-config.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 knowledge/tech/openclaw-multi-wechat-config.md diff --git a/knowledge/tech/openclaw-multi-wechat-config.md b/knowledge/tech/openclaw-multi-wechat-config.md new file mode 100644 index 0000000..2fddbff --- /dev/null +++ b/knowledge/tech/openclaw-multi-wechat-config.md @@ -0,0 +1,81 @@ +# OpenClaw 配置多个微信账户教程 + +> 来源:微信公众号「OpenClaw」 +> 原文链接:https://mp.weixin.qq.com/s/obgpTeTnBoigENhneA7nWA +> 整理时间:2026-03-28 + +--- + +## 插件信息 + +**插件地址**:https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin + +--- + +## 前置安装 + +```bash +openclaw plugins install "@tencent-weixin/openclaw-weixin" +openclaw config set 'plugins.entries["openclaw-weixin"].enabled' true --strict-json +``` + +--- + +## 配置步骤 + +### 第一步:分别扫码登录两个微信号 + +```bash +# 第一次扫码 +openclaw channels login --channel openclaw-weixin + +# 取出两个微信账号的 accountId +cat ~/.openclaw/openclaw-weixin/accounts.json +``` + +### 第二步:创建两个 Agent + +```bash +openclaw agents add agent-weixin-a \ + --workspace ~/.openclaw/workspace-agent-weixin-a \ + --agent-dir ~/.openclaw/agents/agent-weixin-a/agent \ + --non-interactive + +openclaw agents add agent-weixin-b \ + --workspace ~/.openclaw/workspace-agent-weixin-b \ + --agent-dir ~/.openclaw/agents/agent-weixin-b/agent \ + --non-interactive +``` + +### 第三步:配置文件 + +```json +{ + "session": { "dmScope": "per-account-channel-peer" }, + "channels": { + "openclaw-weixin": { + "defaultAccount": "账号A的accountId", + "accounts": { + "账号A的accountId": { "name": "WeChat A", "enabled": true }, + "账号B的accountId": { "name": "WeChat B", "enabled": true } + } + } + }, + "bindings": [ + { "agentId": "agent-weixin-a", "match": { "channel": "openclaw-weixin", "accountId": "账号A" } }, + { "agentId": "agent-weixin-b", "match": { "channel": "openclaw-weixin", "accountId": "账号B" } } + ] +} +``` + +### 第四步:重启验证 + +```bash +openclaw gateway restart +openclaw agents list --bindings +openclaw channels status --probe +``` + +--- + +*本文档由欢欢助理整理*