MATIH Platform is in active MVP development. Documentation reflects current implementation status.
14. Context Graph & Ontology
Memory System
Memory System Overview

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

PageDescription
Memory ConsolidationLLM-powered summarization and forgetting policies
Memory RetrievalMulti-factor memory recall combining recency, relevance, and proximity
Context DeduplicationRemoving duplicate contexts before LLM input assembly

Memory Fact Types

TypeDescriptionExample
PREFERENCEUser or agent preference"User prefers bar charts for time series"
LEARNED_FACTA fact learned from interaction"Sales data is refreshed daily at 6am"
CONTEXT_NOTEContextual information"Q4 includes holiday season adjustments"
CORRECTIONA correction to previous output"Revenue should exclude returns"
SCHEMA_NOTESchema-related knowledge"customer_id is the primary key in orders table"

Memory Importance Levels

LevelDescriptionRetention Priority
CRITICALMust never be forgottenHighest
HIGHImportant for task qualityHigh
MEDIUMUseful but not essentialMedium
LOWNice to haveLow
EPHEMERALTemporary, can be discardedLowest