Docs Talk to your agent

Discord

Add an agent's bot to your Discord server and talk to it there.

Put your agents in a Discord server so people can ask them questions in channels, threads and direct messages, and so review results post to a Discord channel. Each agent gets its own Discord bot, which you make in the Discord Developer Portal. Entropix connects out to Discord for each bot, so Discord needs no address on your side.

In the portal Settings › Channels › Discord Admin

Before you start

  • You need the Admin role in Entropix.
  • You need a Discord account that can make applications, and the Manage Server permission on your server to add bots.
  • Read Channels: how they work for linking accounts, threads, goals and approvals. They work the same in every channel.

The page works through four steps until a bot is in your server. The current step is open; done steps show a done badge. After that the page manages your bots instead (below). The page also names your server once a bot is in it.

Create the bots

Do this once for each agent you want in Discord.

  1. Open the Discord Developer Portal and click New Application. Name it after the agent.
  2. In the left menu, open Bot.
  3. Under Privileged Gateway Intents, turn on Message Content Intent, then click Save Changes. Without it, Discord refuses the bot.
  4. Click Reset Token and copy the token.
  5. Back in Entropix, in step 1, Create the bots, pick the Agent, paste the Bot token and click Register bot.

The token is stored encrypted and never shown again. The agent appears in step 2 as Registered — not in your server yet. You can also register a bot from the agent's Connections tab (Register its bot).

Add them to your server

  1. In step 2, Add them to your server, click Add to server beside the agent.
  2. Discord's authorize page opens with the permissions the bot needs. Pick your server and authorize.
  3. The row shows In <server>, and the Connection column shows connected.

The authorize page asks for these permissions: view channels, send messages, read message history, create public threads, send messages in threads, and embed links.

All of an organisation's bots join one server. The first server a bot joins becomes your organisation's server. A bot added to any other server leaves it.

StateWhat it means
Registered — not in your server yetThe bot is registered. Click Add to server.
In <server> or InstalledThe bot is in your server.
Failed: <reason>Discord refused the bot. Fix the reason, then click Retry.
Turning offThe bot is leaving the server.

The Connection column shows connected, connecting or reconnecting. Reconnecting after a short drop is normal.

Add more agents later

Once a bot is in your server, the page stops showing the four steps. It shows, in order:

  • Add a bot at the top, when some agent has no Discord bot yet. It jumps to the list of those agents.
  • Bots: one row per agent that has a bot, with its state, its review channel and its actions.
  • The agents without a bot, each with the Register bot form. When there are none it says Every agent has a bot.
  • Review channel, with Change to pick another.
  • Try it, folded.

You can also add a bot from the agent's Connections tab: its Discord row links to the form with the agent already picked.

Set the review channel

Step 3, Review channel, is where finished reviews post. Until you set one, it says None set yet — a review posts nowhere until one is.

  1. Click Change channel.
  2. Type part of a name in Search channels and click Search.
  3. Pick the channel and click Save.

The bot must be able to see and post in that channel.

Try it

  1. In your server, mention the bot in a channel it can see, or send it a direct message.
  2. The first time, the bot sends you a one-time link by direct message. If your direct messages are closed, it mentions you in the channel instead. Open the link and click Link. See Channels: how they work.
  3. Send your message again. The agent answers.

Step 4, Try it, shows how many people have linked Discord, and when the agent last answered in a channel and by direct message.

Check what each bot can use

Discord sends a bot nothing from a channel it cannot read, so the bot stays silent there. Step 4 shows a table for each bot, What <bot> can use:

ColumnWhat it shows
ChannelEach channel in your server. Blocked channels come first.
AccessCan read and reply, or Missing: and the permissions it lacks, such as View Channel, Read Message History, Send Messages, Create Public Threads, Send Messages in Threads or Embed Links.
Last message receivedWhen the bot last got a message from that channel, or None recorded.

The table updates about every 10 minutes. To fix a blocked channel, open it in Discord, choose Edit Channel › Permissions, add the bot, and allow what is listed.

Turn Discord off

  • For one agent: on its Connections tab, click Turn Discord off. Use Manage on its Connections in step 2 to get there.
  • For everyone: under Danger zone, click Turn Discord off for every agent. The page shows Turning off — removing the agents' bots from your server.

If a bot fails to leave, Forget now makes Entropix forget the bots at once. They may still be in your server; remove them there.

How it works

  • Entropix holds a connection out to Discord for each bot and receives messages over it. There is no webhook to expose for Discord.
  • The agent answers when you mention the bot or the bot's own role, reply to one of its messages, write in a thread it is in, or send it a direct message. A message that names only someone else is left for the people.
  • Use Discord's reply on any message, such as a webhook's alert, and mention the bot: the agent answers in a thread on your reply and reads the message you replied to, an embed's text included, as context.
  • A mention in a channel starts a thread named after the first line of your message, up to 100 characters. The agent answers there.
  • You can attach up to 5 files to a message, each at most 10 MB. See Files you send.
  • Charts the agent makes post as PNG images.
  • When the agent wants to run an Asks first tool in a chat thread, it asks there: reply yes or no. A goal's action is decided on the portal only. An admin answers a memory change in the thread with "approve" or "reject", or several with "approve all" or numbers ("approve 1,3"). See Approvals in a thread and Approve actions.
  • Anything an agent posts in a channel is visible to everyone in it.

What you can and can't do

You can
  • Give each agent its own bot.
  • Use agents in channels, threads and direct messages.
  • See which channels each bot cannot read, and why.
  • Replace a bot's token on the agent's Connections tab (Replace its bot token).
You can't
  • Put an organisation's bots in more than one server.
  • Register two bots for one agent.
  • Get answers in a channel the bot cannot read.

Troubleshooting

MessageWhat it means and what to do
Turn on Message Content Intent under Bot in the Developer Portal, then press RetryDiscord closed the connection (code 4014). Turn the intent on, save, then click Retry.
Discord rejected the bot token: reset it in the Developer Portal, paste the new one and press RetryThe token is wrong or was reset (code 4004). Reset it, paste the new one with Replace its bot token, then click Retry.
Discord rejected that bot tokenThe token you pasted does not work. Copy it again from Bot › Reset Token.
that token is not a bot'sYou pasted another kind of token. Use the one under Bot.
this agent already has a Discord botEach agent has one bot. Replace its token instead.
<n> channels are blocked.The bot cannot read those channels. Fix their permissions as shown in the access table.
Discord isn't set up on this portal: it needs a secret key.The portal cannot store tokens yet. Contact whoever runs your portal.
Entries under Stuck postsPosts Discord would not accept after several tries, with Discord's reason. Check the bot's access to that channel.