nan-forget — Long-term AI memory
LiveA persistent memory system for AI coding assistants. nan-forget stores decisions, problem-solutions, and context in a local SQLite database with vector search. Your AI remembers what you discussed last week — or last month.
What problem does nan-forget solve?
AI coding assistants like Claude Code and Cursor start every session with a blank slate. They do not remember the architecture decisions you made yesterday, the bug you fixed last week, or the deployment workflow you set up last month. This forces developers to repeat context in every session, wasting time and leading to inconsistent decisions across sessions.
nan-forget gives your AI a persistent brain. Memories are stored locally in a SQLite database at ~/.nan-forget/memories.db with vector embeddings powered by Ollama (no API keys, no cloud dependency). When a topic comes up that was discussed in a previous session — authentication, deployment, testing, architecture — the AI searches its memory automatically and recalls the relevant context.
How does the memory system work?
nan-forget uses a three-stage retrieval system inspired by human memory. Stage 1 (recognition) returns lightweight summaries scored by vector similarity, decay, and access frequency — roughly 50 tokens per memory. Stage 2 (recall) fetches full content including problem-solution pairs for relevant results. Stage 3 (association) finds related memories you did not explicitly search for, using spreading activation across concept links. Memories automatically consolidate over time: aging entries are clustered by topic, summarized, and compacted into long-term storage, while decayed or duplicate entries are archived.
Features
Vector search
Semantic search across all memories using local Ollama embeddings. Find relevant context instantly.
Auto-consolidation
Memories age, cluster, and compact automatically. No manual cleanup needed.
MCP server
Native MCP server for Claude Code. Memory search and save happen automatically during sessions.
Structured memories
Save problem/solution pairs, architecture decisions, and user preferences with full context.