add_memoryLABSCO SUMMARY
Memory that forgets on purpose, and can show why it kept something.
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.
What it is
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.
What you get
- 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.
Requirements
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 nomic-embed-text embedding model pulled (qwen2.5:3b too, if you want fact extraction and compaction): 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.
Setup effort
Follow the published steps — pip install memory-v2-hx
USE CASES
Keeping what matters across a context compaction
Store the decisions and constraints as memories, and let the next session search them rather than re-reading a transcript.
Finding a decision you made months ago
Search on the meaning and the words at once, reranked so what you actually keep using surfaces first.
Following a thread the search index misses
Traverse the knowledge graph from the concept you have to the ones connected to it, and see how dense that neighbourhood is.
Turning a long conversation into durable notes
Extract the facts in two passes and let the pipeline decide per fact whether to add, update, delete or do nothing.
Indexing a markdown vault you already keep
Re-index incrementally so unchanged files are skipped, and check the vault against its manifest for what moved.
Running more than one agent against one memory
Sync each agent from its own offset and read the list of conflicts rather than discovering them in the output.
Stopping the store from growing without limit
Run the decay sweep so unused memories are archived, and mark the ones that must survive as protected.
18 tools
Listed in project docs. Your client may show a different list.
getupdateforgetsearchkeyword_searchgraph_searchgraph_stats_toolstatslist_recentlist_topicsreindexextract_from_conversationcompact_textdecay_sweepagent_synccheck_conflictscheck_integrityBEFORE YOU INSTALL
What to know first
Tools you get
18 tools named in the project's documentation.
Requires
- memory-v2-server on PATH
- Ollama running locally, with the nomic-embed-text model pulled
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
pip install memory-v2-hxInstall Ollama (download it from https://ollama.com/download) and keep it running.
Pull the embedding model every search and store needs:
ollama pull nomic-embed-textOptional, only for extract_from_conversation, compact_text and knowledge-graph building:
ollama pull qwen2.5:3bMCP Clients
Claude Code
{
"mcpServers": {
"memory-v2": {
"command": "memory-v2-server",
"env": {
"MEMORY_V2_DB": "C:\\Users\\<YOUR_USERNAME>\\.memory-v2\\memory.db",
"MEMORY_V2_VAULT": "C:\\Users\\<YOUR_USERNAME>\\vault"
}
}
}
}Claude Desktop
{
"mcpServers": {
"memory-v2": {
"command": "memory-v2-server",
"args": [],
"env": {
"MEMORY_V2_DB": "/home/<YOUR_USERNAME>/.memory-v2/memory.db",
"MEMORY_V2_VAULT": "/home/<YOUR_USERNAME>/vault"
}
}
}
}