Table of contents
How It Works
OpenClaw automatically:
- Saves key context after each interaction
- Updates long-term preferences
- References memory in future conversations
- Compresses old memories to save space
Memory Location
Default path:
~/.openclaw/memory
You can customize this in ~/.openclaw/openclaw.json:
{
"agent": {
"memoryPath": "/custom/path/to/memory"
}
}
Memory Structure
Memory is stored as Markdown files:
USER.md: Your preferences, contact info, goalsCONTEXT.md: Current projects, active tasksLONGTERM.md: Persistent facts, habits, historical dataSESSIONS/: Per-session memory files
Managing Memory
View Memory
Open the files in any text editor. Example USER.md:
# User Profile
- Name: Alex
- Timezone: America/New_York
- Preferred language: English
# Preferences
- Daily brief at 8am
- Weekly review on Sundays
- Quiet hours: 10pm–7am
Edit Memory
Edit the files directly. Changes apply on the next agent loop.
Export Memory
Copy the memory folder to back up or migrate.
Delete Memory
Delete files or the entire folder to reset. OpenClaw will recreate defaults.
Privacy
- Memory files are stored locally and never sent to providers.
- Encrypt your
~/.openclawfolder for extra security. - Review memory regularly to remove sensitive data.
- Use version control (Git) to track changes.
Next Steps
- Workspace Explained
- Prompt Files (AGENTS.md, SOUL.md, TOOLS.md)
- Second Brain Overview
- Security Overview
- Sessions, Main vs Non-Main
FAQ
Q: Is memory encrypted?
A: Not by default. Use full-disk encryption or encrypt the ~/.openclaw folder.
Q: How much memory is stored?
A: Usually a few KB to MB, depending on usage. Old memories are compressed.
Q: Can I disable memory?
A: Yes. Set agent.memory.enabled: false in config.
Q: Does memory sync across devices?
A: No. Use a shared folder or sync service manually.
Q: What if memory is corrupted?
A: Delete the memory folder and restart. OpenClaw will recreate defaults.