Add Mnemon Persistent Memory
Wires the mnemon graph memory binary into NanoClaw agent containers so agents recall past context across sessions.
Dev & CodingAdvanced★ 30,471⑂ 12,865AI score 7/10Last updated: Aug 9, 2026
What it does
Installs the mnemon binary into the NanoClaw agent container image and wires mnemon setup into the entrypoint. On every container start it registers Claude Code hooks that surface relevant memory before the agent replies and store new insights after each turn.
The runbook covers:
- Adding the mnemon install layer plus
MNEMON_DATA_DIRtocontainer/Dockerfile - Inserting
mnemon setup --target claude-code --yes --globalintocontainer/entrypoint.sh, with output routed to stderr so it never breaks the JSON stdin handshake - Copying two structural tests that guard the Dockerfile layer and entrypoint wiring, then running them with vitest
- Rebuilding the image, restarting the service, verifying hooks, and locating the host memory path
Memory lands in the per-agent-group .claude/ mount, so it survives container restarts.
Who it's for
- NanoClaw operators tired of re-explaining context in every new agent session
- Agent groups on the default Claude provider (no
providerkey, or"provider": "claude") - Users comfortable editing Dockerfiles, reading
docker logs, and restarting systemd/launchd units
Examples
- Pre-flight provider check: run
grep -H '"provider"' groups/*/container.jsonto exclude groups on other providers (e.g.opencode), where mnemon hooks never fire. - Pin the latest release: fetch the newest tag from the GitHub releases API, set it as
MNEMON_VERSION, rebuild with./container/build.sh, then smoke-testdocker run --rm --entrypoint mnemon nanoclaw-agent:latest --version. - Verify recall: chat with the agent, open a fresh session, and reference something from before. If mnemon surfaces the context without you restating it, the hooks work; to reset, stop the container and delete the
mnemon/subdirectory on the host mount.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/add-mnemon folder from the GitHub repo nanocoai/nanoclaw into my ~/.claude/skills/add-mnemon/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/nanocoai/nanoclaw.git /tmp/nanoclaw && mkdir -p ~/.claude/skills && cp -r /tmp/nanoclaw/.claude/skills/add-mnemon ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Confirm you are working in a NanoClaw project (it must contain
container/Dockerfileandcontainer/entrypoint.sh). - Fetch the skill:
git clone https://github.com/nanocoai/nanoclaw.git /tmp/nanoclaw - Copy it into your personal skills folder:
mkdir -p ~/.claude/skills && cp -r /tmp/nanoclaw/.claude/skills/add-mnemon ~/.claude/skills/- If you already work inside the NanoClaw repo,
.claude/skills/add-mnemonis picked up as-is.
- If you already work inside the NanoClaw repo,
- Launch Claude Code from the NanoClaw project root.
- Ask something like "Use the add-mnemon skill to give my agents persistent memory." The skill walks Phase 1 (pre-flight) → Phase 2 (apply) → Phase 3 (verify).
- Finish by rebuilding the image (
./container/build.sh), restarting the service (systemctl --user restart ...on Linux,launchctl kickstarton macOS), and checkingdocker logs ... | grep -i mnemon.
View source on GitHub ↗License: MIT