Before you start
- A Slack workspace you are a member of, with permission to install an app (strict workspaces may need an admin to approve).
- AG2 Space installed and signed in on your Mac (desktop.ag2.space).
Fast path: create the app from a manifest
At api.slack.com/apps click Create New App → From a manifest, pick your workspace, paste this and click Create. It sets Socket Mode, the bot scopes, the DM and @mention events and the Messages tab in one step.app manifest
Step by step
1
Create the Slack app
At api.slack.com/apps click Create New App → From scratch, name it (for example
ada-sutando), pick the workspace and click Create App.2
Enable Socket Mode and generate the App-Level Token
Sidebar → Socket Mode → Enable Socket Mode. Generate an App-Level Token with the scope
connections:write and copy the xapp- token.3
Add bot token scopes
Sidebar → OAuth & Permissions → Bot Token Scopes (leave User Token Scopes empty). Add:
im:history and chat:write are what DMs need; the files:* scopes let the agent exchange images and documents. If the agent will post into channels by name (for example delivering lead batches in the GTM use case), also add channels:read and groups:read.4
Enable Event Subscriptions
Sidebar → Event Subscriptions → Enable Events. Leave the Request URL blank (Socket Mode replaces it). Under Subscribe to bot events add
message.im and app_mention, then Save Changes.If Save Changes is greyed out, hard-refresh the page (⌘⇧R). If it still is, type any placeholder URL; Socket Mode overrides it after saving.5
Enable the Messages tab
Sidebar → App Home → Show Tabs → Messages Tab, and check Allow users to send Slash commands and messages from the messages tab. Without it the bot’s DM shows “Sending messages to this app has been turned off”.
6
Install the app
Sidebar → Install App → Install to Workspace, approve, and copy the Bot User OAuth Token (
xoxb-).7
Paste both tokens into AG2 Space
Settings → Channels: paste the
xoxb- token into Slack Bot Token and the xapp- token into Slack App-Level Token, then click Save at the bottom. Without Save the old values stay in use and the bot stays offline. Both are stored locally on your Mac.8
Check the bridge from AG2 Space
In your DM with the agent, send:It checks whether the bridge is installed, brings up what is missing, and tells you plainly whether Slack is connected.
9
Enrol yourself from Slack
DM the bot in Slack. It asks for a pairing code, which proves the person in Slack is you. Get it by asking your agent in AG2 Space (“Give me the Slack pairing code so I can paste it into Slack”), or read it from the agent terminal. Paste it into the Slack DM to enrol as the bot’s owner.Anyone else who DMs the bot afterwards is silently rejected until you add them to the allowlist. Invite the bot to channels with
/invite @yourbot and @mention it there.Troubleshooting
The bot never replies, even after a DM
The bot never replies, even after a DM
Check that Enable Events is on under Event Subscriptions. Then check for the “Workspace needs to reinstall app” banner on the OAuth page: new scopes take effect only after you reinstall.
"Sending messages to this app has been turned off"
"Sending messages to this app has been turned off"
The Messages tab is off. App Home → Show Tabs → Messages Tab → check Allow users to send Slash commands and messages from the messages tab.
"missing_scope" in the Sutando logs
"missing_scope" in the Sutando logs
The App-Level Token has the wrong scope. Basic Information → App-Level Tokens: delete it, generate a new one with
connections:write, paste the new xapp- token, Save.Replies in DM but not to channel @mentions
Replies in DM but not to channel @mentions
Check that
app_mention is subscribed, and that the bot is a member of the channel. Bots cannot auto-join private channels; use /invite from inside the channel.A teammate DMs the bot and gets no reply
A teammate DMs the bot and gets no reply
By design: the first enrolment makes one owner and later senders are dropped at the access gate. Add their Slack member ID under Settings → Channels → Slack → Allowed senders. See Access Control Model for what admitted senders may do.