Search returns a confidence level rather than just the best available match, so an agent can say it does not know instead of guessing from something loosely related — and there are modes for how strictly you want that enforced. The other design choice worth noting is contradiction handling: adding a fact that conflicts with a stored one triggers a single resolution call and updates the memory, rather than leaving both versions in place to be retrieved at random.
A local-first memory layer for LLMs, usable as a Python library or as an MCP server. Facts are extracted, rated for importance, decayed over time, and searched with a confidence level attached — so an agent knows when memory has nothing for it.
- `widemem_add` — extracts facts from text, resolves contradictions with what is already stored, and saves them
- `widemem_search` — semantic search across memories, ranked by similarity, importance and recency
- `widemem_pin` — store a fact at elevated importance so it cannot be forgotten
- `widemem_delete`, `widemem_count`, `widemem_export` for JSON export, and `widemem_health`
- Importance ratings from 1 to 10 with a choice of decay functions, including one that never decays
- Health, legal, financial and safety facts get an importance floor, immunity from decay, and forced contradiction detection, classified first by pattern and then by the model for implied cases
Python 3.10+. Install `widemem-ai` with the mcp extra and run the server module; storage is SQLite plus FAISS by default, with Qdrant as an alternative. Defaults are fully local — Ollama for the LLM and sentence-transformers for embeddings — configured through `WIDEMEM_LLM_PROVIDER`, `WIDEMEM_LLM_MODEL` and `WIDEMEM_EMBEDDING_PROVIDER`, with data under `WIDEMEM_DATA_PATH`. OpenAI and Anthropic are supported providers if you prefer them.
One command — pip install widemem-ai[mcp]
