7h ago

MemTrace Framework Turns LLM Memory Systems Into Traceable Execution Graphs

β€”β€”0β€”β€”
Original post

Introducing MemTrace: Making LLM Memory Systems Finally Debuggable πŸ”πŸ§  Memory is becoming a core component of AI agents. But today’s memory systems are still a "black box". When a memory-augmented agent fails, the real error may have happened: - dozens of turns earlier, - inside a retrieval step, - during memory consolidation, - or from a corrupted update that silently propagates over time. Existing logs cannot recover these long-range causal chains. MemTrace changes this. We introduce the automated tracing framework for LLM memory systems β€” turning opaque memory pipelines into transparent execution graphs that can be inspected, explored, and diagnosed step by step. ⚑ What MemTrace enables: 🧩 Plug-and-Play Instrumentation Seamlessly integrates with diverse memory systems (RAG, Mem0, EverMemOS, etc.) without modifying the original architecture. 🧠 Transparent Memory Execution Transforms opaque memory pipelines into structured execution graphs, making information flow, retrieval, updates, and propagation fully traceable. πŸ” Error Attribution Pinpoint the exact operation responsible for failure across long-horizon memory execution. 🚨 Benchmark Auditing While building MemTraceBench, we found that failure attribution in memory systems remains highly challenging β€” MemTrace still has substantial room for improvement. We also discovered annotation errors in existing memory benchmarks, revealing broader reliability issues in current memory-agent evaluation. πŸ”„ Towards Self-Evolving Agents MemTrace is not only a debugging tool. Its fine-grained attribution signals can directly drive closed-loop optimization, enabling agents to automatically repair faulty behaviors and continuously evolve from failures. πŸ“ˆ Using MemTrace-guided optimization, we improve downstream task performance by up to 7.62%. πŸ“– Paper: https://arxiv.org/abs/2605.28732 ⌨️ Code (coming soon): β€’ MemTrace: https://github.com/zjunlp/MemTrace β€’ smartcomment: https://github.com/zjunlp/smartcomment β€’ MemBase: https://github.com/zjunlp/MemBase We believe memory systems need the same thing software engineering once needed: not bigger models β€” but observability, tracing, and debugging infrastructure. #MemTrace #LLM #NLP #Agent #Tracing #Debugging

3:46 AM Β· May 28, 2026 View on X
MemTrace Framework Turns LLM Memory Systems Into Traceable Execution Graphs Β· Digg