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
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
- Open the Connect Discord dialog.
- Select the Agent to bind.
- Paste the bot token from the Discord Developer Portal.
- Choose connect. After the token is verified, the Discord authorization page opens.
- 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
- Open Integrations and go to the Task assistant group on the Discord page.
- Find a Space you joined and choose Bind Discord.
- Choose the Runtime that runs the task assistant for that Space.
- 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
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.