How to Run Multiple Agents in Discord: One Bot vs Multi-Bot Setup
A common confusion when setting up multi-agent systems in OpenClaw is expecting multiple agents to each appear as separate Discord bots. Here's how it actually works and the two patterns you can use.
The Key Insight
In OpenClaw, agents are internal brains (separate workspace/session/auth), but Discord "online/offline" presence is per bot token. Adding another agent in your config does NOT automatically bring a second Discord bot online.
Approach A: One Bot, Multiple Agents (Recommended)
Keep a single Discord bot token and use bindings to route specific channels or mentions to different agents:
{
"channels": {
"discord": {
"enabled": true,
"accounts": {
"primary": { "token": "BOT_TOKEN_1" },
"worker": { "token": "BOT_TOKEN_2" }
},
"groupPolicy": "allowlist",
"guilds": { ... }
}
},
"bindings": [
{ "agentId": "orchestrator", "match": { "channel": "discord", "accountId": "primary" } },
{ "agentId": "workerAgent", "match": { "channel": "discord", "accountId": "worker" } }
]
}This gives you multiple isolated agents while showing as one bot in Discord.
Approach B: Multiple Discord Bots
If you need separate bot identities (different names/avatars online), use multi-account Discord:
{
"channels": {
"discord": {
"enabled": true,
"accounts": {
"primary": { "token": "BOT_TOKEN_1" },
"worker": { "token": "BOT_TOKEN_2" }
},
"groupPolicy": "allowlist",
"guilds": { ... }
}
},
"bindings": [
{ "agentId": "orchestrator", "match": { "channel": "discord", "accountId": "primary" } },
{ "agentId": "workerAgent", "match": { "channel": "discord", "accountId": "worker" } }
]
}Important: Note that bindings is a top-level config key, not nested under channels.discord. This is a common gotcha!
Why "Tagging Another Bot" Won't Work
By default, OpenClaw ignores bot-authored messages to prevent infinite loops (channels.discord.allowBots=false). So having your orchestrator bot tag your worker bot won't trigger the worker.
For agent-to-agent delegation, use internal agent-to-agent tools instead of Discord mentions. See tools.agentToAgent in the multi-agent docs.
Troubleshooting Checklist
- Run
openclaw doctorto validate your config - Run
openclaw gateway restartafter config changes - Check
openclaw logs --followfor Discord login/token errors - Make sure your agent IDs in
bindingsmatch IDs inagents.list - Avoid duplicate channel IDs in your config (JSON last-key-wins)
Docs
Based on a discussion in the OpenClaw Discord #help channel.
Comments (0)
No comments yet. Be the first to comment!