Memories inject user facts (preferences, projects, style) into the system prompt.

  • Workspace memories: Applied to chats in a single workspace. Limit: 20 per workspace.
  • Global memories: Applied to all workspaces. Limit: 5 total.
  • Access: Tied to user accounts. In multi-user mode, memories are private to each user.

Enabling Personalization

  1. Open any workspace chat.
  2. Click the settings icon (top right).
  3. Select Memories from the menu.
  4. Toggle Enable Personalization ON (Admin access required to toggle on/off; non-admins can manage their own memories once enabled).

Manual Management

Manage via the Memories sidebar:

  • Add: Click + in the tab header. Input a single-sentence fact.
  • Edit/Delete: Click the three-dot menu on the memory card.
  • Move: Use the three-dot menu to select Move to global or Move to workspace.

Automatic Memory Extraction

Uses the configured workspace chat model (requires tool-calling support) to extract facts from recent chats.

Activation Requirements

Runs only when:

  • Both Personalization and Automatic Memory Extraction toggles are ON.
  • Workspace has at least 5 unprocessed chats.
  • Workspace has been idle for the duration of MEMORY_IDLE_THRESHOLD_MS.

Pipeline

  1. Observer: Identifies up to 3 candidate facts per run with confidence ratings.
  2. Reflector: Compares candidates against existing memories to classify scope (global vs. workspace), deduplicate, consolidate updates, and filter low-confidence items.

Chat Execution

When Personalization is active, AnythingLLM appends the following to the system prompt:

  • All global memories (max 5).
  • Top 5 workspace memories (selected by relevance to current chat history; falls back to the 5 most recent if relevance scoring fails).

Note: Memory content is sent to the LLM provider. Do not store credentials or sensitive data.


Environment Configuration

Define these variables in the instance .env file:

VariableDefaultDescription
MEMORY_EXTRACTION_INTERVAL3hrBackground extraction job run frequency.
MEMORY_IDLE_THRESHOLD_MS1200000Minimum idle time (ms) required before processing a workspace (Default: 20 mins).

System Limits

ParameterLimit
Global memories5 per user
Workspace memories20 per workspace, per user
Injected memories per chatAll global + top 5 workspace
Candidates per extraction3 per run, per workspace