Install
openclaw skills install feishu-multiagentConfigure OpenClaw multi-agent routing for Feishu multi-account setups. Use when users need two or more Feishu bots (different appId/appSecret) to run on isolated agents/workspaces with distinct system prompts and independent MEMORY bootstrap, or when troubleshooting wrong-agent routing, shared persona, open_id cross-app errors, pairing/account mixups, memory provider failures, contact scope warnings (99991672), or card streaming permission errors.
openclaw skills install feishu-multiagentSet up and verify that each Feishu account is routed to the intended OpenClaw agent with isolated workspace and prompt files.
Apply deterministic checks so routing, persona, and channel health are provable from logs.
Also ensure each new agent has a valid MEMORY.md and working memory embeddings.
main, assistant)~/.openclaw/workspace, ~/.openclaw/workspace-assistant)default, backup)appId, appSecret)auto or explicit provider/endpoint)Run:
openclaw agents list --bindings
openclaw agents bindings --json
openclaw config get channels.feishu
Detect these issues before changing anything:
backup/default both mapped to same agentagents.listchannels.feishu.accountsagentDir across agentscp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak.$(date +%Y%m%d-%H%M%S)
Prefer non-interactive creation when adding a new agent:
openclaw agents add assistant \
--non-interactive \
--workspace ~/.openclaw/workspace-assistant \
--model minimax-portal/MiniMax-M2.5
Ensure agents.list[] has unique workspace and agentDir per agent.
For every new non-main agent workspace, verify these files exist and are customized:
AGENTS.mdSOUL.mdIDENTITY.mdUSER.mdTOOLS.mdMEMORY.md (or memory.md)Why this is mandatory:
MEMORY.md is injected into system prompt when present.Also create daily memory directory (used by memory indexing):
mkdir -p ~/.openclaw/workspace-assistant/memory
Ensure this shape exists in ~/.openclaw/openclaw.json:
{
"channels": {
"feishu": {
"enabled": true,
"defaultAccount": "default",
"accounts": {
"default": { "appId": "cli_xxx", "appSecret": "xxx", "enabled": true },
"backup": { "appId": "cli_yyy", "appSecret": "yyy", "enabled": true }
}
}
}
}
Never echo secrets back to users in plaintext.
Use one binding per account:
{
"bindings": [
{ "agentId": "main", "match": { "channel": "feishu", "accountId": "default" } },
{ "agentId": "assistant", "match": { "channel": "feishu", "accountId": "backup" } }
]
}
Or use CLI for simple cases:
openclaw agents bind --agent main --bind feishu:default
openclaw agents bind --agent assistant --bind feishu:backup
Update the non-main workspace files so system prompts diverge:
AGENTS.mdSOUL.mdIDENTITY.mdUSER.mdRemove stale bootstrap template when persona setup is complete:
BOOTSTRAP.mdProbe memory first:
openclaw memory status --agent assistant --deep --json
If provider is none, embeddingProbe.ok=false, or logs show provider errors, pin a working provider explicitly.
Example: route memory embeddings through OpenRouter OpenAI-compatible endpoint for work-agent:
AGENT_ID="work-agent"
IDX=$(openclaw agents list --bindings --json | jq -r --arg id "$AGENT_ID" 'to_entries[] | select(.value.id==$id) | .key')
KEY=$(jq -r '.profiles["openrouter:default"].key' ~/.openclaw/agents/$AGENT_ID/agent/auth-profiles.json)
openclaw config set "agents.list[$IDX].memorySearch.provider" '"openai"' --strict-json
openclaw config set "agents.list[$IDX].memorySearch.model" '"text-embedding-3-small"' --strict-json
openclaw config set "agents.list[$IDX].memorySearch.remote.baseUrl" '"https://openrouter.ai/api/v1"' --strict-json
openclaw config set "agents.list[$IDX].memorySearch.remote.apiKey" "\"$KEY\"" --strict-json
openclaw config set "agents.list[$IDX].memorySearch.fallback" '"none"' --strict-json
Then force index once:
openclaw memory index --agent work-agent --force --verbose
openclaw memory status --agent work-agent --deep --json
Expect:
provider is not noneembeddingProbe.ok=truefiles/chunks increase after indexingopenclaw config validate
openclaw gateway restart
openclaw gateway status
openclaw channels status --probe
Ask user to send route-check to each bot.
Then inspect logs:
openclaw channels logs --lines 300 | rg "feishu\\[(default|backup)\\].*dispatching to agent"
Expect:
feishu[default] -> session=agent:main:...feishu[backup] -> session=agent:assistant:...Always approve Feishu pairing with account scope in multi-account setups:
openclaw pairing list feishu --json
openclaw pairing approve feishu <code> --account <accountId> --notify
This prevents approving the same sender into the wrong account allowlist.
open_id cross app:
--account, keep allowFrom scoped per account.~/.openclaw/delivery-queue/ before restart if they keep retrying.gemini embeddings failed: ... User location is not supported:
memorySearch.provider to a supported provider/endpoint (example above).providerUnavailableReason / provider=none in openclaw memory status --deep:
memorySearch provider + key, then run openclaw memory index --agent <id> --force.99991672 contact scope warning:
channels.feishu.resolveSenderNames=false.cardkit:card:write streaming error:
cardkit:card:write.channels.feishu.streaming=false and channels.feishu.blockStreaming=false.When finishing, report:
config validate, gateway status, channels status --probe).memory status --agent <id> --deep, index result, provider/embedding probe state).