ReasoningBank

An agent that writes down its own lessons beats one that starts blank every time. On 187 shopping tasks it solves 49.7%, where no memory solves 39.0%.

Learn how an agent turns its wins and its mistakes into short strategy notes, finds the right note for the next task, and gets better while it works.

Pick a memory type, then press Run the 187 tasks. Watch the lines pull apart as the agent learns. Then we build, piece by piece, the memory item, the judge, the retrieval, and the scaling trick that make the gap.

You need a rough idea of what an LLM agent is (a language model that clicks, types and reads in a loop). We build the rest from zero.

A reading of Lecture 2, Context Evolution, of MIT MAS.S62 How to AI an AI for (Almost) Anything. Paper: Siru Ouyang, Jun Yan, I-Hung Hsu, Yanfei Chen, Ke Jiang, Zifeng Wang, Rujun Han, Long T. Le, Samira Daruki, Xiangru Tang, Vishy Tirumalashetty, George Lee, Mahsan Rofouei, Hangfei Lin, Jiawei Han, Chen-Yu Lee and Tomas Pfister (Google Cloud AI Research, UIUC, Yale), arXiv 2509.25140. Code: google-research/reasoning-bank. Every idea is re-taught here in our own words and devices.

Run a stream of tasks

The end points are the paper's Table 1: WebArena Shopping (187 tasks), Gemini-2.5-flash, success rate 39.0 (no memory), 40.6 (Synapse), 44.4 (AWM), 49.7 (ReasoningBank). The shape of each line between 0 and 187 is illustrative: the agent learns as tasks pass, so the lines start together and spread. Counts are the rate times 187, rounded.

Chapter 0

The Agent That Starts Blank Every Morning

See why an agent that never keeps a lesson repeats the same mistake, and what the paper proposes to change

Imagine a shop assistant who loses all memory every night. On Monday a customer asks for the date of their first order. The assistant opens the account page, sees a short list headed “Recent Orders”, and reads the oldest date on that list. It is the wrong date, because the list shows only the latest few orders. The assistant learns this the hard way. On Tuesday it has forgotten.

A modern LLM agent works like this assistant. An agent is a language model placed in a loop: it reads a web page or a code file, thinks, takes one action such as a click or a command, reads what changed, and repeats. Each job it receives is a task. When one task ends, the agent starts the next from a blank page.

The paper we study, ReasoningBank by Siru Ouyang and colleagues at Google Cloud AI Research, names three costs of that blank page. The agent repeats mistakes it made before. It throws away insights from related tasks. And it never becomes more capable over time, however many tasks it finishes.

Memory is the obvious fix, but what do you store?

The fix sounds easy: give the agent a memory, a store of notes from earlier tasks that it can read before a new one. Many teams have tried it. The hard question is what to put in the notes.

Earlier systems stored one of two things. Some kept the raw trajectory, the full record of every step the agent took. Others kept a workflow, a tidy recipe such as “click My Account, then click View All”, saved only from runs that worked. The paper argues that both fall short. A raw record is long and noisy. A workflow is narrow, and it ignores everything the agent learned from failing.

ReasoningBank stores something else: short notes about how to think in a situation, written from both wins and failures. A note might say: “When a page shows only recent items, look for a link to the full history before you answer.” That note helps on a shopping site today and on a forum next week.

Feel the difference before we explain it

The device below is a toy. Sixteen tasks arrive one after another, and each belongs to one of four families: finding the earliest order, collecting all results, filtering by category, and searching with a precise query. Each family has its own common slip. The top row is an agent with no memory. The bottom row writes one short lesson the first time it fails in a family. Drag the slider to let more tasks arrive.

Watch the same slip repeat

Each cell is one task. Green is solved, red is failed, and the letter is the task family. Drag the slider and compare the two rows, then read the lessons the bank holds.

16

Illustrative toy, not the paper's data. The task order and the first-try outcomes are fixed. The toy assumes one lesson fixes its whole family from then on, which is more generous than real life. The paper's real measurements start in Chapter 7.

Look at where the bottom row turns green. It does not turn green because the agent became smarter. It turns green because each family got its lesson, and after that the lesson was there to be read. That is the whole bet of the paper: a good note, found at the right moment, is worth more than another try from scratch.

Learning with no teacher in the room

There is a catch. In a real deployment nobody tells the agent whether it succeeded. No answer key sits beside the shop. The paper calls this test-time learning: tasks arrive as a stream, one at a time, and the agent must improve using only its own past work and its own judgement of how that work went.

So ReasoningBank needs a way to decide, alone, which past runs were wins and which were failures. It borrows a trick: it asks a language model to grade the run. We study that grader in Chapter 4.

The second idea: scale the learning, not only the answer

The paper has a second contribution. Many recent systems spend extra compute at answer time, for example by trying a task five times and keeping the best try. The authors ask a sharper question. What if those five tries also teach the memory? Five runs of the same task give a free comparison: what did the winners do that the losers did not? They call this memory-aware test-time scaling, or MaTTS, and Chapter 6 builds it.

The paper tests both ideas on three benchmarks: WebArena and Mind2Web for browsing websites, and SWE-Bench-Verified for fixing software bugs. It reports up to 20% relative improvement and up to 16% fewer steps. You played with the headline number in the hero at the top of this page.

The road

  1. The setting: the agent loop, a trajectory, and the stream of tasks, walked on one real example.
  2. What earlier memories stored: raw trajectories and workflows, and where they break.
  3. The memory item: a title, a description and a content line, written from wins and failures.
  4. The judge: how the agent grades itself, and how wrong grades change the result.
  5. The closed loop: retrieve, act, extract, consolidate, and why one retrieved experience is the default.
  6. MaTTS: parallel and sequential scaling that sharpen the notes.
  7. The results: Tables 1 to 3 and what each number means.
  8. Ablations and limits: which parts carry the gain, and what the authors admit.
  9. The field guide: numbers, checklist and the core code.

This paper is the reading for Lecture 2, Context Evolution. A memory that grows as tasks pass is one way the context an agent reads can evolve, and that is why the course assigns it.

An agent finishes a task and starts the next one with a blank page. Which cost does the paper name?

Chapter 1

The Setting: Agents, Trajectories and a Stream of Tasks

Learn the words the paper uses, and walk one real task step by step with and without a memory

Open an online shop as a customer and ask yourself: “When did I buy something here for the first time?” You click your account, scan the page, click again, and read a date. An agent does the same job, but it cannot see pixels. It reads the page as text and answers with a short command. This chapter teaches the few words you need to follow the rest of the paper.

