BrainLayer — Persistent Memory for AI Agents
BrainLayer is a local-first memory layer that gives any MCP-compatible AI agent persistent memory across conversations. It indexes Claude Code session transcripts into a SQLite database with vector embeddings, enabling semantic search, task-aware retrieval, file history tracking, and session analysis. Everything runs locally — no cloud accounts, no API keys, no Docker. The enrichment pipeline uses local LLMs (Ollama/MLX) to generate 10-field metadata per chunk including summaries, tags, importance scores, and intent classification.
Project journey
The Problem
AI agents forget everything between sessions. Every architecture decision, debugging insight, and user preference — gone. Developers repeat themselves constantly, re-explaining context that should be remembered.
Single-File Architecture
Built on SQLite + sqlite-vec: one .db file stores everything. No Docker, no database servers, no cloud accounts. Hybrid search combines semantic embeddings (bge-large-en-v1.5, 1024 dims) with FTS5 keyword search via Reciprocal Rank Fusion.
MCP Integration
14 MCP tools organized into an Intelligence Layer (think, recall, store, sessions) and a Search Layer (search, context, file_timeline, operations, regression). Any MCP-compatible editor — Claude Code, Cursor, Zed, VS Code — gets instant memory.