Skip to content

Slack Agent Tool

πŸ”‘ Key Concepts

The Slack Agent Tool allows INTELLITHING agents to access, index, and query content from specified Slack channels. By leveraging conversational context from Slack, your agents can intelligently extract, rerank, and synthesize relevant information from team discussions, support threads, product feedback, and more.

It’s especially powerful when combined with Retrieval-Augmented Generation (RAG) workflows to produce insights from unstructured communication.

πŸ“˜ Key Definitions

Term Description
Slack Token A bot token used to authenticate and retrieve channel messages.
Channel Names The list of Slack channels the agent should pull messages from.
SlackReader A LlamaIndex module that fetches messages from Slack using your token.
QueryEngineTool A callable interface that enables semantic search over messages retrieved from Slack.

βš™οΈ Setup Guide: Using the Slack Agent Tool

1. Slack Bot Token

  • Generate a Slack bot token with appropriate permissions.
  • Token format typically begins with: xoxb-...
  • Required scopes include: channels:history, groups:history, chat:read, users:read

πŸ” Create Token: Go to https://api.slack.com/apps, create a new app from manifest, and generate a token under App-Level Tokens.

2. Configure Tool Parameters

Field Purpose Example
name Identifier for the tool used by the agent router "Slack Support Bot"
description Used to help the agent match queries "Answers support-related queries from Slack conversations"
channels_names List of Slack channel names to access ["support-inbox", "product-ideas"]
slack_token Secure bot token for channel access "xoxb-1234567890-abcdef"

πŸ”„ How It Works

  1. The SlackReader uses the token to find channel IDs from the provided names.
  2. Messages from the channels are fetched and formatted as documents.
  3. A VectorStoreIndex is built from these messages.
  4. The resulting QueryEngineTool allows agents to perform semantic search over the content.

This allows your agent to respond to queries like:

  • β€œWhat did the engineering team discuss yesterday?”
  • β€œAny recent feedback on the new onboarding flow?”
  • β€œSummarize product announcements from last week.”

βœ… Best Practices

  • Use Channel Scoping: Narrow your config to relevant, topic-specific channels.
  • Keep It Fresh: Regularly rotate your token if needed for security.
  • Use Descriptive Names: Help the router with informative tool names and descriptions.
  • Rerank if High Volume: If your channel is very active, consider pairing this with a reranker node.

πŸ“Œ Example Use Case

You want an agent to summarize recent support trends from Slack:

  1. Add channels: ["support-inbox", "customer-feedback"]
  2. Use a token with full read permissions.
  3. Name your tool "Support Trend Analyzer" and give a relevant description.
  4. Ask the agent:

  5. β€œWhat were the most reported issues this week?”

  6. β€œAny urgent bug patterns from support?”