Docs / Integrations / Slack
Connect Slack
Connect your Stand to your Slack workspace so it can DM you, reply to @-mentions in channels, and exchange files. Plan on about 15 minutes — Slack's app config has more toggles than Discord's, but every step is in here.
Before you start
- A Slack workspace you're a member of. Personal workspaces work — Slack is free for small teams (or solo).
- Permission to install an app in that workspace. Workspaces with strict admin policies may require an admin to approve.
- AG2 Space installed and signed in. If not, grab it from desktop.ag2.space.
⚡ Fast path — create from a manifest
Rather than setting scopes, events and the messages tab by hand, let a manifest do it in one shot. At api.slack.com/apps click Create New App → From a manifest, pick your workspace, paste the YAML below, and click Create. It pre-sets Socket Mode, every bot scope, the DM + @-mention events, and the messages tab.
display_information:
name: Sutando
features:
bot_user:
display_name: Sutando
always_online: true
app_home:
home_tab_enabled: false
messages_tab_enabled: true
messages_tab_read_only_enabled: false
oauth_config:
scopes:
bot:
- app_mentions:read
- channels:history
- chat:write
- files:read
- files:write
- groups:history
- im:history
- im:write
- users:read
settings:
event_subscriptions:
bot_events:
- app_mention
- message.im
socket_mode_enabled: trueThe manifest can't mint tokens, so finish with two manual bits: generate an App-Level Token with connections:write (Step 2 below — the manifest turns Socket Mode on but can't create the token), click Install to Workspace, then copy the xoxb- and xapp- tokens into AG2 Space → Settings → Channels → Slack. You can skip the scopes, events, and messages-tab steps.
Create the Slack app
Open api.slack.com/apps and click Create New App → From scratch.
Name it something memorable — your name plus a hyphen plus something like sutando works (e.g. ada-sutando). Pick the workspace you want the bot to join. Click Create App.
Enable Socket Mode + generate the App-Level Token
In the left sidebar, click Socket Mode and toggle Enable Socket Mode to On. Slack will prompt you to generate an App-Level Token. Name it anything, and add the scope connections:write.
app_configurations:write near the top — that's NOT the one you want. Socket Mode specifically needs connections:write. If you pick the wrong one, Sutando will refuse to start with a missing scope error and you'll have to regenerate.Generate the token. You'll see a long string starting with xapp-. Copy it — this is your App-Level Token.
Add bot scopes
Left sidebar → OAuth & Permissions. Scroll down to Bot Token Scopes (not User Token Scopes — leave that section empty). Click Add an OAuth Scope and add each of these:
chat:write im:history im:write app_mentions:read channels:history groups:history files:read files:write users:read
The two that matter most for DMs are im:history (receive DMs) and chat:write (send replies). The files:* scopes let your agent exchange images and documents with you. If your agent will deliver lead batches into a channel (the GTM hand-off mode), also add channels:read and groups:read: without them the bot cannot resolve a channel by name and you will have to give it the channel ID instead.
Enable Event Subscriptions
Left sidebar → Event Subscriptions. Toggle Enable Events to On.
Leave the Request URL field blank. With Socket Mode enabled, Slack delivers events over the WebSocket; you don't need a public webhook.
Scroll to Subscribe to bot events, click Add Bot User Event, and add message.im and app_mention. Click Save Changes at the bottom right.
https://example.com/x) — Socket Mode overrides it after save.Enable the Messages tab
New Slack apps have DMs disabled by default. Left sidebar → App Home. Scroll to Show Tabs → Messages Tab, and check Allow users to send Slash commands and messages from the messages tab.
Without this, the bot's DM screen shows "Sending messages to this app has been turned off" and your DMs never even leave Slack.
Install the app to your workspace
Left sidebar → Install App (or OAuth & Permissions → Install to Workspace at the top of the page). Click Install to Workspace and approve the permissions prompt.
After install, Slack shows your Bot User OAuth Token starting with xoxb-. Copy it.
xoxb- and xapp- tokens together give full access to your bot. Don't paste them into screenshots, chats, or commits.Paste both tokens into AG2 Space
Open AG2 Space → Settings → Channels. Paste:
- Slack Bot Token ← the
xoxb-token from step 6. - Slack App-Level Token ← the
xapp-token from step 2.
Both are 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 fields before, and the bot stays offline.
Check the bridge from AG2 Space
Before you go anywhere near Slack, get your agent to confirm the bridge is up. Open AG2 Space, start a chat with your agent, and send it this.
Ask your agent to verify Slack
I added my Slack tokens. Please check the Slack bridge and make sure Slack is working.Let it do the work. It checks whether the bridge is even installed, brings up what is missing, and tells you plainly whether Slack is connected.
Enrol yourself from Slack
Now open Slack and find your bot — click the workspace name top-left, search with ⌘K for the bot's name, or look under Direct Messages in the sidebar.
DM it for the first time. It answers by asking for a pairing code, which proves the person in Slack is you. There are two ways to get that code:
- Ask your agent. Back in AG2 Space, send it the line below and paste what it gives you into Slack.
- Read it from the terminal. The code is printed there too — see The agent terminal.
Ask for the pairing code
Give me the Slack pairing code so I can paste it into Slack.Paste the code into the Slack DM. That enrols you as the bot's owner — anyone else who DMs it afterwards is silently rejected unless you add them to the allowlist.
From here the bot is live: DM it like you would your agent in AG2 Space, or invite it into channels with /invite @yourbot and @mention it there.
Troubleshooting
The bot never replies, even after I sent a DM
Check two things in order:
- Event Subscriptions is on. Go back to the app config page → Event Subscriptions. The Enable Events toggle at the top must be green. If it's off, the bot is connected but Slack never sends it your messages.
- Reinstall after scope changes. Any time you add a bot scope, Slack shows a yellow banner at the top of the OAuth page saying "Workspace needs to reinstall app". New scopes don't take effect until you click that reinstall button. Easy to miss.
"Sending messages to this app has been turned off"
You skipped step 5. Go to the app config → App Home → Show Tabs → Messages Tab → check Allow users to send Slash commands and messages from the messages tab. The DM input box should re-appear immediately.
"missing_scope" error in Sutando logs
The App-Level Token was generated with the wrong scope. Go back to Basic Information → App-Level Tokens, delete the existing token, and generate a new one — this time make sure the scope is connections:write (not app_configurations:write). Paste the new xapp- token into Sutando settings, save, and the bot should come online.
Bot replies in DM but not in channel @-mentions
Two checks. (1) You added app_mention under Subscribe to bot events (step 4). (2) The bot is a member of the channel — for public channels, mention it once in a thread to invite it; for private channels, use the /invite command from inside the channel. Bots can't auto-join private channels.
A teammate DMs the bot and gets no reply
By design. The first DM auto-enrolls one owner, and subsequent senders are silently dropped at the access gate. Open AG2 Space → Settings → Channels → Slack → add their Slack user ID to Allowed senders to let them through. (To find a Slack user ID: click their name in Slack, View profile, three-dot menu, Copy member ID.)
Stuck? Ask in the community room
The fastest help is the AG2 Space community support room — it has people and agents from the AG2 team in it, so an agent can dig into diagnostics with you in real time. See Get support for the other ways to reach us.