Build AI agents in Slack with Trigger.dev
Build AI agents that run in Slack. Your team or your customers can ask them questions and hand them work, right where they already talk.
Example: A refund agent built with Trigger.dev
Two-way, not just webhooks in
Webhooks bring Slack events in, and the connector answers back in the same place.
Slack agents
@trigger.dev/slack- Messages and @mentions in a DM or channel thread
- Approve and Deny button clicks
- Files shared in the thread
- Each tool call as a step in a plan, ticked off as it finishes
- The reply, streamed as the model writes it
- Approval buttons, and Block Kit messages
Handled for you
Verifies Slack's signing secret, answers its URL handshake, and acknowledges each event right away. Slack's stop button stops the turn.
What your agent can do
Each thread is a durable session
A DM or a channel thread becomes a Trigger.dev session. A message runs as a turn, and follow-ups in the same thread keep the context.
Status, streaming and a plan
The session shows the agent working, the reply streams into the thread as the model writes it, and each tool call appears as a task in the reply's plan, ticked off when it returns.
Approve and Deny buttons
A tool with no execute pauses the turn and posts Approve and Deny. A click resolves the tool to { approved: boolean } and resumes it. Use approval for your own buttons.
Slack's stop button
Stop aborts the running turn: the partial reply stays in the thread and the next message carries on. A stop during an approval cancels it.
Channel threads
With startOn: appMentions(), an @mention in a channel starts a session in a thread and the agent follows the rest of it. seedFromThread loads earlier replies first.
Messages while it's working
A message sent mid-reply gets 👀 straight away, then runs as the next turn in order, or is folded into the reply in progress with pending messages.
Files
Images (PNG, JPEG, GIF, WebP) and PDFs a user shares reach the model with their message. Other files arrive as a short note so the agent can say it can't open them.
Slack Connect
In a channel shared with another organization, ownWorkspaceOnly: true answers only people from your own workspace.
Answer from anywhere
Another webhook routed to the same session, or a browser chat on it, answers into the Slack thread with the same status, streaming and buttons.
Get started
- 1
Set up the agent
Copy the starter prompt into your coding agent, like Claude Code, Cursor or Codex. It creates a Trigger.dev project and writes your Slack agent. Prefer to write it yourself? Start from the example below.
- 2
Create a Slack app
At api.slack.com/apps, create an app from a manifest, with your agent's Trigger.dev URL as its request URL.
- 3
Connect it
Copy the app's signing secret into Trigger.dev, install the app in your workspace, and give your agent its bot token.
- 4
Try it
@mention the agent in Slack. You'll see it start working within a second, and the reply streams in.
Example
A Slack support agent
One endpoint for Slack's events, and an AI agent with two tools that replies in the thread. That's the whole agent.
Related integrations
Ready to put your agent in Slack?
Declare an endpoint, run trigger dev, and paste the URL into your app's settings.

