Managed Deep Agents is in beta on LangSmith Cloud and Bring Your Own Cloud (BYOC). Use Managed Deep Agents CLI and SDK v0.10 or later for BYOC.
Project structure
Add a Slack channel
A managed deep agent deployment supports one Slack channel. The channel declaration lives atchannels/slack.ts.
To include Slack when you create a project, pass --channel slack:
channels/slack.ts
Configure your agent’s appearance in Slack
Edit the channel declaration to control how the agent appears in Slack.The agent name in Slack. The name must contain 1–35 characters and can contain letters, numbers, spaces, underscores, dashes, and periods. It cannot start or end with a space or dash.
A path to the agent icon shown in Slack, relative to the
channels/ directory. The icon must be a 512 by 512 pixel PNG file no larger than 1 MB. If you omit this parameter, Managed Deep Agents will generate an icon for you.channels/slack.ts
Configure which messages start runs
Which channel messages start agent runs. Direct messages always start runs.
"mention": Only messages that mention the agent."thread": One mention, then every later reply in that thread."all": Every message in the channels the agent is in.
thread and all mode, the agent also gets messages that are not for it. If the agent answers exactly [quiet], the run posts nothing. Tell the agent in its instructions to answer [quiet] when it has nothing to add.
React to the message that starts a run
When a run picks up an inbound message, the agent reacts to it with an emoji, so the sender knows it was seen before the agent has anything to say. The reaction never blocks or delays the reply. Every message gets the same emoji by default. Pass a function to choose one per message:Pass
false to turn reactions off, a Slack emoji short name to use that emoji
instead, or a function taking { text } and returning a short name. The
function may return a promise.Choose the emoji with a decision model
A decision model scores a fixed set of options and answers with one of their keys, so the reaction reflects what the message says and there is no reply to parse. The answer is always one of the options you supplied.TypeSafeClassifier
(Python,
JavaScript) exposes this as a
Runnable, and records traces and token usage in LangSmith.
TYPESAFE_API_KEY on the deployment. To route through the LLM Gateway
instead, set TYPESAFE_BASE_URL=https://gateway.smith.langchain.com and use a
workspace-scoped LangSmith API key, with TYPESAFE_API_KEY in your workspace
provider secrets.
Show run progress
While a run works, Slack shows a working status. Apps with Slack’s agent view also show a Stop button. Select Stop to cancel the conversation’s runs. Usestatus in the channel declaration to replace the default working phrases with a status line or a plan.
Apps LangSmith manages have agent view enabled. For your own app, turn on Agents & AI Apps and add the assistant:write scope to show the Stop button.
Custom Slack status and the Stop button require Managed Deep Agents v0.10.0 or later. The
status API is experimental and may change in a minor release.status: "is on it", to show the same line for the whole run. Pass a list to show plan steps:
channels/slack.ts
title and optional status. Step status defaults to pending. The supported values are pending, in_progress, complete, and error.
Apps with Slack’s agent view show custom status as a plan above the reply. A status line becomes the plan title, and steps become tasks. Other apps show the line, or the first unfinished step, as the thread status.
To update progress from the agent’s state, pass a function instead of a fixed value. The function receives {"state": ...} at run start, before and after model calls, and every four seconds during model or tool calls. It can be synchronous or asynchronous.
Return null to keep the current status. A function that throws, exceeds one second, or returns an invalid value also leaves the status unchanged.
Hide run progress
Hiding Slack status and the Stop button requires Managed Deep Agents v0.10.3 or later.
status: false to hide both the working status and the Stop button:
channels/slack.ts
Deploy the agent
During the first deployment, choose the Slack app for the channel. Later deployments reuse the registered app.Slack app choices and the
MDA_SLACK_BOT_TOKEN and MDA_SLACK_SIGNING_SECRET environment variables require Managed Deep Agents v0.10.0 or later.1
Deploy your agent
Run the deployment command from the project root:
2
Choose a Slack app
The CLI shows the options available for your workspace. Which options appear depends on whether LangSmith can manage apps there:
- Create a new Slack app in <workspace name> (authorized workspace): LangSmith creates and manages the app. Authorize LangSmith in Slack if prompted.
- Create a new Slack app (when app management is unavailable, including self-hosted without an authorized workspace): Open the generated link to create an app from the prepared manifest. Install it to your workspace, then enter its bot token and signing secret.
- Use an existing Slack app (always available): Follow the CLI’s settings checklist, then enter the app’s bot token and signing secret. The checklist includes event and interactivity URLs, bot events, scopes, and any required app features.
xoxb-. Managed Deep Agents stores these credentials for later deployments.3
Complete Slack authorization or approval
If prompted, open the HTTPS authorization link, select the Slack workspace, and approve the requested access. Complete any required workspace admin approval or app installation.The CLI waits for these actions and continues automatically. You do not need to press Enter. It waits for up to one hour; if you stop it or it times out, complete the action and rerun
mda deploy.4
Use the agent in Slack
After the first deployment, your agent sends you a direct message in Slack. Reply to the message to start an agent run. The final response appears in the Slack conversation.
Human-in-the-loop requests in Slack support only the
approve and reject decision types.Deploy without interactive prompts
For a new channel that uses your own Slack app, set bothMDA_SLACK_BOT_TOKEN and MDA_SLACK_SIGNING_SECRET in the deployment shell or project .env. These values replace the app-choice and credential prompts. Use the installed app’s bot token and signing secret, not a user token.
These are CLI-only variables. The CLI passes the credentials to LangSmith for storage rather than including them in the deployed agent’s environment. Keep them in your CI secret store or an uncommitted .env file.
Without these variables, a new noninteractive deployment can use an app LangSmith manages only if Slack authorization is already complete. Run mda deploy interactively once to authorize it, or supply your own app credentials. On a self-hosted instance without app management, supply your own app.
Exchange files with Slack
A Slack channel moves files in both directions. Uploads land in the agent’s sandbox under/workspace/attachments/, and the agent sends a file back by calling attach_file with a path under /workspace. Declaring a Slack channel and a sandbox is the whole setup.
Slack file transfer requires
managed-deepagents>=0.8.0 and a sandbox. Without a sandbox, incoming files are not saved and attach_file is not offered to the model.instructions.md
Review transfer limits
- File size: 200 MiB in each direction.
- Paths:
attach_fileaccepts paths under/workspaceonly. - Thread history: the scan covers recent messages in the thread. When it falls short, the attachment status reports that earlier files may be missing.
- Skipped files: files stored outside Slack, and files deleted from Slack.
- Slack scopes: a transfer blocked by a missing
files:read,files:write, or history scope reports that you need to reconnect Slack.
See also
- Channels overview: understand how channels connect messaging services to an agent.
- Design agent template: deploy a full Slack design agent project.
- Paid media agent template: deploy a full Slack paid media agent project.
- Decision models: configure the model that scores reaction emoji.
- Set up the LLM Gateway: add the provider key that reactions need.
- Agent-owned interrupts: post a Slack form from a tool and resume the run on submit.
- Sandboxes: give the agent the filesystem that file transfers read and write.
- Deploy an agent: configure and deploy a managed deep agent.
- CLI reference: review Managed Deep Agents commands and flags.
Connect these docs to your agent of choice via MCP for real-time answers.

