# AI Memory Subsystem Maturity Scale (1–10) A framework for evaluating AI memory systems — from trivial key-value stores to frontier research implementations. Each level builds on the capabilities below it. --- ## The Scale ### Level 1 — Digital Post-It Note **Capabilities**: Plain text storage. No search, no structure, no retrieval intelligence. Manual read/write of flat files. Equivalent to a `.txt` file the user manages themselves. **Examples**: Copilot's `/memories/` files, `.env` notes, TODO.txt **Defining traits**: - Flat text, no indexing - No semantic understanding - Manual organization only - No cross-session awareness - No deduplication --- ### Level 2 — Structured Notebook **Capabilities**: Organized key-value or tagged storage with basic lookup. Can categorize memories by type or topic. Retrieval is exact-match or keyword-based. **Examples**: Simple SQLite memo tables, tagged note systems, structured JSON logs **Adds over Level 1**: - Schema/structure (fields, types) - Keyword search - Basic categorization (tags, folders) - CRUD operations via API --- ### Level 3 — Searchable Archive **Capabilities**: Full-text search across stored content. Can handle moderate volume. Supports filtering and sorting. Persistent across sessions but with no understanding of *what* was stored. **Examples**: Elasticsearch-backed note stores, grep over structured logs, FTS-enabled SQLite **Adds over Level 2**: - Full-text search (inverted index, tsvector, BM25) - Relevance ranking - Volume handling (thousands of entries) - Query filtering (by date, type, source) --- ### Level 4 — Semantic Memory **Capabilities**: Vector embeddings enable meaning-based retrieval — "find memories *about* authentication" works even if the word "authentication" never appears. This is the threshold where the system begins to *understand* content rather than just pattern-match it. **Examples**: ChromaDB/Pinecone with embeddings, basic RAG systems, naive vector stores **Adds over Level 3**: - Embedding-based semantic search - Meaning-aware retrieval (not just keyword) - Similarity scoring - Basic chunking strategies --- ### Level 5 — Organized Semantic Memory **Capabilities**: Semantic search combined with meaningful organizational structure. Memories are classified by type, scoped to projects/domains, and filterable across multiple dimensions. Hybrid search (semantic + keyword) improves accuracy. **Examples**: Mem0, LangMem, basic production RAG with metadata filtering **Adds over Level 4**: - Memory type classification (facts, decisions, preferences) - Project/domain scoping - Hybrid retrieval (semantic + full-text) - Metadata-enriched storage (source, timestamp, type) - Basic deduplication --- ### Level 6 — Contextual Memory with Session Awareness **Capabilities**: The system understands *sessions* — conversations have beginnings and endings, context carries forward, and handoff notes bridge gaps between interactions. Memory isn't just stored, it's *contextualized* within a workflow. **Examples**: Purpose-built agent memory services with session management, context-window optimization systems **Adds over Level 5**: - Session lifecycle (start → work → end with summary) - Context bundles (what the next agent needs to know) - Handoff notes between sessions - Memory versioning (edit history, supersedes chains) - Conflict detection (contradicting facts surfaced) --- ### Level 7 — Knowledge Graph + Temporal Reasoning **Capabilities**: Entity-relationship graphs connect memories into a web of knowledge. Facts have time validity — the system knows *when* something was true, not just *that* it was true. Graph traversal discovers indirect relationships. **Examples**: Systems with entity extraction + temporal fact management, knowledge-graph-augmented memory **Adds over Level 6**: - Entity tracking (people, projects, concepts as first-class nodes) - Directed relationship edges between entities - Temporal validity windows (valid_from → valid_to) - Historical queries ("what was true in January?") - Graph traversal (multi-hop relationship discovery) - Invalidation without deletion (history preserved) --- ### Level 8 — Self-Maintaining Memory with Active Management **Capabilities**: The system actively manages its own health. Memories decay based on forgetting curves, stale content is garbage-collected, similar memories consolidate, contradictions auto-resolve. The memory system has *agency* over its own contents rather than being a passive store. **Examples**: Systems implementing spaced-repetition science for memory decay, automated reflection/compaction cycles, multi-strategy dedup **Adds over Level 7**: - Power-law / FSRS-inspired memory decay (forgetting curves) - Retrievability scoring (memories strengthen with use) - Automated garbage collection (obsolete memories pruned) - Consolidation (similar memories merged into summaries) - Conflict resolution (newer facts auto-supersede older contradictions) - Dual deduplication (fast hash + semantic similarity) - Pinning (protect important memories from decay) - Background reflection scheduler (autonomous maintenance) --- ### Level 9 — Multi-Modal Retrieval with Compression & Benchmarked Accuracy **Capabilities**: Multiple retrieval strategies compose into a pipeline. The system has been validated against academic benchmarks with published scores. Token-aware compression enables efficient context loading. Hierarchical retrieval loads only what's needed. **Examples**: Systems with multi-stage retrieval pipelines, published benchmark results, lossless compression formats, tiered context loading **Adds over Level 8**: - Multi-stage retrieval pipeline (semantic → keyword rerank → optional LLM rerank) - Published benchmark validation (LongMemEval, LoCoMo, ConvoMem, etc.) - Lossless compression formats for token efficiency - Tiered/layered context loading (identity → essential → on-demand → deep) - Cross-domain navigation (tunnels between knowledge areas) - Multiple ingestion formats (chat exports, code, docs, Slack, etc.) - Wake-up protocols (minimal-token session initialization) --- ### Level 10 — Frontier Research Memory **Capabilities**: Implements capabilities at the edge of published research. Characteristics might include: autonomous memory formation without explicit store commands, causal reasoning over memory chains, counterfactual reasoning ("what would have happened if..."), self-improving retrieval that learns from its own accuracy, emergent memory organization, cross-agent memory sharing with access control, and provable formal guarantees on recall completeness. **Currently theoretical / early research. No known system fully implements Level 10.** **Would add over Level 9**: - Autonomous memory formation (agent decides what to store without being told) - Causal inference chains across memories - Counterfactual reasoning over historical states - Self-improving retrieval (learns from retrieval success/failure) - Formal recall guarantees (provable completeness bounds) - Cross-agent federated memory with privacy-preserving access - Emergent taxonomy (system discovers its own organizational structure) - Active forgetting with justification (not just decay — reasoned pruning) --- ## Project Placements ### Engram: Level 8 Engram is a solid Level 8 system with elements reaching toward Level 9. **Level 8 capabilities fully implemented**: | Capability | Engram Implementation | |------------|----------------------| | Semantic search | pgvector HNSW index, 384-dim embeddings (all-MiniLM-L6-v2) | | Full-text search | PostgreSQL tsvector + ts_rank, trigram GIN for fuzzy matching | | Hybrid retrieval | Semantic + FTS results merged with decay boosting | | Memory types | 7 kinds: fact, decision, procedure, pattern, preference, observation, issue | | Project scoping | Multi-tenant with project-scoped namespaces, enforced at auth layer | | Session lifecycle | `session_start` → ContextBundle (15 relevant memories, decisions, issues, entities) → `session_end` with summary + handoff | | Memory versioning | Version chains (version_of, version integer), full edit history | | Conflict detection | Cosine similarity > 0.8 on facts/decisions surfaces contradictions to agent | | Entity graph | 9 entity kinds, directed relationships, recursive CTE traversal | | Power-law decay | FSRS-inspired: $R = e^{-t/S}$, diminishing returns on access, [0.3–1.2] boost at search time | | Dual dedup | SimHash (O(1) Hamming distance) + semantic cosine similarity | | Garbage collection | Retrievability threshold, exempts pinned + persistent-project + decisions/procedures | | Consolidation | HNSW clustering → merge similar memories into summary, pointer to originals | | Conflict resolution | Auto-obsoletes older contradicting facts/decisions | | Background reflection | 3-phase scheduler (GC → consolidate → conflict resolve), 24h default interval | | Pinning | Exempt specific memories from decay/GC | | Persistent projects | Exempt entire projects from decay | **Level 8 strengths unique to Engram**: - Production-grade infrastructure: PostgreSQL 16, async throughout, 40+ REST endpoints, dual auth (Bearer + OAuth), rate limiting, backup/restore, schema migrations - Multi-agent ready: API key scoping per project, constant-time key validation, key cycling - Observability: Activity event bus (8 event types), web dashboard, JSON structured logging - 9 MCP tools + full REST API (dual transport) - 14 test modules covering all subsystems **Why not Level 9**: No published benchmark results. No lossless compression format. No multi-stage retrieval pipeline with reranking. No tiered context loading strategy. No cross-domain tunneling. Single ingestion mode (explicit `remember()` calls from agents, not batch file/chat mining). --- ### MemPalace: Level 9 MemPalace is a strong Level 9 system — its benchmark validation and retrieval architecture are its distinguishing features. **Level 9 capabilities fully implemented**: | Capability | MemPalace Implementation | |------------|--------------------------| | Semantic search | ChromaDB with default embeddings | | Hierarchical organization | 5-level palace structure: wings → halls → rooms → closets → drawers (+34% retrieval from structure alone) | | Memory types | 5 extracted types: decisions, preferences, milestones, problems, emotions | | Knowledge graph | Temporal entity-relationship graph (SQLite), validity windows, timeline queries | | Graph traversal | BFS room traversal, tunnel-finding between wings | | Multi-stage retrieval | Stage 1: semantic → Stage 2: keyword rerank → Stage 3: optional Haiku LLM rerank | | **Published benchmarks** | LongMemEval: 96.6% R@5 (100% with Haiku) — highest zero-API score published. LoCoMo: 60.3% R@10 (100% with rerank). ConvoMem: 92.9% recall (2× Mem0) | | **Lossless compression** | AAAK dialect: 30x compression, pipe-separated symbolic format with emotion codes + flags, readable by any LLM | | **Tiered context loading** | L0 Identity (~100 tokens), L1 Essential Story (~500–800), L2 On-Demand (~200–500), L3 Deep Search (unlimited). Wake-up cost: ~170 tokens | | **Multi-format ingestion** | 5 chat formats (Claude JSON, ChatGPT, Claude Code JSONL, Slack, plain text) + 25 file types + exchange-pair chunking | | Cross-domain navigation | Palace graph tunnels between wings, room connectivity analysis | | Wake-up protocol | `mempalace wake-up` loads minimal context for session start | | Entity detection | Pattern-based detector + disambiguating registry (40+ ambiguous words) | | 19 MCP tools | Read, write, knowledge graph, navigation, agent diary | | Claude Code hooks | Auto-save every 15 messages + pre-compaction emergency save | **Why Level 9 and not Level 8**: MemPalace crosses into Level 9 because of three capabilities Engram lacks: 1. **Benchmarked accuracy**: Three academic benchmarks with published, reproducible scores. The 96.6% LongMemEval R@5 with zero API calls is a concrete, verifiable claim. Engram has no benchmark validation. 2. **Multi-stage retrieval pipeline**: Semantic → keyword rerank → optional LLM rerank is a composed pipeline with measurable improvement at each stage. Engram merges semantic + FTS but doesn't rerank. 3. **Lossless compression + tiered loading**: AAAK 30x compression and the L0–L3 memory stack are token-aware context management. Engram loads a ContextBundle but doesn't have compression or graduated retrieval layers. 4. **Batch ingestion pipeline**: Mining 25 file types and 5 chat export formats with automatic room detection, entity extraction, and exchange-pair chunking. Engram stores what agents explicitly tell it; MemPalace can ingest entire project directories and conversation histories. **What keeps MemPalace from Level 10**: No autonomous memory formation (requires explicit `mine` or MCP `add_drawer`). No causal reasoning. No self-improving retrieval. No formal recall guarantees. No cross-agent access control. No memory decay or active self-maintenance (memories are permanent once stored — no GC, consolidation, or forgetting curves). --- ## Head-to-Head Comparison | Dimension | Engram (L8) | MemPalace (L9) | Edge | |-----------|-------------|----------------|------| | **Retrieval accuracy** | No published benchmarks | 96.6% LongMemEval, 92.9% ConvoMem | MemPalace | | **Retrieval pipeline** | Semantic + FTS merge | Semantic → keyword rerank → LLM rerank | MemPalace | | **Token efficiency** | ContextBundle (uncompressed) | AAAK 30x compression + L0–L3 tiered loading | MemPalace | | **Memory decay** | FSRS power-law forgetting curves | None (permanent storage) | Engram | | **Deduplication** | SimHash + semantic (dual) | None | Engram | | **Self-maintenance** | 3-phase reflection (GC, consolidate, conflicts) | None | Engram | | **Conflict detection** | Auto-surfaces + auto-resolves | None | Engram | | **Session management** | First-class (ContextBundle, handoff, summary) | None (stateless queries) | Engram | | **Multi-agent support** | Project-scoped keys, role-based auth | Single-user, no auth | Engram | | **Auth & security** | Bearer + OAuth + rate limiting + key cycling | None | Engram | | **Production infra** | PostgreSQL, async, Docker, Traefik, migrations | ChromaDB + SQLite, local files | Engram | | **Batch ingestion** | Manual `remember()` only | 25 file types, 5 chat formats, auto-mining | MemPalace | | **Compression** | None | AAAK 30x lossless | MemPalace | | **Knowledge graph** | Recursive CTE traversal, 9 entity kinds | Temporal validity windows, timeline queries | Tie (different strengths) | | **Organizational structure** | Flat (project → kind) | 5-level palace hierarchy (+34% retrieval) | MemPalace | | **API surface** | 40+ REST endpoints + 9 MCP tools | CLI + 19 MCP tools | Engram | | **Observability** | Activity bus, dashboard, JSON logging | None | Engram | | **Dependencies** | ~6 runtime (PostgreSQL required) | 2 runtime (fully local) | MemPalace | | **Testing** | 14 test modules | 4 test modules | Engram | --- ## Summary **Engram (Level 8)** excels at being a production-grade, multi-agent memory *service*. Its strengths are operational: decay management, dedup, self-maintenance, authentication, session lifecycle, observability, and infrastructure maturity. It's built to run 24/7 serving multiple AI agents with different access scopes. What it lacks is retrieval sophistication — no benchmarks prove its accuracy, no compression saves tokens, and no reranking pipeline refines results. **MemPalace (Level 9)** excels at *retrieval science*. Its strengths are information-theoretic: benchmark-validated accuracy, multi-stage retrieval pipelines, lossless compression, hierarchical organization that measurably improves recall, and a rich ingestion pipeline that can absorb entire conversation histories. What it lacks is operational maturity — no decay, no dedup, no auth, no session management, no self-maintenance, and no multi-agent support. The two systems are complementary rather than competing. Engram is a better *server*. MemPalace is a better *retriever*. A hypothetical system combining Engram's operational infrastructure with MemPalace's retrieval pipeline, compression, and benchmarked accuracy would be a strong Level 9 approaching Level 10.