Purpose: keymem provides an associative memory layer for LLM agents, advocating recall by association rather than by similarity alone. Most agent memory is a vector store, which can only return content literally close to the query and misses things that are associated with the query; keymem stores memories in a key graph, so that "Newton" can reach "strawberries" via the path Newton→apple→fruit→strawberry, a path that exists in the graph rather than in embedding space.
Main capabilities: memory and index concepts belong to two separate spaces, forming an N:M key/value graph, where one memory can be reached by multiple keys and one key can point to multiple memories; supports agent-driven Key→Memory→Key navigation and associative multi-hop recall; key types distinguish concept keys (matched by similarity) from name/proper-noun keys (exact match); supports cross-language key merging (IDF); features Hebbian link learning, where paths actually traversed are strengthened; optional hybrid retrieval (BM25 + dense + RRF) and cross-encoder reranking; local-first, with data stored in a local JSON graph and no external database.
Usage: it is an MCP server (CLI), not a library. Recommended to run with npx -y keymem, or install globally with npm i -g keymem; do not add npm i keymem as an application dependency to your project. It can be added to claude_desktop_config.json, and supports OpenAI embeddings or local embeddings (bge-m3 recommended, automatically downloaded on first run at about 570MB and cached). The repository is also a plugin marketplace, so a single install can connect the MCP server, the UserPromptSubmit hook, and the keymem skill. Agents use it through operations such as recall, read_key, read_memory, and remember.
Limitations: the material does not provide specific billing or pricing information; local embedding and reranking may add several seconds of latency to prompts that trigger recall; the hook waits at most 9 seconds by default; Codex requires manually trusting the hook and explicitly passing environment variables; only confirmation (confirm_memory) refreshes freshness, and mere reads do not.