The agent loop

At each step the agent receives an observation: the current state of the world, written as text. For a web page, the paper uses the accessibility tree. This is the page as a screen reader sees it: an outline of every link, button and field, each with a number, for example [1530] link ‘View All’. The number lets the agent point at one element.

The agent then writes a short thought and one action. The thought is private reasoning in plain words. The action is a command from a fixed list, such as click(‘1530’). The environment runs the command and returns the next observation. This think-then-act loop is called ReAct, and the paper uses it for every agent.

The full record of one task, every observation, thought and action in order, is a trajectory. Think of it as the agent’s diary for one job. The number of loop turns in it is the count of steps.

The agent as a function

The paper writes the agent as one function. It reads the history so far and the memory, and it returns the next action:

πL
The agent’s policy: the rule that picks an action. Here the rule is the backbone language model L, for example Gemini-2.5-flash.
o0:t, a0:t
Everything seen and done from step 0 to step t: the observations o and the actions a.
M
The memory module. In this paper M is the ReasoningBank. It starts empty.
A
The action space: the list of commands allowed. For web tasks it is page operations. For software tasks it is bash commands.
at+1
The next action, one command from A. The paper writes it as an element of A.

How does M reach the model? Simply. The retrieved notes are pasted into the system instruction, the standing text at the top of the prompt. The model reads them as part of its instructions, with a line that tells it to use them when relevant. That is the entire interface. We show the exact wording in Chapter 5.

One detail matters for honesty. Real observations are very long. The paper’s footnote says it uses the agent’s own thinking as a stand-in for the observation history when it builds memory, to keep text short. Remember this when we reach the memory prompts.

Walk one real task

Try the first-purchase task yourself. The device below follows the paper’s own case study (its Figures 1 and 15). Choose a run, then step through it. Watch the agent without memory answer from the “Recent Orders” table, and the agent with memory take two extra clicks.

Step through a trajectory

The top row shows each step’s action. The card shows what the agent sees, thinks and does at the chosen step. Switch the run, then drag the step.

1

The task, the answers (3/11/23 against March 2, 2022) and the idea of the memory item come from the paper’s Figures 1 and 15. The thoughts are our short paraphrases of those figures, and the page text is simplified.

Both runs start the same way. The difference is one thought. The memory run says “I should use the memory item about the My Orders link”, and that one sentence sends it to the full history. We will see how that note is written, found and judged in the next chapters.

Why does this loop matter for memory? Each turn is a chance to go wrong, and a wrong turn costs a step. A 30-step cap means an agent that wanders cannot finish. So a good note does two jobs at once: it raises the chance of a right answer, and it shortens the path to it. The paper measures both, and we will see them together in Chapter 7.

The stream: test-time learning

Now widen the view from one task to many. The paper lets tasks arrive one after another: q1, q2, up to qN. Each must be finished before the next appears, and the agent never sees future tasks. This setting is test-time learning: the agent keeps learning while it is being tested.

Crucially, no ground truth exists at test time. Ground truth is the correct answer or the official pass or fail mark. The agent gets none. It may use only its own past trajectories and its own self-check. The paper names two challenges: how to extract useful memory from past runs, and how to use it on future tasks.

How the paper measures an agent

Two numbers appear in every table. The success rate (SR) is the share of tasks solved: SR = (1/N) ∑ isSuccess(qi), where isSuccess is 1 for a solved task and 0 otherwise. The average steps (AS) is (1/N) ∑ Steps(qi), the mean count of loop turns. Higher SR is better. Lower AS is better, because each step costs time and money. WebArena caps a task at 30 steps.

The testbeds are three benchmarks. WebArena has 684 tasks on working websites: Shopping (187 tasks), Admin (182), Gitlab (180), Reddit (106) and Multi (29, tasks that need several sites). Mind2Web has 1,341 tasks that test cross-task, cross-website and cross-domain generalisation. SWE-Bench-Verified has 500 checked software bugs; the agent must write a patch that passes the tests. The backbones are Gemini-2.5-flash, Gemini-2.5-pro and Claude-3.7-sonnet.

In the paper’s test-time learning setting, what may the agent use to improve?

Chapter 2

What Earlier Memories Stored, and Why It Fell Short

Compare raw trajectories, workflows and reasoning items, and test which one still helps on a new task

You start a new job. A colleague who left last week hands you three things. The first is a screen recording of everything she did on her last project, eight hours long. The second is a checklist for one exact job: “open page X, press button Y”. The third is a page of advice: “when a list looks short, check whether more is hidden behind a link.” Which one helps you most on a job you have never seen?

The three handovers are the three kinds of agent memory this chapter compares. The first two exist already in the literature. The third is the paper’s idea.

Kind one: the raw trajectory

The simplest memory keeps the diary itself. Synapse (Zheng et al., 2024), one of the paper’s two baselines, organises past trajectories as in-context memory: it pastes similar old runs into the prompt, so the model can copy from them. In-context means the text sits in the prompt, and the weights do not change.

The paper’s complaint is practical. A raw trajectory is comprehensive but, in its words, “too lengthy and noisy” to apply to the current request. It carries every wrong turn, every element number, every page of text. The model must find the useful two lines inside a long story.

Kind two: the workflow

Agent Workflow Memory (AWM, Wang et al., 2025) goes one step up. It looks at successful runs, finds repeated patterns, and saves each as a workflow: a short routine with blanks to fill. The paper’s Figure 1 shows one, titled “Retrieve Information from Specific Page Section”, with steps like click(‘section_or_tab_id’) and a final message to the user.

A workflow is much shorter than a diary. But it is still a script of actions. It says what to press, not why. It works when the next task has the same shape, and it gives little help when the shape changes.

Two gaps the authors name

The introduction states the two drawbacks of kinds one and two plainly. First, they cannot distil higher-level, transferable reasoning patterns. Second, they over-emphasise successful experiences, so lessons from the agent’s own failures go unused. The result, the authors write, is memory that is “passive record-keeping” rather than guidance the agent can act on.

Both baselines learn only from successes. That is a design choice, and it has a cost. A failed run often contains the most useful lesson of all, because it shows exactly where the usual approach breaks.

Kind three: the reasoning item

ReasoningBank stores a memory item: a short, structured note about a strategy. Its Figure 1 shows the contrast on the same experience. The raw trajectory is a list of clicks with element numbers. The workflow is a fixed routine. The ReasoningBank item is titled “Navigation Strategy” and its content advises the agent to detect how a list is split into pages, look at every item in the relevant orders, avoid infinite scrolling, and use fallbacks when the first method fails.

