Docs/Discord

Discord

Connect your Hybrix agents to Discord servers. Agents can respond to messages, slash commands, reactions, and thread conversations.

1. Create a Discord bot

Go to the Discord Developer Portal and create a new application:

  1. Visit discord.com/developers/applications and click “New Application”
  2. Go to the Bot tab and click “Add Bot”
  3. Copy the bot token and add it to your .env file
  4. Enable Message Content Intent under Privileged Gateway Intents
env
DISCORD_BOT_TOKEN=MTIzNDU2Nzg5...

2. Configure the channel

Add the Discord channel to your hybrix.config.json:

json
{
  "channels": [
    {
      "type": "discord",
      "token": "$DISCORD_BOT_TOKEN",
      "allowlist": ["your-guild-id"],
      "agents": ["Atlas", "Scout"],
      "prefix": "!",
      "slashCommands": true,
      "threadReplies": true
    }
  ]
}
OptionDefaultDescription
allowlist[]Guild IDs to respond in (empty = all guilds)
prefix!Message prefix to trigger the bot
slashCommandstrueRegister slash commands with Discord
threadRepliestrueReply in threads to keep channels clean
typingIndicatortrueShow typing indicator while agent processes

3. Invite the bot

Generate an invite URL from the Developer Portal under OAuth2 → URL Generator. Select the bot and applications.commands scopes, and grant Send Messages, Read Message History, and Use Slash Commands permissions.

Run hybrix channel test discord to verify the bot is connected and can read messages in your server.

Supported features

Slash commands — Auto-registered per agent. Use /ask Atlas to route to a specific agent.

Thread conversations — Multi-turn conversations happen in threads, keeping channels tidy.

Reactions — Agents can react to messages with emoji to acknowledge or confirm actions.

File attachments — Agents can receive and send file attachments (images, documents, code).