Version control for AI agent memory. Commit, branch, merge, blame and time-travel what your agents know.
See the code
An AI agent builds up memory as it works: facts it learns, decisions it makes. Frameworks store that as state it overwrites as it goes. Mnemosyne gives agent memory what Git gives code: blame, bisect, commits, branches and merge. A Rust core, a mnem CLI, and a Python SDK. Local, deterministic, no network, no model calls.
Your agent runs for an hour, makes forty tool calls, and updates its memory the whole way. Then it gets something wrong, and all you have is the memory as it stands right now. You cannot see when the bad fact got in, what the agent knew before it went off track, or why it believes what it believes. Version control solved exactly this for code.
| Command | What it does |
|---|---|
blame | resolve any belief to the commit (through merges) and the observation that introduced it |
bisect | binary-search a run for the first commit where a wrong belief appears |
commit · log | record memory as an immutable, content-addressed snapshot with its provenance, and walk the history |
show <commit> | reconstruct the memory exactly as it stood at any past commit |
branch · checkout · diff | fork memory for the price of a pointer to explore a hypothesis in isolation |
merge | combine two lines of memory, surfacing conflicts as objects you inspect and resolve |
export · import | dump the whole history as one portable JSON file, and rebuild a store from it |
Every correctness property above - exact reconstruction, precise bisect, accurate blame, no lost writes on merge - holds at 100% across an 80-seed, 720-run sweep, plus a separate 50,000-case fuzz test on the merge algorithm, gated in CI on every change. Full detail: the benchmark.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Nabzx/mnemosyne/releases/latest/download/mnem-git-installer.sh | sh
# no Rust toolchain needed; PowerShell equivalent: mnem-git-installer.ps1 on the same release page
pip install mnem-agents # the Python SDK; `import mnem`
Already have Rust? cargo install mnem-git builds the CLI from source instead.
Three commands, and an agent's memory is under version control:
mnem init ./agent-memory && cd ./agent-memory
mnem add customer-4821 "on the Enterprise plan" --source ticket-4821
mnem commit -m "open the case" --author agent
Now watch it catch a real mistake:
# an hour later, the agent misreads a billing note:
mnem add customer-4821 "downgraded to Pro last month" --source billing-note-8842 --step step-31
mnem commit -m "reconcile the plan tier" --author agent
# a wrong answer surfaces. find where it entered, and why:
mnem bisect --node customer-4821 --equals '"downgraded to Pro last month"'
mnem blame customer-4821
The Python SDK:
import mnem
store = mnem.init("./agent-memory")
store.add("customer-4821", "on the Enterprise plan",
provenance=mnem.Provenance(source="ticket-4821"))
store.commit("learn the plan tier", author="support-agent")
b = store.blame("customer-4821") # which commit set this, and why
print(b.commit[:8], b.provenance.source)
Shell completions:
mnem completions zsh > ~/.zfunc/_mnem # or bash, fish, powershell, elvish
More worked examples, one per surface (SDK, Claude, LangGraph, MCP), live in
examples/ - the README GIF above is examples/claude_agent.py.
| Git | mnem |
|---|---|
git init | mnem init |
git add | mnem add |
git commit | mnem commit |
git log | mnem log |
git branch | mnem branch |
git checkout | mnem checkout |
git diff | mnem diff |
git merge | mnem merge |
git blame | mnem blame, same idea |
git bisect | mnem bisect, same idea |
What is missing on purpose, for now: push / pull / clone (the sync protocol between stores is Era 2), a staged hunk (add -p, staging is a whole node), and a text-merge conflict marker (a conflict is an object you resolve with --resolve <id>=ours|theirs|base|delete or --strategy, not an inline marker).
Code needed version control, then a way to share and build on it together. AI agents need exactly the same thing, and it does not stop at memory: it reaches the whole agent, how agents work together, and eventually the physical machines they run on. Mnemosyne is building that, end to end:
We start with software agents. That is the easiest place to prove it works. But physical AI is the new phenomenon, and it is what this is ultimately built for.
A wave of 2026 research points at this idea (Git4Data, GitOfThoughts, StateFuse, MemTX, LatticeMind), each a paper or a prototype. One finding is worth stating plainly: versioned memory does not make an agent give better answers. What it gives you is history, audit, and safe merging. That is the whole pitch, and it is enough. The benchmark has the numbers, why I built this has the longer version, and why agent memory needs version control makes the general case.
Want the same story worked end to end, one command at a time, with real commit ids instead of a compressed summary? Debugging a poisoned agent with bisect narrates exactly what the GIF above is doing.
Issues, bug reports, and ideas are genuinely welcome, that's the best way to shape what gets built next. Developed by a single maintainer, so most pull requests outside docs//examples/ aren't merged for now (CONTRIBUTING.md has the detail). Apache 2.0 (LICENSE).
Version control for AI agent memory. Commit, branch, merge, blame and time-travel what your agents know.
See the code
An AI agent builds up memory as it works: facts it learns, decisions it makes. Frameworks store that as state it overwrites as it goes. Mnemosyne gives agent memory what Git gives code: blame, bisect, commits, branches and merge. A Rust core, a mnem CLI, and a Python SDK. Local, deterministic, no network, no model calls.
Your agent runs for an hour, makes forty tool calls, and updates its memory the whole way. Then it gets something wrong, and all you have is the memory as it stands right now. You cannot see when the bad fact got in, what the agent knew before it went off track, or why it believes what it believes. Version control solved exactly this for code.
| Command | What it does |
|---|---|
blame | resolve any belief to the commit (through merges) and the observation that introduced it |
bisect | binary-search a run for the first commit where a wrong belief appears |
commit · log | record memory as an immutable, content-addressed snapshot with its provenance, and walk the history |
show <commit> | reconstruct the memory exactly as it stood at any past commit |
branch · checkout · diff | fork memory for the price of a pointer to explore a hypothesis in isolation |
merge | combine two lines of memory, surfacing conflicts as objects you inspect and resolve |
export · import | dump the whole history as one portable JSON file, and rebuild a store from it |
Every correctness property above - exact reconstruction, precise bisect, accurate blame, no lost writes on merge - holds at 100% across an 80-seed, 720-run sweep, plus a separate 50,000-case fuzz test on the merge algorithm, gated in CI on every change. Full detail: the benchmark.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Nabzx/mnemosyne/releases/latest/download/mnem-git-installer.sh | sh
# no Rust toolchain needed; PowerShell equivalent: mnem-git-installer.ps1 on the same release page
pip install mnem-agents # the Python SDK; `import mnem`
Already have Rust? cargo install mnem-git builds the CLI from source instead.
Three commands, and an agent's memory is under version control:
mnem init ./agent-memory && cd ./agent-memory
mnem add customer-4821 "on the Enterprise plan" --source ticket-4821
mnem commit -m "open the case" --author agent
Now watch it catch a real mistake:
# an hour later, the agent misreads a billing note:
mnem add customer-4821 "downgraded to Pro last month" --source billing-note-8842 --step step-31
mnem commit -m "reconcile the plan tier" --author agent
# a wrong answer surfaces. find where it entered, and why:
mnem bisect --node customer-4821 --equals '"downgraded to Pro last month"'
mnem blame customer-4821
The Python SDK:
import mnem
store = mnem.init("./agent-memory")
store.add("customer-4821", "on the Enterprise plan",
provenance=mnem.Provenance(source="ticket-4821"))
store.commit("learn the plan tier", author="support-agent")
b = store.blame("customer-4821") # which commit set this, and why
print(b.commit[:8], b.provenance.source)
Shell completions:
mnem completions zsh > ~/.zfunc/_mnem # or bash, fish, powershell, elvish
More worked examples, one per surface (SDK, Claude, LangGraph, MCP), live in
examples/ - the README GIF above is examples/claude_agent.py.
| Git | mnem |
|---|---|
git init | mnem init |
git add | mnem add |
git commit | mnem commit |
git log | mnem log |
git branch | mnem branch |
git checkout | mnem checkout |
git diff | mnem diff |
git merge | mnem merge |
git blame | mnem blame, same idea |
git bisect | mnem bisect, same idea |
What is missing on purpose, for now: push / pull / clone (the sync protocol between stores is Era 2), a staged hunk (add -p, staging is a whole node), and a text-merge conflict marker (a conflict is an object you resolve with --resolve <id>=ours|theirs|base|delete or --strategy, not an inline marker).
Code needed version control, then a way to share and build on it together. AI agents need exactly the same thing, and it does not stop at memory: it reaches the whole agent, how agents work together, and eventually the physical machines they run on. Mnemosyne is building that, end to end:
We start with software agents. That is the easiest place to prove it works. But physical AI is the new phenomenon, and it is what this is ultimately built for.
A wave of 2026 research points at this idea (Git4Data, GitOfThoughts, StateFuse, MemTX, LatticeMind), each a paper or a prototype. One finding is worth stating plainly: versioned memory does not make an agent give better answers. What it gives you is history, audit, and safe merging. That is the whole pitch, and it is enough. The benchmark has the numbers, why I built this has the longer version, and why agent memory needs version control makes the general case.
Want the same story worked end to end, one command at a time, with real commit ids instead of a compressed summary? Debugging a poisoned agent with bisect narrates exactly what the GIF above is doing.
Issues, bug reports, and ideas are genuinely welcome, that's the best way to shape what gets built next. Developed by a single maintainer, so most pull requests outside docs//examples/ aren't merged for now (CONTRIBUTING.md has the detail). Apache 2.0 (LICENSE).