Remember When It Matters: Proactive Memory Agent for Long-Horizon Agents
In complex, long-horizon tasks—such as writing code or managing multi-step technical projects—AI agents often struggle with "behavioral state decay." This occurs when an agent forgets critical information, such as initial requirements, previous errors, or environment facts, as the task grows longer and the conversation history expands. This paper introduces a proactive memory agent that runs alongside the main AI, acting as an active intervention system that decides when to remind the agent of important information, rather than just passively storing data.
The Problem: Behavioral State Decay
As AI agents work through long sequences of actions, they often repeat mistakes they have already diagnosed or violate constraints they identified earlier. This happens even when the information is technically still within the agent's context window. The authors argue that the issue is not just about having access to data, but about the agent's ability to recognize when that data is relevant to the current step. Simply providing more context can distract the agent or increase latency, so the system needs a way to selectively inject reminders only when they are truly necessary.
How the Memory Agent Works
The proposed system uses a two-phase architecture that operates alongside an unmodified action agent. First, the memory agent observes the ongoing task and updates a structured "memory bank" using specific tools. This bank categorizes information into three types: private status tracking, stable knowledge (like requirements or file paths), and procedural history (like failed commands or successful fixes).
Second, the memory agent decides whether to intervene. At set intervals, it evaluates the current state and either remains silent or sends a concise, memory-grounded reminder to the action agent. This ensures that the action agent is only interrupted when a specific piece of information—such as a forgotten subgoal or a recurring bug—is likely to change the outcome of the next decision.
Performance and Results
The researchers tested this architecture on two major benchmarks: Terminal-Bench 2.0, which focuses on autonomous command-line tasks, and $\tau^2$-Bench, which tests interactive tool-use. The results showed consistent improvements for both weaker and stronger action agents. Specifically, the memory agent improved success rates by 8.3 percentage points on Terminal-Bench and 6.8 percentage points on $\tau^2$-Bench. Comparisons showed that this selective, proactive intervention outperformed other strategies, such as always-on reminders, general retrieval systems, or passive exposure to memory logs.
Future Directions
As a preliminary step toward creating more efficient, open-weight memory policies, the authors fine-tuned a Qwen3.5-27B model to act as the memory agent. By using a combination of supervised fine-tuning and reinforcement learning, they demonstrated that the model could learn to manage the memory bank and decide when to intervene effectively. This suggests that the capability to manage memory and provide timely, relevant guidance can be distilled into a model, rather than relying solely on prompting larger, more expensive systems.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!