DEV Community

Cover image for I got tired of repeating myself to every AI. So I built a persistent memory system.
Javier Rotllant
Javier Rotllant

Posted on

I got tired of repeating myself to every AI. So I built a persistent memory system.

The real problem

I run several businesses. I use Claude in Cowork, DeepSeek in TypingMind, GPT occasionally. Every conversation is its own island.

Two problems kept hitting me:

Long conversations burn tokens. There's a point where you have to start a new session — and everything you've built up just disappears. There's no way to carry accumulated context into a fresh conversation without losing what you've already covered.

What I discuss with Claude, DeepSeek doesn't know. What I decide in one conversation doesn't exist in the next. They're islands.

I researched the market

Before building anything, I had Claude research what already existed. Mem0, Letta, Zep — they all required standing up infrastructure, paying subscriptions, or depending on cloud APIs. Nothing convinced me.

And then Karpathy showed up. He had literally published his LLM Wiki concept a week earlier. The idea was very interesting: markdown files that AIs maintain as persistent memory. An incredible starting point.

But as I read through it, something didn't sit right with how I see things.

Where Karpathy and I diverge

Karpathy proposed three layers (raw/, wiki/, schema/) and thematic folders. Organize memory like a file system a human could navigate.

After years at strategy consulting, I'm trained to think in MECE frameworks, in issue trees, in hierarchical structures. It's instinctive. But when I asked myself "how do I actually remember things?", the answer wasn't "in folders." It was "by association."

That realization became the center of everything: "That's how I think — but not how I remember."

My brain thinks in MECE to analyze and solve problems. But it doesn't remember in MECE. It remembers by relevance, by frequency, by connections. And an LLM works exactly the same way: you give it context, it finds what's relevant, and it responds. It doesn't need your folder hierarchy.

The decision was radical: eliminate all hierarchical folders. A flat lake of documents. A compiler that creates the structure. And limit ourselves to two very clear categories — NEURONS (projects, contexts, knowledge) and ENABLERS (agents, credentials, tools).

Three reflections that came up during the build

As I was building, three things became increasingly clear:

  • You don't need specialized agents. If you give an AI the right context and clear rules, it can do anything. You don't need a different agent for each task. You need one AI with deep vertical knowledge and well-defined norms. The same way you'd work with a trusted person in a company.

  • Rules control, not roles. In an efficient organization, you don't say "only these 3 people can access the system." You say "to access the system, you do it this way." And you put controls in place. Access restrictions create bottlenecks when they're about WHO, not HOW.

  • Design for the AI, not for the human. Everyone organizes memory so a human can browse folders. But the human never opens the folder. The AI reads cold, in milliseconds. So who are you actually organizing for?

How it works (in 30 seconds)

You write in markdown. A Python compiler (1,173 lines, zero external dependencies) validates, deduplicates, auto-corrects, and generates a single optimized file. Any AI reads it.

From tens of thousands of characters of scattered context, you get a single compiled file of ~3.5K tokens. Roughly a 30:1 reduction — from ~114K characters of source to ~3.5K tokens of compiled output.

It's a build artifact for AI, not for humans. The AI consumes 3.5K tokens instead of the full source material. And it doesn't lose precision.

And I don't have to do anything. A file watcher detects changes and recompiles automatically in about 8 seconds.

What makes EIDARA different

Three things I didn't find in any other system:

  • It compiles, it doesn't accumulate. Mem0 accumulates facts. Letta accumulates blocks. EIDARA accumulates and then compiles into a single validated file — checksummed, with a git commit. So that anything that needs context consumes ~3.5K tokens instead of 30K+. It's a build step, not a log.

  • A democratic maintenance process. If an AI isn't sure whether a piece of content is still useful, it flags it. It takes 3 votes from different AI sessions to modify it. If any session disagrees, the vote resets. The system maintains itself.

  • Agents as documents. An agent is a .md file. agent-librarian.md contains the complete librarian protocol. Any AI that reads it becomes the librarian. To share an agent, you share a file. No installation, no platform.

EIDARA is MIT-licensed. You can clone it, fork it, modify it, or just use it.

How we tested it

I asked 4 different models — Claude Opus, Sonnet, DeepSeek V4, and Claude 4.7 — to run 52 tests each on their own. No human intervention. The goal: try to break the system.

The average score was 92.6%. The system never failed. Zero crashes. Zero data loss. And every bug the models found, we fixed. The newer model scored 87.6% — but caught 13 bugs we wouldn't have found otherwise.

Today the project has 103 unit tests that pass at 100%.

Full test methodology is published on GitHub.

Open source — and why

I built EIDARA for myself and my teams. To manage our projects without losing context between conversations. I've been using it daily across my 4 businesses for weeks. It's not a prototype — it's my actual workflow.

So I'm sharing it. In case it works as well for someone else as it has for me.

Installation is as simple as it gets: download the ZIP, hand the INSTALL file to any AI, and it does the rest. You don't even need to open a terminal.

GitHub → · Website → · Full test results →

What's next?

I keep using it daily with my projects. I make improvements as I need them. The project is stable, tested across 4 different models, and has 103 unit tests.

I hope it's useful. If you have questions or ideas, drop them in the comments — I'd love to hear how you handle AI memory across sessions.


Javier Rotllant · LinkedIn · javier@eidara.dev

Top comments (0)