> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

***

title: Discord integration
description: Connect an Agent or a Space task assistant to Discord: bind a bot, chat in DMs and channels, trigger by emoji or message, and turn conversations into tasks.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# Discord integration

The Discord integration provides two independent connections:

- An **Agent bot binding** connects one Sharkly Agent as a Discord bot so you can chat in direct messages, channel @ mentions, and threads.
- A **Task assistant** is one system assistant per Space. Bind it from the Discord integration page, then @ it in a channel to turn conversation context into tasks, or to look up and update tasks in that Space.

Both connect with a Discord bot token and can be used together, but each must be configured separately. A task assistant is not an ordinary Agent: it does not appear in Agent lists, assignment pickers, or in-app chat.

## What you need before connecting

| Prerequisite                 | Details                                                                                                                                                                                              |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Discord application          | Create an app in the Discord Developer Portal and reset and copy the bot token on the Bot page.                                                                                                      |
| Message Content Intent       | Enable and save it under Privileged Gateway Intents on the same Bot page. Without it the bot cannot read message content, so channel message triggers, emoji triggers, and chat context do not work. |
| Server management permission | Adding the bot to a server requires manage permissions on that server.                                                                                                                               |
| Agent                        | An Agent bot binding needs a Sharkly Agent; create one first if you do not have it.                                                                                                                  |

## Where to open it

- Open **Integrations**, then the Discord page;
- or open an Agent's detail page and configure it under the **Integrations** tab, which binds the current Agent directly.

## Connect an Agent bot

1. Open the **Connect Discord** dialog.
2. Select the Agent to bind.
3. Paste the bot token from the Discord Developer Portal.
4. Choose connect. After the token is verified, the Discord authorization page opens.
5. In Discord, pick a server and authorize to add the bot to it.

The bot must join a server before it can send or receive anything, including direct messages — you and the bot must share a server. After authorization, the integration page shows the servers the bot joined. If authorization is not detected, reopen the authorization page or use the install link on the settings page.

## Bind a task assistant

1. Open **Integrations** and go to the **Task assistant** group on the Discord page.
2. Find a Space you joined and choose **Bind Discord**.
3. Choose the Runtime that runs the task assistant for that Space.
4. Paste the bot token and add the bot to your server.

Each Space has at most one task assistant, and it uses the same settings structure as an Agent duplicate: the Space row's **···** menu offers **Settings**, **Unbind**, and **Remove assistant**. **Settings** opens the same settings panel an Agent uses — computer and Runtime, default model, instructions, Skills, and more. **Description** and **Instructions** inherit the admin console's **Task assistant template** by default and sync automatically when the template changes; once edited on the assistant they are marked **Overridden** and keep their own value, and **Reset to inherit** returns them to the template. A shipped template (the built-in Discord task-creation instructions) is provided out of the box, and organization admins maintain it on the admin console's **Task assistant template** page.

## Using the bot in Discord

### Direct messages

Message the bot directly in Discord to chat with the bound Agent. The first message creates the matching Agent session; keep sending in the same DM and the Agent continues in that session.

### @ the bot in a channel

@ the bot in a channel with your question or instruction — this is the default trigger. The Agent replies using the nearby messages as context; if you @ it inside a thread, it replies in that thread.

### Optional: emoji triggers and message triggers

In the Agent's integration settings you can enable triggers one by one. Switch names follow the product; the common ones are:

- **Mentioned in a channel** (default);
- **Emoji trigger in a channel**: adding a chosen emoji to a message triggers the Agent with the nearby context;
- **Message trigger in a channel**: every message in the selected channel triggers the Agent, no @ needed.

All of these depend on Message Content Intent; without it, only direct messages and @ mentions work.

### React to stop the Agent

While the Agent is working, add the ❌ reaction to **the message that started the run** to stop it — however the run was started (direct message, mention, or emoji trigger), and anyone in the chat can do it. Reacting while the Agent is idle has no effect.

After the stop, the working indicator comes off the message and the chat is told the turn stopped, and the run is marked as stopped on the product side, exactly as if you had pressed Stop there — and pressing Stop in the product syncs back to Discord too. The stop emoji defaults to the cross mark and can be changed in the integration settings.

### Start a new session with /new

Use `/new` in a conversation with the bot to start a fresh Agent session without the previous context.

### Sending files

Files the Agent sends return to the original Discord conversation. The bot needs the "attach files" permission; if files fail in one channel only, check that channel's permission overrides.

## Manage and disconnect

Return to the Discord integration page to see the connected bots, including the bound Agent, the servers it joined, and the current status, and to retry or disconnect. Disconnecting stops messages between the Agent and Discord; existing Sharkly sessions and history are not deleted.

## Common states

| State                   | Meaning                                                                                                           |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Token rejected          | Discord rejected the bot token. Reset the token in the Developer Portal and connect again.                        |
| Message handling failed | A message that keeps failing is skipped so it does not block the ones behind it; ask the sender to send it again. |
| Cannot send files       | The bot lacks the "attach files" permission. Text replies are unaffected; authorize again with the install link.  |
| Rate limited            | Discord is limiting how often the bot connects; it retries automatically.                                         |

## Common questions

### The bot does not see channel messages

Confirm **Message Content Intent** is enabled in the Developer Portal, then confirm the bot is still in the server and connected. Without the intent, the bot only sees direct messages and @ mentions.

### Do ordinary channel messages trigger the Agent?

Not by default. @ the bot, add the trigger emoji, or reply in a thread the Agent already participates in. To trigger on every message, enable message triggers for specific channels in the integration settings.

### Does a Discord message become a Sharkly task?

An Agent bot does not turn messages into tasks automatically. To turn channel discussion into tasks, use the Space's task assistant: @ it in the channel and it creates tasks from the conversation context; you can then keep querying and updating those tasks in Discord.

### Does disconnecting delete messages?

No. Disconnecting only stops the exchange between Sharkly and Discord. Message history in Discord and session history in Sharkly are preserved.
