Back to AI Research

AI Research

Remember When It Matters: Proactive Memory Agent fo... | AI Research

Key Takeaways

  • 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...
  • In long-horizon tasks, decision-relevant state is often scattered across an expanding trajectory, while the action agent must surface it and act.
  • As trajectories grow, task requirements, environment facts, prior attempts, diagnoses, and open subgoals can be buried in the context window or pushed beyond it, failing to influence decisions when needed.
  • We call this failure mode "behavioral state decay".
  • We study memory as an active intervention mechanism rather than passive retrieval.
Paper AbstractExpand

In long-horizon tasks, decision-relevant state is often scattered across an expanding trajectory, while the action agent must surface it and act. As trajectories grow, task requirements, environment facts, prior attempts, diagnoses, and open subgoals can be buried in the context window or pushed beyond it, failing to influence decisions when needed. We call this failure mode "behavioral state decay". We study memory as an active intervention mechanism rather than passive retrieval. A separate memory agent runs alongside an unmodified action agent, updating a structured memory bank from the recent trajectory and deciding whether to inject a memory-grounded reminder or remain silent. The module is plug-and-play with frontier action agents and existing agent harnesses. Across Terminal-Bench 2.0 and $\tau^2$-Bench, it improves pass@1 for both weaker and stronger action agents, with gains of +8.3 pp on Terminal-Bench and +6.8 pp on $\tau^2$-Bench. Ablations show that selective intervention outperforms passive bank exposure, always-on injection, advisor-only guidance, and general retrieval. As an early step toward open-weight memory policies, we train Qwen3.5-27B on SETA using SFT and GRPO, improving validation reward and achieving partial transfer to Terminal-Bench.

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)

No comments yet

Be the first to share your thoughts!