Instead of an append-only note file, each memory carries an activation score built from how often and how recently it was retrieved; the score falls off over time and the decay sweep eventually archives what nothing touches, while anything marked protected is exempt. Embeddings, fact extraction and compression all run against a local Ollama, so there is no key to manage and nothing leaves the machine.
A local memory server backed by a single SQLite file holding the rows, a keyword index and vector embeddings side by side. Retrieval fuses keyword and vector search, then reranks with an activation score borrowed from cognitive science. A separate knowledge graph adds multi-hop discovery the flat index cannot do. Nothing leaves the machine: embedding and language-model work all run against a local Ollama.
- add_memory, get, update, forget — store with novelty checking and credential scanning, read, revise, or archive to a graveyard; memories marked protected cannot be forgotten.
- search — hybrid keyword and vector retrieval, fused and reranked; the everyday entry point.
- keyword_search — pure keyword matching, for exact terms, file names and error codes.
- graph_search — Personalized PageRank traversal that reaches related concepts through the graph rather than through wording.
- graph_stats_tool — node and edge counts, type distribution, top entities, graph density.
- stats, list_recent, list_topics — active, archived and protected counts; recent memories; topic clusters drawn from the graph's communities.
- reindex — incremental re-indexing of a markdown vault, skipping files whose hash did not change.
- extract_from_conversation — a two-pass pipeline that pulls facts out of text, then decides add, update, delete or nothing for each.
- compact_text — compresses text while pulling protected content out first and verifying the summary stayed faithful.
- decay_sweep — background maintenance that updates importance, promotes and demotes layers, and archives dead memories.
- agent_sync and check_conflicts — changelog-style sync between agents with consumer offsets, and the list of unresolved conflicts between them.
- check_integrity — verifies vault files against a stored manifest and reports modified, new and missing ones.
Python 3.9 or newer, the package from PyPI, and a SQLite file you nominate on the command line — the whole store is that one file. The real prerequisite is a running Ollama with the embedding model pulled: there is no API key because there is no hosted service, and the cost of that is that Ollama has to be up. The server pre-warms the embedding model at startup, so the first query does not pay the cold start.
One command — pip install memory-v2-hx
