Message behaviour of the Slack integration
This article explains how our AI agents interact with messages in Slack, including context awareness, message history, and data retention policies.
Message Retention
We only save Slack messages related to tool calls:
- Regular conversation messages in Slack are not stored in our systems
- Only tool call inputs and outputs are saved for reference
- This limited retention helps maintain privacy while preserving essential functionality
Context Awareness in Channels vs. Threads
When interacting with an agent in Slack, the context it has access to depends on where you tag it:
Channel Tagging
When you tag an agent directly in a channel:
- The agent does not have access to the previous messages in that channel
- It only sees the message in which it was tagged
- No channel context is provided to the agent
Thread Tagging
When you tag an agent within a thread:
- The agent does receive the full thread history
- It can see all previous messages in that specific thread
- This allows for more contextual responses based on the ongoing conversation
User Identification
Our agents handle user identification in a specific way:
- Agents do not have access to Slack usernames
- Agents do have access to user IDs
- Messages appear to the agent in this format:
<USER_ID>: message text
Tip: If you want the agent to recognize specific users by name, add their user IDs and corresponding names to the system instructions.
Agent Identification
When an agent is tagged, its own ID appears in the message it receives:
- The agent sees its own ID in the message text
- This can sometimes cause confusion about who is being addressed
Tip: Include the agent's own ID in the system instructions so it can recognize when it's being tagged.
Tool Usage
When an agent uses a tool in Slack:
- Tool usage is indicated with:
Using tool: {toolname}
- Follow-up questions in the same thread will maintain access to previous tool calls
- Both the tool inputs and outputs remain accessible to the agent within the thread context
This enables continuous conversations that reference previous tool usage without requiring users to restate information.
Best Practices
- Use threads for complex conversations that require context
- Include relevant user IDs in system instructions if name recognition is important
- Add the agent's own ID to system instructions for better self-recognition
- Keep conversations in the same thread when referencing previous tool usage
Following these guidelines will help you get the most out of your Slack agent integration while understanding its capabilities and limitations.