I Fixed OpenClaw's Memory Problem Forever
By Beau Johnson · · 17 min · 3.4K views
Chapters
- 0:00The memory problem (why your agent goes rogue)
- 1:30How default OpenClaw memory works
- 3:00Layer 1: Bootstrap files that survive compaction
- 4:00Layer 2: Daily memory logs
- 5:00Layer 3: Supermemory (semantic knowledge graph)
- 7:00Layer 4: Neon (PostgreSQL database)
- 8:30Why you need BOTH Supermemory and Neon
- 9:30Lossless Claw plugin (nothing ever gets deleted)
- 10:30QMD local search engine
- 11:00How 10 agents share memory and learn over time
- 12:005 steps to set this up yourself
About this video
Transcript
Read the full transcript
0:00The biggest problem with OpenClaw is getting the whole memory thing figured out. And in this video, I'm going to walk you through how I completely solved the dementia issues with OpenClaw and your agents. And I know you've experienced this before if you have OpenClaw going, you're talking to it and it completely forgets on what you had said the day before. I'm going to walk you through the detailed process of what I have going on and how I'm backing up the memory in hopes that you can take some of these concepts and apply them to your own setup. You know, your agent forgets things. This is it. Everyone goes through this. It loses instruction, it goes rogue in long sessions. And if you've been using OpenClaw for more than a week, you know exactly what I'm talking about. You're probably tired of it. So, I spent the last 3 weeks
0:46rebuilding my entire memory system from scratch, and now my agents remember everything. And in this video, I'm going to walk you through how. So, they learn over time. That's the important part. They get better as each day comes and goes. The agents get better. They get smarter. They know what content I'm doing and how I'm doing it and what's performing well and what's not. And they basically just get better at their jobs every single day. And I'm going to start off and tell you with the problem because if you don't understand why OpenClaw memory breaks, then you're going to have a harder time fixing it. Out of the box, OpenClaw memory is just a markdown file on a disk. Your memory markdown file, daily logs, and that's it. The model reads those files when a session starts, and here's where everything breaks. When your
1:31conversation gets too long and fills up what is called the context window, OpenClaw does something called compaction. It takes your entire conversation history and it summarizes it into a shorter version. And that summary is lossy. It means it loses the details. The details get lost in the sauce. Instructions you gave in a chat disappear. Your preferences you mentioned 2 hours ago are gone. This actually happened to Summer You. She's the director of alignment in Meta. And Meta's alignment lead, this lady told her OpenClaw agent, "Don't do anything until I say so." The session got long, compaction fired, that instruction vanished from the summary, and then the
2:16agent started deleting her emails. Awesome. If Meta's alignment director can't prevent this with default OpenClaw memory, you cannot either. So, why I'm going to be breaking this down because it is the most common question I get in our community and in the comments that come in on YouTube. How do I fix this memory problem? Well, I believe that I've come up with a concept that has been working really well where my agents actually remember stuff. So, if it's not written to a file, it doesn't exist, and that's the main rule. You know, your chat instructions are temporary. Files are permanent. So, that's the first thing you need to understand. Now, let me talk to you about what I built instead and what's been working for me. And it might work for you. Just depends on what you're doing. I have a four-layer memory system. And each layer
3:03does something different. So, layer one is those bootstrap files. Those are the soul markdown, the agents markdown file, the user markdown file, memory and tools markdown file. They load at every single session start from the disk, not from conversation history. From disk. So, compaction can never touch them. This is where I put everything that matters. Who I am, how I operate, what tools I use, my long-term memory, my long-term vision, my mission statement. These files survive everything, even compaction events. Layer two is daily memory logs. So, every single day I create a file called memory 3.19 or whatever. Everything that happens that day goes in there. All of the logs, the
3:49decisions we made, bugs we fixed, features we built, revenue updates. This is the raw journal. Real quick, before we keep going, if you're watching this and you want to actually build with some of these tools, not just watch videos about them, then you're going to want to check out our community down below, Shipping School. We have a full Claude code course, a full OpenClaw course, and four live bootcamps every single week where we actually help you get set up from scratch. Like actually set this thing up, not just watch a tutorial and figure it out by yourself. And we also provide one-on-one coaching, so you could book a call with me, we could share screens, and I can help you get Claude code or OpenClaw running on your machine. That's it. No fluff. I built this community because watching
4:35YouTube's only gets you so far. We launched it just 3 days ago and we have over 55 members. You need people around you who are actually building, people who hold you accountable, and coaches who can help you when you get stuck. I'll put the link in the description down below. Get in now before the price goes up. Here's the key. I don't just keep these as dead files on the disk. This is where layer number three comes in. Ah, Supermemory. This is what changes everything for me. Most people don't know about Supermemory. I could put a link down below. I'm not affiliated with them. They don't even have an affiliate program, but you should check it out if you're struggling with memory issues with OpenClaw. Supermemory is a semantic memory API. You push content in and it builds an intelligent knowledge graph on top of
5:21it. It's not just storing text. It extracts facts, it understands the relationships, it tracks the temporal context. It even automatically forgets outdated information. So, here's how I use it. I have a memory sync agent that runs every 4 hours. This is the heartbeat. It reads today's daily log, it reads the memory markdown file, and then it pushes a summary to Supermemory. Here's what makes it powerful. Every agent in my system has its own container inside of Supermemory. I have 13 agents, loosely based on the Wu-Tang Clan. We got the RZA, the GZA, Inspectah Deck, Masta Killa, Cappadonna. They all do different things. But my content writer, RZA, searches its own container. My
6:06intel agent, uh, which is Ghostface, fires off at 5:00 a.m., searches its own container. They're not waiting through each other's noise, basically. So, when my content agent wakes up at 6:00 a.m. to write video outlines, it searches Supermemory and asks, "What topics have we already covered?" And Supermemory doesn't just do keyword matching, it understands that a video about a doctor replacing a virtual then a video about a healthcare AI agent are basically the same topic. So, it prevents duplicates even when the words are completely different. It creates It makes it so things aren't so redundant. And Supermemory has this graph memory system where facts build up on top of other facts. So, if I tell it, "Alex works at
6:51Google." and then later I tell it, "Alex just started at Stripe." it doesn't just store both, it marks the Google one as outdated and the Stripe one as current. When an agent asks, "Where does Alex work?" it says, "Stripe." not Google. Default OpenClaw memory would surface whichever one matched the search query the best. Probably the older one because it's been in the files longer. I also have container tags for each Shipping School member in our community, so I can get better feedback on how to be leading these people, taking their first step in the AI journey, and getting and creating an outline for them, basically. So, when I hop on a coaching call with Daniel, let's say, I search his container and
7:37get instantly feedback on his profile, where he's stuck, and what to do to move past where he's getting stuck. We talked about and basically what we talked about last time or in the last call. The system builds this automatically from every interaction. Now, layer number four is Neon. This is a PostgreSQL database in the cloud. This is just what I use. You can use Convex, Supabase, whatever. But this is basically acting as the source of truth for the structured data. So, member counts, revenue numbers, video IDs, post history, blog slugs, anything in rows and columns that you'd query with a SQL. So, why do I need Supermemory and Neon? Because they do completely different things. Neon answers how many members we have. That's a SQL query. Select count
8:22from members. Done. Supermemory answers what Daniel is struggling with and what did we tell him last time. That's a semantic search across unstructured contexts. SQL cannot do that. So, I write to both systems for redundancy. If Supermemory goes down, Neon has all the structured data. If I need fuzzy contexts that SQL can't handle, Supermemory has it. They complement each other very well and neither replaces the other. Now, here's something that made a big difference that I just did today was I set up a filter prompt at the organization level within Supermemory. This tells Supermemory what to prioritize when it ingests content. So, I told it, "Hey, prioritize revenue
9:08numbers, member milestones, decisions we make, and the lessons that we've learned along the way." Basically, things like content topics for duplication events. We don't want to replicate the same videos over and over again. Basically, this helps it get much smarter. And I'm just sharing my journey with you in hopes that I can help you solve this memory issue. It creates a skip routine and status checks as well, agent execution logs, and temporary file paths. This cut out so much noise. Before this, my agents were searching through piles of garbage logs to find one relevant piece of context. Now, the searches are clean because the ingestion is clean. I also enabled reranking on the research-heavy agents. So, this means Ghostface, the intel agent, or the
9:55RZA search Supermemory, the results go through a cross encoder model that re-scores them for better relevance. This adds about 100 milliseconds of latency, but the accuracy improvement is insane. For the D-dupe agents where things avoid duplication, that's where speed matters more. I left re-ranking off. You want your D-dupe checks fast, not perfect. And I set up something called entity context for shipping school members. Each member gets their own container tag inside of super memory. So, member_daniel has all of Daniel's coaching notes, what he's building, where he's struck, how we can best help him. Member_Faheem has Faheem's context. When I'm going to
10:40hop on a bootcamp call and I search that member's container to get instant brief and know what is going on in his life and how I can help him, that's where it comes in. Where they get stuck, how to make him take the next step. Super memory builds this profile automatically for me. Everything I push into the container, the more interactions we have, the richer the profile gets. If you're struggling to keep up with content, well, I'm about to save you about 40 days worth of work. [music] I built something called content machine. It's 10 AI agents that run on the open claw orchestration, and they handle everything. Scripts, thumbnails, X posts, blogs, outreach, clips, newsletters, all of it. So, I went from 1,000 subscribers to 4,000 subscribers on YouTube in 7 days using this exact
11:26system. Every single morning I wake up >> [music] >> and the content's already done. I spend maybe 15, 20 minutes reviewing and approving them and I move on with my day. [music] It works for any niche, fitness, finance, real estate, marketing, whatever you are building, and it is 100% completely customizable to your use case. So, you get the mission control dashboard, all of the cron jobs, everything I've built over the last 40 days helping me gain more and more people to subscribe and join the community. So, you plug in your own thing and it molds it to you, it learns how you talk, and it writes so it doesn't sound like AI slop. $97 one-time, it's not a subscription. [music] I'll put the link down below and you'll thank me later. Now, I'm going to talk about two more tools that make this
12:12even better, and they'll be linked down below. Lossless Claw is a plugin that replaces open claw's compaction engine. Remember how I said compaction is lossy? It throws away those old messages. With lossless claw, endorsed by Peter Steinberger, nothing is ever thrown away. Every message gets persisted in SQLite. Older message gets summarized into a DAG structure, like a tree of summaries. And the agent gets tools to search and recall old details. So, if you told your agent something 6 hours ago, it can actually find it even after compaction. Think of default open claw as a goldfish. After 20 minutes, it forgets. Lossless claw turns it into an elephant. Everything is saved,
12:57everything is searchable. Then there's the common question I get, "Well, what about QMD? How does that compare to QMD memory?" Query markdown documents. This is built by Toby, who's the former CTO of Shopify, by the way. QMD is a local search engine that combines three types of search. BM25 keyword search, vector semantic search, and LLM re-ranking, all running locally on your machine. So, there's no API calls, there's no cloud, which is nice. But when should you actually use QMD? When you have a large document collections beyond your workspace, your Obsidian vault, project documentation, meeting transcripts from the last 6 months, QMD indexes all of it and gives your agent access through the MCP server. So, you can say, "Search my
13:44meeting notes for when we discussed the pricing strategy." And QMD finds and extracts the paragraph. The difference from default open claw memory is that the default only searches memory markdown file and the daily logs. QMD searches everything you point at it. Now, I'm going to talk to you about how all this comes together in practice with my agents. So, I have 13 agents all running on cron jobs. Every morning, 5:00 a.m. is when they kick off. Ghostface kicks off and gathers the intel. And first, it searches super memory with container tag Ghostface for all recent context. It searches Neon for current stats. It searches the web for the trends, and then it saves what it found back to both systems. At 6:00
14:29a.m., the Rizza wakes up and writes the video outlines. First thing it does is search super memory with a container tag the Rizza to find what topics we've already covered. Then it checks Neon for the last 30 video titles, so it avoids duplication. It searches the internet for those new use cases. It writes three scripts in the first run, and then it saves them to Neon. Pushes a summary of what topics were covered back to super memory. Every agent follows this pattern in one way or another. Search both memory systems before acting. Do the work, write the results back to both systems before the cron job dies. The next agent picks up where the last one left off. And over time, they genuinely get better. The content performance evaluator runs every Monday and writes
15:15what worked and what didn't, and then it writes it to a reference file. The Rizza reads that file the next morning, title hooks that got more clicks than they get used more, right? Topics that underperform get evaded avoided and thrown away. It's a feedback loop built on persistent memory. The whole point is default open claw gives you a goldfish that forgets every 20 minutes. What I built gives you a system where 10 agents share context across two databases, learn from their own performance, and never lose a single piece of information. So, if you want to set this up yourself, here's the quick version. Step one is put all your durable rules in files, not chat, memory, agents, and soul markdown file. These survive compaction. Step two, set up your super memory for semantic memory search. The
16:02free tier works fine. Step three, set up a database like Neon for structured data. Also free. Step four is make your agents write to both systems after every run. The fifth step is make your agents search both systems before every run. That's the loop. And you know what? This is exactly what we teach in the community, how to build this type of infrastructure so one person can run an entire content operation. And we have over 109 builders in the community within 11 days, which is crazy. Building together, shipping together, learning how we're building our businesses, and applying what we're learning. And we hold you accountable as well. Every Friday, we got to see what you're building, and we got to make sure you're making progress. We do six live bootcamps every single week. I'll put the link down below. Get in now before
16:48the price goes up. And if you haven't subscribed already, please do cuz we release about six videos every single day. We'll see you in the next one. Bye-bye.
Build this with us, live
Shipping Skool is a free community with 4 live build sessions a week. Bring your idea.
Join Shipping Skool — Free





