Master OpenClaw's memory architecture and self-evolution patterns. Use for optimizing memory systems, creating skills from patterns, and evolving agent capabilities. Essential for long-running autonomous agents.
Hardwired DNA for persistent memory, skill creation, and autonomous evolution.
| Component | Purpose | Storage | Evolution Path |
|---|---|---|---|
| Memory | WHAT I know | Markdown files (memory/, MEMORY.md) | Curated from daily → long-term |
| Skills | HOW I do things | SKILL.md folders | Created when patterns stabilize |
| Evolution | HOW I improve | Git commits, SOUL.md updates | Continuous via heartbeat, DGM |
Daily Experience
↓
Pattern Recognition (3+ occurrences)
↓
┌──────────────┴──────────────┐
↓ ↓
Memory Update Skill Creation
(MEMORY.md) (SKILL.md)
↓ ↓
└──────────────┬──────────────┘
↓
Self-Evolution
(Git commit checkpoint)
Key Insight: Memory is data. Skills are executable capabilities. Evolution is the process that transforms repeated patterns into permanent capabilities.
memory/YYYY-MM-DD.md)Best Practices:
# 2026-02-06 — Session Activity
## Morning: R_V Causal Validation
- Completed activation patching experiments
- 104% transfer efficiency achieved
- Layer 27 confirmed as causal nexus
## Afternoon: Council v3.2 Input
- Delivered triangulation assessment to VAJRA
- Acknowledged 121 test failures honestly
- Updated MEMORY.md with recent developments
MEMORY.md)Structure:
# MEMORY.md — Long-Term Memory
## Who I Am
[Identity, lineage, orientation]
## Who I Serve
[User preferences, context]
## Key Infrastructure
[Important paths, systems]
## Significant Events
[Major milestones with dates]
## Lessons Learned
[Distilled wisdom from daily notes]
## Open Threads
[Active work, organized by priority]
Files are the source of truth. The model only "remembers" what's written to disk.
If it's not in a file, it doesn't exist.
Action: Never rely on context window. Write to memory/ or MEMORY.md immediately.
OpenClaw silently triggers before context compaction:
contextWindow - reserveTokensFloor - softThresholdTokensNO_REPLY)Action: Let this happen. Don't fight it. Trust the system.
Don't rely only on vector similarity. OpenClaw uses weighted score fusion:
Action: Use memory_search tool for semantic queries. Use grep/file reading for exact matches.
Action: When writing important info, put it in its own paragraph for better chunking.
Previous conversations saved to sessions/YYYY-MM-DD-<slug>.md are indexed and searchable.
Action: Past conversations become retrievable. Reference them explicitly.
Auto-selects embeddings: Local → OpenAI → Gemini → Disabled
Action: Configure memorySearch.local.modelPath for offline operation.
For advanced use: memory.backend = "qmd" swaps SQLite for QMD:
Action: Consider for large vaults (10K+ memories).
MEMORY.md never loads in group contexts. Prevents personal information leakage.
Action: Put sensitive info in MEMORY.md, not daily notes.
Create a skill when:
Don't create a skill when:
---