Memory System Overview
The Context Graph memory system provides long-term memory management for AI agents, including memory consolidation (summarizing and compacting old memories), efficient retrieval (combining recency, relevance, and entity proximity), and context deduplication (removing redundant information before LLM context assembly).
Architecture
+------------------+ +--------------------+ +-------------------+
| Temporal Memory | --> | Memory Retrieval | --> | Context Assembly |
| Store | | Service | | (for LLM) |
+------------------+ +--------------------+ +-------------------+
| |
v v
+------------------+ +--------------------+
| Memory | | Context |
| Consolidation | | Deduplication |
+------------------+ +--------------------+Subsections
| Page | Description |
|---|---|
| Memory Consolidation | LLM-powered summarization and forgetting policies |
| Memory Retrieval | Multi-factor memory recall combining recency, relevance, and proximity |
| Context Deduplication | Removing duplicate contexts before LLM input assembly |
Memory Fact Types
| Type | Description | Example |
|---|---|---|
PREFERENCE | User or agent preference | "User prefers bar charts for time series" |
LEARNED_FACT | A fact learned from interaction | "Sales data is refreshed daily at 6am" |
CONTEXT_NOTE | Contextual information | "Q4 includes holiday season adjustments" |
CORRECTION | A correction to previous output | "Revenue should exclude returns" |
SCHEMA_NOTE | Schema-related knowledge | "customer_id is the primary key in orders table" |
Memory Importance Levels
| Level | Description | Retention Priority |
|---|---|---|
CRITICAL | Must never be forgotten | Highest |
HIGH | Important for task quality | High |
MEDIUM | Useful but not essential | Medium |
LOW | Nice to have | Low |
EPHEMERAL | Temporary, can be discarded | Lowest |