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
- The
SlackReader
uses the token to find channel IDs from the provided names. - Messages from the channels are fetched and formatted as documents.
- A
VectorStoreIndex
is built from these messages. - 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:
- Add channels:
["support-inbox", "customer-feedback"]
- Use a token with full read permissions.
- Name your tool
"Support Trend Analyzer"
and give a relevant description. -
Ask the agent:
-
βWhat were the most reported issues this week?β
- βAny urgent bug patterns from support?β