Install
openclaw skills install @heicha1231414/memory-system-skillA practical memory protocol for long-running AI agents: dual logs, encoding safety, backup sync, multi-agent facts
openclaw skills install @heicha1231414/memory-system-skillA practical, battle-tested protocol for persistent memory in long-running AI agent setups. Hardened by real incidents: encoding corruption, backup drift, multi-agent desync.
Long-lived agents lose continuity between sessions. This protocol gives you:
memory/
├── logs/YYYY-MM-DD/ # one directory per day
│ ├── YYYY-MM-DD.md # summary (events, "## time — topic" sections)
│ └── YYYY-MM-DD-verbatim.txt # verbatim transcript (MUST be exact)
├── knowledge-base.txt # optional: topic index + event digests
├── scripts/ # helper scripts
└── body/ # optional: agent state / sensory layer
.md): concise event digest, one section per topic/time.-verbatim.txt): ⚠️ exact transcript. No summarization, no omission, no rewriting. This is the personal-history record.Corruption is silent and permanent. Follow these:
AppendAllText with explicit UTF-8). Never read-modify-write the whole file.Add-Content on Windows PowerShell 5.1 defaults to the system ANSI codepage (GBK on zh-CN) — mixing encodings corrupts files..ps1 is read as ANSI by PS 5.1 → garbled strings, broken paths, mojibake filenames. Save scripts with BOM before running.[char]0xXXXX) or use a safe wrapper; UTF-8 bytes get misdecoded as GBK in mixed environments.Copy-Item (or equivalent) to sync; never edit files in place on the backup volume.For setups with more than one agent:
For setups with more than one agent sharing memory, mutual checking closes the blind spots a single agent can't see (e.g. one agent's backup script stops covering a path and nobody notices for days).
For agents with a simulated body or feeling system: