Memory for Claude Code that follows you across your machines.
Anamnesis is a file-first memory layer for Claude Code. What your agent learns (your conventions, decisions, and fixes that worked) is captured as markdown, indexed locally, and synced across the machines you already own.
Write a note on your desktop in Amsterdam. Open your laptop on the train and the note is already there, with nothing to copy over and no cloud account to set up.
Apache-2.0 · Local-first · Pre-alpha
desktop
Amsterdam
laptop
on the train
## [semantic] Postgres connection pooling
Use a single pool per process. The 25-connection cap was the cause of the Friday timeout.
written on desktop · already searchable on laptop
Recorded on two real machines: the desktop saves the conventions to memory, and the laptop receives them at its next session start.
Install
One command per machine.
The PyPI package is anamnesis-memory; the command it installs is anamnesis. Then anamnesis init registers the MCP server, installs the hooks, and runs a first sync. See the docs for from-source and air-gapped setups.
What you get
A memory layer that stays on your machines.
Notes are markdown files on your own machines, synced as git commits over your own network.
file-first
Markdown you own
Every note is a plain markdown file under ~/.anamnesis/memory, readable and git diff-able. The files are the source of truth; the index is derived from them and can always be rebuilt.
local-first
SQLite FTS5, no cloud
A SQLite FTS5 index gives keyword and BM25 recall, rebuilt locally on each machine. No cloud account, no API key required for the core.
cross-machine
Git over your Tailscale mesh
Markdown syncs as a git repo over your own private Tailscale network. Only the markdown travels; each machine rebuilds its own index, so the database file is not copied between machines.
automatic
Injects at start, captures at end
A SessionStart hook injects your global preferences plus the project notes and recent session summaries. A SessionEnd hook (and PreCompact) captures a durable note: the ask, the files touched, the outcome.
private
Machine-local scope
settings.json is per-machine and is never synced, so each machine points at its own checkout. The session summarizer is deterministic by default and needs no API key.
browsable
Dashboard and 3D memory map
A git-like Next.js dashboard to browse, full-text search, edit, and read the history of every note across your fleet, plus a 3D memory map of how your notes connect.
How it works
Install once per machine, then use Claude Code as usual.
- 01
Install once per machine
Run anamnesis init on each machine. It registers the MCP server, installs the SessionStart, SessionEnd, and PreCompact hooks, configures the store at ~/.anamnesis, and runs a first sync. It is idempotent and --print shows the plan without writing.
- 02
Use Claude Code normally
Nothing changes in how you work. At session start, your global preferences and the project notes are injected. At session end (and before a compact), a durable note is captured: the ask, the files touched, the outcome.
- 03
Your memory follows you
Each sync runs commit, pull --rebase, push over your private Tailscale mesh and rebuilds the local index. A note written on one machine is searchable on the others within a sync cycle. Diverging edits are reported as a git conflict rather than dropped.
Benchmark
One scripted task on a clean machine: without Anamnesis the agent re-explores the project to learn its conventions; with Anamnesis the SessionStart memory block carries them over. That came out to about 8% fewer input tokens for the same task, with the conventions known from the first turn. The token saving is a side effect; the point is that the setup does not have to be taught again.
3 runs per arm on claude-opus-4-8, driven headlessly through the Claude Code CLI on a synthetic project; agentic runs vary, we report the averages as-is. Reproduce it.
Comparison
Anamnesis, built-in project memory, or nothing.
Claude Code already supports per-project memory files (the CLAUDE.md you edit by hand). They are real and useful. They are also scoped to one project on one machine, and you maintain them yourself.
| Capability | Anamnesis | Built-in project memory | Nothing |
|---|---|---|---|
| Memory persists between sessions | Yes | Yes | No |
| Captured automatically at session end | Yes | No | No |
| Injected automatically at session start | Yes | Partial | No |
| Syncs across your own machines | Yes | No | No |
| Stored as markdown you own and can edit | Yes | Yes | No |
| Keyword and BM25 search over all notes | Yes | No | No |
| Browsable dashboard and history view | Yes | No | No |
| No cloud account required | Yes | Yes | Yes |
The built-in injection cell is marked partial because Claude Code reads the project CLAUDE.md you keep current by hand. Anamnesis writes those notes for you and carries them to every machine you own.
The same memory on every machine you use.
Anamnesis keeps your coding agent's memory in markdown files on your own machines, synced over your own private network. It is open source and needs no cloud account.