How OpenClaw memory works — and how to see what your agent knows
Your agent's memory is plain files you can open, edit, and back up. What OpenClaw remembers, where it keeps it, and how to manage it.
OpenClaw’s memory is refreshingly unmagical: your agent writes what it learns into plain text files in its workspace, and reads them back when it thinks. That means you can open your agent’s memory, read it, edit it, and back it up like any other files — and it survives restarts, upgrades, and moves because it’s just data on disk.
What your agent actually remembers
Three layers, worth keeping distinct:
- Identity — who your agent is: its name, role, and personality, established when you first set it up (OpenClaw makes a small ritual of this — the “hatching”) and kept as workspace files you can revise.
- Long-term memory — what it knows about you and your world: preferences, standing facts, things you’ve told it to remember. Accumulated over time as notes in the workspace.
- Sessions — the running context of each conversation, held by the Gateway so chats pick up where they left off. Session context is working memory; the durable stuff gets distilled into the files above.
You can just… read it
This is the property that surprises people coming from cloud assistants. Everything durable your agent knows sits in its workspace under ~/.openclaw (full tour of what lives where) as ordinary, readable files. Want to know what your agent has written down about you? Open the folder. Want to correct a wrong fact it keeps repeating, or excise something you’d rather it forgot? Edit the file. Want to understand why it behaved oddly? The notes it acted from are right there. No export request, no vendor dashboard, no trust-us opacity — inspectability is the feature.
Two practical corollaries. First, memory is sensitive by construction — it’s a growing file of your life, so it deserves the same protection as the machine it lives on, and every backup of it is a copy of those secrets too. Second, memory is portable — the workspace on a new machine running the same OpenClaw version is your agent, which is how an agent can move homes without losing itself.
Making memory durable
Because memory is files, durability is a filesystem question, and the failure modes are mundane:
- Restarts are safe by design — process restarts and full machine reboots don’t touch the workspace. We’ve verified on our own pods that identity, memory, and channels come back intact after a hard reboot.
- Containers are safe only if mounted — in Docker setups, the state directory must be a volume on the host, or the agent’s mind lives inside a disposable container.
- Backups need to exist and be tested — one folder to back up, one practice restore to trust it. On Everpod pods that’s automatic and rehearsed; self-hosting, it’s item seven on the checklist and the one most people skip until the week they wish they hadn’t.
The through-line: OpenClaw made the agent’s mind your property — files you can read, on a disk you choose. What’s left to you is what property always asks: somewhere safe to keep it.