WIDEMEM.AI
open source
MEMORY INFRASTRUCTURE FOR LLM AGENTS
(or: give your AI a memory that doesn't suck)
Goldfish memory? Fixed.
Persistent memory for stateless models. Add, search, and manage user memories across sessions. Importance scoring decides what matters. Temporal decay forgets what doesn't. YMYL keeps health and financial facts safe.
One pip install. Zero external services. Local-first with SQLite + FAISS.
> FEATURES
Nine reasons your memory system should try harder.
Batch Conflict Resolution
One LLM call for N facts. Not N calls. Your wallet will thank you.
Importance + Decay
Facts rated 1-10. Old trivia fades. Critical facts don't.
Hierarchical Memory
Facts → summaries → themes. Broad questions get themes, specific ones get facts.
Active Retrieval
“Wait, you said San Francisco AND Boston?” Contradictions caught, not ignored.
Self-Supervised Extraction
LLM extraction quality, local model costs. Eventually.
YMYL Prioritization
Health, legal, financial facts get special treatment. Some things you just don’t forget.
Uncertainty & Confidence
Knows when it doesn’t know. Three modes: strict, helpful, or “I can guess if you want.”
Retrieval Modes
fast / balanced / deep — choose your accuracy-cost tradeoff. Same system, three price points.
Memory Pinning
Pin a fact and it never decays. For allergies, API keys, and the rule you refuse to explain again.
> QUICK START
Five lines. That's it.
1 | from widemem import WideMemory
2 |
3 | memory = WideMemory()
4 | memory.add("I live in San Francisco and work as an engineer", user_id="alice")
5 |
6 | results = memory.search("where does alice live", user_id="alice")
7 | print(results[0].memory.content) # I live in San Francisco...> HOW IT WORKS
Most memory systems treat every fact the same. widemem doesn't.
Memories that know their place
Importance scoring (1-10) + time decay means "has a peanut allergy" always outranks "had pizza on Tuesday". Not all memories are created equal.
One brain, three layers
Facts roll up into summaries, summaries into themes. Ask specifics and get facts. Ask broadly and get the big picture. No extra API calls.
YMYL or GTFO
Health, legal, and financial facts get VIP treatment: higher importance floors, immunity from decay, and forced contradiction detection. Because forgetting medication is not a minor regression.
Conflict resolution that isn't stupid
Add "I live in Boston" after "I live in San Francisco" and the system detects the contradiction, resolves it in a single LLM call, and updates the memory. Like a reasonable adult would.
Local by default, cloud if you want
SQLite + FAISS out of the box. No accounts, no API keys for storage. Plug in Qdrant or any cloud provider when you're ready. Or don't.
Full audit trail
Every add, update, and delete is logged. Who changed what, when, and why. Because you'll eventually ask.
WORKS WITH
FROM THE BLOG
I BUILT A MEMORY LAYER THAT FORGETS ONLY WHAT DOESN'T MATTER
The founding pitch. Why forgetting is harder than remembering, what cognitive science says about selective memory, and how batch conflict resolution, importance decay, and YMYL safety work under the hood.
RECENT
YOUR AI MEMORY CAN'T TELL A RIVER BANK FROM A SAVINGS ACCOUNT
Regex-based YMYL classification flags 'bank of the river' as financial and misses 'my chest hurts' entirely. How we fixed both with a two-stage pipeline at zero additional API cost.
WHY YOUR AI CODING AGENT KEEPS FORGETTING YOUR PROJECT CONVENTIONS
CLAUDE.md, .cursorrules, and Aider conventions files don't scale past 200 lines. Here's how to give Claude Code, Cursor, and Aider a real memory layer with widemem.
THE REAL COST OF AI MEMORY: EVERY PROVIDER, COMPARED
How much does AI memory actually cost? Mem0, Zep, Letta, Cognee, LangMem, widemem. Real numbers from $0 to $475/mo.
WHY CONTEXT WINDOWS AREN'T MEMORY (AND WHY IT MATTERS)
Context windows keep getting bigger. 128K, 1M, 10M tokens. Bigger context is not memory. Three research papers, real cost math, and benchmark data explain why.
THE COMPLETE GUIDE TO LLM MEMORY
A deep dive into how memory works for LLMs. Core concepts, how OpenAI, Claude, Grok, DeepSeek, and Perplexity handle memory, and where this is heading.