← Back to the issue of 14 November 2026
Agents that check their memories
Linking each remembered lesson to the run it came from lets an AI agent catch bad lessons, raising scores and cutting the tasks that memory makes it fail
The problem
External memory lets LLM agents improve from experience by distilling past trajectories into concise lessons. But memory can cause memory-induced degradation: the agent fails tasks it would solve without memory, often because it follows a wrong lesson or misapplies a valid one. Lessons are inferred from trajectories labelled only with success or failure, which do not reveal which actions caused the outcome, and they are usually given without the trajectories they came from, so the agent cannot check them.
Average accuracy hides this, so the authors measure Gain (memory turns failures into successes) and Regression (memory turns successes into failures) separately. In tasks the agent consistently solves without memory but fails with it, 52% of failures trace to a memory item the agent followed, most often a wrong one.
The method
WikiTrace stores memory in three linked layers: a concise insight (what to do, when it applies, the source run and whether it succeeded), a compilation summarising why that run succeeded or failed, and the raw trajectory itself. A compiler extracts at most three insights per run; insights are never updated or deleted, so the pool may contain redundant or conflicting ones.
On a new task the agent receives all insights plus the three most similar past runs. It is prompted to descend through the links with terminal tools (read, bash) before acting whenever an insight lacks needed detail, conflicts with another or comes from a failed run.
Evaluation uses eight suites across five benchmarks: ALFWorld, ScienceWorld and PlanCraft (text worlds), AppWorld (Test-Normal and Test-Challenge) and τ3-bench Retail (tool use). Three trials per suite and method; all methods build memory once from the same no-memory training runs. The agent is a Pi terminal agent, and agent and memory builders use deepseek-v4-flash with high reasoning effort. Baselines are No Memory, AWM, ExpeL, ReasoningBank and Insights Only (same insights, no source links or descent prompt).
Key results
- Best score on all eight suites; average 90.2 against 79.5 for No Memory (+10.7) and +3.2 over Insights Only.
- The only memory method that matches or exceeds No Memory on every suite.
- Regression 4.5%, against 6.5% for Insights Only and 9.7% for a rerun baseline without memory; lower than Insights Only on seven of eight suites.
- Gain exceeds the rerun baseline by 35 percentage points, against 27 for Insights Only and 7–14 for existing memory methods.
- Relative to Insights Only, wrong or out-of-scope memory items cause half as many regressions; the agent consults the linked evidence more on harder tasks, where its advantage is largest, and the gains hold under another backbone.
Limitations
- Memory is built from binary outcomes, so a compilation’s diagnosis of a failure, and any insight drawn from it, may be wrong; a source link lets the agent check an insight but does not verify it (authors).
- Every insight is placed in the first message, so the prompt grows with the memory; a memory too large to include in full would need retrieval, which the paper leaves open (authors).
- The causes of degradation and the labels of when the agent descends come from an LLM judge (gpt-5.6-sol) reading the agent’s reasoning, so they describe what the reasoning states, not what produced the outcome (authors).
Why it matters
Agents that learn from experience are only useful if the lessons do not quietly break tasks they could already do. By separating gains from regressions the paper makes that cost visible, and shows that keeping the evidence behind each lesson, rather than the lesson alone, reduces it while also raising scores.