Weixin Multi-Agent Router|微信多 Agent 路由 — Weixin Multi-代理 路由r|微信多 代理 路由
v1.0.0De签名 or implement single-entry multi-代理 routing for OpenClaw Weixin 设置ups. Use when one Weixin account should 路由 between any number of backend 代理s, when users want natural switch commands instead of separate Weixin 机器人s, when 代理 names and counts must stay configurable, when per-代理 会话 isolation is required to avoid 上下文 mixing, or when summary-based handoff/re设置/状态 commands are needed for a Weixin 插件, 扩展, or reusable 技能.
运行时依赖
安装命令
点击复制本土化适配说明
Weixin Multi-Agent Router|微信多 Agent 路由 — Weixin Multi-代理 路由r|微信多 代理 路由 安装说明: 安装命令:["openclaw skills install weixin-multi-agent-router"] 该技能用于微信相关操作,可能需要相应的平台账号或API密钥
技能文档
Weixin Multi 代理 路由r
Build a chat-friendly multi-代理 系统 behind one Weixin entrypoint.
Prefer 插件-layer routing first. Do not 启动 by changing OpenClaw core unless the user explicitly wants a reusable 框架 beyond Weixin.
Core capabilities
- 路由 one Weixin entry to any number of 代理s
Treat Weixin as:
one human-facing entrypoint one configurable 列出 of backend 代理s one per-contact current-代理 状态
Do not assume there are exactly two, three, or any other fixed number of 代理s. The 技能 should still work if the user has 1, 3, 5, or more routable backend 代理s.
Do not 模型 this as Telegram-style multi-机器人 身份 unless the underlying Weixin 提供者 actually supports separate independently routable 机器人 identities.
- Isolate memory per 代理
Do not only switch tone or persona inside a 分享d 会话.
Require 会话 身份 to include at least:
channel accountId peerId 代理Id optional 会话 version
Recommended 会话 key pattern:
代理:<代理Id>:OpenClaw-weixin::dm::v
This is the mAIn 防护rAIl agAInst 上下文 mixing.
- Store current active 代理 per contact
Keep per-contact 路由r 状态 contAIning at least:
current代理 lastActiveAt optional lastSwitchAt optional per-代理 会话Versions optional per-代理 recent历史
Recommended default behavior:
default 代理 = primary coordinator inactivity fallback = re设置 current 代理 to default after a configurable timeout
- Use summary-based handoff, not raw transcript sharing
When the user asks to hand work from one 代理 to another:
collect recent 历史 from the current 代理 only build a compact handoff summary switch current代理 confirm the handoff in chat prefer silent handoff so the tar获取 代理 does not immediately double-reply
Do not automatically expose one 代理's full transcript to another.
Recommended command surface
Support at least four command groups.
Switching
Examples:
切到{代理} 切换到{代理} 回到{default代理} {代理} ... 状态
Examples:
当前是谁 现在是谁 你是谁 角色列表 Re设置
Examples:
重置当前 清空当前上下文 清空{代理} 只重置{代理}
Prefer version-based 会话 re设置 over destructive transcript deletion.
Handoff / summary
Examples:
转给{代理} 交给{代理} 让{代理}接手 总结后交给{代理} 查看当前上下文摘要 查看{代理}上下文摘要 Implementation 工作流
Follow this order.
Step 1: define the 代理 map
Decide:
the full configurable 代理 列出 per-代理 ids per-代理 display names shown to the user per-代理 角色 descriptions per-代理 aliases / command triggers default 代理 inactivity timeout
Keep this data-driven. A public 技能 must not depend on one private team's exact 代理 count or naming scheme.
If these are hard-coded in the current implementation, plan a config layer before publishing the 系统 as a generic 技能.
For configuration patterns and prompts, read references/configurability.md.
Minimal productized config shape:
{ "default代理": "mAIn", "inactivityTimeoutMs": 1800000, "代理s": [ { "代理Id": "mAIn", "displayName": "主助理", "description": "综合处理、调度、总结", "aliases": ["主助理", "总助理"] }, { "代理Id": "ops", "displayName": "技术助手", "description": "维护、配置、诊断", "aliases": ["技术", "运维"] } ] }
Productization 检查列出 for an 更新/public release:
ensure 代理 列出, aliases, default 代理, and timeout are configuration-driven keep 路由r 运行time 状态 separate from long-lived top-level config keep public examples generic; do not publish private team names as defaults 验证 agAInst at least two different 代理 maps before packaging Step 2: define the command map
Map natural-language commands to:
switch current 代理 switch and 发送 content 查询 状态 show 角色s re设置 current or tar获取 代理 show summary handoff
Keep first-pass matching explicit and conservative. Avoid fuzzy aliasing until the stable command 设置 works.
For concrete command patterns, read references/commands.md.
Step 3: implement 路由r 状态 + 会话 isolation
创建 or 更新 路由r 模块s such as:
command 解析器 状态 store 会话-key 构建器 路由r decision layer handoff summary 构建器 direct reply strings
Persist 状态 outside the core config when possible so per-contact 运行time data does not pollute long-lived top-level config.
For architecture 图形界面dance, read references/architecture.md.
Step 4: 验证 behavior in chat
Test at minimum:
switching current-代理 persistence inactivity fallback 代理 memory isolation re设置 behavior summary-based handoff no duplicate reply after silent handoff no “summary of summary” nesting in recent-历史 views
For 验证 scenarios, read references/验证.md.
输出 standards
When helping with this task:
explAIn the routing 模型 in plAIn language separate “single-entry multi-代理” from “multi-机器人 身份” make 会话 isolation explicit make handoff rules explicit prefer a config-driven de签名 if the user wants to 分享 the solution publicly avoid implying that the 系统 needs ex