Skip to content

Share your Managed Deep Agent with your team using Slack

Read the Portuguese translation →

Author: LangChain · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: Share your Managed Deep Agent with your team using Slack · Channel: LangChain · 04:41 · Watch on YouTube

Topics: AI agents, Task and workflow automation

The video demonstrates how to connect an existing Managed Deep Agent to Slack and deploy it through LangSmith. It covers authorizing the Slack workspace, testing the agent, and monitoring its request traces in LangSmith. The presenter also shows how to customize the Slack agent’s name and appearance, and explains message-trigger settings. Triggering on every channel message can be useful in a dedicated agent channel, but may cause the agent to reply to unrelated messages.

  • Use the Slack init command to add a Slack channel to an existing Managed Deep Agent project.
  • Redeploy the agent after creating or changing its Slack channel configuration.
  • Authorize the Slack connection using the URL shown after deployment.
  • The agent sends an introductory message after it is authenticated.
  • Requests made through Slack can be viewed in the LangSmith deployment dashboard and inspected as traces in Studio.
  • Customize the Slack agent with a name, description, icon, and background color.
  • You can tag the agent in threads, add it to channels, and share it with colleagues.
  • By default, the agent must be tagged to respond; enabling “trigger on all messages” makes it respond to every new message in a channel.
  • The “allow bot triggers” option can let multiple agents tag and interact with each other.
  • Use all-message triggering in a channel where automatic responses make sense, since the agent may also respond to unrelated messages.
Start Chapter Summary
00:00 Connect and deploy the agent to Slack The presenter initializes a Slack channel for an existing Managed Deep Agent, deploys it, and authorizes the connection to a Slack workspace.
01:36 Test the agent and monitor requests A Slack request is tested, and the presenter shows how to view its deployment and trace in LangSmith.
02:37 Customize the Slack agent The presenter updates the agent’s name and icon, redeploys it, and describes sharing it in Slack.
03:39 Configure message triggers The video explains bot triggers and all-message triggering, demonstrating how the latter makes the agent respond to every message in a channel.

Your agent will be added to Slack on the next deploy. — 00:31

we can see that the request I just made has actually already shown up. — 01:36

We’ll rename this Meridian Agent. — 02:37

with this enabled, it’ll just respond to everything in a channel. — 04:10

you really want to use this in a specific channel where it makes sense. — 04:10

Managed Deep Agents, Slack, LangSmith, LangSmith Studio, LangChain, Meridian Agent

00:00 In this video, we’re gonna take a look at deploying a Managed Deep Agent to production using Slack as the main point of interaction. So I have this Managed Deep Agent, which is a research assistant agent. It’s in pretty good shape. I’ve been working on it using LangSmith Studio. And what I wanna do is distribute this to my team using Slack. So if you’re creating an agent for the first time and you know you wanna use Slack, you can initialize the Slack channel connection on creation. But in this case, I wanna add a Slack channel to an existing project So I’m gonna run the Slack init command.

00:31 And what this has done is it’s created this channels directory, and it’s added slack.py, where it’s defined Slack as a specific channel that we’ll use. Once I’ve done this you can see it’ll say, “Your agent will be added to Slack on the next deploy.” So I’ll run deploy. And this is gonna create a new deployment because I haven’t deployed before. Once you create a Slack channel, you’re always going to need to redeploy in order for that channel to activate. So let’s let this run All right, so the deployment’s finished, and if you’re doing this for the first time, you’ll see there’s this Slack authorization step that you’ll run

01:04 into once the deployment goes live. So I’ll open this authorization URL And in this case, I’m adding this to our internal Slack workspace. I’ll click Allow. This will run the connection, and once it’s completed, I can go back to my terminal and wrap things up. All right, so this has been deployed to LangSmith, and I just got a message from the agent, so let’s take a look So as soon as the agent was authenticated, it sent me this intro message, and

01:36 let’s test it out by sending it a note that it’ll need to use tool calls in order to find the answer to. While it answers the question, we’ll take a look at the dashboard here on LangSmith for this deployment, and we can see that the request I just made has actually already shown up. And if I open up this agent in Studio, then we’ll also see the thread so here’s the Slack thread that I created. Here’s the answer. So if you’re deploying this agent into Slack and you have many users that are interacting with it, it’s pretty straightforward

02:06 to monitor the traces for those. So I can see in here the complete trace for the request that happened in Slack, while of course the user, which is myself in this case, will just see the answer and the progress as the agent performs a lookup. So the last thing I wanna do is add some customization to my agent. You’ll notice that it created an icon automatically, and the name was based on the directory name. But we can customize this a bit further by changing the way our channel is defined. So I can add a name, description, icon, and a background color.

02:37 So we’ll just grab the setup code here, add that in. And in this case, I have a nice icon that I like that I wanna use, so I’ll just put that into the channels directory. There it is. And we’ll rename this Meridian Agent. It does answer customer questions, the order returns, so we’ll leave that, and I’ll update my icon location and once that’s done, I’ll redeploy and these changes will take effect All right, so the agent has finished deploying. Let’s check out the new look. It’s got a new name and a new avatar.

03:08 Cool. So that’s quick customization, but now the agent’s added to Slack, I can tag it in threads, add it to channels, share it with colleagues, which is pretty useful. The last thing I want to show is message triggers. There’s two configuration options when you’re setting up your Slack channel to determine when an agent runs. One is trigger on all messages, which by default is false. This is what we’ve been looking at already, although we’ve been DM-ing the agent rather than using it in a channel. If I flip this to true, every new message in a channel will activate the agent.

03:39 The other is allowing bot triggers, where you can allow multiple agents to interact with each other. If you flip this on, then two agents can actually tag each other and interact. Let’s take a look at trigger on all messages. I’ve added this in my channel definition. I’ve enabled trigger on all messages, but I’ve kept allow bot triggers to be false. And if I go to Slack and I send a message like, “Hey team, can we replay something on the dead letter queue?” But I don’t tag the agent directly. When I run this, the agent will actually respond.

04:10 So by default, you need to manually tag the agent in order to trigger a response. But with this enabled, it’ll just respond to everything in a channel. This can be useful if you’re working with a team and you have a dedicated agent channel, or if the agent is generic enough that you want it to answer every query that’s raised in a single channel. But you know, of course, if I say things like, “Anyone free for lunch?” then the agent will also reply to this message because it’s triggered on every message. So you really want to use this in a specific channel where it makes sense.

04:41 But it may be a useful configuration option for agents that you want to be always on. You can also leverage your agent as a human in the loop type support or you can have the agent run on a schedule and automatically send updates. There’s tons of ways you can use an agent once it’s added into Slack. So that’s a quick intro to Slack connections and Slack channels for your Managed Deep Agents.