Slack Assistant
Add native Slack assistant threads, suggested prompts, titles, and bounded status updates to the Slack channel.
slackAssistant() returns a channel and a capability. Use both so thread events and runtime lifecycle stay connected.
import { slackAssistant } from '@noir-agent/agent/channels/slack-assistant'
const assistant = slackAssistant({
prompts: [
{ title: 'Analyze data', message: 'Analyze the latest product changes.' },
{ title: 'Draft a post', message: 'Draft a blog post from this thread.' },
],
status: {
debounceMs: 800,
refreshMs: 30_000,
minVisibleMs: 1_200,
},
})
export default noir({
// ...
channels: { slack: assistant.channel },
plugins: [assistant.capability],
})The bundle reacts to Slack assistant thread started and context-changed events. It can set suggested prompts, derive a bounded title from the first message, and translate model/tool lifecycle into native thread status.
Status behavior
Updates are debounced to avoid flashing, refreshed so Slack does not expire them during long runs, kept visible for a minimum duration, and cleared with a timeout. Unsupported Slack Assistant methods are temporarily disabled per installation instead of breaking ordinary message delivery.
Limits
Use at most four suggested prompts. Prompt titles are capped at 75 characters and messages at 2,000 characters. Thread titles are clipped to 50 characters. These limits are normalized before Slack calls.
Required Slack setup
Enable the Agents & AI Apps features for the Slack app, subscribe to the assistant thread events Slack exposes, and add the corresponding scopes. Keep app_mention or message subscriptions for ordinary channel use. The same signing secret and bot token are used by the bundled channel.
Slack Assistant is an enhancement, not a separate runtime. If the installation does not support the API, normal Slack messages should continue to work.