docs/main/end-user-guide/collaborate/agents-context-management.mdx
Mattermost Agents are designed to handle context efficiently, ensuring that only necessary information is sent to the Large Language Model (LLM) for generating accurate responses. This document outlines how Agents process and include relevant context. The company name, the server name, and the time are always passed to the LLM to ensure accurate and contextually relevant responses.
<Note>Ensure data privacy
We recommend that customers with strict privacy requirements run the LLM locally to prevent sensitive data, including personally identifiable information (PII) and message content, from being shared with an external LLM hosting vendor. This ensures data privacy while enabling Agent functionality.
</Note>When you send a direct message to an Agent bot, the context sent to the LLM includes:
Additional context in direct messages
By default, some tool use is enabled to allow for features such as integrations with JIRA, and additional context may be sent to the LLM, depending on the prompt that includes:
When you @mention Agents in a channel, the context sent to the LLM includes:
Standalone messages (@-mentions in a channel)
Threaded messages (@-mentions in a thread)
Context differences between standalone and threaded messages:
In addition to regular chat interactions, Agents provide specialized features where extra context is sent to the LLM. Each feature provides specialized context tailored to the task being performed. Below are the scenarios where extra context is sent to the LLM: