Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents

Quang Dao, Purvi Kathalkar, Kenneth Eaton


Abstract
Large language model (LLM) agents have demonstrated the ability to solve multi-step tasks requiring planning, tool use, and external information access, yet growing execution histories increase inference cost and expose reasoning to outdated, irrelevant, or misleading information, potentially degrading reasoning quality. Existing memory approaches organize or compress execution histories but provide limited mechanisms for deciding which memories remain active. We introduce the Weighted Memory Tree (WMT), a hierarchical memory system that organizes execution into tasks, subtasks, and actions while assigning each memory a dynamic retention score. Event-based updates and selection-based decay revise these scores, allowing WMT to preserve useful information, fold completed trajectories, suppress low-utility content, and retain access to folded context. We evaluate WMT on GAIA and its text-only subset, GAIA-Text, using Qwen3-8B, Gemma 4 E4B, and Llama-3.1-8B, with ablations and memory-poisoning experiments. Relative to linear memory, WMT improves accuracy by an average of 9.97 percentage points on GAIA-Text and 10.10 percentage points on GAIA, while reducing prompt-token usage by 32.8% and 32.2%, respectively. In our controlled memory-poisoning experiments, WMT reduces the measured persistence and propagation of intentionally injected unreliable information. Our results suggest that effective long-horizon agent memory depends less on storing more information than on deciding which information should remain active.
Anthology ID:
2026.realm-1.35
Volume:
Proceedings of the Second Workshop for REsearch on Agent Language Models (REALM 2026)
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Ehsan Kamalloo, Nicolas Gontier, Nikolai Rozanov, Maryam Hashemzadeh, Akhil Arora
Venues:
REALM | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
524–540
Language:
URL:
https://aclanthology.org/2026.realm-1.35/
DOI:
Bibkey:
Cite (ACL):
Quang Dao, Purvi Kathalkar, and Kenneth Eaton. 2026. Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents. In Proceedings of the Second Workshop for REsearch on Agent Language Models (REALM 2026), pages 524–540, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents (Dao et al., REALM 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.realm-1.35.pdf