Skip to main content
The Slack connector lets workspace members talk to your Managed Deep Agent from Slack. You declare triggers under connectors/, and mda deploy provisions the Slack app for you: 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.
Unlike the manual Slack app setup used before, mda deploy creates and installs the Slack app through the workspace’s Slack connection in LangSmith, points its Events Request URL at /connectors/slack/events, and writes the bot token and signing secret onto the deployment. You do not create an app or put SLACK_BOT_TOKEN / SLACK_SIGNING_SECRET in .env.

Prerequisites

  • A Managed Deep Agents project with a root identity declaration (Slack events require identity).
  • A Slack connection in LangSmith (Settings → Workspace → Integrations). mda deploy uses this connection to create and install the app.

Add the Slack connector

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

The app branding

app controls how the app that mda deploy creates presents itself in Slack: The connector rebuilds app at runtime only to preserve the authored config; deploy uses it when it provisions the app.

How Slack Events work

  1. Slack POSTs to https://<agent-server>/connectors/slack/events (the connector name 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 with the Slack Web API (and can set assistant loading status while the run is in progress).
LangGraph auth is bypassed only on POST /connectors/{name}/events so Slack can deliver without an ingress secret; the loopback invoke still uses MDA_INGRESS_SECRET.

Connector options

Triggers and Slack bot events

mda derives the required OAuth scopes and event subscriptions from the on list at compile time, and mda deploy pushes them to the provisioned app. When you change on, redeploy so the subscriptions and scopes update. Invite the bot to each channel where you will @mention it.

Required secrets

The bot itself needs no Slack secrets in .env: mda deploy writes the bot token and signing secret onto the deployment when it provisions the app. Set these only for the features you use:

Deploy and smoke-test

  1. Connect Slack in LangSmith (Settings → Workspace → Integrations) and ensure identity is declared.
  2. Run mda deploy. Deploy creates and installs the Slack app, sets its Events Request URL to https://<agent-server>/connectors/slack/events, and writes the bot token and signing secret onto the deployment.
  3. In Slack, @mention the bot in a channel where it is invited (or DM it if direct_message is enabled).
  4. 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 or guest user so the same person keeps one thread history across browser and Slack when threads are user-owned. 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.
Deployments without OIDC keep Slack users as-is (slack:T…:U…). Set the Sign in with Slack redirect URL to https://<agent-server>/identity/slack/callback. 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 injects 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).

Troubleshooting

Next steps

Connectors

Compare connector types.

GitHub connector

Prepare sandboxes, load tools, and receive GitHub App webhooks.

Identity

Scope Slack callers and link accounts with Connect-with-Slack.

Deploy an agent

Deploy the connector-enabled agent.