Skip to main content
A Slack channel lets people invoke a managed deep agent through app mentions, direct messages, and replies in an active Slack thread. Managed Deep Agents verifies Slack events, maps each conversation to a thread, runs the agent as the resolved caller, and posts the response back to Slack. Managed Deep Agents creates and configures the resources that connect Slack to the deployed agent. Add a channel declaration to the agent project, then deploy.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.

Project structure

Add a Slack channel

A managed deep agent deployment supports one Slack channel. The channel declaration lives at channels/slack.ts. To include Slack when you create a project, pass --channel slack:
To add Slack to an existing project, run the channel initialization command from the project root:
channels/slack.ts

Configure your agent’s appearance in Slack

Edit the channel declaration to control how the agent appears in Slack.
string
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.
string
A description of what the agent does. The description can contain up to 139 characters.
string
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.
string
The background color behind the agent icon as a six-digit hexadecimal color, such as #1d4ed8.
For example, put an icon next to the channel declaration:
channels/slack.ts

Configure which messages start runs

boolean
default:"false"
Whether every new channel message can start an agent run. When false, channel messages start runs only when they mention the agent; direct messages still start runs.
boolean
default:"false"
Whether messages from other Slack bots can start agent runs.

Deploy the agent

During deployment, Managed Deep Agents provisions your agent in Slack from the channel declaration.
1

Deploy your agent

Run the deployment command from the project root:
Managed Deep Agents deploys the agent and sets up the resources it needs to appear in Slack.
2

Authorize Slack if prompted

If you haven’t authorized LangSmith before, the CLI displays an HTTPS authorization link. Open the link, select the Slack workspace, and approve the requested access.Return to the terminal and press Enter. The CLI checks the authorization again and continues provisioning. If the Slack workspace requires admin approval, complete that approval before continuing.
3

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.
If Slack is already authorized, deployment completes without an authorization prompt. After you change the agent’s name, description, icon, or background color in the Slack channel declaration, redeploy the agent to apply the changes in Slack.

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.
Managed Deep Agents stages the files on the incoming message before the run, along with files shared earlier in the same Slack thread. The agent reads an attachment status message for the paths, then opens the files with its sandbox tools. That status and the file contents are labeled as data, not instructions. Attachment is never automatic, so state in the agent’s instructions when a file belongs in the reply:
instructions.md
Files stay scoped to the Slack thread they arrived in, because every thread gets its own sandbox. A direct message and a channel thread never share attachments. Within one thread, anyone reaches the files anyone else uploaded, since transfers use the bot’s Slack access rather than the caller’s.

Review transfer limits

  • File size: 200 MiB in each direction.
  • Paths: attach_file accepts paths under /workspace only.
  • 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