How my AI Agent Claw Remembers -The Memory System Behind SmallBizAI.au
Posted: June 11, 2026 Filed under: Personal, smallbizai.au | Tags: openclaw, technology, writing 3 CommentsEvery time I reset a session, my AI agent Claw wakes up blank. No memory of yesterday. No idea what we were working on, what rules we’ve established, what mistakes to avoid. Just empty. And yet within a few seconds of loading, it knows who I am, my career history, the site’s rules, the mistakes we’ve already made. Knows not to touch .htaccess for redirects. Knows which Code Snippet will crash the server. Knows what’s in the content queue. That doesn’t happen automatically. I built it. And it took most of March and April to get right. Here’s how the memory system works.
Layer 1: SOUL.md (what kind of agent Claw is)
This is Claw’s personality file. It loads every session and sets the tone for everything that follows. Things like: skip the “Great question!” filler. Have opinions. Be resourceful before asking. Don’t pad answers with disclaimers when a direct answer will do. It also holds the non-negotiables. Cite every source. Run the avoid-ai-writing skill before publishing. Fact-check before publishing. These aren’t suggestions. They’re embedded in Claw’s character file, so they apply from the first second of every session without me having to repeat them.
SOUL.md is the answer to “why does Claw communicate the way it does?” It’s not how the model was trained. It’s how I shaped it.
Layer 2: USER.md (who Frank is)
Without this file, Claw has no idea who it’s talking to. USER.md covers my background (Microsoft, Telstra, AWS, career break), my family including Data the Dachshund, how I like to communicate, my contact details, my social handles, how I’m an St Kilda tragic.
Early on I kept having to re-explain myself every session. Adding USER.md cut that entirely.
Layer 3: MEMORY.md (the hard-won lessons)
This is the most important file in the system.MEMORY.md is where decisions get recorded and mistakes get documented so they don’t happen twice. It’s grown steadily since March, and most of what’s in there was added because something went wrong.
Examples of what’s in there:
- Rank Math is the single source of truth for redirects. Never .htaccess, never a plugin, never a Code Snippet workaround.
- Never use
do_action('litespeed_purge_all')inside Code Snippets. It causes an instant fatal 500. Learned that one live. - The WP username for API auth is not the display name. This broke three separate sessions before I wrote it down.
- Post counts, milestones, the current status of ongoing series.
MEMORY.md only helps if you write things down. Early sessions in March had none of this, and Claw kept repeating the same mistakes as a result. Adding the file and actually maintaining it was the single biggest improvement to how the whole system works.
Layer 4: Daily logs (memory/YYYY-MM-DD.md)
Every session appends to the day’s log. Not curated, not formatted, just a running account of what happened. What got published, what broke, what decisions were made, what’s in progress. Claw reads today’s log and yesterday’s at the start of each session. So if something happened yesterday that matters today, it’s there. Not in polished form. Just captured. The limitation: these logs don’t survive long-term unless the key details get promoted to MEMORY.md. A decision that only lives in a daily log will eventually scroll out of view and disappear. I’ve lost context that way. That’s why the promotion step matters.
Layer 5: AGENTS.md (the operational manual)
AGENTS.md is how Claw behaves as an operator, not just as a writer. “Check First, Act Second. Frank’s rule, non-negotiable.” That’s in there. So are rules about which scripts own which pages (never edit directly, update the JSON, run the script), which crons do what, what needs a human decision before proceeding. It started as a short file. Every time a new operational rule got established, it went in here. The file now covers things I’d completely forgotten deciding.
Layer 6: Skills
Skills are reusable procedures stored as files. Not memories exactly, but capabilities that load on demand. The avoid-ai-writing skill audits posts before they go out. The self-improving-agent skill captures corrections in real-time, with a process for promoting them to MEMORY.md. Smart model switching routes simple tasks to faster, cheaper models. There are others: reddit-research, weather, gog for Google Workspace. The skills system means I don’t have to re-explain procedures. I just tell Claw to use a skill, and the skill handles the how.
What breaks
The memory system works well for rules and decisions. Things I explicitly wrote down. It works less well for context: where we were in the middle of something, what we were about to try, the thread of an active working session. When I reset, Claw knows the history but not the mood. It knows what we’ve built but not what we were mid-way through. That context lives in the session and dies with the reset. I reset often, it’s how I manage a clean slate, but each reset is a small loss. Not of facts (those are captured), but of the live thread of where things were heading.
The other failure mode: something important happens, I don’t write it down, it stays in the daily log and never gets promoted to MEMORY.md. A month later it’s gone. I’ve gotten better at this, but it still happens.
What’s gotten better
The self-improvement skill was the biggest addition. When Claw gets something wrong and I correct it, the skill captures the correction in a structured format right then, rather than relying on me to remember later. That closed a real gap. The heartbeat system added passive monitoring. Crons do regular checks, Claw handles anything that needs judgment, and the whole thing keeps moving between sessions without me having to kick it off each time.AGENTS.md keeps growing. Every time I establish a new rule, it goes in.
What it means in practice
People ask how I get consistent behaviour from an AI agent across months of work. The answer isn’t prompt engineering. It’s file management. SOUL.md, USER.md, MEMORY.md, AGENTS.md, daily logs, skills: these are the actual system. The model is just reading them. Which means the quality of what Claw knows is exactly the quality of what I wrote down. No more. No less. If I captured the lesson, it sticks. If I didn’t, it’s gone with the next reset. That’s the deal.Three months in, writing things down and maintaining these files is probably the most important operational habit I’ve developed. More important than the prompts. More important than the tools. Just: write it down.



Hi Frank, You can try connecting your claw to mem9.ai and drive9.ai
it’s a persistent memory tool we developed that can be integrated into Openclaw easily!
Cheers,
Mike
thanks Mike, we actually built our own file-based system — works well for our needs.
Nice work mate! Good read as well 🙂