OpenClaw Memory System
OpenClaw's memory isn't a black box. It's a set of readable, editable files on your own server. Your assistant reads them on every session, writes to them as it learns, and builds a persistent picture of who you are and what you need - accumulating context over months.
The Architecture: Memory as Files
Most AI assistants store memory in opaque databases controlled by the AI company. You can sometimes see a list of 'remembered facts,' but you can't inspect how they're stored, verify their accuracy, or edit them in bulk. If the company deletes your data or changes their retention policy, your memory is gone.
OpenClaw takes the opposite approach. Memory is stored as plain text files in your workspace directory on your own server. Each file has a specific role in the memory architecture. Every session, your assistant reads these files to restore context before responding to you. Every session, it updates them with new information worth keeping.
This file-based architecture has profound implications. You can open any memory file in a text editor and read exactly what your assistant knows about you. You can correct mistakes. You can add context in bulk by pasting in documents, preferences, or background information. You can delete outdated information instantly. You have full control, full visibility, and full ownership.
The memory system is also persistent across all interactions - Telegram messages, heartbeat automations, subagent tasks. Everything that touches your OpenClaw instance reads from the same workspace files, so context built in one context is available everywhere.
SOUL.md: Your Assistant's Personality
SOUL.md is the foundational personality file. It defines who your assistant is and how it behaves. A minimal SOUL.md might specify communication style: 'Be concise and direct. Skip pleasantries. Get to the answer.' A detailed SOUL.md might cover areas of expertise, topics to avoid, preferred formats, and behavioral guidelines for different situations.
Your assistant reads SOUL.md at the start of every session and internalizes it as its identity. This means SOUL.md changes take effect immediately - edit the file and the very next conversation reflects the new personality.
Common things people put in SOUL.md: preferred communication style (formal vs casual, verbose vs concise), topics the assistant should always prioritize, things the assistant should never do (like send external messages without confirmation), and the assistant's 'persona' including a name if you want one.
You can also give your assistant opinions and values in SOUL.md. 'You believe in privacy-first technology choices.' 'You push back on vague requirements and ask clarifying questions.' 'You default to the simpler solution when in doubt.' These shape how the assistant reasons, not just how it communicates.
Some users iterate on SOUL.md extensively, refining their assistant's personality over months. Others write one version and never touch it. Both approaches work - the file is yours to evolve at whatever pace suits you.
AGENTS.md: Workspace Rules and Protocols
AGENTS.md governs how your assistant operates within your workspace. Where SOUL.md is about personality, AGENTS.md is about procedures. It answers questions like: what does the assistant read at session start? What files should it update? What's the protocol for committing code? What are the safety rules for external actions?
A well-structured AGENTS.md creates consistency across all your assistant's work. If AGENTS.md says 'always run TypeScript type checking before committing code,' your assistant follows that rule even if you forget to mention it. If it says 'ask before sending any external messages,' that safeguard applies to every session.
AGENTS.md is also where you document your workspace structure for your assistant. 'The main project is in ~/projects/myapp. Use PRs for all code changes. The staging server is at staging.myapp.com.' This context would otherwise need to be repeated every session - putting it in AGENTS.md means your assistant always has it.
You can organize AGENTS.md with sections for different domains: one section for coding protocols, one for communication rules, one for file management, one for security policies. The assistant reads it top to bottom and applies all of it.
MEMORY.md and Daily Notes: Episodic Memory
Daily notes are the raw log layer. For each day your assistant is active, it creates or updates a file at `memory/YYYY-MM-DD.md`. These files capture what happened: topics discussed, decisions made, tasks completed, things learned. They're intended to be detailed enough to reconstruct the day's context if needed.
Your assistant reads yesterday's and today's daily notes at the start of each session. This gives it immediate access to recent context without needing to load weeks of history. If you had an important conversation three days ago, it might not be in the automatically loaded files - but it's there in the daily note archive, searchable if needed.
MEMORY.md is the curated layer - your assistant's long-term working memory. It's meant to hold the facts that should always be available: your preferences, your ongoing projects, your relationships and contacts, your work context. Your assistant actively manages this file, adding new significant information and periodically reviewing daily notes to promote what's worth keeping.
The two-layer system mirrors how human memory works. Daily notes are like a detailed journal - comprehensive but not always in front of you. MEMORY.md is like your active mental model - condensed, current, always accessible. Over months of use, MEMORY.md becomes a rich, accurate representation of your working context that would take new AI tools hours to reconstruct from scratch.
Why This Beats ChatGPT's Memory Approach
ChatGPT introduced memory features that let it 'remember things about you.' The implementation is a managed list of facts that OpenAI stores on their servers, summarized and extracted by their system. You can view the list and delete items, but you can't inspect the full representation, can't edit individual memories, can't bulk-import context, and can't verify that what's stored accurately reflects what you've told it.
OpenClaw's memory is fundamentally different in five ways. First, it's explicit - every piece of information your assistant has is in a file you can read. No opaque database, no uncertainty about what it knows. Second, it's editable - you can modify, correct, or delete anything at any time. Third, it's portable - your memory files are standard markdown you can copy, back up, or migrate to another server. Fourth, it's on your infrastructure - stored on your Hetzner VPS, not on a company's servers subject to their data policies. Fifth, it accumulates deliberately - your assistant actively curates and consolidates memory rather than passively storing facts.
Over six months of daily use, an OpenClaw assistant with a maintained memory system has substantial context about you: your projects, your preferences, your contacts, your decision history. This depth isn't achievable with session-limited AI tools that reset between conversations.
PlugAndClaw ensures your memory files persist indefinitely on your dedicated VPS. No data loss due to plan changes, no shared storage limits, no automatic deletion. Your workspace is yours, and everything your assistant writes into it accumulates as long as you keep your server running.
Frequently Asked Questions
How does OpenClaw's memory system work?
OpenClaw uses a file-based memory architecture. Your workspace contains several key files: SOUL.md defines your assistant's personality, AGENTS.md contains workspace rules and instructions, MEMORY.md holds curated long-term memories, and daily notes files capture raw session logs. On each session, your assistant reads these files to restore context - effectively waking up with its full memory intact.
What is SOUL.md in OpenClaw?
SOUL.md is the personality file for your OpenClaw assistant. It defines who your assistant is: its communication style, values, areas of focus, and behavioral guidelines. You write it in plain markdown and your assistant reads it at the start of every session. Edit SOUL.md to make your assistant more formal, more casual, more technical, or more focused on specific topics - the changes take effect immediately.
What is MEMORY.md and how is it different from daily notes?
MEMORY.md is curated long-term memory - the distilled facts and context your assistant should always have available. Your assistant writes significant information here deliberately: preferences you've stated, decisions you've made, ongoing projects, key relationships. Daily notes (memory/YYYY-MM-DD.md) are raw logs of what happened each day. Your assistant periodically reviews daily notes and promotes important insights to MEMORY.md, similar to how humans review a journal and update their mental model.
Can I edit my assistant's memory files directly?
Yes, completely. All memory files are plain text markdown files on your server. You can SSH in and edit them directly, or ask your assistant to update them: 'Remember that I prefer concise replies' or 'Note that my project deadline is March 15.' Your assistant reads these files on every session start, so changes take effect immediately in the next conversation.
How is OpenClaw's memory better than ChatGPT's memory?
ChatGPT's memory is a black box - you can see a list of what it claims to remember, but you can't inspect the underlying representation, verify accuracy, or bulk-edit. OpenClaw's memory is explicit, readable files you control entirely. You can audit exactly what your assistant knows, correct errors, delete outdated information, and add context in bulk. Your memory is also stored on your own server, not on OpenAI's infrastructure.
Your AI assistant. Live in under 1 minute.
⚡ Build Your AI's Memory$39.50/month - persistent memory on dedicated VPS - 7-day money-back guarantee