openclaw-mem

Session-first memory curator for OpenClaw. Keeps RAM clean, recall precise, and durable knowledge safe.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "openclaw-mem" with this command: npx skills add openclaw-mem

OpenClaw Memory Curator

A session-first memory system for OpenClaw.

It exists for one reason: important knowledge must survive session compaction without bloating the context window.


TL;DR (for humans)

  • Session memory = temporary (RAM)
  • Disk = source of truth
  • Decisions & preferences → MEMORY.md
  • Daily work → memory/YYYY-MM-DD.md
  • This skill saves durable knowledge before compaction
  • Retrieval always happens via memory_searchmemory_get

If something matters later, write it to disk.


⚠️ CRITICAL REQUIREMENT

Session memory indexing must be enabled.

Enable Session Memory

CLI

clawdbot config set agents.defaults.memorySearch.experimental.sessionMemory true

JSON

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "experimental": { "sessionMemory": true },
        "sources": ["memory", "sessions"]
      }
    }
  }
}

Mental Model (read this once)

OpenClaw memory has three layers. Confusion usually comes from mixing them up.

1. Session Memory (RAM)

  • Lives in the current conversation
  • Automatically compacted
  • Indexed for retrieval
  • Never reliable long-term

👉 Treat as short-term thinking space.


2. Daily Logs (memory/YYYY-MM-DD.md)

  • Append-only
  • What happened today
  • Commands, edits, short-lived issues

👉 Treat as a work log, not a knowledge base.


3. Long-Term Memory (MEMORY.md)

  • Curated
  • Small
  • High-signal only
  • Indexed and retrievable

👉 Treat as facts the agent must not forget.


When to Write Memory (simple rules)

Write to MEMORY.md if it would still be true next week.

Examples:

  • Decisions
  • Preferences
  • Invariants
  • Policies

Write to daily logs if it helps understand today.

Examples:

  • Refactors
  • Experiments
  • Temporary blockers

If unsure: write to daily log first, promote later.


Pre-Compaction Flush (why this exists)

Before OpenClaw compacts the session, it triggers a silent reminder.

This skill uses that moment as a Save Game checkpoint.

What happens:

  1. Durable knowledge is extracted
  2. Daily notes are written to today’s log
  3. Durable items are promoted to MEMORY.md
  4. Agent replies NO_REPLY (user never sees this)

This prevents knowledge loss without interrupting you.


Durable Memory Format (MEMORY.md)

Use IDs and tags so search works reliably.

## DEC-2026-02-04-01
type: decision
area: memory

Decision:
Session memory is retrieval-only. Disk is the source of truth.

Reason:
Session compaction is lossy. Disk memory is stable.

ID prefixes

  • DEC – Decisions
  • PREF – Preferences
  • FACT – Durable facts
  • POLICY – Rules / invariants

Retrieval Strategy (how agents should recall)

  1. Use memory_search (max ~6 results)
  2. Pick the best 1–2 hits
  3. Use memory_get with line ranges
  4. Inject the minimum text required

This keeps context small and precise.


Agent Playbook (rules for agents)

  • Prefer disk over RAM
  • Prefer MEMORY.md over daily logs for facts
  • Use search before asking the user again
  • Never copy raw chat into memory
  • Write memory explicitly, do not assume it sticks

Anti-Patterns (do not do these)

  • ❌ Copy chat transcripts into memory
  • ❌ Store secrets or credentials
  • ❌ Treat daily logs as long-term memory
  • ❌ Overwrite memory files instead of appending
  • ❌ Store speculation as fact

Privacy Rules

  • Never store secrets (API keys, tokens, passwords)
  • Ignore anything inside <private>...</private>
  • If sensitive info exists: store only that it exists, not the value

Retention & Cleanup

Default: no deletion

  • Disk is cheap
  • Recall quality is expensive

Optional:

  • Move old daily logs to memory/archive/YYYY-MM/
  • Only prune after durable knowledge is verified

Usage (human-friendly)

Examples that work well:

  • “Store this as a durable decision.”
  • “This is a preference, remember it.”
  • “Write this to today’s log.”

Design Philosophy

  • Disk is truth
  • RAM is convenience
  • Retrieval beats retention
  • Fewer tokens > more tokens
  • Memory should earn its place

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

System Monitor

跨平台系统监控工具,支持 Linux 和 Windows,监控硬盘、内存、CPU 使用情况,记录历史数据,支持变化对比和预警。**适合定时任务**。触发场景:(1) 定时系统健康检查(推荐每6小时),(2) 用户询问系统状态、资源使用情况,(3) 资源异常预警,(4) 查看历史监控数据对比。

Registry SourceRecently Updated
044
Profile unavailable
Research

OpenClaw Memory-OS

OpenClaw Memory-OS - Digital immortality service and cognitive continuity infrastructure for personal memory management

Registry SourceRecently Updated
0163
Profile unavailable
Research

MidOS MCP — Knowledge OS for AI Agents

MidOS — The MCP Knowledge OS. 134 tools for knowledge management, multi-agent orchestration, search, planning, and memory. 670K+ vectors, 46K+ chunks, EUREKA...

Registry SourceRecently Updated
0158
Profile unavailable