Integrate Slack with an agent

no
Summary: Connect LangSmith Fleet to your Slack workspace to let your agents communicate with users in Slack.

Original Documentation

Documentation Index#

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt Use this file to discover all available pages before exploring further.

Connect LangSmith Fleet to your Slack workspace to let your agents communicate with users in Slack.

With LangSmith Fleet, you can securely connect your agents to your Slack workspace to let your agents communicate with users in Slack.

After integrating, your agents will be able to:

  • Receive messages directly from your Slack bot, starting a new run with the message content.
  • Communicate back to your Slack workspace after processing the message.
  • Obtain relevant context from Slack by reading thread messages and conversation history.

LangSmith Fleet offers two ways to connect an agent to Slack: a custom Slack bot (recommended) and the default Slack bot.

Custom vs. default bot#

Custom Slack botDefault Slack bot
Slack appYour own app, created through LangSmithLangSmith’s Slack account
TriggerTag the bot directly with @Bot_NameEvery message in the channel
DMs
Best forDirect back-and-forth communication from Slack.Starting a run every time a message is sent in a specific channel

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.

Set up a custom Slack bot#

A custom Slack bot gives you full bidirectional communication between your agent and Slack.

Prerequisites#

  • An existing agent in Fleet (see Quickstart to create one)
  • Admin access to a Slack workspace or permission to install apps

Create the 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.

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

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.

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

Link your Slack bot to an existing agent, or click Finish to link later.

You can link a Slack bot to an agent from the integrations page or from the agent editor. 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 bot 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 bot name.

  1. Select your agent from My Agents in the left-hand navigation.

  2. Click Edit Agent.

  3. Scroll to the Channels section.

    You may need to set the agent identity first. Click Set Identity in the top right corner.

  4. Click Slack.

  5. From the dropdown menu, select the Slack app you want to link.

Invite the bot to your channel#

  1. In Slack, go to the channel where you want to use the bot.
  2. Type /invite @YourSlackBotName to invite the bot.
  3. Send a message mentioning the bot to verify it responds.

Configure agent behavior (optional)#

Your agent needs to know how to handle incoming Slack messages. Update its instructions by prompting it directly in the agent chat:

Update your instructions to handle the Slack Trigger and Slack Tools
for bidirectional communication

Adjust the instructions based on your use case—for example, you might want the agent to only respond to certain types of questions, or to pull information from specific sources before replying.

Set up the default Slack bot#

The default Slack bot uses LangSmith’s Slack account and triggers your agent on every message posted in a connected channel. It cannot receive DMs.

  1. On the Fleet > Integrations page, authenticate with Slack.
  2. In Slack, invite the default app (@LangSmith Fleet) to a channel.
  3. Copy the channel ID.

In Fleet, select your agent and click the Edit Agent icon.

1.In the Channels section, click Slack.

  1. Navigate to LangSmith Bot and click Add Channel.
  2. Paste the channel ID and channel name.

Send any message in the channel to start a run.

Add Slack tools#

Slack tools let your agent send messages, reply in threads, and read channel history. 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’s done.

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.”

  1. In the agent editor, scroll to the Tools section.
  2. Click + Add.
  3. Search for “Slack” and add the tools you need, if not already added:
    • slack_send_channel_message—Post messages to a channel
    • slack_reply_to_message—Reply in a thread
    • slack_write_private_message—Send direct messages
    • slack_read_channel_history—Read recent messages
    • slack_read_thread_messages—Read thread replies
  4. If prompted, click Connect to authorize the Slack tools.
  5. Click Save changes.

Troubleshooting#

Agent does not respond#

If your agent is not responding, you can try the following:

  • Check the thread in Fleet for any approvals that need human input.
  • Verify the bot was invited to the channel.
  • Check the Feed tab for errors.
  • Ensure the channel is not paused in the Channels section.
  • Try reauthenticating with Slack to make sure Fleet has your most up-to-date Slack user ID stored.

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#

Connect additional services to your agent

Set up email, schedule, or webhook channels

Start from a prebuilt agent template


Edit this page on GitHub or file an issue.

Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

Link last verified June 7, 2026. View original ↗
Source: LangChain Docs
Link last verified: 2026-04-05