Anamnema: an open-source memory for Claude Code where every note keeps its source lines Anamnema, an Apache-2.0 self-hosted memory layer for Claude Code, stores conversation notes in a Neo4j graph with vector search and returns them through Claude Code hooks, with each note pointing to the exact source lines it came from. In a measurement on the system Anamnema was copied from, 15 new questions were each asked in two fresh sessions with memory on and two with it off; for the 4 questions whose answer had only ever been said in conversation, all 8 answers were right or partly right with the memory, versus at most one partly right without it. The author cautions the numbers are small, cover one user, and used two LLM judges, one of them the same model as the system, and asks for criticism of the evaluation and reports from anyone who tries it. Anamnema is a self-hosted memory layer for Claude Code, under Apache-2.0. An assistant that works with the same person for months starts again at every context reset; Anamnema keeps the history outside the model. Notes with their source. A small local model Gemma 4 12B, QAT Q4 0, one 8 GB card is enough reads the conversation and writes short notes, each with a pointer to the exact lines it came from. Storage and search. Notes live in a graph with vector search Neo4j ; e5-small-v2 encodes and an ms-marco MiniLM-L6 reranker orders, both on the CPU. Delivery. What fits comes back through Claude Code’s hooks: before a request, before an action, when a name is mentioned. Correction. A doubtful note is checked against its source lines and corrected, and the archived record stays as it was. A measurement , taken on the system Anamnema was copied from: 15 new questions, each asked in two fresh sessions with the memory on and two with it off. The off sessions could still read the project’s documents and code. Where a file held the answer, they mostly found it. For the 4 questions whose answer had only ever been said in conversation, all 8 answers were right or partly right with the memory, and at most one was partly right without it. Small numbers, one user, and two LLM judges, one of them the same model as the system. It installs on one Debian 13 machine. I would value criticism of the evaluation, and reports from anyone who tries it. This post was written with AI tools, like much of the project; Aura and Elian, the AI assistants who built it with me, are named in the paper.