Zero-Mem: Zero-Token Memory Operations for LLM Agents
TL;DR Highlight
Zero-Mem cuts LLM calls from agent memory operations, reducing memory time 57.6% versus the fastest baseline.
Who Should Read
A backend developer building long-term agent memory who is worried about the cost and latency of LLM calls used for summarizing and storing memory.
Core Mechanics
- Memory operations use no LLM
- Only the final-answer reader calls an LLM.
- No other step consumes LLM input or output tokens.
- Encoder computation is accounted for separately.
- Keep original traces, not summaries
- Original interaction traces are the source of record.
- LLM-made intermediate records can omit or merge details and obscure the evidence.
- Two views organize the same traces
- An entity-context graph exposes connections across interactions.
- A temporal hierarchy preserves conversational locality and session state.
- Each query weighs the two views
- It retrieves from both views using query-dependent weights.
- It follows their structure to recover supporting relations or surrounding context.
- Rules discard conflicting evidence
Community Reactions
- Ablations back both views
- Ablations reportedly support the contribution of the two views and their query-dependent coordination.
- Experience with a KV-cache approach
- A commenter stores conversation KV cache in a local LLM and retrieves via attention scores after a prefill pass.
- They report SOTA results on LoCoMo and LongMemEval.
- Opinion that it is easy to implement
- One commenter says it is easy to build at the agent harness level.
- They say NER can be much simpler for programming and long-running task dialogues.
- Opinion that the real win is no generative rewriting
- A commenter says summaries make retrieval depend on omissions, hurting auditability.
- They want benchmarks on contradiction and changing values, and encoder and index costs reported next to token cost.
How to Apply
- Count LLM calls in your memory pipeline
- Log call count, tokens, and latency for each summarize, rewrite, and retrieval step.
- Check what share of calls happens outside the final answer.
- Store raw turn IDs next to summaries
- If you use summaries, attach source turn IDs to each one.
- Show the raw turns that supported each answer.
- Try retrieval with entity and session indexes
- Build an entity index and a session/time index, and query both with the same question.
- Compare which works better per question type.
- Build a conflict test with changing values
- Create conversations where attributes change across sessions and check if latest and earlier values are distinguished.
- Record encoder and index costs alongside token costs.
Try It
# Simplified version of the paper's method: memory audit prompt to paste into Claude/ChatGPT
You are a reviewer of agent memory design. In the memory pipeline below, separate steps that need an LLM call from steps that rules or indexes can replace.
[Pipeline description]
{{memory write/retrieval flow}}
[Sample conversation log]
{{10-20 turns of conversation}}
Instructions:
1. Make a table of each step, whether it calls an LLM, and whether it consumes input/output tokens.
2. Assume the raw conversation is kept with an entity-based index and a time/session-based index, and design the fields for each index.
3. For the question {{question}}, write rules for how much to use each index and how to discard conflicting evidence.
Next to try: feed in a conversation where a value changes (e.g., address or job title) and ask which is the latest and which is earlier.Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.