LoreKit: open-source deterministic memory layer for coding agents, no vector index
madsthines · reddit · 2026-10-11
A developer open-sourced LoreKit, a memory layer for coding agents built on a contrarian idea: memory should be deterministic—same store, same branch, same read, every time—with no vector index, no model call on read, and no re-embedding bill.
Why: most of what coding agents need to remember is precise ("RLS returns 200 + [], not 4xx"; "run typecheck before claiming done"), not fuzzy.
Ranking without embeddings:
- Score on signal over recency: recurrence (a lesson re-learned five times beats a one-off), whether applying it helped, and word overlap with the branch name
- MMR near-duplicate dropping so one lesson can't flood the session
- Max one lesson per bot-written loop, preventing review-bot bookkeeping spam
- Fixed 3000-char budget, so reads cost the same at 6 or 60,000 memories, with a header noting what didn't fit ("8 of 6000 memories loaded")
- On tool-call failure, a second search on error terms injects up to three lessons before retry
It also stores metadata on how agents read/update/archive memories to analyze and optimize agentic workflows. Full scoring code and the four scale-breaking spots are in the author's blog post.
More from coding & agent
- Detective game benchmark: agent swarm plus strong reasoner solves 96/100 cases — No_Yogurtcloset_7050 · 2026-10-11
- laya-guard: local guardrail for coding agents blocks 25/27 AgentDojo attacks at ~90ms — Extreme_Ad5709 · 2026-10-11
- Sherlock game shows small-agent swarm plus strong reasoner solves 96/100 murder cases — No_Yogurtcloset_7050 · 2026-10-11
- Dev builds laya-guard: a 322M local model vets every coding agent command in ~90ms on CPU — Extreme_Ad5709 · 2026-10-11
- SF Tech Week takeaway: AI buzz shifts from agents to the infra agents need to run reliably — May_F1_ · 2026-10-11
- LLM as Holmes plus a swarm of small agents solves 96/100 detective cases at $0.58 per case — No_Yogurtcloset_7050 · 2026-10-11