#9954: feat(slack): add Agents & AI Apps (assistant) support
docs
channel: slack
stale
Cluster:
Slack Integration Enhancements
## Summary
Adds support for Slack's "Agents & AI Apps" feature, enabling the full assistant experience when the toggle is enabled in Slack app settings.
## What this does
When a Slack app has "Agents & AI Apps" enabled, Slack fires special assistant events and provides a split-view side panel for AI conversations. This PR handles those events:
### New: `assistant_thread_started` handler
- Fired when a user opens the AI assistant panel or starts a new thread
- Sets configurable suggested prompts ("How can I help?", "Summarize channel", etc.)
- Stores thread context (which channel the user is viewing) for channel-aware responses
### New: `assistant_thread_context_changed` handler
- Fired when a user switches channels while the assistant panel is open
- Updates stored thread context
### New: Auto thread titles
- After the first reply in an assistant thread, automatically sets the thread title (truncated user message)
- Shown in Slack's History tab for easy conversation navigation
### New: Thread context store
- In-memory store tracking assistant thread context (channel, team, enterprise)
- TTL-based cleanup (24h expiry) to prevent memory growth
## Backward compatible
All listeners are registered but only fire when "Agents & AI Apps" is enabled in the Slack app settings. **Zero impact when the toggle is OFF.**
## Files changed
| File | Change |
|------|--------|
| `src/slack/monitor/events/assistant.ts` | New — assistant event handlers |
| `src/slack/monitor/assistant-context.ts` | New — thread context store |
| `src/slack/monitor/events.ts` | Register assistant events |
| `src/slack/monitor/message-handler/dispatch.ts` | Auto-title assistant threads |
| `docs/channels/slack.md` | Add `assistant:write` scope + events to manifest |
## Slack setup required
1. Enable "Agents & AI Apps" in Slack app settings
2. Add `assistant:write` to bot scopes
3. Subscribe to `assistant_thread_started` and `assistant_thread_context_changed` events
## Future work (not in this PR)
- Text streaming (`chat.startStream` / `appendStream` / `stopStream`)
- Configurable suggested prompts via `channels.slack.assistant` config
- Context-aware prompts (different prompts per channel)
- Feedback buttons on responses
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds support for Slack “Agents & AI Apps” assistant events by registering new event listeners (`assistant_thread_started`, `assistant_thread_context_changed`), maintaining an in-memory per-assistant-thread context store (TTL-based), and auto-setting thread titles after the first response. It wires the new assistant event registration into the existing Slack monitor event registration, and updates Slack setup docs/manifest to include the required `assistant:write` scope and assistant events.
<h3>Confidence Score: 4/5</h3>
- This PR is likely safe to merge, but has a couple logic issues that will cause incorrect behavior in Slack assistant threads.
- The changes are scoped to new Slack assistant events and a small dispatch hook; however, thread titling uses the wrong timestamp for new threads and context expiration cleanup may not run without writes, which can lead to unbounded memory growth over long uptimes.
- src/slack/monitor/message-handler/dispatch.ts, src/slack/monitor/assistant-context.ts
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#9985: feat(slack): add channel-aware context for AI Assistant threads
by natedenh · 2026-02-05
90.3%
#9671: feat(slack): add AI Assistant loading states support
by natedenh · 2026-02-05
89.2%
#2917: Slack: fix thread context + prevent reply spillover
by SocialNerd42069 · 2026-01-27
78.1%
#23268: feat(slack): Add App Home tab support
by slurpyone · 2026-02-22
76.9%
#15879: Support for forwarded messages and file_shared messages in slack
by olyashok · 2026-02-14
76.4%
#21147: feat(slack): support chat:write.customize for custom bot name/avatar
by bernardclaw · 2026-02-19
76.4%
#19816: feat(slack): add typingReaction config for DM typing indicator fall...
by dalefrieswthat · 2026-02-18
75.9%
#7404: feat(slack): add Socket Mode bot + auto-join + bridge scaffolding; ad…
by zprager · 2026-02-02
75.6%
#11491: feat(slack): allow agents to resolve channel IDs to names and list ...
by Lukavyi · 2026-02-07
75.5%
#13486: fix: allow Slack HTTP mode without app token
by SepehrShapouri · 2026-02-10
75.4%