I Built a Memory System for AI Agents Because They Keep Forgetting Everything
OpenClaw Engram is a memory plugin I built to solve the biggest problem with AI agents: they forget everything between conversations. Here's why I built it and how it works.
The biggest problem with AI agents isn’t intelligence. It’s memory.
Every conversation starts from zero. The AI doesn’t remember what you told it last week. It doesn’t know about that preference you mentioned. It doesn’t recall the decision you made.
That’s not useful for a team member. That’s a chatbot.
I built OpenClaw Engram to fix this.
The Problem
I was implementing OpenClaw for teams. Setting up workflows, connecting integrations, automating the boring stuff. It worked—until it didn’t.
The issue: every new conversation was a blank slate. We’d set up something in week one. By week two, the AI had no idea what we did. It would suggest the same things, forget the context, miss the nuances.
This is fine for a search engine. It’s not fine for a team member.
What I Built
Engram is a memory plugin for OpenClaw that gives AI agents persistent, searchable long-term memory across conversations.
Instead of forgetting everything between sessions, Engram:
- Extracts what’s worth remembering from each conversation using the LLM itself
- Stores memories as plain markdown files on disk—no database, no vendor lock-in
- Retrieves relevant context when the agent needs it—hybrid search that actually works
The agent doesn’t just have a conversation. It builds up knowledge about your team, your workflows, your preferences.
How It Works
There’s a lot under the hood, but here’s the gist:
Signal detection. Not every conversation turn is worth remembering. Engram scans each message locally (fast, free) and only triggers memory extraction when something actually matters—corrections, preferences, important decisions.
Structured extraction. When triggered, the LLM analyzes the conversation and extracts typed memories: facts, preferences, corrections, entities, decisions, relationships, principles. Each memory gets a confidence score.
Smart storage. Memories are plain markdown files with YAML frontmatter. You can grep them, version them, back them up. They’re yours.
Hybrid retrieval. When the agent needs context, it searches through past memories using QMD—a hybrid search that combines BM25 keyword matching with semantic understanding. The right memories surface at the right time.
Features I’m Proud Of
A few things that make Engram different:
Entity profiles. Facts about people, projects, and tools accumulate into per-entity files. The agent builds up a real understanding of who you work with, what tools you use, how your team operates.
Contradiction detection. If the agent learns something that conflicts with what it knew before, it catches it. Tracks the old memory, links to the new one, never loses the audit trail.
Memory linking. Typed relationships between memories—follows, contradicts, supports, related. The agent can traverse these connections to understand context.
Privacy by design. Memories never leave your machine. The only external call is to the LLM for extraction. Everything stays local.
The Result
Teams using Engram get an AI that actually knows their business.
Instead of explaining the same context every time, the agent remembers. It knows your team’s preferences. It recalls previous decisions. It builds on what it learned.
That’s the difference between a chatbot and a team member.
Why I Built It
I needed it. Plain and simple.
Every implementation I did, the memory problem came up. “Can it remember X?” “Will it know about Y?” The answer was always no.
So I built the thing. Engram is now part of every OpenClaw setup I do. It’s the foundation that makes everything else work.
I’ve been building and customizing AI agents for ecommerce teams. If you’re curious about what this could look like for your operation, let’s talk.
Want to talk about this?
I work with ecommerce teams on AI and automation. Happy to chat.
Related posts
Why I Customized an AI Operator for Ecommerce
After 25 years in ecommerce, I started customizing OpenClaw because every "AI solution" on the market was just a chatbot with a new logo. Here's why I did it and what I learned.
How to Set Up OpenClaw for Your Ecommerce Team
A practical guide to getting an AI operator running for your Magento, Shopify, or Adobe Commerce store. What to expect, what you need, and how long it takes.