agent/service.run_turn runtime as in-app Ask, with the same organization-scoped tool registry, connected MCP servers, provider, thread store, and permission gate.
That means you can start a conversation in Slack, approve a sensitive action without leaving Slack, and find the persisted thread later in the in-app Ask history.
The app registers as a Slack Agent (the AGENT badge): it gets Slack’s split-pane chat surface with suggested prompts, a native “is thinking…” status line while a turn runs — in the pane and in channel threads — and a New chat control that starts a fresh agent conversation (assistant_thread_started resets the thread mapping).
How the bridge works
run_turn; Slack is an Events API and Interactivity adapter over that same function. Neither transport owns a second prompt, model loop, or tool list.
Approvals in Slack
When the agent reaches a permission-gated action—such as sending email, recording a decision, publishing, deleting data, or calling a mutating MCP tool—it posts an Approval needed card with Approve and Deny buttons. The turn waits for up to 300 seconds. Clicking either button resolves the same permission gate used by in-app Ask, then replaces the card with a terminal approved or denied state. If the request was already handled or expired, Slack says so and does not execute the action.Threads and identity
SpeakerWeave stores the Slack-to-agent relationship inslack_agent_threads:
Channel messages are attributed with the sender’s Slack display name when
users.info is available. Agent threads use slack:<user_id> as their user identity, remain organization-scoped, and appear in the in-app Ask thread history.
Set up the Slack app
The manifest does almost all of the configuration. For a self-hosted deployment, first replace bothhttps://speakerweave.com request URLs in the manifest with your public web origin.
- In Slack, choose Create New App → From an app manifest and paste
api/slack_manifest.json(or copy the manifest from Settings → Integrations in the app). The manifest configures:- Bot token scopes:
app_mentions:read,assistant:write,chat:write,im:history,im:read,im:write,users:read - Bot events on
/api/slack/events:app_mention,assistant_thread_started,message.im - Interactivity on that same URL (this is what delivers Approve/Deny clicks)
- The agent view (AGENT badge + split-pane surface) with a description and suggested prompts
- An unlocked messages tab, so the pane composer accepts messages
- Socket Mode off — SpeakerWeave receives signed HTTPS events only
- Bot token scopes:
- Install the app to the workspace and copy the Bot User OAuth Token (
xoxb-…) from OAuth & Permissions and the Signing Secret from Basic Information. - Optional but recommended: upload the app icon from
assets/slack-app-icon-1024.pngunder Basic Information → Display Information. - Invite the bot to any channels where it should answer mentions (
/invite @SpeakerWeave). DMs and the agent pane need no invite. - Configure the API environment (next section) and send the bot a DM.
If you change scopes or events later, Slack requires a reinstall before the new configuration takes effect; the token value survives reinstalls.
Configure the API environment
You can verify the detected provider and key state under Settings → Integrations → Slack bot.
Troubleshooting
Deployment boundary
The reference configuration intentionally binds one deployment to one Slack workspace and oneSLACK_DEFAULT_ORG; there is no Slack OAuth installation flow. Before serving multiple workspaces from one deployment, add a workspace-to-organization installation table and resolve the organization from the verified Slack workspace instead of a global environment value.
