Install
openclaw skills install weixin-multi-agent-routerDesign or implement single-entry multi-agent routing for OpenClaw Weixin setups. Use when one Weixin account should route between any number of backend agents, when users want natural switch commands instead of separate Weixin bots, when agent names and counts must stay configurable, when per-agent session isolation is required to avoid context mixing, or when summary-based handoff/reset/status commands are needed for a Weixin plugin, extension, or reusable skill.
openclaw skills install weixin-multi-agent-routerBuild a chat-friendly multi-agent system behind one Weixin entrypoint.
Prefer plugin-layer routing first. Do not start by changing OpenClaw core unless the user explicitly wants a reusable framework beyond Weixin.
Treat Weixin as:
Do not assume there are exactly two, three, or any other fixed number of agents. The skill should still work if the user has 1, 3, 5, or more routable backend agents.
Do not model this as Telegram-style multi-bot identity unless the underlying Weixin provider actually supports separate independently routable bot identities.
Do not only switch tone or persona inside a shared session.
Require session identity to include at least:
Recommended session key pattern:
agent:<agentId>:openclaw-weixin:<accountId>:dm:<peerId>:v<version>This is the main guardrail against context mixing.
Keep per-contact router state containing at least:
currentAgentlastActiveAtlastSwitchAtsessionVersionsrecentHistoryRecommended default behavior:
When the user asks to hand work from one agent to another:
currentAgentDo not automatically expose one agent's full transcript to another.
Support at least four command groups.
Examples:
切到{agent}切换到{agent}回到{defaultAgent}{agent} ...Examples:
当前是谁现在是谁你是谁角色列表Examples:
重置当前清空当前上下文清空{agent}只重置{agent}Prefer version-based session reset over destructive transcript deletion.
Examples:
转给{agent}交给{agent}让{agent}接手总结后交给{agent}查看当前上下文摘要查看{agent}上下文摘要Follow this order.
Decide:
Keep this data-driven. A public skill must not depend on one private team's exact agent count or naming scheme.
If these are hard-coded in the current implementation, plan a config layer before publishing the system as a generic skill.
For configuration patterns and prompts, read references/configurability.md.
Minimal productized config shape:
{
"defaultAgent": "main",
"inactivityTimeoutMs": 1800000,
"agents": [
{
"agentId": "main",
"displayName": "主助理",
"description": "综合处理、调度、总结",
"aliases": ["主助理", "总助理"]
},
{
"agentId": "ops",
"displayName": "技术助手",
"description": "维护、配置、诊断",
"aliases": ["技术", "运维"]
}
]
}
Productization checklist for an update/public release:
Map natural-language commands to:
Keep first-pass matching explicit and conservative. Avoid fuzzy aliasing until the stable command set works.
For concrete command patterns, read references/commands.md.
Create or update router modules such as:
Persist state outside the core config when possible so per-contact runtime data does not pollute long-lived top-level config.
For architecture guidance, read references/architecture.md.
Test at minimum:
For validation scenarios, read references/validation.md.
When helping with this task:
If the user has not decided how many agents to expose yet, suggest starting with a small set such as:
Present this only as a starting point for usability, not as a requirement of the architecture.
references/architecture.mdreferences/commands.mdreferences/configurability.mdreferences/validation.md