Skip to main content

Memory Lifecycle

Memories are not static snapshots; they are part of a dynamic system where knowledge is born, accessed, evolves, and eventually fades or is replaced.

1. Creation

The lifecycle begins when a memory is extracted from a source:

  • Conversation Extraction: The Curator Worker processes transcripts to find facts and preferences.
  • Document Ingestion: The Document Intelligence Layer processes files to extract entities and insights.
  • Manual Creation: Users or tools create memories directly via the API.
  • System Generation: The system creates summaries or insights during consolidation.

2. Storage & Indexing

Once created, a memory is dual-indexed:

  • Knowledge Graph: Stored as a MemoryBlock node in JanusGraph, connected to its subject and source.
  • Vector Store: A semantic embedding is generated and stored in Qdrant for similarity search.

3. Retrieval & Access

When a user or agent asks a question:

  • The system retrieves relevant memories using vector and graph search.
  • Each time a memory is retrieved, it is "touched" (its accessed_at timestamp is updated).
  • Accessing a memory boosts its Salience, keeping it relevant for longer.

4. Decay

Memories that are not accessed gradually lose their importance:

  • The system applies an exponential decay algorithm to the Salience score.
  • Factual information decays slowly, while temporary insights or interaction records decay faster.
  • When salience falls below a certain threshold, the memory is considered "stale."

5. Supersession

When new information contradicts or updates an existing memory:

  • A new MemoryBlock is created.
  • The new block identifies the old one via the supersedes field.
  • The Knowledge Graph creates a SUPERSEDES edge between them.
  • In retrieval, the latest version is prioritized.

6. Archival

Stale or superseded memories may be moved to long-term archival storage to keep the primary index performant and focused on current knowledge.