公司动向The Decoder5/10

Meta AI uses a second AI agent as a memory coach to keep long tasks on track

By Jonathan Kemper

Meta AI uses a second AI agent as a memory coach to keep long tasks on track
图源:The Decoder

AI 摘要

Meta AI wants to stop AI agents from forgetting errors they've already diagnosed and repeating failed steps during complex tasks. A separate memory agent maintains a structured memory bank and decides when to remind the main agent and when to stay silent. The system improved scores by up to 8.3 perc

原文正文

Meta AI uses a second AI agent as a memory coach to keep long tasks on track

During long tasks, AI agents often forget constraints, repeat failed commands, and rediscover errors they've already diagnosed. Meta AI's proposed memory module tracks that information and decides when to remind them.

In a new paper, Meta AI researchers describe how these failures play out. An agent recognizes a constraint early on but later violates it while fixing an unrelated bug. It sees that a command failed, then tries a nearly identical version soon afterward. It diagnoses an error pattern but later treats the same pattern as new.

The authors call this "behavioral state decay." The state that guides the agent's decisions gets scattered across a growing task history. It can become buried deep in the context window or fall out of it altogether. Even when the information remains in the transcript or context window, it may no longer reliably shape the agent's behavior. Meta AI says simply giving agents access to longer histories doesn't solve the problem.

Deciding when memory matters

Existing memory systems focus on storing, updating, and retrieving information. According to the paper, that works well for personalization and recall across sessions. But agents working through a task face another problem. The system must decide when a memory is useful enough to bring back. Too few reminders lead to repeated mistakes, while too many add latency, consume tokens, and distract the agent from its current work.

This goes beyond summarization: a summarizer just decides what information to retain where Meta's system decides whether a stored execution state should influence the agent's next move. Since failure modes vary widely by task, a fixed summarization rule can't make that call reliably.

A second agent decides when to speak up

The proposed system pairs an unmodified "action agent" with a separate "memory agent." At fixed intervals, the memory agent reviews a sliding window of the most recent steps and updates a structured memory bank. It then decides whether to add a brief reminder to the action agent's next call or stay silent.

The authors say the module can work with existing agents and harnesses as a plug-and-play component. Unlike a general advisor model, it provides only memory-based reminders and doesn't offer broader strategic advice.

The memory bank has three sections. A private status field tracks progress and outstanding risks and is never shown to the Action Agent. Knowledge Memory stores stable facts such as requirements, file paths, and configurations. Procedural Memory records what the agent tried and what happened, including failed commands, successful fixes, and rejected hypotheses.

During each memory step, the agent can update the bank only through predefined tool calls rather than freely overwriting its contents. It then decides whether to reactivate a stored state and, if needed, writes a targeted reminder. Choosing not to intervene is part of the policy.

Selective reminders improve scores on two benchmarks

The researchers tested the system on Terminal-Bench 2.0, which evaluates autonomous agents in realistic command-line environments. They also used tau2-Bench, which tests conversational tool use in the airline, retail, and telecom sectors. Claude Opus 4.6 served as the memory agent, though the model has since received several updates.

With the older Claude Sonnet 4.5 as the action agent, the system solved 46 percent of Terminal-Bench tasks on its first attempt. The baseline solved 38 percent. On tau2-Bench, the task-weighted average rose from 55 to 62 percent.

Results varied by domain. Scores for airline and retail tasks each rose by about 10 percentage points, while telecom improved by only 3 points. The researchers say the uneven gains suggest that the memory agent intervenes at different rates depending on the task rather than applying a fixed aggregation rule.

The gains were larger for the weaker agent but didn't disappear with a stronger one. Opus 4.6 improved by 2.4 percentage points on Terminal-Bench and 2.5 points on tau2-Bench. The result suggests that the memory system does more than compensate for a weaker model's limited capacity.

Selective intervention works better than constant recall

The team removed one capability at a time to determine which parts of the system drove the gains. When the action agent received the full memory bank at every step, performance fell below that of the full system. A version without the "silence" option, which returned a memory at every step, remained competitive but produced less consistent gains across domains.

An advisor-style version without a persistent memory bank helped in some areas but hurt performance in others. The full design, which combines a maintained memory bank with selective reminders, performed best.

The approach also outperformed Mem0, a production memory layer that retrieves records through search. The difference isn't just which records the system retrieves. The memory agent also decides whether and how a stored state should enter the loop as a targeted reminder.

An example from the tau2-Bench "Airline" domain shows how that works. A user claimed Gold status, but the tool identified him as a regular customer. The baseline granted compensation based on the user's claim. The memory agent instead issued a reminder to rely on the verified tool data.

Most remaining errors involved calibration rather than memory. In some cases, for example, the memory agent treated a speculative inference with too much confidence.

Smaller open models need training to manage memory well

The main version doesn't require a specially trained model and instead runs as a prompted agent. The team also tested whether it could teach the intervention policy to an open model. It trained the smaller Qwen3.5-27B as the memory agent while keeping a much larger action model frozen.

Without training, the smaller memory agent reduced performance. Supervised fine-tuning recovered that loss, and later reinforcement learning improved its decisions about when to recall a stored state.

Meta AI lists several open questions, including training the memory and action agents together, teaching the system to invoke memory when needed instead of following a fixed schedule, and determining when literal memories work better than task-specific abstractions.

Meta AI has published the project's code on GitHub.

Meta isn't alone in running into this problem, and the industry still has no standard approach. The open-source Mastra framework uses two background agents that monitor and compress a conversation instead of keeping its full history in the context window. The GAM system aims to prevent "context rot" in long chats and, like Meta's approach, compares its results with the Mem0 memory layer. Other researchers are designing lifelong AI memory systems that can actively add, revise, and forget knowledge.

AI News Without the Hype – Curated by Humans

Subscribe to THE DECODER for ad-free reading, a weekly AI newsletter, our exclusive "AI Radar" frontier report six times a year, full archive access, and access to our comment section.

Subscribe nowRead on for the full picture.

Subscribe for hype-free coverage.

- Access to all THE DECODER articles.

- Read without distractions – no Google ads.

- Access to comments and community discussions.

- Weekly AI newsletter.

- 6 times a year: “AI Radar” – deep dives on key AI topics.

- Up to 25 % off on KI Pro online events.

- Access to our full ten-year archive.

阅读原文
Meta AI uses a second AI agent as a memory coach to keep long tasks on track · AI Daily