cd /news/ai-agents/anamnema-an-open-source-memory-for-c… · home › topics › ai-agents › article
[ARTICLE · art-175643] src=discuss.huggingface.co ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

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.

recommendation

Store agent memory outside the model as source-linked notes in a graph with vector search, and inject them through hooks before requests and actions so conversation-only facts survive context resets.

more in playbook: Designing agent systems
read1 min views3 publishedNov 24, 2026

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.

── more in #ai-agents 4 stories · sorted by recency
── more on @anamnema 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/anamnema-an-open-sou…] indexed:0 read:1min 2026-11-24 · —