Why I Built a Sovereign Memory Control Plane for AI Agents
Key Takeaways
- โข AI agents need persistent memory across sessions โ standard solutions are either static files (no recall) or cloud APIs (no privacy)
- โข OmniMind uses three embedded databases (LanceDB, Kuzu, SQLite) for vector search, knowledge graphs, and provenance tracking
- โข A nightly Memify worker compresses raw episodic logs into higher-level knowledge โ your agent gets smarter while you sleep
- โข 100% local, zero cost, open source (MIT), installs as an OpenClaw plugin in one command
- โข 100% local โ no data ever leaves my machine
- โข Zero cost โ no monthly bill, no API credits
- โข Persistent โ survives sessions, survives restarts, survives time
- โข Evolving โ raw logs are useless at scale. I wanted my agent to actually learn over time
- โข OpenClaw-native โ install as a plugin, not bolt on an external service
- โข v0.3.0 โ Current release. ECL pipeline, all three stores, Memify worker. Running in production on my own agents.
- โข v0.4 โ Multi-agent shared memory, file watcher, inspection dashboard.
- โข v1.0 โ Memory-as-Asset: export, share, and selectively publish memory snapshots.
The Day I Realized My AI Agent Had a 20-Minute Memory
Every OpenClaw agent starts a new session with a blank slate.
It remembers what's in `MEMORY.md` โ but that's static. A configuration file. It doesn't remember what we talked about yesterday. It doesn't know that we already solved the database latency problem three weeks ago. It doesn't connect the dots across conversations.
I ran OpenClaw for months before I admitted this was a problem. The framework is excellent โ but the memory situation was stuck between two bad options.
#
Option 1: Static Files (Free, Doesn't Scale)
`MEMORY.md` + `AGENTS.md` + a folder of daily notes. This is the default OpenClaw setup. It's fine for configuration. It's useless for recall.
There's no vector search. No temporal awareness. No relationship tracking. Every time you need to know "did we already figure this out?" you're grepping markdown files manually.
#
Option 2: Cloud Memory APIs (Works, Costs Money, Gives Away Privacy)
Supermemory. Mem0. They're good products. But they send your agent's conversations to someone else's server, vectorize them, and charge $30-50/month for the privilege. Your private work, your architectural decisions, your half-baked ideas โ all on someone else's infrastructure.
If you're building a business on your agent's work, that competitive advantage shouldn't live in a cloud database you don't control.
What I Wanted
A memory layer that was:
So I built [OmniMind](https://github.com/apifenylabs/omnimind).
The Architecture: Three Databases, One Pipeline
Most memory solutions pick one storage layer and call it done. Vectors for search. Or a graph for relationships. Or SQL for audit.
I wanted all three.
#
1. LanceDB โ Vector Search
Every memory gets embedded (using local Ollama โ no cloud API calls) and stored in LanceDB. Columnar, embedded, fast.
What it's good for: "What did we say about database latency back in April?" โ semantic search across everything the agent has ever discussed.
#
2. Kuzu โ Knowledge Graph
Memories aren't isolated facts. They're connected. A decision about pricing relates to a competitor analysis relates to a feature prioritization thread.
Kuzu (embedded, columnar, no server) stores entities and their weighted relationships. When the agent recalls a decision about pricing, the graph surfaces the related context automatically.
What it's good for: "Why did we choose this approach?" โ the graph shows the reasoning tree, not just the final decision.
#
3. SQLite โ Provenance
Who stored this memory? When? Who accessed it last? Is it still relevant?
SQLite keeps the audit trail. No guesses about where a memory came from or whether it's stale.
What it's good for: Accountability. Knowing whether a memory is from yesterday's session or three months ago changes how much you trust it.
#
The ECL Pipeline (Extract โ Cognify โ Load)
Raw markdown โ chunked โ embedded โ stored across all three layers. Every time a memory is added, the pipeline:
1. Extracts structured entities from the text
2. Cognifies โ embeds the text for vector search, creates graph nodes and edges
3. Loads โ writes to all three stores atomically
#
The Memify Worker (Nightly Evolution)
Raw conversation logs are noisy. A single session might generate hundreds of memory entries. Many are trivial: "tried approach X, it failed." But over time, patterns emerge.
Every night, the Memify worker scans raw episodic logs, identifies patterns, and compresses them into higher-level semantic knowledge. It prunes stale edges. It strengthens relationships that appear repeatedly. It derives preferences and habits from repeated behavior.
Your agent gets smarter while you sleep.
Comparison: OmniMind vs Alternatives
| Feature | OmniMind | Supermemory | Mem0 | Static files |
|---------|----------|-------------|------|-------------|
| Local-first | โ
100% local | โ Cloud API | โ Cloud API | โ
|
| Free | โ
| โ $30/mo | โ $50/mo | โ
|
| Vector search | โ
LanceDB | โ
| โ
| โ |
| Knowledge graph | โ
Kuzu | โ | โ | โ |
| Provenance tracking | โ
SQLite | โ | โ | โ |
| Self-evolution | โ
Memify | โ | โ | โ |
| OpenClaw native | โ
Plugin | โ (manual) | โ (manual) | โ
(static) |
| Privacy | โ
No data leaves | โ | โ | โ
|
The One-Liner Install
```bash
openclaw plugins install @openclaw/omni-mind
```
That's it. No signup. No API key. No cloud.
What I Haven't Solved Yet (Being Honest)
1. Multi-agent shared memory โ Each OmniMind instance is single-agent. Shared context across agents is coming in v0.4.
2. Proactive file watcher โ Currently you trigger the ECL pipeline manually or via cron. Auto-watch on file changes is planned.
3. Scale testing โ It works great on my setup (about 2 weeks of dogfood). More data needed before calling it production-ready.
4. npm publish โ The package installs from local source today. ClawHub listing is in review.
Why "Sovereign"?
Because your agent's memory *is* your intellectual property. Every decision, every experiment, every failed approach โ that's knowledge. It shouldn't be locked in a SaaS database. It shouldn't vanish when a session ends. It shouldn't be a configuration file you manually edit.
Sovereign means you own it. All of it. Locally. Permanently.
What's Next
Get Involved
[GitHub: apifenylabs/omnimind](https://github.com/apifenylabs/omnimind) โ MIT licensed, contributions welcome.
If you build AI agents, I'd love to hear what breaks for you. Feedback, criticism, and PRs all appreciated.
- Agentic Workflows: How to Design AI Agents That Actually Do Your Job (Without Breaking Things)4 min read ยท Agentic workflows promise fully autonomous business processes, but reality is me...
- LangChain vs CrewAI vs AutoGen vs OpenAI Agents SDK: Best AI Agent Framework for 20263 min read ยท We pit LangChain, CrewAI, AutoGen (Microsoft), and OpenAI Agents SDK head-to-hea...
- AI Customer Support & Chatbots for Asian Businesses (2026): 15+ Tools for 24/7 Service in English, Mandarin, Japanese, Korean & SEA Languages12 min read ยท From multilingual AI chatbots handling Cantonese-English code-switching to voice...
Devin โ AI Software Engineer
The first AI software engineer. Delegate coding tasks and ship faster.
Learn About Devin โ