Notice what is missing from that note: any website name, any element number, any exact words from the query. The extraction prompt even forbids them. We study that rule in Chapter 3. For now, notice what the absence buys: the note can travel.

Test it: does the note travel?

The device below lets you carry each kind of memory to three new tasks. The cards use the paper’s Figure 1 text (shortened). The “reuse” levels are our own reading of how well each card would apply, so treat them as a teaching aid, not a measurement. The measurement comes from the paper and appears under the card.

Carry a memory to a new task

Choose what the agent stored, then choose a new task. The meter shows how much of the stored text still applies. Compare the three kinds on the third task.

Card text is shortened from the paper's Figure 1. Reuse levels are our illustrative judgement. The measured numbers are the paper's Table 1, WebArena Multi subset (29 tasks needing several websites), Gemini-2.5-flash: no memory 10.3, Synapse 10.3, AWM 3.4, ReasoningBank 13.8.

On the third task the diary and the checklist lose most of their value, because they name things that do not exist on a code site. The advice survives, because it talks about lists and pages in general. That is the paper’s argument in one picture.

Does the paper’s data agree?

Yes, in the hardest setting. The paper’s Multi subset asks the agent to carry memory across several websites. There, the authors report a gain of +4.6 points in average success rate over the strongest baseline, and note that AWM “fail[s] to provide gains and even degrade[s]”. In the flash model row the numbers are 10.3 with no memory, 3.4 with AWM, and 13.8 with ReasoningBank. A script that does not fit the new task can pull the agent in the wrong direction.

One fairness point. The paper builds the baselines with the same retrieval and consolidation code as ReasoningBank. Only the extraction step differs: what gets written into memory. So the gap you see in the tables is a gap in memory content, not in plumbing.

Memory kindWhat it storesLearns from failuresTransfers across sites
Raw trajectory (Synapse)The whole diary of a past runNo, successes onlyWeakly: tied to one page
Workflow (AWM)A routine of actions with blanksNo, successes onlyPartly: fails when the shape changes
Reasoning item (ReasoningBank)A title, a description and a short strategyYes, from wins and failuresBest, by design
The paper’s baselines, Synapse and AWM, share a limitation. Which one?

Chapter 3

The Memory Item: Title, Description, Content

Distil a long trajectory into at most three short strategy notes, from a win or from a failure

After a match, a good coach does not hand the players the full video. She watches it once and writes three sentences on a card: what worked, what to avoid, and when to use it. Next week the players read the card in ten seconds. This chapter shows how ReasoningBank writes those cards.

The shape of one card

Every card in the bank, called a memory item, has exactly three parts. The title is a short name for the strategy. The description is one sentence that says what the item is about. The content holds the distilled reasoning: the steps, the reasons behind choices, and the practical insights. The paper says the items are “both human-interpretable and machine-usable”. A person can read the bank. A model can read it too.

The paper’s Figure 2 shows a real item. Its title is “Prioritize user account sections for personal data”. Its description starts “When a query requests user-specific…”. Its content begins “Systematically look for and click on links…”. Notice that it names no shop and no button number. It describes a habit.

Who writes the cards, and when

The agent’s own backbone model writes them. The paper sets the extractor to the same model as the agent, at temperature 1.0 (a setting that allows varied wording). After each task, two things happen in order. First a judge labels the trajectory success or failure (Chapter 4). Then the extractor receives the user query and the trajectory, and it answers in a fixed text format.

The format is plain Markdown. For each item the model writes a line # Memory Item i, then ## Title, ## Description and ## Content with the text beneath. The success prompt asks for 1 to 3 sentences of content. The prompt is short enough to quote in spirit:

  1. Think first. “You must first think why the trajectory is successful, and then summarize the insights.”
  2. At most three items. “You can extract at most 3 memory items from the trajectory.”
  3. No repeats. “You must not repeat similar or overlapping items.”
  4. No specifics. “Do not mention specific websites, queries, or string contents, but rather focus on the generalizable insights.”

Each rule has a reason. Thinking first makes the model find the cause before it writes the lesson. The cap of three keeps the bank short, so retrieval stays cheap. The ban on repeats stops one run from filling the bank with copies. The ban on specifics is the most important: it forces the lesson to be about the strategy, not about this one page.

Failures get their own prompt

The failure prompt is almost the same, with one change in the first rule. The model must “first reflect and think why the trajectory failed, and then summarize what lessons you have learned or strategies to prevent the failure in the future.” A success yields a validated strategy. A failure yields what the paper calls a counterfactual pitfall: a warning of the form “do this instead next time”. Both are stored in the same bank, in the same format.

The paper’s Figure 17 gives a worked failure. The task was to list the names and price range of Sony Bluetooth headphones. The agent typed a vague search, got a flood of unrelated items, and spent its steps clicking “next page” until the step limit ended the run with no answer. The diagnosis in the figure: the agent “spent endless steps on ‘page next’”. The extractor then wrote three items, titled “Search query optimization”, “Adjust number of items displayed per page” and “Use filters available”. Try both prompts in the device below.

Extract the cards

Choose what the judge said about the run. The middle box shows which prompt the extractor gets, and the cards below are what it writes. Switch and compare.

The failure titles and the diagnosis are from the paper's Figure 17. The success item's title is from Figure 2. The one-line descriptions and the success run's other two titles are our illustrative wording, written to match the prompt's rules.

What gets stored, and with what shape

The paper keeps the bank as a JSON file. Each entry holds three things: the task query, the original trajectory, and the memory items extracted from it. Each item has the schema {title, description, content}. The embedding of each query (a list of numbers, explained in Chapter 5) goes in a second JSON file, so similarity search is quick. The bank is saved for each independent run, so it grows through the whole stream.

pythonimport re

def extract(llm, query, trajectory, label):         # label: "success" or "failure"
    system = SUCCESS_PROMPT if label == "success" else FAILURE_PROMPT
    reply = llm(system, f"Query: {query}\n\nTrajectory: {trajectory}", temperature=1.0)
    items = []
    for block in re.split(r"# Memory Item \d+", reply)[1:][:3]:   # at most 3 items
        t = re.search(r"## Title (.*)", block)
        d = re.search(r"## Description (.*)", block)
        c = re.search(r"## Content (.*)", block, re.S)
        if t and d and c:
            items.append({"title": t[1].strip(), "description": d[1].strip(), "content": c[1].strip()})
    return items                                         # list[dict], len <= 3

