微信官方 openclaw 插件配置不同 agent 的方法

3 月 22 日
 AFOX

刚刚试了一下微信官方出的 openclaw 插件,发现扫码之后默认绑定的是“main” agent ,要绑定到其他 agent 需要执行以下步骤: 1 ) 去 openclaw 安装目录找到 openclaw-weixin 目录,然后读取 accounts.json 中的 id 内容:

 cat accounts.json
[
  "xx-im-bot"
]

2 ) 修改 openclaw 配置文件,在 binding 中新增:

这里的 agentId 是你需要绑定到的对应 agent

{
      "agentId": "weixin", 
      "match": {
        "channel": "openclaw-weixin",
	    "accountId": "xx-im-bot"
      }
    }

3 ) (这一步不知道要不要)在 channels 中新增:

  "openclaw-weixin": {
      "enable": true,
      "accounts": {
        "xx-im-bot": {

	}
      }
    }

4 ) 然后重启即可

2995 次点击
所在节点    微信
8 条回复
xyseoer
3 月 22 日
兄弟,你好高效呀 我去试试.
Rookiewan
3 月 22 日
不知道能不能多个微信绑定同一个 openclaw 的不同 agent
xyseoer
3 月 22 日
@Rookiewan 我也想知道 我正在试
AFOX
3 月 22 日
@Rookiewan 可以多个微信扫码,每扫一个会生成一个新的 accound id 。具体命令可以看一下微信的那个 npm 包,里面有说明
xyseoer
3 月 22 日
@AFOX 确实可以 我说下详细步骤
如果要添加多人
1. 执行官方命令 npx..... 需要拿到多人的 botid
2. 之后去 openclaw.json 里修改配置 需要修改 2 处
(1)channels 中 增加

"openclaw-weixin": {
"enabled": true,
"defaultAccount": "xxx-im-bot", #默认的 bot 可以不设置,但不设置重启的时候会安全提醒
"accounts": {
"xxx-im-bot": {},
"xxx-im-bot": {}
}
}


(2)bindings 中 增加你的智能体关联

"bindings": [
{
"agentId": " xxx",
"match": {
"channel": "openclaw-weixin",
"accountId": "xxx-im-bot"
}
},

3. 之后重启应该就能用了.
chroming
3 月 22 日
这样配置是否可能实现 weixin--openclaw channel--acp--codex?这种链路?
zhuyao
3 月 23 日
clawbot 能加群吗
stardust21
3 月 28 日
实测 2026.3.13 版本第三步可以不加

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.ih06.com/t/1200122

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX