memlens Tracks Down Memory Retrieval Failures
Feisty_Dog_1198 · reddit · 2026-07-15
The author built a tool called memlens specifically designed to track down why an AI agent's memory retrieval "failed to recall."
The Problem Solved
- Existing memory tools usually only return the final relevant results.
- But during actual debugging, the more critical questions are:
- Was it never stored in the first place?
- Was the score too low?
- Was it silently filtered out by a threshold?
How memlens Works
- It doesn't handle retrieval itself; instead, it wraps a trace layer that logs the complete scoring and retention reasons for every candidate memory.
- It currently supports two adapters:
- mnemos: Natively exposes the true score of each candidate.
- mem0: Bypasses the public API's hidden thresholds to fetch all candidates first, then reapplies thresholds based on the actual logic to reveal the filtered-out candidates.
- It also provides a terminal viewer, memlens view trace.json, for easy trace inspection.
The author explicitly positions it as a debugging layer to "observe the true scoring process," rather than just another retriever that fabricates scores.
More from coding & agent
- Kimi K3 rises to No. 4 on the Agent Arena leaderboard — HeyZoyaKhan · 2026-07-22
- Claude adds screen-recorded skills that can replay your workflow — CodeByPoonam · 2026-07-22
- Devin adds e2b sandboxes for remote agent execution — badphilosopher · 2026-07-22
- Hermes Agent Refactoring Proposal: Decoupling via Event Bus and Monorepo Slicing — Promptmethus · 2026-07-22
- ty now reads Pydantic config keywords and field metadata — charliermarsh · 2026-07-22
- Pensar Launches AI Security Agent to Autonomously Discover and Patch 0-Days — andriy_mulyar · 2026-07-22