Loading...
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.
Semantic vectors (bge-large-en-v1.5) + FTS5 keyword search, fused with Reciprocal Rank Fusion. Content-hash dedup with UNIQUE index eliminates duplicates at ingest.
Native macOS Swift daemon (209KB) providing MCP over Unix socket. Real-time indexing hooks capture prompt/response pairs as they happen. Always-on recall without starting a separate server.
Conversation
CC sessions → JSONL
Indexing
Chunk + deduplicate
Embedding
bge-large 1024-dim
Hybrid Search
Vec + FTS5 + RRF
BrainBar
12 tools, Unix socket
Conversation
CC sessions → JSONL
Indexing
Chunk + deduplicate
Embedding
bge-large 1024-dim
Hybrid Search
Vec + FTS5 + RRF
BrainBar
12 tools, Unix socket
pip install brainlayerAI 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.
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.
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.
Every indexed chunk gets enriched with 10 metadata fields (summary, tags, importance, intent, symbols, epistemic_level, debt_impact, and more) using local LLMs — Ollama or MLX on Apple Silicon. Zero cloud dependency.
268,000+ conversation chunks indexed from 9 projects. Session-level analysis extracts decisions, corrections, and learnings. Regression detection tracks what changed since a file last worked.
2 MCP tools (voice_speak + voice_ask), 5 voice modes, whisper.cpp STT (~300ms), edge-tts, VoiceBar MCP daemon, session booking. 314 tests. bunx voicelayer-mcp.
Autonomous AI agent ecosystem — 12 Bun workspace packages, 7 domain agents, 60+ AI-agnostic skills, multi-LLM routing, Night Shift autonomous coding at 4am. 1,073 tests.
3 core (search, store, recall) + 9 knowledge graph (digest, entity, update, expand, tags, subscribe, unsubscribe, stats, crossref). Consolidated from 14. Old names still work via aliases.
Unified brain_digest with 3 modes: full content ingestion, faceted tag generation via Gemini 2.5 Flash, and tiered selectivity (T0-T3 classifier). 284K+ chunks enriched with structured metadata.