Skip to main content
The Slack channel lets workspace members talk to your Managed Deep Agent from Slack. You declare triggers under channels/, and mda deploy creates and installs the Slack app through your workspace’s Slack connection in LangSmith—there is no app to make by hand and no bot token or signing secret to copy. The runtime verifies signatures, runs the agent, and can auto-reply in the same thread or DM.
Managed Deep Agents is in private beta, available on LangSmith Cloud in the US region only. Join the waitlist to request access.
For the channel model and current limits, see Channels.

Prerequisites

  • A Managed Deep Agents project with a root identity declaration (channels/ requires identity).
  • Slack connected for your LangSmith workspace (Settings → Integrations). mda deploy provisions the channel’s Slack app through that connection.
  • MDA_TRIGGER_SERVER_URL set to the trigger server origin so deploy can reach the provisioning API.

Add a Slack channel

Add channels/slack.py or channels/slack.ts next to your agent entry. The file name becomes the channel name (slackPOST /channels/slack/events). Export a named channel created with channels.slack:
Pair this with an identity declaration that matches your product:
For browser + Slack account linking (same user across web and Slack), use validated-token auth with user-owned threads and Connect-with-Slack instead of a bare shared bot install.

How Slack Events work

  1. Slack POSTs to https://<agent-server>/channels/slack/events (the file stem slack becomes the path segment).
  2. The runtime verifies the Slack signing secret against the raw body and returns HTTP 200 within Slack’s ack window.
  3. In the background it invokes the graph over trusted loopback, stamping user and source-thread identity (source.provider: "slack").
  4. When autoReply is enabled, it posts the agent response back with the Slack Web API (and can set assistant loading status while the run is in progress).
LangGraph auth is bypassed only on POST /channels/{name}/events so Slack can deliver without an ingress secret; the loopback invoke still uses MDA_INGRESS_SECRET.

Channel options

Triggers and Slack bot events

The app’s event subscriptions follow your on list: thread_reply is what asks for the channel message events it needs. mda deploy pushes the subscriptions (and OAuth scopes) to the app on every deploy, so changing on and redeploying is the whole update—there is no reinstall step.

The Slack app

A Slack channel needs a Slack app, but the app is not something your project supplies. mda deploy creates and installs one through the Slack connection your workspace configured in LangSmith:
  1. Creates the app (branded with your app config, or the deployment name), installs it into the connected workspace, and reinstalls it when scopes change.
  2. Points its Events Request URL at https://<agent-server>/channels/slack/events and subscribes it to the bot events your on triggers need.
  3. Writes the bot token, signing secret, app id, team id, and bot user id onto the deployment as secrets.
Those keys—SLACK_BOT_TOKEN, SLACK_SIGNING_SECRET, SLACK_API_APP_ID, SLACK_TEAM_ID, SLACK_BOT_USER_ID—are deploy-owned. Deploy writes and overwrites them, and a value left in .env no longer shadows the real connection, so there is nothing Slack-specific to author before the first deploy. Two limits follow from how Slack apps work:
  • One Slack app per deployment, so a project may declare at most one Slack channel.
  • Slack needs a public Events URL, which a first deploy only learns at the end: the first mda deploy warns and skips the app, and the next deploy connects it. Re-running deploy on an existing deployment connects or updates the same app instead of making another.

Required secrets

SLACK_BOT_TOKEN and SLACK_SIGNING_SECRET are no longer on this list: deploy provisions them from the workspace’s Slack connection and writes them onto the deployment itself.

Deploy and smoke-test

  1. Connect Slack for your LangSmith workspace (Settings → Integrations) and ensure identity is declared.
  2. Run mda deploy. On the first deploy the CLI warns that the Slack app was skipped—the deployment had no public URL yet.
  3. Run mda deploy again. Deploy creates and installs the app, points its Events URL at the deployment, and subscribes it to your triggers’ bot events.
  4. In Slack, invite the bot to a channel and @mention it (or DM it if direct_message is enabled).
  5. Confirm the bot shows a loading status (when supported) and posts a reply when autoReply is true.
Test the project locally with mda dev, then deploy it with mda deploy. Open deployment traces in LangSmith to inspect model calls, tool calls, errors, and latency.

Optional: Connect-with-Slack

Connect-with-Slack maps a Slack user (slack:T…:U…) to a web/guest user so the same person keeps one thread history across browser and Slack when scope.threads is "user". The OAuth routes mount automatically when a Slack channel is declared on a user-scoped deployment—you do not list the provider in identity. When OIDC is configured (SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, MDA_PUBLIC_APP_URL, and a signing key such as MDA_GUEST_SIGNING_KEY):
  • Linked users — Events remap to the web user and the agent runs.
  • Unlinked users — The bot replies with a connect link; no agent run until they finish OAuth.
Shared-bot projects without OIDC keep Slack users as-is (slack:T…:U…). The client id and secret come from the Slack app deploy created: open the app in your Slack workspace settings and copy them into .env (or LangSmith workspace secrets).

Slack OAuth redirect URLs

On LangGraph Host, set MDA_PUBLIC_API_URL to the public Agent Server URL so Slack’s redirect_uri is not an internal loopback. mda deploy can inject MDA_PUBLIC_API_URL when the deployment already has a runtime URL; set it in .env after the first deploy if needed. Deploy also derives CORS_ALLOW_ORIGINS from MDA_PUBLIC_APP_URL (add more hosts with MDA_CORS_ORIGINS or an explicit CORS_ALLOW_ORIGINS). Managed connect routes on the Agent Server:

Troubleshooting

Next steps

Channels

See how channel discovery and Events ingress work.

Identity

Choose a shared bot vs linked validated-token auth for Slack callers.

Deploy an agent

Route secrets and deploy the channel-enabled agent.

CLI reference

Look up channels/ packaging and deploy behavior.