Skip to content

Memory System

The memory system enables persistent, contextual conversations by storing and retrieving relevant information about your interactions. Unlike traditional chat applications that forget everything between sessions, Iris builds a growing understanding of you over time.

Two Layers of Context

Iris uses two complementary systems for remembering what matters:

  1. Truths - Stable, core facts that are relevant across conversations. Your name, key relationships, and fundamental preferences. Truths are earned through behavioral evidence - memories that consistently prove useful get promoted automatically.

  2. Memories - Contextual information retrieved based on what you're currently discussing. Memories about cooking surface when you're planning dinner, not when you're debugging code.

This separation ensures Iris always knows the essentials while keeping context focused on what's relevant to the current conversation.

Memory Retrieval

When you start a conversation, Iris retrieves relevant context through semantic search:

  1. Query Generation: An LLM analyzes recent conversation turns and generates search queries
  2. Vector Search: Queries are embedded and compared against memory embeddings using cosine similarity
  3. Ranking: Results are scored and ranked by the composite scoring formula
  4. Filtering: Only memories above the similarity threshold (default: 0.38) are included

This means if you're discussing a recipe, memories about cooking surface. Discussing a work project brings up professional context.

Memory Types

TypeDescription
factObjective information about the user
preferenceLikes, dislikes, and preferences
goalThings the user wants to achieve
eventPast or upcoming events
skillCapabilities and expertise
relationshipPeople and relationships
habitRegular behaviors and routines
contextSituational information

Scoring

Memories are ranked by a composite score that balances multiple factors:

score = (semantic × 0.60) + (recency × 0.25) + (frequency × 0.15)

Score Components

ComponentWeightWhat it measures
Semantic similarity60%How closely the memory relates to the current conversation, measured by cosine similarity between embeddings
Recency25%How recently the memory was created or accessed, decaying linearly over 90 days
Frequency15%How often the memory has been retrieved, indicating ongoing relevance

Type Bonuses

Certain memory types receive score bonuses because they tend to be more relevant:

  • Relationships: +0.10 (people you know are often contextually important)
  • Preferences and goals: +0.05 (these shape how Iris should respond)
  • Recent events: +0.10 (upcoming or recent events are likely relevant)

Example Scoring

Consider a memory: "Prefers morning meetings before 10am" created 30 days ago, accessed 5 times.

If you ask "When should we schedule our call?":

  • Semantic similarity might be 0.85 (highly relevant)
  • Recency: ~0.67 (30/90 days decay)
  • Frequency: ~0.50 (normalized)

Raw score: (0.85 × 0.60) + (0.67 × 0.25) + (0.50 × 0.15) = 0.75

With the preference bonus (+0.05): 0.80

Configuration

SettingDefaultDescription
memory.max_results7Maximum memories to include from semantic search
memory.similarity_threshold0.38Minimum similarity score to include a memory

TIP

If memories seem stale or irrelevant, adjust the scoring weights in config. Increase recency to prioritize recent memories, or semantic to prioritize relevance.

How Memories Are Created

  1. Automatic Extraction - Background job analyzes conversations and extracts memorable facts
  2. Consolidation - Similar memories are merged nightly, with generation tracking to enable organic memory evolution
  3. Promotion to Truths - Frequently accessed memories can be promoted to Truths through distillation
  4. Manual Tools - Iris can store, update, or delete memories directly during conversation

Viewing Memories

The Memories page in the UI shows all your memories with filtering and search. Consolidated memories display their generation level (e.g., "Merged Gen 2") to show how many times they've been consolidated. The Insights page includes consolidation statistics in the Memory Insights panel.

Troubleshooting Memory Retrieval

Memories not surfacing

If relevant memories aren't appearing in conversations:

  1. Check the similarity threshold - The default (0.38) is fairly permissive. If memories still aren't surfacing, the search queries may not match well. Try rephrasing your question to use similar language to how the memory is stored.

  2. Verify memories exist - Check the Memories page to confirm the information was actually stored.

  3. Check if it should be a Truth - If a memory is important enough to surface in most conversations, it might be better suited as a Truth. Create it manually or wait for distillation to promote it.

Too many irrelevant memories

If Iris seems to include memories that aren't helpful:

  1. Raise the similarity threshold - Increase memory.similarity_threshold in config to be more selective.

  2. Reduce max results - Lower memory.max_results to include fewer total memories.

Stale memories dominating

If old memories keep appearing over newer, more relevant ones:

  1. Increase recency weight - The default recency weight (0.15) is relatively low. Increasing it prioritizes recent memories.

  2. Let consolidation run - Consolidation merges similar memories, which can help surface the most current version of information.

  3. Update outdated memories - Use the update_memory tool to correct information rather than creating new memories.