Skip to main content
With LangSmith Fleet, you can add an agent to your Slack workspace so your team can work with it directly in Slack. After you add an agent to Slack, it can:
  • Receive messages from Slack and start a run with the message content.
  • Reply in your Slack workspace after processing a message.
  • Read thread messages and conversation history for context.
  • Read file attachments included in Slack messages.
Fleet maps each agent to a single Slack app, so users experience the Slack bot as your agent deployed in Slack rather than a separate service that relays messages.
Disclaimer:AI-generated content: All responses from agents in Slack are generated by AI and may contain errors or inaccuracies. Always verify important information.
The Slack integration with Fleet does not have any direct pricing. However, agent runs and traces are billed through the LangSmith platform according to your organization’s plan.For current pricing information, see the LangSmith pricing page.

Add your agent to Slack

After you authenticate with Slack once, you can add any agent to Slack in one click. Fleet creates a Slack app for the agent and configures it with the agent’s name, description, and icon.
One-click Slack setup is available on LangSmith Cloud. On Self-hosted, create and link a custom Slack app manually instead. See Connect a custom Slack app (Self-hosted).

Prerequisites

  • An existing agent in Fleet (see Quickstart to create one).
  • A Slack workspace where you can install apps.

Connect Slack

1

Open the Channels drawer

Open your agent, then in the sidebar expand the Channels drawer.
2

Connect Slack

  1. Click Connect your first channel, then select Slack.
  2. The first time you connect, authenticate with Slack and authorize Fleet. After that, adding an agent to Slack takes one click.
3

Confirm the Slack app

Fleet creates a Slack app named after your agent and links it to the agent. Each agent maps to one Slack app, and each Slack app links to one agent.
When your agent is first added to a Slack workspace, it sends you a direct message with tips for inviting it to channels and mentioning it.

Invite the agent to a channel

  1. In Slack, go to the channel where you want to use the agent.
  2. Type /invite @YourAgentName to invite it.
  3. Mention the agent with @YourAgentName to start a run. The agent replies in a thread.

Approve or deny actions in Slack

When an agent pauses on a tool that requires approval, it raises the request directly in Slack. The message names the tool and the action, with Approve and Deny buttons, so you can respond without leaving Slack. For more information on approvals, see Human-in-the-loop.

Error messages in Slack

If an agent encounters an error during a run, it replies in the Slack thread instead of going silent. For some error types, such as authentication errors, the reply includes more detail so you can resolve the issue.

Add Slack tools

Slack tools let your agent send messages, reply in threads, read history, and send direct messages. They work regardless of how the agent was triggered, whether through Slack, the Fleet UI, a schedule, or a webhook. For example, you could start a long-running research task in the Fleet chat UI and instruct the agent to send you a Slack message when it is done. To add Slack tools:
  1. Open your agent, then in the sidebar expand the Connections drawer.
  2. Click Add connection and add Slack if it is not already connected.
  3. Add the Slack tools you need:
    • Send Channel Message: Post a message to a channel.
    • Reply to Message: Reply in a thread.
    • Write Private Message: Send a direct message.
    • Read Channel History: Read recent channel messages.
    • Read Thread Messages: Read replies in a thread.
  4. If prompted, authorize the Slack connection.
You can also ask your agent to add these tools itself. In the agent chat, try: “Add the Slack tools so you can respond to messages.”
Set each tool to Auto to run it without approval, or Ask to require approval before it runs. For more information, see Human-in-the-loop.

Connect a custom Slack app (Self-hosted)

On Self-hosted, one-click Slack setup is not available. Instead, create and link a custom Slack app manually from the Integrations page by copying your Slack app credentials into Fleet.

Create the Slack app

1

Create a new Slack app

  1. Navigate to the Integrations page in Fleet and go to the Apps section.
  2. Click Add Slack App.
  3. Enter a name for the bot.
  4. Click Create Slack App. You will be redirected to the Slack API site with a popup asking you to pick a workspace.
Do not create a separate Slack app outside of this flow. The app must be created through this popup.
2

Select your workspace

  1. Choose the workspace where you want to install the bot.
  2. Click Next.
  3. Click Create Bot.
3

Enter your app credentials

After creating the bot, you will receive your app credentials. Enter the following credentials in Fleet:
  • App ID
  • Client ID
  • Client secret
  • Signing secret
Copy the full client secret and signing secret carefully to ensure a successful connection.
4

Connect OAuth

  1. Click Connect OAuth.
  2. Click Allow to give Fleet access to your app.
5

Finish setup

Link your Slack bot to an existing agent, or click Finish to link later.
You can link a custom Slack app to an agent from the Integrations page or from the agent sidebar. Each agent can only have one Slack app, and each Slack app can only be linked to one agent.
  1. Navigate to the Slack Apps section on the Integrations page in Fleet.
  2. Select the app you want to link.
  3. From the dropdown menu, choose the agent you want to link to.
  4. Verify that <Agent Name> appears next to the app name.

Troubleshooting

Agent does not respond

If your agent is not responding, you can try the following:
  • Check the thread in the Fleet UI for errors.
  • Verify the agent was invited to the channel.
  • Try deleting the Slack app in the Channels drawer, then going through setup again.

Not allowed to tag the bot

If you receive a private message saying you are not allowed to tag the bot, your Slack ID is not authorized for that agent. The agent’s owner needs to share the agent with you, either by sharing run access with the whole workspace or with you individually.

Next steps

Add more tools

Connect additional services to your agent

Add more channels

Set up email, schedule, or webhook channels

Use templates

Start from a prebuilt agent template