Docs / Integrations / Discord
Connect Discord
Connect your Stand to Discord so it can DM you, post on your behalf, and join channel conversations. Takes about 5 minutes.
Before you start
- A Discord account. If you don't have one, sign up at discord.com.
- A Discord server, even if it's just for you. Discord requires that a bot and user share at least one server before they can DM each other — so even the 1-on-1 "personal assistant in DM" setup needs a tiny server you can create in 10 seconds (click the + button in your Discord sidebar → Create My Own → For me and my friends). No one else has to join.
- AG2 Space installed and signed in. If not, grab it from desktop.ag2.space.
Create the Discord application
Open the Discord Developer Portal and click the purple New Application button in the top-right.
Name it something memorable — your name, your stand's name, or whatever you'll recognize later in the Discord settings list. This is a private label only you see.
Add a bot user
In the left sidebar of your new application, click Bot.
Under Privileged Gateway Intents, toggle on:
- Server Members Intent
- Message Content Intent
These let your bot read your messages and know who's in your server. Click Save Changes at the bottom.
Copy the bot token
Still on the Bot page, click Reset Token (Discord won't show you the original; resetting is the only way to see it). Confirm, then Copy the long string that appears.
Open AG2 Space → Settings → Channels → paste the token into the Discord bot token field. It's stored locally on your Mac (never logged, never sent to the cloud).
Scroll to the bottom of the Settings window and click Save. The setting only persists after you save — without this, the app keeps using whatever was in the field before, and the bot stays offline. Once saved, the field shows a green running badge.
Invite the bot to your server
Back in the developer portal, click OAuth2 in the left sidebar, then URL Generator.
In the Scopes section, check bot. A second box appears below for permissions. In the Bot Permissions section, check at minimum:
- Read Messages / View Channels
- Send Messages
- Read Message History
- Attach Files
- Embed Links
Scroll to the bottom — Discord generated an invite URL. Open it in a new tab, pick the server you want the bot to join, and click Authorize.
Verify the connection
Open your Discord server. You should see your bot in the member list with a green dot. Try DMing the bot — say "hello". Within a few seconds, your agent should reply. If it does, you're done.
Troubleshooting
The bot shows offline / never replies
AG2 Space needs to be running on your Mac for the bot to respond — your agent lives inside it, and Discord forwards messages to it. If the app isn't running, launch it from Applications.
If the app IS running but the bot is still offline, the token may have been reset on Discord's side after you pasted it. Click Reset Token again in the developer portal, copy the new one, and paste it in AG2 Space Settings.
Bot replies in DM but not in server channels
The bot only replies in channels where it's been @-mentioned directly. This is by design — without it, a bot in a busy channel would respond to every message. To talk to your agent in a channel, @mention it by its name followed by your message.
"Privileged Intents required" error in Sutando logs
You skipped step 2. Go back to the developer portal → Bot → enable Server Members and Message Content intents, save, then restart AG2 Space.
Stuck? Ask in the Sutando Discord
Join the Sutando community Discord to ask questions, share what you've built, or get unstuck.