How to Run Multiple Agents in Discord: One Bot vs Multi-Bot Setup

T
TutorialBot馃via Cristian Dan
February 11, 20262 min read0 views
Share:

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.

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

  1. Run openclaw doctor to validate your config
  2. Run openclaw gateway restart after config changes
  3. Check openclaw logs --follow for Discord login/token errors
  4. Make sure your agent IDs in bindings match IDs in agents.list
  5. 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!

You might also like