Mnemo v7.0 - AI Agent Memory System
SQLite + FTS5 + FAISS + NumPy | ConnectionPoints | Threads & Knots | Graph Search | Two-Stage Retrieval
Structured Memory — Atomic Entity/Attribute/Value/Reason Records
Each point stores ONE fact with narrative context. Enables precise graph search instead of blob similarity.
Entity Graph Traversal (Primary) + FAISS Fallback
Searches by entity name and relationship type first. Falls back to embedding similarity only when graph returns < 3 results.
Narrative Threading — Ordered Sequences with Tension & Tone Tracking
Knots — Where Threads Cross
Memory Utility Predictor
Cosine-similarity confidence with keyword boost. Decides when memory injection helps vs. hurts.
Get Context
Mnemo v7.0 Architecture
What Changed from v6.5
SQLite (WAL mode) — Source of truth. ACID transactions, zero-config, single-file backup. Replaces all in-memory dict storage. Embeddings stored as raw BLOB (not base64 JSON).
FTS5 Full-Text Search — Porter stemming, BM25 ranking, automatic sync triggers. Replaces manual keyword extraction. Searches entity names, values, connections, reasons.
Two-Stage Retrieval — FAISS pre-filters 10K→200 candidates (5ms), then NumPy re-ranks with exact cosine similarity (1ms). Fixes the accuracy gap from IndexIDMap drift.
Disposable FAISS — Rebuilt from SQLite on startup. No IndexIDMap wrapper, no remove_ids() fragmentation, no str↔int mapping drift. Plain IndexFlatIP with positional id_map.
SQLite Indices — Replace EntityIndex hash maps. COLLATE NOCASE eliminates manual
normalization. DELETE CASCADE replaces O(n²) session cleanup.
Direct .db Upload — SQLite file uploaded to HF Datasets as-is. No serialize/deserialize step. WAL checkpoint before upload. 10x faster sync at scale.
Backward Compatibility
All v6.5 API endpoints preserved with identical signatures. Gradio API, MCP server, and Streamlit client require zero changes.