/install mneme
Mneme — agent memory protocol
Mneme is a plain-text format for an agent's persistent, cross-session memory. A memory
file (*.mneme) is a list of cells (one decision/fact/preference each, self-contained),
and a derived spine (one line per cell: id + state + gist). Full spec: \x3Chttps://github.com/casperkwok/mneme>.
Core rule — content is immutable, state is mutable. A cell's gist/body/cue is a fact
about the past, never edited. Its state/seen/conf is its relation to now, updated as
reality moves. To change content, add a new cell that supersedes the old.
When to use
- A
*.mnemefile exists in the project → it is the memory; follow this protocol. - The user wants durable memory ("remember this across sessions", "记住这个决策/偏好/踩坑").
- You just produced something a future session would be wrong or redo without.
Cell format
@ DEC-0042 storage/cache # @ ID(PREFIX-NNNN, unique, never reused) + topic-path
gist Local cache uses SQLite, not JSON # one self-contained line; promoted into the spine
state live conf high since 2026-06-03 seen 2026-06-03
cue concurrent writes / cache corruption / local storage choice # recall keywords
> why / cost / context (free prose, may span multiple > lines)
link supersedes DEC-0031 # typed relation, repeatable
- state:
proposed(not yet authoritative) ·live(current/authoritative) ·stale(maybe expired, verify first) ·superseded(replaced) ·retired(dead, audit only). Spine/working-memory shows onlylive+stale. - ID prefixes:
DECdecision ·OKRgoal ·PREFpreference ·GOTCHApitfall ·FACTfact/constraint ·TODOlong-lived todo. Extensible. - link relations:
supersedes/superseded-by(pair them),relates,depends-on,blocks,refines. - Line-oriented, no nesting; unknown lines are ignored;
#lines are comments.
Protocol (SOP)
- Boot — when project context matters, read only the spine, not whole files:
python scripts/mneme_tool.py spine \x3Cfile>(orgrep '^@\|^gist\|^state'). Keep it resident. - Recall — before acting, match the task topic against each cell's
cueandtopic-path; expand only the cells that hit. Recall generously, then judge relevance by content. - Trust —
live + conf high + recent seen→ use directly.stale/conf low/ oldseen→ verify against the real source first, then bumpseento today (raisestate/confif warranted).proposed→ not a conclusion; don't act on it unless the task is to advance it. - Write — when something durable is produced, append a new cell: next id via
python scripts/mneme_tool.py new-id PREFIX \x3Cfile>(never hand-count), self-containedgist, setstate/conf,since = seen = today, writecue(which future topics should recall it — don't skip),>for the why,linkas needed. Append to end; never silently edit an old cell. Test: would a future session be wrong or redo work without this? If yes, write it. - Supersede — to revise a belief: new cell + old cell set
superseded+ mutuallink(supersedes/superseded-by). To merely reaffirm: only bump the old cell'sseen. Content is never edited in place. - Conflict — two
livecells disagree → prefer higherconf, then newerseen, and tell the user explicitly; then supersede the loser. - Hygiene — one claim per cell; gist self-contained; long content external (link/path only); ids never reused.
Tooling (don't rely on agent discretion)
scripts/mneme_tool.py (zero deps):
spine \x3Cfile>— derive the spine (live/stale).lint \x3Cfile>— health-check: duplicate ids, missing required fields, asymmetric/dangling supersede links, bad dates, andlivecells whoseseenis older than 45 days (decay). Exit code 1 on errors — wire into a gitpre-commithook so lifecycle metadata can't silently rot.new-id PREFIX \x3Cfile>— allocate the next collision-free id.
Don't use Mneme for
High-frequency precise queries / transactions (use a DB), large blobs (store externally, link only), throwaway within-session scratch, or things that belong in code/docs. Mneme holds the why — decisions, constraints, lessons, preferences — not every what.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install mneme - After installation, invoke the skill by name or use
/mneme - Provide required inputs per the skill's parameter spec and get structured output
What is Mneme?
Maintain persistent cross-session agent memory in the Mneme plain-text format (.mneme files) — decisions, facts, preferences, gotchas, goals. Use when an .mn... It is an AI Agent Skill for Claude Code / OpenClaw, with 69 downloads so far.
How do I install Mneme?
Run "/install mneme" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Mneme free?
Yes, Mneme is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Mneme support?
Mneme is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Mneme?
It is built and maintained by Casper (@casperkwok); the current version is v0.1.1.