Install
openclaw skills install @hal-9909/self-evolving-memoryOrchestrate the OpenClaw memory system so it actually runs reliably in practice. Use when the task involves capturing user preferences, current task state, corrections, decisions, recurring issues, memory cleanup, memory migration, or deciding where information should live across the workspace memory layers, including hot state, daily memory, structured long-term memory, root summary, and enforcement files such as SOUL.md, AGENTS.md, and TOOLS.md. Also use when the user asks to save memory, remember something, adapt old memories to the new system, or make the memory system actually stick and keep working over time.
openclaw skills install @hal-9909/self-evolving-memoryThis skill is the workflow layer for the memory system. It does not replace memory storage. It decides what to capture, where to route it, when to promote it, and when to harden it.
Use this order:
MEMORY.md + memory/ = formal memory ledgerSESSION-STATE.md = current task state only.learnings/ = auxiliary scratch/noise layer onlyNever create a second formal ledger.
Use SESSION-STATE.md for:
Do not store durable history here.
Use memory/YYYY-MM-DD.md for:
Route stable items to:
memory/preferences.md — user preferences / communication style / stable likes-dislikesmemory/system.md — stable environment facts / endpoints / toolchain constraints / pathsmemory/projects.md — long-running project context / decisions / statusmemory/MEMORY.md — cross-cutting long-term stable conclusionsUse root MEMORY.md only for the few high-value facts worth automatic injection every session.
Keep it short.
If a recurring problem should change future behavior, also update one or more of:
SOUL.mdAGENTS.mdTOOLS.mdSKILL.mdThis skill supports semantic memory search via memory_search. Multiple embedding
backends are supported. See references/embedding-setup.md for full configuration:
nomic-embed-text, mxbai-embed-large, etc.text-embedding-3-small / text-embedding-3-largeQuick config example (Ollama, local):
{
"memorySearch": {
"enabled": true,
"provider": "ollama",
"model": "nomic-embed-text"
}
}
Quick config example (OpenAI):
{
"memorySearch": {
"enabled": true,
"provider": "openai",
"model": "text-embedding-3-small",
"remote": {
"baseUrl": "https://api.openai.com/v1",
"apiKey": "YOUR_OPENAI_API_KEY"
}
}
}
When this skill is triggered for the first time, or when the user asks to "set up" / "initialize" / "check" the memory system, run this setup check:
Check the current workspace for these files. If any are missing, create them from templates OR tell the user exactly which command to run:
Required files:
SESSION-STATE.md → templates/SESSION-STATE.md
MEMORY.md → templates/MEMORY.md
HEARTBEAT.md → templates/HEARTBEAT.md
memory/preferences.md → templates/memory/preferences.md
memory/system.md → templates/memory/system.md
memory/projects.md → templates/memory/projects.md
memory/MEMORY.md → templates/memory/MEMORY.md
Recommended agent files (prompt user to create if missing):
SOUL.md — add memory discipline section (see references/setup-checklist.md Step 3)
AGENTS.md — add memory closeout protocol
TOOLS.md — add memory-related tool discipline
Action:
references/setup-checklist.md.references/embedding-setup.md.Tell the user they can also run the setup script:
bash scripts/setup.sh [optional-workspace-path]
This will copy all templates and report what's missing.
For the concrete operating protocol, read:
references/runtime-protocol.mdUse that reference when the memory system needs to operate reliably over time, not just route one memory item.
For setup and initialization:
references/setup-checklist.md — step-by-step first-time setupscripts/setup.sh — automated setup scriptFor embedding setup options, read:
references/embedding-setup.mdmemory/YYYY-MM-DD.mdmemory/preferences.md or other structured fileMEMORY.md or enforcement filesBefore or during longer work, update SESSION-STATE.md with:
Use hot state for continuity, not archiving.
memory/YYYY-MM-DD.md.learnings/memory/system.mdMEMORY.md if it is worth automatic injection every sessionmemory/projects.mdmemory/MEMORY.mdUse this mental model:
observed → captured in SESSION-STATE.md or dailycurated → moved into structured long-term memoryhardened → promoted into SOUL / AGENTS / TOOLS / skill / scriptstable → repeatedly validated, remains in long-term memory until marked staleRule:
When asked to clean memory, adapt old memory, or audit the system:
MEMORY.md remains summary-onlySESSION-STATE.md is not stale or pretending to be long-term memory.learnings/ is not drifting into primary-ledger statusDo not promote every temporary detail. Good memory systems are selective. If uncertain, prefer:
SESSION-STATE.md for immediate continuitymemory/YYYY-MM-DD.md for tentative notesUse this skill when the user asks or implies any of:
Keep replies short. Actually perform the routing/editing work. Do not just say memory was saved — save it. Do not ask for permission again when the memory action is already clear.
For non-trivial memory operations, do not stop at classification. Make sure the system actually advances:
SESSION-STATE.md when current continuity mattersmemory/YYYY-MM-DD.md for daily capturereferences/runtime-protocol.md when a task or phase endsIf any of these are skipped, the memory system is only partially operating.