channels/, point the Slack app Events Request URL at your deployment, and 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). - A Slack app you can install into a workspace.
- Deploy or local Agent Server URL for Event Subscriptions (after first deploy, copy it from the LangSmith deployment dashboard).
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 define_slack_channel / defineSlackChannel.
validated_token ingress and Connect-with-Slack instead of a bare shared-bot install.
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 actor 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
mda derives required OAuth scopes from the on list at compile time. After you change scopes in the Slack app, reinstall the app to the workspace so the new scopes apply.
Required secrets
Put these in the project.env (or LangSmith workspace secrets) before mda deploy. Deploy preflights the Slack pair when channels/ is present.
Optional install pins for tests or multi-install hardening:
SLACK_API_APP_ID, SLACK_TEAM_ID, SLACK_BOT_USER_ID.
Configure the Slack app
Create or open a Slack app at api.slack.com/apps, then wire Event Subscriptions and OAuth to your Agent Server.1. Create the app and install it
- Create an app from scratch in the workspace you will use for testing.
- Under OAuth & Permissions, add the bot token scopes that match your
ontriggers (at minimumchat:writeplus the history/mention scopes above). - Install the app to the workspace and copy the Bot User OAuth Token into
SLACK_BOT_TOKEN. - Under Basic Information, copy the Signing Secret into
SLACK_SIGNING_SECRET.

Slack app Basic Information → App Credentials
SLACK_SIGNING_SECRET. For Connect-with-Slack, also copy Client ID into SLACK_CLIENT_ID and Client Secret into SLACK_CLIENT_SECRET. Prefer the Signing Secret over the deprecated Verification Token.
2. Point Event Subscriptions at your deployment
Deploy the agent first (or runmda dev) so the Events URL exists, then enable Event Subscriptions:
Replace
<agent-server> with the Agent Server URL from mda deploy / the LangSmith deployment dashboard (for local dev, use your publicly reachable tunnel or equivalent—Slack must reach the URL).
Slack sends a url_verification challenge; the managed runtime responds automatically when the signing secret matches.
3. Subscribe to bot events
Under Subscribe to bot events, add every event your triggers need:app_mentionmessage.im(fordirect_message)message.channelsandmessage.groups(forthread_reply)
@mention it. Add message.groups when the bot should continue threads in private channels (not shown in the example below).

Event Subscriptions with a verified Request URL and bot event subscriptions
4. Confirm bot token scopes
Under OAuth & Permissions → Bot Token Scopes, confirm scopes match the table above. If you add scopes after the first install, reinstall the app, then re-invite the bot to channels. Addgroups:history when the bot should continue threads in private channels (not shown in the example below).

OAuth & Permissions → Bot Token Scopes
Deploy and smoke-test
- Put Slack secrets in
.envand ensure identity is declared. - Run
mda deploy(ormda devwith a reachable Events URL). - Set the Slack Request URL to
https://<agent-server>/channels/slack/eventsand verify it. - In Slack,
@mentionthe bot in a channel where it is invited (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 actor so the same person keeps one thread history across browser and Slack when scoping.threads is "actor".
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 actor and the agent runs.
- Unlinked users — The bot replies with a connect link; no agent run until they finish OAuth.
slack:T…:U…).
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:

OAuth & Permissions → Redirect URLs

Connect-with-Slack prompt for an unlinked user
Troubleshooting
Next steps
Channels
See how channel discovery and Events ingress work.
Identity
Choose shared-bot vs linked validated_token for Slack callers.
Deploy an agent
Route secrets and deploy the channel-enabled agent.
CLI reference
Look up
channels/ packaging and deploy preflight.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

