Persistent, queryable memory for AI coding assistants. Lore runs entirely on your machine and stores design decisions, rejected approaches, and coding patterns in a local Qdrant vector database, then surfaces them to Claude Code (or any MCP-compatible AI) before it proposes changes so it never re-suggests what you've already ruled out.
Lore exposes five MCP tools over stdio:
| Tool | What it does |
|---|---|
memory_search |
Retrieve relevant memories before proposing a design |
memory_record |
Store a new decision, rejection, pattern, or note |
memory_list_recent |
Browse recently stored memories |
memory_forget |
Delete a memory by ID |
memory_supersede |
Replace an outdated memory with a new one |
Memories are embedded with Ollama (nomic-embed-text) for dense vectors and BM25 for sparse vectors. Queries use hybrid retrieval (RRF fusion) with a recency boost — so recent decisions are ranked higher.
Add prompts/system-addition.md to your editor's instructions/rules file. This tells the AI to call memory_search before designing and memory_record when decisions are made.
Automatically extract memories from completed Claude Code sessions. Requires ANTHROPIC_API_KEY.
Add to ~/.claude/settings.json:
{
"hooks": {
"Stop": [{
"matcher": "",
"hooks": [{ "type": "command", "command": "/abs/path/to/hooks/session-end.sh" }]
}]
}
}lore add / memory_record
└─ scrub secrets
└─ dense embed (Ollama) + sparse embed (BM25)
└─ Qdrant UpsertWithSparse
lore search / memory_search
└─ embed query
└─ Qdrant hybrid search (RRF fusion) + recency boost
└─ return top-k
lore ingest-session <transcript>
└─ parse JSONL → scrub → chunk
└─ Anthropic extracts memories as JSON
└─ cosine dedup gate → upsert
Qdrant stores named vectors: dense (768-d cosine) + sparse (BM25). Repo identity is stable across renames: git.RepoID uses SHA256 of the remote origin URL when available.