Show HN: Valkey-powered semantic memory for Claude Code sessions https://ift.tt/JRqV1rT
Show HN: Valkey-powered semantic memory for Claude Code sessions I wanted to explore Valkey's vector search capabilities for AI workloads and had been looking for an excuse to build something with Bun. This weekend I combined both into a memory layer for Claude Code. https://ift.tt/5H2nIZX The problem: Claude Code has CLAUDE.md and auto memory, but it's flat text with no semantic retrieval. You end up repeating context, especially around things not to do. BetterDB Memory hooks into Claude Code's lifecycle (SessionStart, PostToolUse, PreToolUse, Stop), summarizes each session, generates embeddings, and stores everything in Valkey using FT.SEARCH with HNSW. Next session, relevant memories surface automatically via vector similarity search. The interesting technical bit is that Valkey handles all of it - vector search, hash storage for structured memory data, sorted sets for knowledge indexing, lists for compression queues. No separate vector database. There's also an aging pipeline that applies exponential decay to old memories based on recency, clusters similar ones via cosine similarity, and merges them to keep the memory store from growing unbounded. Self-hostable with Ollama for embeddings and summarization, or plug in any LLM provider. Runs on Bun, ships as compiled binaries. MIT licensed. March 3, 2026 at 12:02AM
0 टिप्पणियाँ:
एक टिप्पणी भेजें