Skip to main content
Back

Google Cloud's ReasoningBank Helps AI Agents Learn From Mistakes, Boosting Success by 20%

Google Research's new memory framework lets LLM agents learn from both wins and losses, turning past mistakes into reusable reasoning strategies.

Pro

  • Google Research introduces ReasoningBank, a memory framework distilling reasoning strategies from both successful and failed agent trajectories.
  • Memory-aware test-time scaling (MaTTS) uses parallel or sequential rollouts to generate contrastive signals for better memory curation.
  • Up to 20% relative gain in success rate and 16% fewer interaction steps across WebArena, Mind2Web, and SWE-Bench-Verified.
  • Robust to LLM-as-a-judge noise; performance holds steady between 70-90% verifier accuracy.
  • Memory items evolve emergent behaviors, from low-level actions to compositional reasoning strategies.
  • Open-source Apache 2.0 code available at google-research/reasoning-bank, ICLR 2026 accepted.

Most LLM agents suffer from a strange kind of amnesia. Deploy them in a persistent role, hand them a stream of tasks, and they will happily repeat the same mistakes over and over again, discarding whatever insights they picked up along the way. A team from Google Cloud AI Research and UIUC has proposed a fix called ReasoningBank, a memory framework that distills generalizable reasoning strategies from an agent's own successes and failures, then feeds them back at test time so the agent gets measurably better as it works.

The paper, accepted at ICLR 2026, pairs this memory system with a technique called memory-aware test-time scaling (MaTTS). Together, they push success rates up by as much as 20% on standard web and coding benchmarks while cutting the number of interaction steps by 16%. The code is open source under Apache 2.0.

The forgetting problem

Agent memory is not a new idea, but existing approaches have a narrow view of what to store. Recent efforts have primarily focused on storing past interactions for reuse, but these approaches are often limited to leveraging raw trajectories or successful routines. That creates two blind spots. Raw trajectories are lengthy and noisy, so pasting them into future prompts drags on context without transferring much wisdom. And storing only successful workflows means the agent never learns from its own screw-ups, which is arguably where the richest signal lives.

ReasoningBank takes a different stance. It treats memory as a place for distilled, transferable reasoning patterns, extracted from both wins and losses without needing ground-truth labels.

How the memory bank actually works

ReasoningBank architecture diagram showing memory retrieval, extraction, and consolidation

Each memory item is a structured unit with three fields: a title, a one-sentence description, and a content block containing the distilled reasoning steps or operational insights. The pipeline runs in a closed loop with three stages:

  1. Retrieval. When a new task arrives, the agent embeds the query with gemini-embedding-001 and runs cosine-similarity search over the bank, pulling the top-k relevant memory items into its system prompt.
  2. Extraction. After the trajectory finishes, an LLM-as-a-judge labels it success or failure without any ground-truth reference. Successful runs contribute validated strategies; failed ones supply counterfactual warnings.
  3. Consolidation. New items are appended to the bank. The authors deliberately keep this step minimal, no fancy merging or forgetting, to isolate the effect of the content itself.

The judge is not perfect, and that matters. The team calibrates the LLM-as-a-Judge against ground-truth labels and finds baseline accuracy around 72.7% on WebArena-Shopping. Crucially, they show ReasoningBank remains robust even when the judge's accuracy is degraded to 70-90% in simulation. In other words, you do not need a flawless verifier for the loop to work.

Scaling experience, not just parameters

The second half of the paper introduces MaTTS, which asks a simple question: if you are already spending extra compute at test time to sample multiple trajectories, why not use that redundancy to build better memory?

Diagram comparing vanilla TTS, parallel MaTTS with self-contrast, and sequential MaTTS with self-refine

MaTTS comes in two flavors:

  • Parallel scaling. Generate k trajectories for the same query, then use self-contrast across them to identify consistent patterns and filter out spurious solutions before writing to memory.
  • Sequential scaling. Iteratively refine a single trajectory in the style of self-refine, using the intermediate notes and corrections as additional signal for memory extraction.

The interesting finding is that memory and scaling reinforce each other. Better memory steers the extra rollouts toward promising paths, and the diverse rollouts produce richer contrastive signals for the next round of memory. Without memory, scaling only nudges Best-of-N from 39.0 to 42.2. With ReasoningBank, MaTTS pushes it from 49.7 to 55.1.

What the numbers say

The team tested on WebArena, Mind2Web, and SWE-Bench-Verified, with Gemini-2.5-Flash, Gemini-2.5-Pro, and Claude-3.7-Sonnet as backbones. On WebArena with Gemini-2.5-Pro, the No Memory baseline hits 46.7% success rate; ReasoningBank alone lifts that to 53.9%, and adding MaTTS pushes it to 56.3%. Average steps per task drop from 8.8 to 7.1.

On SWE-Bench-Verified, ReasoningBank raises Gemini-2.5-Pro's resolve rate from 54.0% to 57.4%, while cutting average steps from 21.1 to 19.8. Baselines like Synapse (raw trajectories) and AWM (workflow abstractions) either barely move the needle or actively hurt in generalization-heavy settings such as WebArena's Multi subset.

Efficiency gains are especially concentrated on the trajectories that succeed. ReasoningBank reduces steps up to 2.1 on successful cases, a 26.9% relative reduction, showing that it helps the agent reach solutions faster rather than just truncating failed attempts.

Emergent strategy evolution

One of the more intriguing findings is qualitative. The memory items themselves evolve over time in ways that look a bit like the learning dynamics of reinforcement learning. A strategy might start as a low-level procedural rule (find the navigation link), then progress to self-verification (re-check the identifier), then to adaptive filtering (use search before assuming completeness), and finally to compositional reasoning that cross-references task requirements against available options.

That progression is not hard-coded. It emerges from the closed-loop process of retrieving, using, and updating memory as the agent encounters more tasks.

Where this is useful, and where it is not

ReasoningBank is a strong fit for agents in persistent, long-running deployments that see recurring task types: customer support automation, repository maintenance, browser-based data entry, or anywhere an agent will encounter variations of the same problem thousands of times. It works with off-the-shelf models via API and integrates as a system-prompt injection, so you do not need to fine-tune anything.

The limitations are worth flagging:

  • The success signal depends on an LLM-as-a-judge, which is imperfect for ambiguous tasks.
  • Retrieval is basic embedding similarity. Adding more retrieved experiences beyond one actually degrades performance, from 49.7 with one experience to 44.4 with four, suggesting that noise and conflicts creep in quickly.
  • Consolidation is append-only, so the bank grows unboundedly without pruning or forgetting policies.
  • Sequential MaTTS saturates fast; parallel scaling wins at larger k.

Getting your hands on it

The repository ships implementations for both WebArena and SWE-Bench, built on top of BrowserGym and mini-swe-agent respectively. It supports Gemini, Claude via Vertex AI, and GPT models. The core loop is a straightforward ReAct agent with the memory retrieval step injected as an additional system instruction:

Below are some memory items that I accumulated from past
interaction from the environment that may be helpful to solve
the task. You can use it when you feel it's relevant. In each
step, please first explicitly discuss if you want to use each
memory item or not, and then take action.

Memory items are stored as JSON with the title/description/content schema, and embeddings are pre-computed for efficient similarity search. If you already have an agent stack, plugging in ReasoningBank is closer to a config change than a rewrite.