Skip to main content

Mnemosyne

Version control for AI agent memory.

Licence: Apache 2.0  CI  Status: early development  Rust  Python

A support agent is told a past answer was wrong. It runs bisect to find the commit where the belief entered, blame to trace it to a misread billing note, then commits a correction. The history keeps both.

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: commits, branches, merge, blame and bisect. A Rust core, a mnem CLI, and a Python SDK. Local, deterministic, no network, no model calls.

The problem

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.

What you get

Command What it does
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
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

A Python agent loop: a Claude call, store.add with provenance, store.commit, and store.blame tracing a belief to its origin

Quickstart

cargo build --release -p mnem-git   # the mnem binary (crate: mnem-git)
pip install -e ".[dev]"                  # the mnem-agents 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)

The GitHub for AI agents

Git made source code collaborative; GitHub made it social. As software becomes agents working in teams, they need the same stack underneath. Mnemosyne is building it in three eras:

  1. The substrate (now): single-agent versioned memory, local and deterministic.
  2. The collaboration layer: semantic merge that reasons about contradiction, a sync protocol, and a review step before a memory update lands in shared memory. Pull requests, for agent memory.
  3. The platform (1.0): the whole agent (prompt, tools, memory, policy, evals) as one versioned, signed, forkable artefact, with a registry.

The later two are the point. Everything today is 0.0.x groundwork (ADR-0010).

Status

Tag What landed
v0.0.2 the object store, commit · add · log, the Python binding
v0.0.3 branch · checkout · diff, time travel
v0.0.4 deterministic three-way merge with conflict objects
v0.0.5 blame · bisect, the provenance index

Next: a LangGraph adapter and an MCP server. See ROADMAP.md and CHANGELOG.md.

How it works

  • mnem-store (Rust): the object model, the content-addressed store, the commit graph. Never touches the network or a model; a cargo deny check enforces it.
  • mnem: the CLI (crate mnem-git, Rust) and the SDK (mnem-agents, Python) built on the core.
  • The store is a .mnem/ directory, format specified in docs/format/ and frozen for 0.0.x at format_version 1. Decisions live in docs/adr/.

Prior work

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.

Contributing & licence

Developed by a single maintainer; issues and feedback welcome, but not open to external pull requests at this stage (CONTRIBUTING.md). Apache 2.0 (LICENSE).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnem_agents-0.0.7.tar.gz (74.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mnem_agents-0.0.7-cp310-abi3-macosx_11_0_arm64.whl (801.5 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file mnem_agents-0.0.7.tar.gz.

File metadata

  • Download URL: mnem_agents-0.0.7.tar.gz
  • Upload date:
  • Size: 74.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.15.0

File hashes

Hashes for mnem_agents-0.0.7.tar.gz
Algorithm Hash digest
SHA256 7f75be3ba257a7ba7f530fb17c4108c155e6b48a1eb7988e7e88f7c86e5e57fd
MD5 f536d4df8dd049110c73bb52ae0ef061
BLAKE2b-256 27f280171f2852a1a4566f56d9e616b4bf6d8f90d83c5e46245b1ccdb5e4288a

See more details on using hashes here.

File details

Details for the file mnem_agents-0.0.7-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mnem_agents-0.0.7-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 133259615b93511b7902dffd75218dd7c86dc52ac44fd7b4399aeb5ee1c02d42
MD5 9aa47d948d6f05522ebd800f3f6bdc50
BLAKE2b-256 7c7b125c2659cd7000a9c0f4b75cd448ee2968f26e3f64579e5200cd680dc6fb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page