The sketch is ours, written to match the prompt format in the paper’s Appendix A.1. The input is two strings, and the output is a list of at most three small dictionaries. That is the whole interface between a long run and a short memory.

Failure mode: the card that is too specific

Symptom. Suppose an item says “click element 1614 on the orders page”. On the next task it is retrieved, and the agent finds no such element. Measurement. The paper does not measure this directly, but its design shows the worry: its Multi results (Chapter 2) show that tied-down memory can fall below no memory at all. Fix. The prompt bans website names, queries and string contents, so the extractor abstracts before it writes. The rule is the guard.

Why does the extraction prompt forbid website names, queries and exact strings?

Chapter 4

The Judge: Labels Without an Answer Key

Let the model grade its own run, then measure how much a wrong grade hurts

A student finishes a practice exam alone at night. The answer key is locked in the teacher’s office. To learn from the exam, the student must first decide which answers were right. She rereads her work, checks it against what the question asked, and marks each answer. Her marks are imperfect. Are they good enough to study from?

The agent is in the same position. Chapter 1 told us that no ground truth exists during the stream. Chapter 3 told us that the extractor needs to know whether a run succeeded or failed, because it uses a different prompt for each. Something must decide, and the paper chooses a language model.

The judge

An LLM-as-a-judge is a language model asked to grade another model’s work. Here the judge is the agent’s own backbone, run at temperature 0.0 so that the same run always gets the same label. Its prompt (the paper’s Figure 10) sets the judge up as an expert in evaluating web agents and sorts tasks into three types:

  1. Information seeking. The reply must contain the information the user wanted, or say plainly that it is unavailable. The judge must also check that the agent did enough. If the user asked for the top searched items, the agent must have sorted by search count first.
  2. Site navigation. The judge studies the action history and the final page to see whether the agent reached the right page. The reply text does not matter.
  3. Content modification. The user wanted a setting or a page changed. The judge checks the final page to confirm the change.

The input is four pieces of text: the user’s intent, the trajectory, the final state of the page, and the agent’s reply (or “N/A” if none). The output is two lines: Thoughts: followed by reasoning, then Status: followed by success or failure. The code reads the second line and nothing else.

Why only two labels? Because the next step needs only a switch. The label picks the success prompt or the failure prompt. No score, no partial credit.

How good is the judge?

The authors measured it. On the WebArena Shopping subset, with Gemini-2.5-flash as judge, the judge’s labels matched the official ground truth 72.7% of the time. Roughly three out of every eleven labels are wrong. That sounds worrying for a system that learns from these labels.

So the authors ran a clean experiment. They simulated judges of different accuracy. A 100% judge uses the true labels. A 90% judge gives the true label 90% of the time and the flipped label 10% of the time. They went all the way down to 50%, which for a two-label problem is a coin flip. Then they ran the whole ReasoningBank loop on Shopping and recorded the success rate (the paper’s Figure 8). Try the same idea below. The grid shows 100 runs, and the slider sets how often the judge is right.

Make the judge worse

Green cells are runs the judge calls a success and grey cells are runs it calls a failure. A red ring marks a wrong label. Drag the accuracy down and watch the bars: the paper's measured success rate for the nearest tested accuracy is highlighted.

72.7%

The grid is a toy: 100 runs, 40 of them truly successful (invented), with a fixed random draw for each run, so a lower accuracy only adds wrong labels. The bars are the paper's Figure 8 (WebArena Shopping, Gemini-2.5-flash): 100% gives 52.4, 90% gives 49.7, 80% gives 48.7, 70% gives 49.7, 60% gives 47.6, 50% gives 47.6. With no memory the same subset scores 39.0.

Reading the result

Three facts stand out. First, the perfect judge does best, at 52.4. That is the sensible direction: better labels, better memory. Second, between 70% and 90% accuracy the success rate barely moves, from 49.7 to 48.7 and back to 49.7. The authors conclude the framework “is robust to noise in the verification step”. Third, even the coin-flip judge reaches 47.6, which is 8.6 points above no memory.

The paper does not explain the third fact, so here is our reading, labelled as such. A wrongly labelled run still contains real information about the site. The extractor is told to write strategies, not to certify truth. A lesson drawn from a run mislabelled as a win may still say “look for the full order list”, and that line is useful regardless of the label. The label only changes the tone of the advice.

Where the judge appears again

The judge is not the only grader in the paper. In MaTTS (Chapter 6) a language model also picks the best of N trajectories for the best-of-N score, using a different prompt (Figure 12). It rewards progress toward the goal, efficient use of steps, avoids loops, and weighs the severity of errors. It returns a JSON object with the winning index and an analysis.

Failure mode: a wrong grade becomes a wrong lesson

Symptom. A run that really failed is labelled a success, so its habits are filed as “validated strategies”. Measurement. At the paper’s measured 72.7% accuracy, about 27 of every 100 labels are wrong, and the device above counts how many of them go each way. Fix. The authors do not add a stronger judge. They show the loop tolerates the noise, and they list the judge as a limitation, suggesting stronger verifiers, human feedback or ensemble judgement for future work. That is a fair reading of their Appendix E.

Which statement matches what the paper found when it simulated a worse judge?

Chapter 5

The Closed Loop: Retrieve, Act, Extract, Consolidate

Follow one task through the whole cycle, and see why fetching one experience beats fetching four

You walk into a library and ask: “How do I find the oldest record in a long list?” A good librarian does not read you the whole shelf. She thinks, “We had a question like this last spring”, walks to one folder, and hands you its single page of advice. Finding the right folder is half of the work. Writing the advice is the other half. This chapter ties the pieces of the last three chapters into one cycle.

Four moves, repeated for every task

The paper’s Figure 2 draws a loop with three named steps. We add the act step, which sits between them, so you can see the full cycle:

  1. Retrieve. Embed the new task, find the most similar past task, and fetch its memory items.
  2. Act. Run the ReAct loop with those items pasted into the system instruction.
  3. Extract. Have the judge label the trajectory, then have the extractor write new items (Chapters 3 and 4).
  4. Consolidate. Add the new items to the bank. The next task now sees them.

Retrieve: from words to numbers to a neighbour

A computer cannot compare the meaning of two sentences directly. So it turns each sentence into an embedding: a list of numbers, a vector, produced by a model trained so that sentences with similar meaning get similar lists. Picture each sentence as an arrow from the origin. Arrows that point the same way mean similar things.

To measure “pointing the same way”, use cosine similarity, the cosine of the angle between two arrows. It is 1 when they point the same way, 0 when they are at right angles. The paper uses cosine distance (one minus this) over embeddings from gemini-embedding-001, served through Vertex AI.

cos(u, v)
The similarity of two embeddings, from −1 to 1. Higher means closer in meaning.
u · v
The dot product: multiply the two lists number by number, then add the results.
‖u‖ ‖v‖
The product of the two arrow lengths. Dividing by it removes length, so only direction counts.

A worked toy case with two numbers per arrow. The new task is u = (4, 3), length 5. Past task A is v = (3, 4), length 5: dot product 4×3 + 3×4 = 24, so cos = 24 / (5×5) = 0.96. Past task B is (2, 0), length 2: dot product 8, so cos = 8 / (5×2) = 0.80. Past task C is (0, 1), length 1: dot product 3, so cos = 3 / 5 = 0.60. Task A wins.

The search keeps the top-k most similar experiences. Each experience carries the (up to three) items extracted from it. The paper’s default is k = 1. With one experience, at most three items enter the prompt.

Act: how the notes reach the model

The retrieved items are pasted into the system prompt, each as its title and content. The paper’s wording adds an instruction that, in spirit, reads: here are memory items from past interactions that may help; use them when relevant; at each step, first say whether you want to use each item, then act. That last clause forces the agent to reason about the memory, not just absorb it. Our case study in Chapter 1 showed it: “I will use memory item 5.”

Consolidate: the simplest thing that works

Consolidation, in the paper’s own words, is “a simple addition operation”. New items are appended. There is no pruning, no merging, no forgetting. The authors chose this deliberately. A smarter rule would add another variable, and they wanted gains to be attributable to the content of memory. The paper’s future-work section proposes merging and forgetting for later.

Follow one task through with its data flow. A query string goes in. The embedding model turns it into a vector of d numbers (the paper does not state d). The bank holds one stored vector per past task, so the similarity step compares against an n×d table and returns n scores. The top-k indices select experiences, which expand to at most 3k items. Those items become a block of text. After the run, the trajectory and query go to the judge and the extractor, and at most three new items plus one new query vector join the bank.

Try k yourself

Why is the default only one experience? Drag the slider in the device below. The scatter shows past tasks as arrows from the origin, and the lines mark the k nearest by angle. The bars are the paper’s own ablation (its Figure 13).

Fetch k experiences

Choose a new task, then set k. The new task is the teal arrow; past tasks are purple dots; fetched ones are ringed. The bars show the paper's success rate for each k, with your k highlighted.

1

The scatter is a toy in two dimensions: 14 invented past tasks in three clusters. Real embeddings have many more dimensions. The bars are the paper's Figure 13 (WebArena Shopping, Gemini-2.5-flash): k = 0 gives 39.0, k = 1 gives 49.7, k = 2 gives 46.0, k = 3 gives 45.5, k = 4 gives 44.4.

The curve peaks at one. The first fetched experience lifts success from 39.0 to 49.7. Each extra one lowers it a little: 46.0, 45.5, 44.4. The authors read this as a sign that “excessive experiences may introduce conflicts or noise”, and that “the relevance and quality of memory are more crucial than sheer quantity”.

pythondef solve_one(task, bank, agent, judge, extractor, embed, k=1):
    q = embed(task)                                        # shape (d,)
    sims = bank.vectors @ q / (norm(bank.vectors, axis=1) * norm(q))  # shape (n,)
    top = sims.argsort()[::-1][:k]                       # k most similar experiences
    items = [it for i in top for it in bank.items[i]]      # at most 3k items
    system = BASE_PROMPT + format_items(items)             # title + content of each item
    trajectory = agent.run(task, system, max_steps=30)   # ReAct, temperature 0.7
    label = judge(task, trajectory)                        # "success" or "failure", temperature 0
    new_items = extractor(task, trajectory, label)         # at most 3 items
    bank.append(vector=q, items=new_items, trajectory=trajectory)  # no pruning
    return trajectory

Failure mode: more memory, worse agent

Symptom. You add memory and the success rate drops when you fetch more of it. Measurement. On Shopping, success falls from 49.7 at k = 1 to 44.4 at k = 4, yet all four settings beat no memory at 39.0. Fix. Keep retrieval tight: take the single best match first, and improve item quality before you enlarge the fetch.

The paper’s default retrieval fetches k = 1 experience. Why not more?

Chapter 6

MaTTS: Spend More Compute to Learn Better Memory

Run several tries on one task, compare them, and write sharper notes than any single try could give

Five students get the same puzzle. Each works alone and writes down an answer. Then they sit together and compare. Two of them got it right and three did not. The talk that follows teaches more than any single solution could. “You went down the left path and hit a wall, and I did not, why?” The group learns from the differences.

The paper’s second idea is to give an agent that same classroom. It is the idea behind memory-aware test-time scaling, or MaTTS.

Background: test-time scaling in two plain paragraphs

Test-time scaling (TTS) means spending more compute while answering, not while training. The simplest recipe is best-of-N: run the model N times on one problem, then pick the best result with a scorer. Another is self-refinement: the model finishes, rereads its own work, and fixes mistakes, again and again. Both are known to help on maths and coding. The paper notes that for multi-step agent tasks they are less studied, and that earlier work ignored the role of memory.

Now put memory in. The obvious combination, the paper’s Figure 3(a), runs N trajectories and turns each into memory items on its own. The authors call this vanilla TTS, or “MaTTS without aggregation”. It wastes something: the N runs are about the same task, so they can be compared, and vanilla TTS never compares them.

Parallel scaling: self-contrast

In parallel scaling the agent produces k trajectories for the same task, all guided by the currently retrieved memory. A single extractor call then sees all k at once. Its prompt (Figure 11, left) tells it to use self-contrast: find patterns that led to success again and again, find mistakes in the failures, and write strategies that hold beyond the exact pages. It may extract at most five items from all the trajectories together, each with 1 to 5 sentences of content.

One subtle point in the paper’s appendix: this prompt does not first ask a judge to label each run. It asks the model to compare directly. The contrast itself supplies the signal, so the memory does not depend on an external verdict.

Sequential scaling: self-refinement

In sequential scaling the agent works on one trajectory and then rechecks it. The first recheck instruction says: carefully re-examine the previous trajectory, including your reasoning and actions; check you used the right page elements and that your reply answers the query; correct any inconsistency, or confirm the answer. Later rechecks just say “Let’s check again.” The output keeps the same think-and-act format.

The scaling factor k is the number of trajectories in the parallel case and the number of refinement steps in the sequential case. The paper’s important detail: the notes the agent writes while rechecking also go to memory, because they hold “reasoning attempts, corrections, and insights that may not appear in the final solution”. And k = 1 means no scaling at all.

How the final answer is chosen

For parallel scaling, the paper reports Best-of-N (BoN) as one metric. A language model reads all N trajectories at once (the prompt of Figure 12) and picks the single best, using four criteria: progress toward the goal, efficiency, loop detection and error severity. It returns a JSON object with the winning index. The other metric is Pass@1, the success rate of one randomly chosen trajectory, which measures the quality of the average run after memory curation.

See the scaling curves

The device below plots the paper’s Figure 4: Shopping subset, Gemini-2.5-flash, with ReasoningBank. Three lines: the full MaTTS, MaTTS without aggregation (vanilla), and MaTTS without memory. Switch between the two scaling modes and drag k.

Scale k, with and without memory

The top sketch shows what happens at your k. The plot below shows the paper's success rate at each k. Purple is full MaTTS, blue is vanilla TTS, grey is no memory.

5

The plotted values are read from the paper's Figure 4 (WebArena Shopping, Gemini-2.5-flash). Parallel: MaTTS 49.7, 50.3, 52.4, 54.0, 55.1; vanilla 49.7, 49.7, 51.3, 52.9, 52.4; no memory 39.0, 39.4, 40.6, 41.7, 42.2. Sequential: MaTTS 49.7, 51.9, 53.5, 54.0, 54.5; vanilla 49.7, 50.8, 51.9, 52.4, 51.9; no memory 39.0, 37.4, 38.5, 40.1, 40.6. The sketch is ours.

What the curves say

First, both scaling modes help, and with memory the help is steady. Parallel climbs from 49.7 to 55.1 as k goes from 1 to 5. Sequential climbs from 49.7 to 54.5. Without memory the lines wobble: parallel moves between 39.0 and 42.2, and sequential between 37.4 and 40.6. More compute alone gives a shaky gain.

Second, aggregation matters. At k = 5, full MaTTS beats vanilla TTS by 55.1 to 52.4 in the parallel mode and by 54.5 to 51.9 in the sequential mode. The comparison step earns about two and a half points.

Third, the two modes trade off. Sequential is ahead at small k (51.9 against 50.3 at k = 2) but fades: once the agent is sure, rechecking adds little. Parallel keeps getting fresh, varied tries, so it passes sequential at k = 5.

The two-way street

The paper then asks whether memory helps scaling as much as scaling helps memory. With k = 5 in parallel mode, the best-of-5 score rises with better memory: 42.2 with none, 44.4 for Synapse, 47.6 for AWM and 55.1 for ReasoningBank. For Pass@1 the story is sharper. Scaling lifts weak memories only a little (Synapse 40.6 to 41.2, AWM 44.4 to 45.5) but lifts ReasoningBank from 49.7 to 53.0. The authors conclude that scaling alone is not enough: “only when paired with good memory mechanism does it contribute to curation of more effective memory”. A good memory sends the extra tries in useful directions, and the extra tries return better memory.

What does parallel MaTTS do that vanilla test-time scaling with memory does not?

Chapter 7

The Results: Three Benchmarks, Three Models

Read Tables 1 to 3 the way the authors do, and find where the gains are large and where they are small

Before you trust a method, you ask three questions. Better than what? On which tests? By how much, and is the gain the same everywhere? A results chapter answers those questions with tables. This one tells you how to read each table, what the paper claims from it, and where the claim is weaker than the headline.

How to read Table 1

Table 1 covers WebArena. Its rows are three kinds of agent, repeated for each backbone model: no memory, Synapse (raw trajectories), AWM (workflows), ReasoningBank, and ReasoningBank plus MaTTS. The MaTTS row uses parallel scaling with k = 5 and reports pass@1, the success of one randomly chosen trajectory. Its columns are the five WebArena subsets plus an overall column. Each subset shows two numbers: the success rate (SR, higher is better) and the average steps (lower is better).

Look first at the overall column. With Gemini-2.5-flash the success rate rises from 40.5 with no memory to 48.8 with ReasoningBank, a gain of 8.3 points. Gemini-2.5-pro gains 7.2 (46.7 to 53.9) and Claude-3.7-sonnet gains 4.6 (41.7 to 46.3). The abstract’s “up to 20% relative improvement” is the flash row: 48.8 divided by 40.5 is 1.205.

Now compare the baselines. Synapse adds 1.6 points in the same flash row, and AWM adds 3.6. ReasoningBank adds 8.3. MaTTS adds another 3.0 on top (51.8). The two older methods help a little. The new one helps several times as much.

Explore the table

The device below holds all of Table 1’s success rates and step counts. Pick a backbone, a subset and a metric. Hunt for the places where a baseline falls below no memory, because they show what a poor memory costs.

Read Table 1 your way

Choose a model, a WebArena subset and a metric. Bars show the five rows of the paper’s table. The purple bar is ReasoningBank. A bar in red outline sits below no memory.

All values are the paper's Table 1 (WebArena, pass@1, MaTTS parallel with k = 5). The subset sizes are Shopping 187, Admin 182, Gitlab 180, Reddit 106, Multi 29, overall 684. Multi has only 29 tasks, so one task moves its rate by 3.4 points.

What the table shows, and what it hides

Three patterns repay a second look. First, the gain is not the same everywhere. With flash on Reddit, ReasoningBank lifts success from 55.7 to 67.0 (+11.3). With Claude on Gitlab it lifts it from 36.7 to 41.1 (+4.4). The headline average hides a spread.

Second, a bad memory costs. AWM on Gemini-pro Admin scores 49.3 against 51.1 with no memory. AWM on Claude overall scores 40.8 against 41.7. A memory that does not fit can pull the agent backward. ReasoningBank is above no memory in every cell of the table.

Third, Multi is tiny. It has 29 tasks, so it is noisy. Claude with no memory scores 0.0 there, and ReasoningBank scores 3.4, which is one task. Read the percentage as a sign of direction, not a precise gap. The paper does say transfer across sites is where the older methods struggle most.

One more way to read the table: ask which row you would deploy. A method that gains only on one backbone is fragile. Here ReasoningBank beats no memory in every success-rate cell, on all three models, and MaTTS beats ReasoningBank in every cell too. The baselines are less steady, as you saw. A result that repeats across settings is stronger evidence than any single large number.

Efficiency: fewer steps

The paper reports that ReasoningBank lowers the number of steps by up to 1.4 compared with no memory. That is the flash overall row, 9.7 down to 8.3. For Gemini-pro the drop is 8.8 to 7.4, which is the “up to 16%” of the abstract. Fewer steps means fewer model calls, so the agent also costs less per task. Chapter 8 shows where these savings come from.

Other benchmarks

SWE-Bench-Verified (Table 2) is a different world: the agent works in a code repository with only bash. The authors compare against Synapse only, because AWM needs a fixed action set and bash has an open one. With Gemini-flash the resolve rate rises from 34.2 (no memory) to 38.8, and steps drop from 30.3 to 27.5. With Gemini-pro it rises from 54.0 to 57.4, and steps drop from 21.1 to 19.8. Synapse on pro (53.4) is slightly below no memory.

Mind2Web (Table 3) scores each step against a reference. Its measures are element accuracy (did it pick the right page element), action F1 (right action on it), step success rate (both right) and task-level success (every step right). With flash, cross-domain element accuracy goes from 35.8 to 40.6 and step success rate from 31.9 to 36.6. Task-level success stays tiny, 1.0 to 1.6, because one wrong step ruins the task. The paper says gains are largest in the hardest, cross-domain setting.

Finally the authors test a small open model, Gemma-3-12B, on Shopping. Success rises from 17.1 to 24.1 with ReasoningBank (Synapse 16.0, AWM 21.4), and its average steps are the lowest at 11.8. The idea does not need a frontier model, although the paper tests this only on one subset.

In Table 1, which observation shows that a poorly fitting memory can hurt?

Chapter 8

Ablations, Emergent Strategies and Limits

Switch parts off one at a time to see which ones carry the result, and note what the paper does not claim

A mechanic who wants to know which part makes an engine fast takes the parts off one at a time and measures after each. In research this is an ablation: switch off one piece of the method and see how much the score falls. The bigger the fall, the more that piece was carrying. This chapter walks through the paper’s ablations, its cost numbers, its one famous picture of memory growing, and its own list of limits.

Note the setting. Nearly all ablations run on a single slice: WebArena Shopping with Gemini-2.5-flash, where the no-memory score is 39.0 and ReasoningBank scores 49.7. That keeps the comparison clean, and it also means the results are narrower than the main tables.

Ablation 1: do failures help?

The paper’s central design choice is to learn from failed runs too. Figure 7 tests it. For each method the authors build memory from successes only, then from successes and failures. Synapse and AWM were designed for successes only, so adding failures gives them noise they cannot use.

The numbers tell the story. Synapse moves from 40.6 to 41.7, almost nothing. AWM falls from 44.4 to 42.2. ReasoningBank rises from 46.5 on successes alone to 49.7 with failures. Two lessons follow. The extraction step must be built to use failures, and ReasoningBank’s own gain from failures is 3.2 points. Even on successes alone it beats both baselines (46.5 against 40.6 and 44.4).

Ablation 2 and 3: the judge and k

You met the other two already. Chapter 4 showed that a judge between 70% and 90% accurate scores about the same (49.7, 48.7, 49.7) and that even a coin flip scores 47.6. Chapter 5 showed that k = 1 is the best retrieval, with 49.7, falling to 44.4 at k = 4. In both cases the memory still beat having none.

Efficiency: where the steps go, and what it costs

Does fewer steps mean the agent just gives up sooner? Table 4 splits steps into successful and failed tasks. A method that only cuts failed runs short would show its drop in the failed columns. Instead the drop is larger on successes: Shopping 6.8 to 4.7 (2.1 fewer) against 8.7 to 7.3 (1.4 fewer) on failures. The authors read this as the agent following good paths more directly, not as quitting early.

The paper also counts tokens (Table 5). Memory is not free: the judge and the extractor each make model calls. Even so, ReasoningBank’s total is 53,054.5 tokens per task, only about 4.3% more than no memory (50,847.4), and less than Synapse (58,514.7) or AWM (59,372.8). It spends fewer tokens acting (49,306.1 against 50,847.4) because it uses fewer steps, and the judge and extractor take up the difference. Compare the three views in the device below.

Switch the parts and the cost

Pick a view. Failures: success rate with and without failed runs in memory. Steps: average steps on successful and failed tasks. Tokens: average tokens per task, split by what they pay for.

Failures: WebArena Shopping, Gemini-2.5-flash, no memory 39.0 (Figure 7). Steps: Table 4, four WebArena domains. Tokens: Table 5 (average total tokens per task). The segments of each token bar are action generation, judge and memory extraction.

Strategies that grow: the emergent-behaviour figure

Figure 6 follows one memory item, titled in the paper “User-Specific Information Navigation”, as it changes over time. The authors present it as a human-read case study of a single item, so treat it as an illustration, not a statistic. It grows through four stages:

  1. Procedural. A plain rule: look for “Next Page”, “Page X” or “Load More” links.
  2. Self-reflection. A check: before you act, re-check that the element you picked is the right one.
  3. Adaptive check. A habit: use search and filters first, and make sure you have everything before you report.
  4. Compositional. A skill: cross-check the current view against the task, and if it does not match, reassess the options such as filters and other sections.

The authors compare this to the learning dynamics of reinforcement learning, where simple behaviours combine into richer ones. Note that no weights change here. The same item text grows richer because each new run adds to the bank.

Scaling with memory, in one more number

The paper also reports pass@k, the chance that at least one of k tries succeeds. With full MaTTS in parallel mode pass@k reaches 62.1 at k = 5, against 52.4 for MaTTS without memory. At k = 2, even vanilla TTS gets 50.8 against 47.6 without memory. The authors read this as better sample efficiency: each try is worth more when memory points it somewhere useful.

The limits the authors list, and two of ours

Appendix E names three. Focus on content: the paper does not compare with other memory architectures such as episodic or hierarchical memory. Simple retrieval and consolidation: these are kept simple on purpose, so stronger versions may add more. Reliance on the judge: labels can be noisy when tasks are ambiguous, and the authors suggest stronger verifiers, human feedback or ensembles.

Two more points are our own reading. The bank only grows, since consolidation never prunes, so cost may rise over a long stream; the paper lists merging and forgetting as future work. And the ablation numbers come from one slice and one model, so use them as evidence of direction, not as constants.

Failure mode: memory that cannot use failures

Symptom. You feed failed runs into a success-only memory and the score drops. Measurement. AWM goes from 44.4 to 42.2 in Figure 7. Fix. Use an extraction prompt written for failures, which turns a failed run into a preventive lesson, as ReasoningBank does.

In Figure 7, what happens when failed trajectories are added to the memory of Synapse and AWM, and to ReasoningBank?

Chapter 9

Field Guide: The Whole Paper on One Page

Keep the numbers, the checklist and the core code, and see where to read next

You can now rebuild the paper from memory. An agent works through a stream of tasks with no answer key. Before each task it embeds the query and fetches the most similar past experience, which brings up to three memory items. It pastes them into its system prompt and acts. Afterwards a judge labels the run, and an extractor turns the run, win or loss, into at most three strategy notes with a title, a description and a content line. The notes are appended to the bank. MaTTS adds a second loop: run k tries on one task, compare them, and write better notes from the differences.

The numbers that matter

WhatNumberWhy it matters
Shopping, Gemini-2.5-flash, success rate39.0 none; 40.6 Synapse; 44.4 AWM; 49.7 ReasoningBankThe hero of the lesson (Table 1)
WebArena overall gain vs no memory+8.3 flash, +7.2 pro, +4.6 ClaudeHolds across three backbones
Relative gain, flash overall40.5 to 48.8, about 20%The abstract’s headline
Steps, overallflash 9.7 to 8.3; pro 8.8 to 7.4 (about 16%)Fewer steps means lower cost
Multi subset, flash10.3 none; 3.4 AWM; 13.8 ReasoningBankA poor fit hurts
SWE-Bench-Verified resolve rateflash 34.2 to 38.8; pro 54.0 to 57.4Works for code agents
MaTTS on Shopping, k = 5parallel 55.1; sequential 54.5; vanilla 52.4 and 51.9Comparing tries beats pooling them
Judge accuracy and its effect72.7% measured; 52.4 at 100%; 49.7 at 70% to 90%; 47.6 at 50%Robust to label noise
Retrieved experiences, k49.7 at 1; 46.0; 45.5; 44.4 at 4Relevance beats quantity
Adding failed runsReasoningBank 46.5 to 49.7; AWM 44.4 to 42.2Only built-for-failure memory gains
Tokens per task53,054.5 against 50,847.4 (+4.3%)Memory costs little
Settingsagent 0.7; extractor 1.0; judge 0.0; 30 steps; k = 1; at most 3 items (5 in MaTTS)What you need to rerun it

Can you rebuild it? A checklist

Tick each line you could do on a blank page. The ring fills as you go. If a line is hard, the chapter in brackets is the place to return to.

Check what you can rebuild

Tap a line when you can do it without looking. The ring shows how much of the paper you hold.

A self-check only. Nothing here is saved or scored.

The core as code

This sketch is ours, written from the paper’s method and appendix. llm, embed and run_react stand for whatever model API and agent loop you use. It shows every moving part in one place.

pythonclass ReasoningBank:
    def __init__(self):
        self.vectors, self.items, self.runs = [], [], []        # one row per past task

    def retrieve(self, q_vec, k=1):                          # Ch 5
        if not self.vectors: return []
        sims = [cosine(q_vec, v) for v in self.vectors]
        top = sorted(range(len(sims)), key=lambda i: -sims[i])[:k]
        return [it for i in top for it in self.items[i]]        # at most 3k items

    def add(self, q_vec, items, run):                       # consolidation: append only
        self.vectors.append(q_vec); self.items.append(items); self.runs.append(run)

def judge(task, run):                                       # Ch 4, temperature 0
    out = llm(JUDGE_PROMPT, task, run, temperature=0)
    return out.split("Status:")[-1].strip().strip('"')   # "success" or "failure"

def solve(task, bank, k=1):
    q = embed(task)
    notes = bank.retrieve(q, k)
    run = run_react(task, system=BASE + format_items(notes), max_steps=30)
    items = extract(task, run, judge(task, run))               # Ch 3: at most 3 items
    bank.add(q, items, run)
    return run

def matts_parallel(task, bank, k=5):                         # Ch 6
    q = embed(task); notes = bank.retrieve(q)
    runs = [run_react(task, system=BASE + format_items(notes)) for _ in range(k)]
    items = self_contrast(task, runs)                         # one call sees all k runs, at most 5 items
    bank.add(q, items, runs)
    return pick_best(task, runs)                              # best-of-k by an LLM

def matts_sequential(task, bank, k=5):
    q = embed(task); run = run_react(task, system=BASE + format_items(bank.retrieve(q)))
    notes = []
    for i in range(k - 1):                                    # k = number of refinement steps
        run, note = recheck(run, FIRST_CHECK if i == 0 else "Let's check again.")
        notes.append(note)                                  # the check notes also feed memory
    bank.add(q, extract(task, run, judge(task, run), notes), run)
    return run

Where this sits

Agent memory is a crowded field. Some systems manage memory like an operating system, paging notes in and out. Some store graphs of facts. Some tune memory with reinforcement learning. ReasoningBank asks a narrower question and answers it well: what should a note say? Its answer is a strategy, written from wins and failures, free of site detail. The authors point to richer layers as future work, such as episodic traces, working memory and long-term stores with decay, and to retrieval that plans multi-step lookups.

It connects to the course thread as well. Lecture 2 asks how the text an agent reads can evolve over time. ReasoningBank is one clean answer: the context changes with every task, and nothing about the model changes. The introduction sets up the course question of how to AI an AI, and harness evolution asks what else around the model can improve itself.

Keep going

Credit

ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory is by Siru Ouyang, Jun Yan, I-Hung Hsu, Yanfei Chen, Ke Jiang, Zifeng Wang, Rujun Han, Long T. Le, Samira Daruki, Xiangru Tang, Vishy Tirumalashetty, George Lee, Mahsan Rofouei, Hangfei Lin, Jiawei Han, Chen-Yu Lee and Tomas Pfister, from Google Cloud AI Research, UIUC and Yale. Read the paper on arXiv and find the authors’ code. This page re-teaches their ideas in our own words; the figures and tables quoted come from the paper.

The takeaway. An agent does not need new weights to learn. It needs a short, well-written note after each task, a way to find the right note later, and an honest grade on its own work. Write strategies, not stories, and learn from the failures too.
You build a ReasoningBank for a new agent. Which set of choices follows the paper?

Now press Teach and explain the loop out loud, from memory: what a memory item holds, how the judge and the extractor use a run, how the next task finds its note, and why comparing k tries beats pooling them. Then go back to the instrument and run the 187 tasks once more.

ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory
Read the paper · Authors' code · Lecture 2, Context Evolution · The course site · Back to Gleams