Multi-account management layer for WeChat ClawBot (the official WeChat AI bot plugin by Tencent).
WeClawBot-ex is a productized fork of the official @tencent-weixin/openclaw-weixin plugin. It turns the upstream multi-account runtime into a visual, operator-friendly WeChat console.
The current public release supports:
- multiple WeChat accounts connected to one OpenClaw Gateway
- one WeChat account mapped to one OpenClaw agent by default
- a local control console for QR login and channel management
- isolated chat context by default
- auto-triggered channel reload after QR confirmation, with manual restart fallback
Older shared-agent test data is not migrated in this release. Reconnect old accounts if you are upgrading from an earlier private build.
Two phones, one Gateway, two dedicated agents.
Phone A -> Agent A
workspace-wx-09c653a7Own identity, own memory.
|
Phone B -> Agent B
workspace-wx-847277d3Separate from Phone A.
|
- Node.js >= 22
- OpenClaw
>= 2026.3.12installed (openclawCLI available)
weclawbot-ex@2026.3.24is the current published release.- This release was runtime-verified against local OpenClaw
2026.3.14after the plugin-sdk compatibility hotfix. - For fresh installs, prefer OpenClaw
2026.3.22+when possible, because the public npm release line has already moved there. - On newer OpenClaw builds, keep using explicit plugin-sdk subpaths such as
account-id,channel-config-schema,infra-runtime,media-runtime,command-auth, andtext-runtime. The rootopenclaw/plugin-sdkentry remains intentionally narrow upstream.
git clone https://github.com/ImGoodBai/WeClawBot-ex.git
cd WeClawBot-ex
openclaw plugins install .If you previously installed the official openclaw-weixin plugin locally, remove or disable it before testing WeClawBot-ex. Both plugins currently register the same runtime channel id (openclaw-weixin), so loading both at once can cause channel conflicts.
In the same OpenClaw profile, the recommended state is:
plugins.entries.weclawbot-ex.enabled = trueplugins.entries.openclaw-weixin.enabled = false
If you want both plugins available, keep them in separate profiles / separate OPENCLAW_STATE_DIR values.
For compatibility, the current release still uses these runtime identifiers:
- Product / repo name:
WeClawBot-ex - npm package + plugin entry key:
weclawbot-ex - Channel config key:
channels.openclaw-weixin
This is expected for the current version. A mixed-name log does not mean the wrong repository was installed.
For the default experience, no extra config is required after install:
openclaw gatewayThen open http://127.0.0.1:19120/.
Plugin config lives under channels.openclaw-weixin in openclaw.json.
| Field | Type | Default | Description |
|---|---|---|---|
agentBinding.enabled |
boolean |
true |
Enable one-WeChat-one-agent binding |
agentBinding.maxAgents |
number |
20 |
Dedicated agent limit; new users fall back to main after the limit |
demoService.enabled |
boolean |
true |
Start the local Web console |
demoService.port |
number |
19120 |
Console port |
demoService.bind |
string |
127.0.0.1 |
Console bind address |
demoService.restartCommand |
string |
openclaw gateway restart |
Manual restart command shown in diagnostics |
baseUrl |
string |
https://ilinkai.weixin.qq.com |
Weixin iLink API endpoint |
cdnBaseUrl |
string |
https://novac2c.cdn.weixin.qq.com/c2c |
Media CDN endpoint |
logUploadUrl |
string |
- |
Optional log upload endpoint |
- Start your OpenClaw Gateway
- Open http://127.0.0.1:19120/
- Click Add WeChat Channel — scan the QR code with WeChat
- After scan success, wait a few seconds for auto refresh
- If the new account still does not come online, run
openclaw gateway restart - Send a message from that WeChat account — the bound AI agent replies
Repeat step 3 for each additional WeChat account.
- FAQ: docs/faq.md
- Architecture and isolation boundary: docs/architecture.md
WARNING: Plugin "... contains dangerous code patterns"is currently warn-only in OpenClaw. It is a scanner warning, not the install blocker.npm install failedneeds the full npm stderr before the root cause can be confirmed.- Check
node -vfirst. This plugin requires Node.js>= 22. - Check
openclaw --versionnext. The current release targets OpenClaw>= 2026.3.12. - If you are running OpenClaw
2026.3.14, upgrade toweclawbot-ex@2026.3.24or newer before debugging message delivery. Older plugin builds can fail at runtime because some helpers are not exported from the rootplugin-sdkentry on that host version. - If you upgrade OpenClaw later, re-run
openclaw plugins install .and verify one real inbound/outbound message roundtrip. Upstream still evolves the SDK around explicit subpaths, not the root barrel. - After pulling a newer GitHub revision, run
openclaw plugins install .again. OpenClaw runs the installed copy under~/.openclaw/extensions, not your working tree directly. - If the plugin installs but the console does not open, verify
channels.openclaw-weixin.demoService.enabled=trueand restart Gateway. - If the console still fails to boot, make sure the official
openclaw-weixinplugin is not installed at the same time in the same OpenClaw profile. - If QR login succeeds but the new account does not receive messages, first wait for auto refresh, then use the manual restart command shown in the diagnostics panel.
- If the QR image does not render as PNG on older runtimes, the console falls back to an SVG data URL automatically; this does not affect the login flow.
Run these before opening or merging a change:
npm run test:unit
npm run test:smoke
npm run test:gate
npm run test:gate:fullCurrent automated coverage focuses on:
- config-triggered channel reload and manual fallback
- account snapshot / isolation diagnostics
- control page render smoke
- local demo service health
- mock QR login flow without real WeChat devices
test:gate is the current default closeout gate for this standalone repo.
test:gate:full additionally runs typecheck, which still depends on upstream-derived imports being fully self-contained.
WeChat A <-> WeClawBot-ex <-> OpenClaw Agent A
WeChat B <-> WeClawBot-ex <-> OpenClaw Agent B
WeChat C <-> WeClawBot-ex <-> OpenClaw Agent C
- Fork of the official
@tencent-weixin/openclaw-weixinplugin (v1.0.2) - Extends the QR login module to support concurrent multi-session management
- Adds a local web console (
src/service/) for visual channel management - Chat context is separated by default for each WeChat account
- Each stable WeChat user is bound to one dedicated OpenClaw agent by default
- Agent workspace is separated by agent id
- Tool/runtime side effects are still shared at the host level
If you are specifically evaluating data isolation, read docs/architecture.md. The short version is:
- default mode: one WeChat account -> one dedicated agent
- compatibility fallback: shared
mainagent only when dedicated binding cannot be completed - future stage: stronger workspace/tool/runtime isolation
Official openclaw-weixin |
WeClawBot-ex | |
|---|---|---|
| Multi-account runtime | Supported, mainly via CLI workflow | Supported, with one local web console |
| Agent mapping | Shared/manual operator setup | Default one WeChat -> one dedicated agent |
| QR login experience | Terminal output | Browser QR with live status cards |
| Account visibility | Mainly logs and local state | Aggregated dashboard and relogin actions |
| Cooldown diagnostics | Manual inspection | Built-in -14 visibility |
| Chat isolation | Requires extra manual configuration | Enabled by default |
- The upstream protocol/runtime layer is treated as frozen
- Ongoing changes should stay in our own layer:
src/service/, plugin packaging, and docs - Avoid editing upstream-derived files unless a compatibility fix is unavoidable
- One WeChat account -> one OpenClaw agent
- Explicit tool / runtime side-effect isolation
- Harder tenant boundary enforcement
- Shareable QR codes for external distribution
- Paid entry points per WeChat channel
- Plugin-side billing and commercial distribution workflow
At the runtime layer, yes. The official plugin already has multi-account account storage and monitor startup logic. WeClawBot-ex focuses on management UX, QR workflow visibility, diagnostics, and operational packaging.
Not fully. One WeChat account now maps to one dedicated OpenClaw agent by default, and the agent workspace is separated by agent id, but tool/runtime side effects are still shared at the host level.
Yes. That is now the default behavior of this repo. Shared-agent mode only remains as a compatibility fallback when dedicated binding cannot be completed.
Full history: CHANGELOG.md.
- Default one-WeChat-one-agent: each WeChat user binds to a dedicated agent by default
- Zero-config startup:
openclaw gatewayis enough for first run; session isolation and agent binding auto-apply - Re-login keeps the same agent: rescanning the same WeChat account preserves the previous binding
- Configuration reference: README now lists all supported config fields and defaults
- Architecture + FAQ: public docs now explain official-plugin differences and the current isolation boundary
- Automated quality gate:
npm run test:gatecovers binding logic, QR flow, and control-page rendering
MIT — see LICENSE and NOTICE for upstream attribution.
Scan the QR code below to join the WeChat ClawBot exchange group:



