How it Works
Understanding how Memex collects, stores, and searches your conversations
Overview
Memex gives your AI coding assistants long-term memory by:
- Collecting raw conversations from Claude Code, Codex, and other tools
- Storing everything in a local SQLite database (never losing original data)
- Optionally generating multi-level summaries for better search
- Searching via full-text, semantic vectors, or both
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ JSONL/JSON │ ──▶ │ SQLite │ ──▶ │ Search │
│ (source) │ │ (messages) │ │ FTS + MCP │
└─────────────┘ └──────┬──────┘ └─────────────┘
│
▼ (optional)
┌─────────────┐ ┌─────────────┐
│ Compact │ ──▶ │ LanceDB │
│ L1/L2/L3 │ │ (vectors) │
└─────────────┘ └─────────────┘
"Never Compacted" means: your original conversations are always preserved. The Compact layer is optional and additive — it generates summaries to enhance search, but never replaces the source data.
Contents
- Collection - Where data comes from and how it's collected
- Storage - SQLite and LanceDB architecture
- Compact - Multi-level summary system (L0-L3)
- Search - Full-text, semantic, and hybrid search