Learning What Not to Forget: Long-Horizon Agent Memory from a Few Kilobytes of Learning
About
Long-running language-model systems accumulate interaction history that outgrows the context window, so they must continually evict. When an eviction policy drops a load-bearing detail, for example an access token issued at login or a path the next call needs, the action fails. We present LRE (Learned Relevance Eviction), a few kilobytes, CPU-only, language-model-free scorer that learns which units of history are load-bearing and keeps them by verbatim extraction. Under a matched-budget comparison, in our experiment, no baseline dominates LRE on the accuracy-cost plane. On agents, LRE matches the accuracy of keeping the entire history overall. On the simplest tasks, it exceeds that no-eviction baseline by 27%, while requiring zero compressor calls and reducing peak context size by up to 52%. A controlled study trace shows LRE completes tasks where the others loop, finishing one such task in 37% fewer calls than keeping everything and solving 14 tasks where no other run policy does. On conversational memory, LRE outranks dense and token-pruning encoders at zero neural cost. In downstream evaluation, LRE gives the best budgeted answer quality on LoCoMo reading 68% fewer tokens. Its supervision can also be annotation-free: training only on the system's own behavior recovers 95% of the supervised scorer's effectiveness. We argue that, because memory eviction in LLM agents is a fidelity problem, it requires a deployable proactive policy where the future query is unavailable and exact state is decisive, and that cheap learned relevance can be sufficient.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Question Answering | Locomo | Accuracy17.7 | 10 | |
| Relevance Ranking | LongMemEvalS | Macro-AUC0.708 | 8 | |
| Relevance Ranking | Locomo | Macro-AUC82.9 | 6 | |
| Question Answering | LongMemEvalS | Accuracy29.6 | 5 | |
| Task-goal completion | AppWorld Easy normal 57 tasks (test) | Accuracy73.7 | 4 | |
| Task-goal completion | AppWorld Average 168 tasks (test normal) | Accuracy41.1 | 4 | |
| Task-goal completion | AppWorld Medium 48 tasks (test_normal) | Accuracy37.5 | 4 | |
| Task-goal completion | AppWorld Hard 63 tasks (test_normal) | Accuracy14.3 | 4 |