Here’s the thing nobody tells you when you first build with AI: the model is smart, but it has no memory. Every conversation starts from zero. Every agent wakes up a stranger. Whatever it learned about you yesterday is gone. Unless you paste it all back in, every single time.

I ran straight into this wall building systems for clients. The agents worked, but they were stateless. To make them feel continuous, you end up stuffing the entire history back into the prompt on every call. It’s expensive, it’s fragile, and (this is the part most people miss) it actually makes the AI dumber.

Cramming everything into the model doesn’t give it a better memory. It buries the signal in noise.

The fix isn’t more context shoved into the AI. It’s a layer sitting above the AI that stores everything, and then injects only the most relevant piece at the exact moment it’s needed. So I built one. It’s called Pragma, it’s open source, and it’s free to run.

The three pains it kills

Every team building real agents hits the same three walls:

Pragma decouples the AI app from storage and retrieval entirely. One source of truth for user context, reachable over a simple API, from any app you build.

How it actually works

Memory gets sorted into cognitive schemas: explicit facts, behavioral patterns, preferences, entities, things that are only true for a window of time. And retrieval doesn’t rely on one strategy and hope. It runs three in parallel and fuses the results:

Those three get merged with Reciprocal Rank Fusion into one deduplicated, ranked answer, so the agent gets exactly the context it needs and nothing it doesn’t. No prompt bloat. No amnesia.

3 in parallel
retrieval strategies, semantic, keyword, and graph, fused into one answer, so the agent gets the context it needs and nothing it doesn’t.

The part I like most

My favorite piece is what I call the Memory Passport: export and import. An agent’s memory becomes portable: you can move a user’s entire context between platforms instead of it being locked inside one vendor. In a world where everyone’s trying to trap you, portability is a feature people switch for.

Why I gave it away

Pragma is on my GitHub, MIT-licensed, take it. Some things I build become businesses, some become tools I use every day, and some are ideas I wanted to see running. This one was an idea I couldn’t stop thinking about, and the memory wall is one every agent builder hits.

Whether it becomes something bigger later, I haven’t decided. For now it’s out there, free, so the next person hitting the wall doesn’t have to build the ladder themselves.