WikiTrace links agent memory lessons to the trajectories behind them

External memory lets LLM agents improve from experience: trajectories from past tasks are distilled into concise lessons that are handed to the agent on new tasks. The paper starts from a problem with that setup. Memory can also cause what the authors call memory-induced degradation, where an agent fails on tasks it would have solved without memory. According to the authors, this often happens because the agent follows a lesson that is incorrect, or misapplies or misreads a valid one.
The authors trace the cause to how lessons are made. They are inferred from trajectories labeled only with task success or failure, and they are typically provided to the agent without the trajectories they came from. The agent therefore has no way to check them.
The proposed fix is WikiTrace, an evidence-linked memory system designed to let agents check each lesson against its original trajectory. The design is motivated by the authors' finding that a trajectory often still holds the evidence needed to catch an erroneous lesson. WikiTrace stores each lesson as a concise insight, linked to a summary of why its trajectory succeeded or failed and to the raw trajectory itself.
On a new task, the agent starts from all the insights. Whenever an insight lacks details needed to act, conflicts with another insight, or comes from a failed task, the agent descends through its links using terminal tools. It uses what it finds to fill in missing details or correct the insight before acting.
The authors validate WikiTrace on five agentic benchmarks. They report that it consistently outperforms existing memory approaches and a baseline given the same insights alone, while also reducing memory-induced degradation. Code is available on GitHub at github.com/yukyeongleee/wikitrace.
Key facts
- The paper defines memory-induced degradation: an agent with memory fails on tasks it would solve without memory.
- The authors say the cause is often an incorrect lesson, or a valid lesson that is misapplied or misread, and that agents normally cannot check lessons because the source trajectories are not provided.
- WikiTrace stores each lesson as a concise insight linked to a summary of why its trajectory succeeded or failed and to the raw trajectory.
- The agent follows links with terminal tools only when an insight lacks needed details, conflicts with another, or comes from a failed task.
- Validated on five agentic benchmarks, WikiTrace reportedly outperforms existing memory approaches and an insights-only baseline while reducing degradation.
Why it matters
Agent memory is usually pitched as a pure gain, but this paper focuses on a cost: memory can make an agent fail at tasks it would otherwise solve. The authors argue the root problem is that lessons are inferred from trajectories labeled only with success or failure, then handed over with no way to verify them. WikiTrace's answer is to keep the evidence attached to each lesson so the agent can check it before acting.
Who it affects
Anyone building LLM agents that learn from past tasks through distilled lessons or an external memory store. The idea applies to the lesson-store pattern the paper describes, where past trajectories are condensed into short guidance for new tasks.
How to use it
The authors link code at github.com/yukyeongleee/wikitrace. The described pattern is: store each lesson as a short insight, attach a summary of why the trajectory succeeded or failed, and keep the raw trajectory behind it. At task time, start from the insights and follow links with terminal tools only when an insight lacks details, conflicts with another, or comes from a failed task.
How solid is it
This is the authors' own report of results on five agentic benchmarks, where WikiTrace consistently outperforms existing memory approaches and an insights-only baseline while also reducing memory-induced degradation. The text gives no numerical results and does not name the benchmarks, models or competing memory methods, so the size of the gains cannot be judged from it. The claim is that degradation is reduced, not eliminated.
Risks and caveats
No cost, latency or token-overhead figures are given for descending through links, so the price of the extra checking is unknown. The motivating finding is that a trajectory often holds the evidence to catch a bad lesson, which means it does not always. Without named benchmarks and baselines, independent comparison would need the released code.