LLM agents, programs that use large language models to perform tasks, often try to learn from past experiences by storing memories. But many stored memories are useless or even harmful, and keeping them slows the agent down and wastes computing resources.
The researchers built a system called Anchor that tests each candidate memory before keeping it. It replays the original situation with and without the memory to see if the memory actually changes the agent's decision in a helpful way. Only memories that produce a meaningful change and align with the intended outcome are kept.
On two benchmark tasks, Anchor improved the agent's success rate by up to 19.9% and its score by up to 17.2% compared to the best existing methods. It also used far fewer memory entries and consumed fewer tokens, meaning it was both more effective and more efficient.
