Skip to content

Memory System

The memory system provides persistence across sessions, enabling continuity in conversations and long-term knowledge retention.

What It Is

Without memory, each session starts fresh. The memory system solves this by:

  • Storing conversation context
  • Recording decisions and events
  • Building long-term knowledge
  • Enabling recall of prior work

Types of Memory

Daily Notes

Location: memory/YYYY-MM-DD.md

Raw logs of what happened each day:

  • Conversation summaries
  • Decisions made
  • Tasks completed
  • Infrastructure changes
  • Errors and lessons learned

Created automatically or manually. Formatted as running logs.

Long-Term Memory

Location: MEMORY.md

Curated, distilled knowledge:

  • User preferences and profile
  • Infrastructure details
  • Important decisions
  • Lessons learned (condensed from daily notes)
  • Contact information
  • Project context

Security note: Only loaded in 1:1 private sessions (WhatsApp, DMs), not in group chats.

Session Transcripts

Optional history of past conversations. Used for:

  • Context recall
  • Continuing interrupted tasks
  • Audit trails

How It Works

Session Startup

Before responding, the agent:

  1. Reads SOUL.md — agent identity
  2. Reads USER.md — user profile
  3. Reads memory/YYYY-MM-DD.md — today and yesterday
  4. Reads MEMORY.md — if private session

When asked about prior work:

  1. Semantic search across memory files
  2. Return top relevant snippets with citations
  3. Pull full context only when needed

Writing Memory

Significant events should be recorded:

  • Decisions and their rationale
  • Infrastructure changes
  • Errors and fixes
  • New preferences learned
  • Project milestones

Your Setup

Component Location
Active workspace /home/openclaw/.openclaw/workspace on k3s-master
Daily notes memory/YYYY-MM-DD.md
Long-term memory MEMORY.md
Backup Synced to onthecouch/REDACTED-workspace repo

Best Practices

For Daily Notes

  • Log key events as they happen
  • Include context (what, why, outcome)
  • Skip routine chatter
  • Timestamp important entries

For Long-Term Memory

  • Review daily notes periodically (weekly)
  • Distill into MEMORY.md
  • Remove outdated information
  • Structure with clear headings
  • Never include secrets — Use TOOLS.md for sensitive details

For Users

  • Tell the agent "remember this" to save important context
  • Reference prior work by date or topic
  • Correct mistakes in memory when spotted

Maintenance

Weekly Review (Heartbeat Task)

  1. Read recent daily notes
  2. Identify significant learnings
  3. Update MEMORY.md
  4. Remove obsolete entries
  5. Commit and push

Monthly Cleanup

  • Archive old daily notes (>30 days)
  • Verify MEMORY.md accuracy
  • Update infrastructure docs if changed

Security

  • Private data stays in private contexts
  • Secrets go in TOOLS.md (not committed) or Sealed Secrets
  • Memory is searchable — Don't write what you wouldn't want found
  • Group chat safe — MEMORY.md not loaded in shared channels