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.
Prerequisites
- A Managed Deep Agents project with a root identity declaration (
channels/requires identity). - Slack connected for your LangSmith workspace (Settings → Integrations).
mda deployprovisions the channel’s Slack app through that connection. MDA_TRIGGER_SERVER_URLset to the trigger server origin so deploy can reach the provisioning API.
Add a Slack channel
Addchannels/slack.py or channels/slack.ts next to your agent entry. The file name becomes the channel name (slack → POST /channels/slack/events). Export a named channel created with channels.slack:
How Slack Events work
- Slack POSTs to
https://<agent-server>/channels/slack/events(the file stemslackbecomes the path segment). - The runtime verifies the Slack signing secret against the raw body and returns HTTP 200 within Slack’s ack window.
- In the background it invokes the graph over trusted loopback, stamping user and source-thread identity (
source.provider: "slack"). - When
autoReplyis enabled, it posts the agent response back with the Slack Web API (and can set assistant loading status while the run is in progress).
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:
- Creates the app (branded with your
appconfig, or the deployment name), installs it into the connected workspace, and reinstalls it when scopes change. - Points its Events Request URL at
https://<agent-server>/channels/slack/eventsand subscribes it to the bot events yourontriggers need. - Writes the bot token, signing secret, app id, team id, and bot user id onto the deployment as secrets.
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 deploywarns 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
- Connect Slack for your LangSmith workspace (Settings → Integrations) and ensure identity is declared.
- Run
mda deploy. On the first deploy the CLI warns that the Slack app was skipped—the deployment had no public URL yet. - Run
mda deployagain. Deploy creates and installs the app, points its Events URL at the deployment, and subscribes it to your triggers’ bot events. - In Slack, invite the bot to a channel and
@mentionit (or DM it ifdirect_messageis enabled). - Confirm the bot shows a loading status (when supported) and posts a reply when
autoReplyistrue.
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.
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.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

