AMBER:通过仅追加记忆训练长时程 Web 智能体
摘要
AMBER 是一个框架,让 Web 智能体联合学习推理、行动并将信息写入仅追加(append-only)的记忆,并通过基于结果奖励的强化学习进行端到端训练。在不使用人工筛选的 SFT 数据的情况下,其在 WebArena Lite 上的成功率优于基于覆盖写入记忆的方法。
arXiv:2610.07118v1 Announce Type: new
Abstract: Modern language-model agents increasingly interact with external environments over long-horizon, multi-step trajectories, where the accumulated interaction history can quickly exceed practical context budgets. To ensure reliability, agents must maintain factual information over long horizons, remember execution errors and corrective feedback, and track progress across actions. Several approaches have been proposed to achieve this without the need for maintaining the entire execution history in context, such as using the reasoning and action history, learning to maintain a fixed-size memory through an overwrite mechanism, and periodic summarization. Although overwrite memory can in principle retain anything an append-only memory can, it must learn to carry each fact through every subsequent rewrite, which is difficult to learn from sparse outcome rewards; for interactive applications like web agents, we find that trained overwrite memories delete key information required by the trajectory, as well as corrective feedback received from the environment. We introduce AMBER (Append-only Memory Bank for Evidence Retention) - a simple and scalable framework where an agent jointly learns to reason, act, and write free-form memory, while an append-only rule guarantees retention by construction. This allows AMBER to be trained end-to-end with reinforcement learning from outcome rewards without the need for extensive curated SFT data. On WebArena Lite, AMBER improves average success over overwrite-based memory by 4.09 percentage points, increases the fraction of tasks solved in five repeated runs by 4.8 percentage points, and matches an overwrite baseline trained on substantially more expensive curated supervision. AMBER achieves these improvements while maintaining a practical token budget, providing a strong balance between context efficiency, task performance, and reliable long-horizon execution.
查看缓存全文
缓存时间: 2026/10/08 12:17
# AMBER: Training Long-Horizon Web Agents through Append-Only Memory
Source: [https://arxiv.org/html/2610.07118](https://arxiv.org/html/2610.07118)
Chinmay Savadikar, Zhaoyu Zhang, Mingyu Zhao, Shuang Xie, Han Li, Tianfu Wu, Lingyun Wang North Carolina State University Shopify
###### Abstract
Modern language\-model agents increasingly interact with external environments over long\-horizon, multi\-step trajectories, where the accumulated interaction history can quickly exceed practical context budgets\. To ensure reliability, agents must maintain factual information over long horizons, remember execution errors and corrective feedback, and track progress across actions\. Several approaches have been proposed to achieve this without the need for maintaining the entire execution history in context, such as using the reasoning and action history, learning to maintain a fixed\-size memory through an overwrite mechanism, and periodic summarization\. Although overwrite memory can in principle retain anything an append\-only memory can, it must learn to carry each fact through every subsequent rewrite, which is difficult to learn from sparse outcome rewards; for interactive applications like web agents, we find that trained overwrite memories delete key information required by the trajectory, as well as corrective feedback received from the environment\. We introduce AMBER \(Append\-onlyMemoryBank forEvidenceRetention\)—a simple and scalable framework where an agent jointly learns to reason, act, and write free\-form memory, while an append\-only rule guarantees retention by construction\. This allows AMBER to be trained end\-to\-end with reinforcement learning from outcome rewards without the need for extensive curated SFT data\. On WebArena Lite, AMBER improves average success over overwrite\-based memory by 4\.09 percentage points, increases the fraction of tasks solved in five repeated runs by 4\.8 percentage points, and matches an overwrite baseline trained on substantially more expensive curated supervision\. AMBER achieves these improvements while maintaining a practical token budget, providing a strong balance between context efficiency, task performance, and reliable long\-horizon execution\. Our code is available at[https://github\.com/agentic\-foundation\-modeling\-research/amber](https://github.com/agentic-foundation-modeling-research/amber)\.
11footnotetext:Work done as part of internship at Shopify22footnotetext:Equal contribution33footnotetext:Corresponding authors:\{csavadi,tianfu\_wu\}@ncsu\.edu,lingyun\.wang@shopify\.com## 1Introduction
Language models are increasingly used as agents that interact with external environments over long\-horizon, multi\-step trajectories, including web\-based deep research\([OpenAI, 2025](https://arxiv.org/html/2610.07118#bib.bib11)\), tool use\([Yao et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib24)\), and browser navigation\([Müller & Žunič, 2024](https://arxiv.org/html/2610.07118#bib.bib10)\)\. Unlike single\-turn tasks, the information required to complete these tasks is often discovered incrementally through interaction and exploration, and is not available upfront\. An agent must therefore identify useful information from its observations, track its execution progress, and preserve relevant evidence until it is needed later\. This raises a central question for long\-horizon agents:*once an agent has identified information worth remembering, how should that information be retained across subsequent interactions?*
The straightforward solution is to condition every decision on the complete interaction history, including previous observations, reasoning, and actions\([Yao et al\., 2023](https://arxiv.org/html/2610.07118#bib.bib23);[Jin et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib4)\)\. However, this context grows throughout the trajectory and quickly becomes impractical when observations are large\. Longer contexts can also make relevant information harder to retrieve reliably\([Liu et al\., 2024a](https://arxiv.org/html/2610.07118#bib.bib5)\)\. Web navigation makes this problem particularly demanding: an agent must collect facts across pages, plan and execute sequences of actions, track completed and pending subgoals, remember failed attempts, recover from mistakes, and use information acquired many steps earlier\.
To make long\-horizon interaction efficient, practical context management strategies approximate the full interaction history using some form of compressedmemory\. For reliable execution, context management mechanisms must decide what information to*write*, what previously written information to*retain*, and what information to*surface*\. Moreover, a useful memory mechanism should be robust to diverse environments and interaction settings\. Several methods have been proposed to address this problem, such as retaining reasoning and action histories while discarding past observations\([Wei et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib19);[Gandhi & Neubig, 2025](https://arxiv.org/html/2610.07118#bib.bib3)\), learning a compact memory that is recursively rewritten at each step\([Zhou et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib32);[Yu et al\., 2026](https://arxiv.org/html/2610.07118#bib.bib26);[Yuan et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib27)\), or using external memory and summarization mechanisms\([Yan et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib22);[Wu et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib20)\)\. In this paper, we focus on the first two mechanisms, and show that reasoning and action history alone is not sufficient, and an explicit memory is required for reliable long\-horizon execution\.However, when overwrite memory is trained from outcome rewards, the learned agents lose factual information and corrective feedback, and as a result repeat mistakes\.
We proposeAMBER\(Append\-onlyMemoryBank forEvidenceRetention\), which separates the learned decision of*what to write*from*what to retain*\. At each interaction step, the agent reasons, acts, and generates a free\-form natural\-language memory entry, which is appended to a persistent memory bank \(Figure[1](https://arxiv.org/html/2610.07118#S1.F1)\)\. The policy therefore learns what information is worth recording, while retention is determined by a simple append\-only rule\. We show that AMBER can be trained jointly to optimize reasoning, action and memory generation in a scalable manner with minimal supervised data followed by end\-to\-end reinforcement learning from outcome rewards\. To ensure scalable training, we develop and describe a rollout architecture capable of large\-scale rollouts\.
On WebArena\([Zhou et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib31)\), AMBER improves the average task success rate over overwrite memory by4\.094\.09percentage points and increases the fraction of tasks solved in five repeated runs by4\.84\.8percentage points\. We show that AMBER loses less information and repeats fewer execution errors\. Moreover, overwrite memory matches AMBER’s performance only when trained on substantially more expensive curated supervision\. Together, these results suggest that the gap is one of learnability rather than capacity: the append\-only prior makes durable memory easier to learn from weak outcome supervision\.
Figure 1:Overview of AMBER\. At each step, the agent jointly reasons, acts, and generates a memory entry that is appended to a persistent memory bank provided as context to future steps\. See text for details\.Our contributions are summarized as follows, which establish AMBER as a simple, scalable method for training long\-horizon web agents that balances task performance, reliability, context efficiency and supervision complexity:
- •A retention\-focused view of learned agent memory\.We show that overwrite\-style memory can result in loss of key factual information as well as corrective feedback, resulting in agents failing to solve tasks and repeating mistakes\.
- •Append\-only learned memory\.We introduce AMBER, which learns what information to record while using a deterministic append\-only rule\. We show that AMBER improves success rate, reliability, information retention, and shows better error correction ability than overwrite memory\. While appending increases the context length in theory, we find that over trajectories in WebArena, the context length stays practical\.
- •RL training, rollout architecture, modest supervision\.We show that AMBER can be trained in an end\-to\-end manner using reinforcement learning from outcome rewards\. We further describe a scalable rollout infrastructure that enables this training\. We show that while overwrite memory needs careful data curation for the initial SFT phase before RL, AMBER can achieve better performance without this extensive SFT, making it cheaper and easier to train\.
## 2Related Work
Training Web Agents\.LLM\-based web agents combine language understanding, planning, and interface control to complete multi\-step tasks\([Yao et al\., 2023](https://arxiv.org/html/2610.07118#bib.bib23)\), with benchmarks such as WebArena\([Zhou et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib31)\)providing functional evaluation on realistic, reproducible websites\. Two major directions have emerged for training open models in these environments\. The first constructs successful trajectories for supervised fine\-tuning \(SFT\), for example by retroactively labeling exploration\([Murty et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib9)\), replaying tutorials\([Xu et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib21)\), or framing exploration as graph search\([Gandhi & Neubig, 2025](https://arxiv.org/html/2610.07118#bib.bib3)\)\. The second learns directly from the outcomes of online interaction, using approaches such as a self\-evolving curriculum with an outcome reward model\([Qi et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib13)\)or multi\-turn reinforcement learning with binary task rewards\([Wei et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib19)\)\.[Vattikonda et al\. \(2025\)](https://arxiv.org/html/2610.07118#bib.bib17)study both approaches across web\-agent post\-training settings and find their combination important for strong performance\. These systems make coupled design choices along five axes: the observation representation, the context retained across interactions, the model family, the training strategy, and the evaluation environment\. Because existing systems often vary several of these axes simultaneously, their results make it difficult to isolate the effect of the context\-retention strategy\. Our experiments vary only the retained context while holding the other four axes fixed\.
Memory for Long\-Horizon Agents\.We use*trajectory memory*to refer to information retained across steps of the same task\. Several recent methods make such memory an explicit, learnable component of long\-horizon reasoning, and they differ mainly in how much of the retention decision is left to the learned policy\. Self\-MAP augments conversational web navigation with memory and reflection\([Deng et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib2)\); MEM1\([Zhou et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib32)\)and MemSearcher\([Yuan et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib27)\)jointly train reasoning and memory consolidation into a compact recurrent state; and MemAgent learns an overwrite memory for arbitrarily long segmented inputs\([Yu et al\., 2026](https://arxiv.org/html/2610.07118#bib.bib26)\)\. In these methods, whether a fact survives is decided by the policy at every rewrite\. Other systems expose learned operations over an external store\. These include structured memory management trained with outcome rewards\([Yan et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib22)\), insertion and deletion as policy actions\([Zhang et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib29)\), periodic summarization of interaction history\([Wu et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib20)\), and learned consolidation of web\-search histories\([Ye et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib25)\)\. These operations make memory more expressive, but they also enlarge what the policy must learn, often from sparse outcome rewards alone\. AMBER takes the opposite approach: the policy learns only what to write, and retention is fixed by an append\-only rule\.
## 3Background
### 3\.1Web Interaction as a Partially Observable Markov Decision Process
We model web interaction as a partially observable Markov decision process \(POMDP\)ℳ=\(𝒮,𝒜,P,R,Ω,O,γ\)\\mathcal\{M\}=\(\\mathcal\{S\},\\mathcal\{A\},P,R,\\Omega,O,\\gamma\)\. At interaction steptt,st∈𝒮s\_\{t\}\\in\\mathcal\{S\}denotes the environment state,at∈𝒜a\_\{t\}\\in\\mathcal\{A\}is the textual action sampled by the policy,P\(st\+1∣st,at\)P\(s\_\{t\+1\}\\mid s\_\{t\},a\_\{t\}\)describes the website and browser dynamics,Rt∈\{0,1\}R\_\{t\}\\in\\\{0,1\\\}is the scalar task reward, andγ\\gammais the discount factor\. The agent receives an observationot∈Ωo\_\{t\}\\in\\Omega, such as a screenshot, DOM representation, or accessibility tree, according to the observation functionO\(ot∣st,at−1\)O\(o\_\{t\}\\mid s\_\{t\},a\_\{t\-1\}\)\.
A straightforward approach to acting under partial observability is to condition the policy on the complete interaction history:
Ht=\(o0,a0,o1,a1,…,at−1,ot\),at∼πθ\(⋅∣Ht\)\.H\_\{t\}=\(o\_\{0\},a\_\{0\},o\_\{1\},a\_\{1\},\\ldots,a\_\{t\-1\},o\_\{t\}\),\\qquad a\_\{t\}\\sim\\pi\_\{\\theta\}\(\\cdot\\mid H\_\{t\}\)\.\(1\)The policy is trained to maximize the expected discounted return
J\(θ\)=𝔼τ∼πθ\[∑t=0TγtRt\]\.J\(\\theta\)=\\mathbb\{E\}\_\{\\tau\\sim\\pi\_\{\\theta\}\}\\left\[\\sum\_\{t=0\}^\{T\}\\gamma^\{t\}R\_\{t\}\\right\]\.\(2\)
Modern LLM\-based agents implement this using the ReAct framework\([Yao et al\., 2023](https://arxiv.org/html/2610.07118#bib.bib23)\), where an autoregressive LLM first generates chain\-of\-thought reasoningrtr\_\{t\}and then an actionata\_\{t\}:
\(rt,at\)∼πθ\(⋅∣x,Ht\),\(r\_\{t\},a\_\{t\}\)\\sim\\pi\_\{\\theta\}\(\\cdot\\mid x,H\_\{t\}\),\(3\)wherexxdenotes the task \(or goal\) given to the agent, and bothrtr\_\{t\}andata\_\{t\}are expressed in natural language\. The reasoningrtr\_\{t\}interprets the current page, tracks intermediate goals, and motivates the next action\. Unlikeata\_\{t\}, it does not directly modify the environment, but instead conditions the environment\-affecting action that follows\.
### 3\.2Compressing Interaction History
Conditioning on the full historyHtH\_\{t\}preserves all information available to the agent at steptt\. In practice, however, retaining every past observation is prohibitively expensive: tokenized web observations can be long, causing the interaction history to quickly exhaust the policy model’s context window\. Web agents therefore replace the full history with a compactretained contextCtC\_\{t\}that carries information from previous steps\. ForCtC\_\{t\}to serve as an effective substitute forHtH\_\{t\}, the resulting policy should approximate the behavior of the full\-history policy:
πθ\(⋅∣x,ot,Ct\)≈πθ\(⋅∣x,Ht\)\.\\pi\_\{\\theta\}\(\\cdot\\mid x,o\_\{t\},C\_\{t\}\)\\approx\\pi\_\{\\theta\}\(\\cdot\\mid x,H\_\{t\}\)\.\(4\)
Concretely, at steptt, the policy receives the current observationoto\_\{t\}together with the retained contextCtC\_\{t\}and generates the reasoning and action
\(rt,at\)∼πθ\(⋅∣x,ot,Ct\)\.\(r\_\{t\},a\_\{t\}\)\\sim\\pi\_\{\\theta\}\(\\cdot\\mid x,o\_\{t\},C\_\{t\}\)\.\(5\)An update ruleUUthen determines what information from the current interaction is carried forward:
Ct\+1=U\(x,Ct,ot,rt,at\)\.C\_\{t\+1\}=U\(x,C\_\{t\},o\_\{t\},r\_\{t\},a\_\{t\}\)\.\(6\)Thus,UUdetermines both what information persists across interactions and how the retained context grows as the task progresses\. For reliable long\-horizon execution,CtC\_\{t\}must remain a useful proxy forHtH\_\{t\}\. This requires the update rule to satisfy three properties:
- •Progress tracking\.The current observation describes the present page, but not the agent’s broader execution state: which subgoals have been completed, which remain unresolved, or which actions have already been attempted and failed\.CtC\_\{t\}must preserve this information\.
- •Information identification\.Because the retained context cannot include every past observation,UUmust identify which information is important for completing the task and should therefore be carried forward\.
- •Durability\.Once important information has been identified, it must remain available across subsequent interactions until it is needed at a future step\.
## 4AMBER: Append\-Only Memory
To satisfy the properties above, we propose AMBER \(Append\-only Memory Bank for Evidence Retention\), which jointly learns to reason, act, and generate step\-wise memories\. AMBER instantiates the update ruleUUin Equation[6](https://arxiv.org/html/2610.07118#S3.E6)using a persistent memory bank\. At each interaction step, the policy generates a free\-form memory entry containing information that may be useful later in the trajectory\. The entry is appended to the memory bank, which is provided as the retained contextCtC\_\{t\}at subsequent steps\. We next describe how reasoning, action generation, and memory generation are realized within each interaction step, and how the resulting memory is carried forward across steps\.
### 4\.1Two\-Turn Memory Generation and Append\-Only Retention
At each environment step, AMBER interacts with the policyπθ\\pi\_\{\\theta\}through a two\-turn conversation\. At the beginning of steptt, a new conversation is constructed whose first user message contains the taskxx, the current observationoto\_\{t\}, and the memory bankCtC\_\{t\}\. The policy first generates reasoningrtr\_\{t\}followed by an executable actionata\_\{t\}:
\(rt,at\)∼πθ\(⋅∣x,ot,Ct\)\.\(r\_\{t\},a\_\{t\}\)\\sim\\pi\_\{\\theta\}\(\\cdot\\mid x,o\_\{t\},C\_\{t\}\)\.\(7\)
The conversation is then continued with a second user message instructing the policy to generate a memory entry\. Since the reasoning and action from the first turn remain in the conversation, the same policy generates a free\-form memorymtm\_\{t\}conditioned on the preceding within\-step interaction:
mt∼πθ\(⋅∣x,ot,Ct,rt,at\)\.m\_\{t\}\\sim\\pi\_\{\\theta\}\(\\cdot\\mid x,o\_\{t\},C\_\{t\},r\_\{t\},a\_\{t\}\)\.\(8\)Memory generation therefore occurs after the agent has selected its action but before it observes the outcome of that action\. The entrymtm\_\{t\}can record task\-relevant information from the current observation together with the agent’s execution state and progress\.
After the two model turns are complete, the environment executesata\_\{t\}and returns the next observationot\+1o\_\{t\+1\}\. The generated memory entry is appended to the persistent memory bank:
Ct\+1=Ct∥\[mt\],so thatCt=\[m0,…,mt−1\],C\_\{t\+1\}=C\_\{t\}\\mathbin\{\\\|\}\[m\_\{t\}\],\\qquad\\text\{so that\}\\qquad C\_\{t\}=\[m\_\{0\},\\ldots,m\_\{t\-1\}\],\(9\)withC0C\_\{0\}empty\. The within\-step conversation is then discarded\. At stept\+1t\+1, AMBER constructs a new two\-turn conversation fromxx,ot\+1o\_\{t\+1\}, and the updated memory bankCt\+1C\_\{t\+1\}\. Thus, previous observations, reasoning traces, actions, and other within\-step conversation messages are not replayed across steps; only the generated memory entries are carried forward throughCtC\_\{t\}\.
The update in Equation[9](https://arxiv.org/html/2610.07118#S4.E9)is deterministic and contains no learned parameters\. Because each update only appends a new entry, previously written memories cannot be modified or removed\. AMBER therefore guarantees durability by construction\. The policy is responsible for deciding what information to record and how to represent the evolving execution state, whereas the append\-only update rule determines what persists across interactions\.
Because every memory entry is retained, the size ofCtC\_\{t\}grows with the trajectory length\. We show empirically that this growth remains substantially smaller than retaining the complete interaction history and stays within practical context limits over the horizons we evaluate\.
### 4\.2End\-to\-End Optimization Using RL
The information that should be recorded in memory can vary substantially across tasks and environments\. Rather than specifying hand\-crafted rules for what the agent should remember, we learn this behavior end\-to\-end from task outcomes\. Specifically, we jointly optimize reasoning, action generation, and memory generation using reinforcement learning, allowing the policy to learn what information is useful to record and how to use the accumulated memory during subsequent interactions\. We train AMBER using outcome rewards with Group Relative Policy Optimization \(GRPO\)\([Shao et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib14)\)\. We observe that directly applying RL to the pretrained instruction model produces unstable rollouts\. Following[Vattikonda et al\. \(2025\)](https://arxiv.org/html/2610.07118#bib.bib17), we therefore first perform supervised fine\-tuning \(SFT\) on offline trajectories to initialize the policy before RL\. The resulting SFT policy is also used as the reference policy during RL\. For efficient training, we use asynchronous RL\([Mnih et al\., 2016](https://arxiv.org/html/2610.07118#bib.bib7)\)\.
#### Optimizing multi\-step rollouts\.
For each training task, the behavior policyπθold\\pi\_\{\\theta\_\{\\mathrm\{old\}\}\}generates a group ofGGmulti\-step rollouts\. Each rolloutggreceives a single terminal rewardRg∈\{0,1\}R\_\{g\}\\in\\\{0,1\\\}, giving𝐑=\(R1,…,RG\)\\mathbf\{R\}=\(R\_\{1\},\\ldots,R\_\{G\}\)\. We compute the group\-relative advantage as
Ag=Rg−mean\(𝐑\)std\(𝐑\)\+δ,A\_\{g\}=\\frac\{R\_\{g\}\-\\operatorname\{mean\}\(\\mathbf\{R\}\)\}\{\\operatorname\{std\}\(\\mathbf\{R\}\)\+\\delta\},\(10\)whereδ\\deltais a small constant for numerical stability\. Every interaction step in rolloutggis assigned the same advantageAt,g=AgA\_\{t,g\}=A\_\{g\}, and treated as an independent training sample during policy\-gradient optimization\. For the two\-turn interaction defined in Section[4\.1](https://arxiv.org/html/2610.07118#S4.SS1), a step contains all assistant\-generated tokens from the reasoningrt,gr\_\{t,g\}, actionat,ga\_\{t,g\}, and memorymt,gm\_\{t,g\}\. Template and user\-message tokens inserted between the two assistant turns are masked from the loss\. Consequently, every assistant\-generated token at stepttreceives the same rollout\-level advantageAgA\_\{g\}\.
Let𝒴t,g\\mathcal\{Y\}\_\{t,g\}denote the set of assistant\-generated tokens at stepttof rolloutgg, including reasoning, action, and memory tokens\. For tokeni∈𝒴t,gi\\in\\mathcal\{Y\}\_\{t,g\}, we define the importance\-sampling ratio
ηt,g\(i\)=πθ\(yt,g\(i\)∣yt,g\(<i\),x,ot,g,Ct,g\)πθold\(yt,g\(i\)∣yt,g\(<i\),x,ot,g,Ct,g\)\.\\eta\_\{t,g\}^\{\(i\)\}=\\frac\{\\pi\_\{\\theta\}\\left\(y\_\{t,g\}^\{\(i\)\}\\mid y\_\{t,g\}^\{\(<i\)\},\\,x,\\,o\_\{t,g\},\\,C\_\{t,g\}\\right\)\}\{\\pi\_\{\\theta\_\{\\mathrm\{old\}\}\}\\left\(y\_\{t,g\}^\{\(i\)\}\\mid y\_\{t,g\}^\{\(<i\)\},\\,x,\\,o\_\{t,g\},\\,C\_\{t,g\}\\right\)\}\.\(11\)The resulting GRPO objective is
𝒥\(θ\)\\displaystyle\\mathcal\{J\}\(\\theta\)=𝔼x∼𝒟\(x\),τ∼πθold\[1G∑g=1G1Tg∑t=0Tg−11\|𝒴t,g\|∑i∈𝒴t,gmin\(ηt,g\(i\)Ag,clip\(ηt,g\(i\),1−ϵl,1\+ϵu\)Ag\)\]\\displaystyle=\\mathbb\{E\}\_\{x\\sim\\mathcal\{D\}\(x\),\\tau\\sim\\pi\_\{\\theta\_\{\\mathrm\{old\}\}\}\}\\Bigg\[\\frac\{1\}\{G\}\\sum\_\{g=1\}^\{G\}\\frac\{1\}\{T\_\{g\}\}\\sum\_\{t=0\}^\{T\_\{g\}\-1\}\\frac\{1\}\{\|\\mathcal\{Y\}\_\{t,g\}\|\}\\sum\_\{i\\in\\mathcal\{Y\}\_\{t,g\}\}\\min\\Big\(\\eta\_\{t,g\}^\{\(i\)\}A\_\{g\},\\operatorname\{clip\}\\big\(\\eta\_\{t,g\}^\{\(i\)\},1\-\\epsilon\_\{l\},1\+\\epsilon\_\{u\}\\big\)A\_\{g\}\\Big\)\\Bigg\]−β𝕂𝕃\(πθ∥πref\),\\displaystyle\-\\beta\\,\\mathbb\{KL\}\\left\(\\pi\_\{\\theta\}\\,\\\|\\,\\pi\_\{\\mathrm\{ref\}\}\\right\),\(12\)whereϵl\\epsilon\_\{l\}andϵu\\epsilon\_\{u\}are the lower and upper clipping ranges, respectively, andβ\\betacontrols the KL penalty to the SFT reference policy\.
Thus, AMBER receives no separate memory\-specific reward during RL\. The memory writer is optimized jointly with reasoning and action generation through the terminal outcome reward, allowing useful memory\-writing behavior to emerge from task performance rather than from hand\-crafted memory rules\.
### 4\.3Rollout Infrastructure
Efficient rollout generation for web\-agent RL requires handling several sources of isolation and latency\. First, each rollout needs an independent browser session so that browser state, such as cookies, does not leak across rollouts\. Second, some WebArena tasks modify persistent website state, requiring separate website containers across concurrent rollouts\. Third, browser interaction is often substantially slower than model inference, so synchronizing all rollouts at every step can lead to poor GPU utilization\. We therefore separate model inference, browser execution, and website serving into independently scalable components\. Figure[2](https://arxiv.org/html/2610.07118#S4.F2)shows the resulting architecture\. Each rollout, corresponding to a multi\-step episode, is assigned an isolated browser session and website container\.
#### Remote browser execution and rollout isolation\.
We use Ray\([Moritz et al\., 2018](https://arxiv.org/html/2610.07118#bib.bib8)\)to manage concurrent browser sessions and reward models\. The Ray actors are exposed through an environment server implemented in FastAPI\. At each environment steptt, the rollout manager sends the actionata\_\{t\}to the environment server over HTTP\. The server routes the request to the Ray actor associated with that rollout, which executes the action in the browser and computes the rewardRtR\_\{t\}\. The resulting observationot\+1o\_\{t\+1\}is then returned to the rollout manager through the environment server\. Each rollout is assigned a unique identifier, which is used to route requests to the corresponding Ray actor\. For tasks that modify website state, the rollout is also assigned a dedicated website container hosted on a separate virtual machine, preventing changes made by one rollout from affecting another\. In practice, each Ray actor creates a BrowserGym\([Chezelles et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib1)\)environment to manage the browser interaction and rewards\.
#### Asynchronous environment interaction\.
Rollouts execute asynchronously at the interaction\-step level\. In particular, rollouts do not wait for one another after each environment step\. While one rollout is waiting for browser execution, page loading, or reward computation, another rollout whose environment step has completed can issue a model\-inference request for its next action\. Since both the inference server, implemented with SGLang, and the environment server are asynchronous HTTP servers, environment interaction and model inference can overlap across different rollouts\. This reduces idle inference time caused by slow browser execution and allows the rollouts to progress independently\. The complete implementation details are provided in Appendix[D](https://arxiv.org/html/2610.07118#A4)\.
Figure 2:Rollout architecture\. Each task is expanded into a group ofGGrollouts on a leased website VM, and each rollout gets its own Ray\-managed browser session and website container\. Red arrows denote HTTP connections\. Solid arrows show per\-step traffic between the inference server, rollout manager, and environment server, and dashed arrows show per\-episode VM lease and release\.
## 5Experiments
Environment\.We use WebArena\([Zhou et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib31)\)as the training and evaluation environment\. WebArena provides five self\-hosted websites: Shopping, Shopping Admin \(a content management system\), Reddit, GitLab, and Maps, together with812812curated tasks verified through functional evaluation\. We evaluate on WebArena Lite\([Liu et al\., 2024b](https://arxiv.org/html/2610.07118#bib.bib6)\), a curated subset of these tasks, and use the remaining tasks during reinforcement learning\. Early in our experiments, we found that GitLab produced unstable container setups when many instances were launched in parallel, and therefore exclude it from our experiments\.
Input Representation and Environment Interaction\.We use the flattened accessibility tree restricted to elements in the current viewport, together with open\-tab metadata\. We use BrowserGym\([Chezelles et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib1)\)for accessibility\-tree extraction and browser interaction\. We cap RL rollouts at 20 interaction steps and evaluation at 30 steps\.
Curating synthetic data for Supervised Fine\-Tuning\.For the SFT stage, we use trajectories released by Go\-Browse\([Gandhi & Neubig, 2025](https://arxiv.org/html/2610.07118#bib.bib3)\), which contain accessibility\-tree observations coupled with step\-wise reasoning and action traces for supervision\. We construct step\-wise memory labels required by AMBER by retrospectively annotating successful trajectories using Pi coding agent\([Zechner, 2025](https://arxiv.org/html/2610.07118#bib.bib28)\)with GPT 5\.5\. We provide the full details of the data generation along with the prompts in Appendix[G](https://arxiv.org/html/2610.07118#A7)\.
Evaluation\.We evaluate AMBER across five independent runs with different seeds using three metrics:\(1\) Success rate\.The success rate for each website, averaged over tasks and the five runs \(Section[5\.1](https://arxiv.org/html/2610.07118#S5.SS1)\)\.\(2\) Repeated\-run reliability\.For each task, we count the number of successful runs and report the fraction of tasks solved in at leastkkof five runs, fork=1,…,5k=1,\\ldots,5\(Section[5\.2](https://arxiv.org/html/2610.07118#S5.SS2)\)\.\(3\) Context length\.The token length of the action prompt, including the retained contextCtC\_\{t\}\(Section[5\.3](https://arxiv.org/html/2610.07118#S5.SS3)\)\.
Baselines\.We compare AMBER against two established context\-management strategies:Reasoning\+Action History, which retains past reasoning and actions \(e\.g\., WebAgent\-R1\([Wei et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib19)\), Go\-Browse\([Gandhi & Neubig, 2025](https://arxiv.org/html/2610.07118#bib.bib3)\)\), andOverwrite Memory, which maintains a learned memory through overwrite updates \(e\.g\., MemAgent\([Yu et al\., 2026](https://arxiv.org/html/2610.07118#bib.bib26)\), MemSearcher\([Yuan et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib27)\)\)\. We use WebAgent\-R1 and MemAgent as representative methods from these respective categories, re\-implementing both baselines with reference to their official implementations\. All methods use the Qwen 3\.5\([Team, 2026](https://arxiv.org/html/2610.07118#bib.bib16)\)model family under a common experimental setup\. Experimental details and hyperparameters are provided in Appendix[I\.2](https://arxiv.org/html/2610.07118#A9.SS2)\.
### 5\.1Success Rate
Table[1](https://arxiv.org/html/2610.07118#S5.T1)reports success rates on WebArena Lite, averaged over five independent runs\. We make the following observations:
- •Zero\-shot evaluation\.Under a zero\-shot setting, Qwen 3\.5 9B achieves a 34\.22% success rate under the full\-context protocol, which drops to 21\.82% under the AMBER protocol\. The same trend is observed for 27B\. This shows that Qwen 3\.5 is capable of reasoning and acting in web environments, but cannot generate compressed step\-wise memory reliably\.
- •Benefit of explicit memory\.MemAgent, which maintains an explicit learned memory through overwrite updates, improves over the reasoning\-and\-action history of WebAgent\-R1 by4\.414\.41percentage points\. This suggests that explicitly training the agent to record task\-relevant information is beneficial for long\-horizon interaction, rather than relying on reasoning generated primarily to support the next action\.
- •Append\-only retention improves success rate\.AMBER achieves the highest average success rate, outperforming MemAgent by4\.094\.09percentage points with Qwen 3\.5 9B, and by 2\.05 points with 27B\. AMBER with Qwen 3\.5 27B outperforms Haiku 4\.5 by 2\.1 points\.
Table 1:Success rate \(%\) on WebArena Lite, averaged over five evaluation runs\.ModelShoppingAdminRedditMapMulti\-siteAverageClosed Models/Zero\-Shot with AMBERGPT\-5\-mini28\.6838\.1029\.4125\.6427\.7830\.71±\\pm1\.11Haiku 4\.544\.9662\.8652\.9425\.6438\.8946\.72±\\pm3\.24Qwen 3\.5 9B27\.0528\.0010\.7214\.1016\.6721\.82±\\pm2\.97Qwen 3\.5 27B37\.2143\.4342\.3517\.6940\.0035\.75±\\pm4\.19Qwen 3\.5 9BFull Context \(Zero\-Shot\)36\.0840\.2048\.2414\.0033\.3334\.22±\\pm1\.30WebAgent\-R129\.4634\.2939\.2210\.2633\.3328\.35±\\pm0\.64MemAgent28\.8441\.7144\.7117\.6940\.0032\.76±\\pm1\.54AMBER \(ours\)29\.3043\.4361\.1823\.0843\.3336\.85±\\pm1\.68Qwen 3\.5 27BFull Context \(Zero\-Shot\)47\.9158\.2955\.2921\.5426\.6745\.35±\\pm1\.73WebAgent\-R143\.2654\.2976\.4714\.6236\.6744\.57±\\pm3\.46MemAgent48\.8456\.5771\.7615\.3840\.0046\.77±\\pm3\.18AMBER \(ours\)49\.7756\.5770\.5923\.8543\.3348\.82±\\pm1\.36
### 5\.2Reliability Across Repeated Runs
Table 2:Repeated\-run reliability across five evaluation runs\. Each column reports the percentage of tasks solved in at least the indicated number of runs \(e\.g\.,≥3/5\\geq 3/5denotes tasks solved in at least three of five runs\)\.≥1/5\\geq 1/5≥2/5\\geq 2/5≥3/5\\geq 3/5≥4/5\\geq 4/55/55/5Qwen 3\.5 9BWebAgent\-R143\.3%34\.6%25\.2%24\.4%15\.7%MemAgent48\.8%39\.4%34\.6%25\.2%15\.7%AMBER53\.5%41\.7%36\.2%32\.3%20\.5%Qwen 3\.5 27BWebAgent\-R162\.2%49\.6%44\.1%36\.2%30\.7%MemAgent59\.1%52\.0%48\.0%42\.5%32\.3%AMBER61\.4%55\.1%50\.4%41\.7%35\.4%
Figure 3:Mean action\-prompt length by interaction step, averaged over five runs\. The context length is plotted in log scale\.
Table[2](https://arxiv.org/html/2610.07118#S5.T2)evaluates how consistently each method solves the same task across the five runs\. Each column applies a progressively stricter criterion, from solving a task at least once \(≥1/5\\geq 1/5\) to solving it in all five runs \(5/55/5\)\. For the 9B model, AMBER leads at all five reliability thresholds\. For the 27B model, AMBER leads at≥2/5\\geq 2/5,≥3/5\\geq 3/5, and5/55/5, while WebAgent\-R1 leads at≥1/5\\geq 1/5and MemAgent at≥4/5\\geq 4/5\.
Tasks brought within reach\.For the 9B model, both memory\-based methods increase the fraction of tasks solved at least once, from 43\.3% with reasoning history to 48\.8% with overwrite memory and 53\.5% with AMBER\.
Tasks solved repeatedly\.At the majority\-run threshold \(≥3/5\\geq 3/5\), success increases from25\.2%25\.2\\%with reasoning history to34\.6%34\.6\\%with overwrite memory and36\.2%36\.2\\%with AMBER for the 9B model\. At the strictest5/55/5threshold, AMBER reaches20\.5%20\.5\\%with 9B and35\.4%35\.4\\%with 27B, outperforming both baselines\.Thus, AMBER’s main advantage appears in solving tasks consistently across repeated runs rather than simply solving more tasks once\.
### 5\.3Context Length
Since AMBER preserves every memory entry, its context length grows with the trajectory length, whereas overwrite memory remains bounded\. Figure[2](https://arxiv.org/html/2610.07118#S5.T2)quantifies this difference using the fully rendered action prompt\. At step3030, AMBER reaches7\.47\.4k tokens compared with44k for MemAgent and99k for WebAgent\-R1\. However, the context length for AMBER stays well below the full\-context baseline, which reaches9090k tokens by step 30, and within the model’s maximum context length\. Although AMBER results in a larger context length, it remains practical\.AMBER trades a moderate increase in context length for stronger and more reliable task execution\.
### 5\.4Supervision Strength vs\. Retention Prior
One possible explanation for the weaker performance of overwrite memory is that RL cannot learn to write a cumulative and lossless memory without stronger supervised data\. To test whether better supervised data during the initial SFT phase can reduce the gap, we refine the supervision targets for the generated memory using a pipeline consisting of a judge model that penalizes lossy compression and ensures that the memory is cumulative \(see Appendix[H](https://arxiv.org/html/2610.07118#A8)for details\)\. As shown in Table[4](https://arxiv.org/html/2610.07118#S5.T4), refined supervision improves MemAgent’s average success rate from32\.76%32\.76\\%to35\.59%35\.59\\%\. The same pattern appears in repeated\-run reliability \(Table[4](https://arxiv.org/html/2610.07118#S5.T4)\): AMBER matches the refined overwrite model at three of the five thresholds, while refined overwrite leads at the remaining two\. We use Qwen 3\.5 9B for the experiments\.
These results show that stronger SFT supervision can improve overwrite memory\. However, obtaining this improvement requires a more complex and expensive data\-generation pipeline\. AMBER achieves this level of performance without requiring this additional refinement procedure\.
Table 3:Effect of refined training data on success rate, compared with the original MemAgent and AMBER\.MemAgent\+ Refined dataAMBER \(ours\)Shopping28\.8427\.4429\.30Admin41\.7150\.8643\.43Reddit44\.7156\.4761\.18Map17\.6914\.6223\.08Multi\-site40\.0036\.6743\.33Average32\.76±\\pm1\.5435\.59±\\pm1\.7536\.85±\\pm1\.68
Table 4:Effect of refined training data on repeated\-run reliability, compared with the original MemAgent and AMBER\.MemAgent\+ Refined dataAMBER≥1/5\\geq 1/548\.8%54\.3%53\.5%≥2/5\\geq 2/539\.4%39\.4%41\.7%≥3/5\\geq 3/534\.6%34\.6%36\.2%≥4/5\\geq 4/525\.2%28\.3%32\.3%5/55/515\.7%21\.3%20\.5%
## 6Trajectory Analysis
Table 5:Percentage of trajectories retaining environment feedback in memory afterkksteps\.kk12345% trajectories100\.025\.67\.54\.50\.8
In this section, we analyze the trajectories of agents with overwrite vs\. append memories for a more nuanced understanding of the failures\. We observe two main patterns which highlight the failure modes of overwrite memory and how append memory mitigates them:
Recovery after execution errors\.Overwrite memory can erase error feedback from the environment, potentially causing the agent to repeat previously rejected actions\. We focus on invalid actions, for which the environment provides clear, actionable feedback that can guide recovery\. Table[5](https://arxiv.org/html/2610.07118#S6.T5)shows that this feedback is lost from memory after four steps, and Figure[4](https://arxiv.org/html/2610.07118#S6.F4)illustrates the repetition of previously rejected actions\. To quantify this behavior, we define an*event*as the first rejection of an invalid action within an episode and count how often the agent repeats that action afterward\. Averaged over five seeds, AMBER re\-issues an invalid action 1\.29 times per event, compared with 1\.95 for MemAgent\. Both methods heed most corrections, but MemAgent re\-issues the invalid action six or more times in 15\.4% of events, compared with 3\.3% for AMBER\. While this analysis focuses on invalid actions,it shows that append memory can retain and act on feedback better than overwrite memory\.
Figure 4:Error recovery on a Maps task\. The environment supportsfillbut notclear\. Both agents issueclear, see the error, and record it in memory\. MemAgent’s next overwrite erases the record, and it issuesclearrepeatedly\. AMBER’s appended entry persists, and it never repeats the action\. See Figure[7](https://arxiv.org/html/2610.07118#A5.F7)for the detailed trajectory\.Information loss\.Overwrite memory can also drop evidence that was already recorded correctly, making it unavailable when needed later\. We call this failure mode*recursive\-compression loss*\(Figure[5](https://arxiv.org/html/2610.07118#S6.F5); more examples in Appendix[F](https://arxiv.org/html/2610.07118#A6)\)\.
Figure 5:Recursive\-compression loss\. The task asks for reviewers who mention good fingerprint resistance, and the two matching reviews never share a viewport\. Both agents record Rachel after the first scroll\. The overwrite agent’s rewrite after it sees T\. Gannon drops Rachel, and it answers with T\. Gannon only\. AMBER’s original entry persists alongside the new one, and it answers correctly with both reviewers\.
## 7Conclusion
In this paper, we study context retention in long\-horizon web agents and propose AMBER \(Append\-only Memory Bank for Evidence Retention\)\. AMBER separates the learned decision of what to record from the deterministic decision of what to retain: the policy writes a free\-form memory entry at each step, and an append\-only rule preserves every entry\. We show that AMBER can be trained end\-to\-end with reinforcement learning from outcome rewards after minimal supervised fine\-tuning\. On WebArena Lite, AMBER improves average success over overwrite memory across 9B and 27B model sizes, and achieves stronger repeated\-run reliability\. Our trajectory analysis shows that overwrite memory can lose recorded evidence and error feedback\. While refined supervision narrows the gap for overwrite memory, it requires an expensive data curation pipeline, and AMBER matches it without this additional curation\. Thus, AMBER is a simple, scalable method for training long\-horizon web agents that balances task performance, reliability, context efficiency and supervision complexity\.
## 8AI Disclosure
In this work, we use generative AI tools for the following:
- •Writing code, which is verified by the lead author\.
- •Drafting parts of the manuscript, which is proofread and rephrased by the authors\.
- •Synthetic data generation \(details are provided in the relevant sections\)
- •Data analysis and trajectory analysis\.
We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI\.
## References
- Chezelles et al\. \(2024\)De Chezelles, Thibault Le Sellier, Sahar Omidi Shayegan, Lawrence Keunho Jang, Xing Han Lù, Ori Yoran, Dehan Kong, Frank F Xu, Siva Reddy, Quentin Cappart, et al\.The browsergym ecosystem for web agent research\.*arXiv preprint arXiv:2412\.05467*, 2024\.
- Deng et al\. \(2024\)Yang Deng, Xuan Zhang, Wenxuan Zhang, Yifei Yuan, See\-Kiong Ng, and Tat\-Seng Chua\.On the multi\-turn instruction following for conversational web agents\.*arXiv preprint arXiv:2402\.15057*, 2024\.URL[https://arxiv\.org/abs/2402\.15057](https://arxiv.org/abs/2402.15057)\.
- Gandhi & Neubig \(2025\)Apurva Gandhi and Graham Neubig\.Go\-browse: Training web agents with structured exploration\.*arXiv preprint arXiv:2506\.03533*, 2025\.URL[https://arxiv\.org/abs/2506\.03533](https://arxiv.org/abs/2506.03533)\.
- Jin et al\. \(2025\)Bowen Jin, Hansi Zeng, Zhenrui Yue, Jinsung Yoon, Sercan Arik, Dong Wang, Hamed Zamani, and Jiawei Han\.Search\-r1: Training llms to reason and leverage search engines with reinforcement learning\.*arXiv preprint arXiv:2503\.09516*, 2025\.
- Liu et al\. \(2024a\)Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang\.Lost in the middle: How language models use long contexts\.*Transactions of the association for computational linguistics*, 12:157–173, 2024a\.
- Liu et al\. \(2024b\)Xiao Liu, Tianjie Zhang, Yu Gu, Iat Long Iong, Yifan Xu, Xixuan Song, Shudan Zhang, Hanyu Lai, Xinyi Liu, Hanlin Zhao, et al\.Visualagentbench: Towards large multimodal models as visual foundation agents\.*arXiv preprint arXiv:2408\.06327*, 2024b\.
- Mnih et al\. \(2016\)Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu\.Asynchronous methods for deep reinforcement learning\.In*International conference on machine learning*, pp\. 1928–1937\. PmLR, 2016\.
- Moritz et al\. \(2018\)Philipp Moritz, Robert Nishihara, Stephanie Wang, Alexey Tumanov, Richard Liaw, Eric Liang, Melih Elibol, Zongheng Yang, William Paul, Michael I\. Jordan, and Ion Stoica\.Ray: A distributed framework for emerging AI applications\.In Andrea C\. Arpaci\-Dusseau and Geoff Voelker \(eds\.\),*13th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2018, Carlsbad, CA, USA, October 8\-10, 2018*, pp\. 561–577\. USENIX Association, 2018\.URL[https://www\.usenix\.org/conference/osdi18/presentation/nishihara](https://www.usenix.org/conference/osdi18/presentation/nishihara)\.
- Murty et al\. \(2024\)Shikhar Murty, Hao Zhu, Dzmitry Bahdanau, and Christopher D\. Manning\.NNetNav: Unsupervised learning of browser agents through environment interaction in the wild\.*arXiv preprint arXiv:2410\.02907*, 2024\.URL[https://arxiv\.org/abs/2410\.02907](https://arxiv.org/abs/2410.02907)\.
- Müller & Žunič \(2024\)Magnus Müller and Gregor Žunič\.Browser use: Enable ai to control your browser, 2024\.URL[https://github\.com/browser\-use/browser\-use](https://github.com/browser-use/browser-use)\.
- OpenAI \(2025\)OpenAI\.Introducing deep research\.[https://openai\.com/index/introducing\-deep\-research/](https://openai.com/index/introducing-deep-research/), 2025\.\[Accessed 13\-09\-2026\]\.
- Packer et al\. \(2023\)Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G\. Patil, Ion Stoica, and Joseph E\. Gonzalez\.MemGPT: Towards LLMs as operating systems\.*arXiv preprint arXiv:2310\.08560*, 2023\.URL[https://arxiv\.org/abs/2310\.08560](https://arxiv.org/abs/2310.08560)\.
- Qi et al\. \(2025\)Zehan Qi, Xiao Liu, Iat Long Iong, Hanyu Lai, Xueqiao Sun, Wenyi Zhao, Yu Yang, Xinyue Yang, Jiadai Sun, Shuntian Yao, Tianjie Zhang, Wei Xu, Jie Tang, and Yuxiao Dong\.WebRL: Training LLM web agents via self\-evolving online curriculum reinforcement learning\.In*International Conference on Learning Representations*, 2025\.URL[https://arxiv\.org/abs/2411\.02337](https://arxiv.org/abs/2411.02337)\.
- Shao et al\. \(2024\)Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Yang Wu, et al\.Deepseekmath: Pushing the limits of mathematical reasoning in open language models\.*arXiv preprint arXiv:2402\.03300*, 2024\.
- Shinn et al\. \(2023\)Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao\.Reflexion: Language agents with verbal reinforcement learning\.In*Advances in Neural Information Processing Systems*, 2023\.URL[https://arxiv\.org/abs/2303\.11366](https://arxiv.org/abs/2303.11366)\.
- Team \(2026\)Qwen Team\.Qwen3\.5: Towards native multimodal agents, February 2026\.URL[https://qwen\.ai/blog?id=qwen3\.5](https://qwen.ai/blog?id=qwen3.5)\.
- Vattikonda et al\. \(2025\)Dheeraj Vattikonda, Santhoshi Ravichandran, Emiliano Penaloza, Hadi Nekoei, Megh Thakkar, Thibault Le Sellier de Chezelles, Nicolas Gontier, Miguel Muñoz Mármol, Sahar Omidi Shayegan, Stefania Raimondo, Xue Liu, Alexandre Drouin, Laurent Charlin, Alexandre Piché, Alexandre Lacoste, and Massimo Caccia\.How to train your LLM web agent: A statistical diagnosis\.*arXiv preprint arXiv:2507\.04103*, 2025\.URL[https://arxiv\.org/abs/2507\.04103](https://arxiv.org/abs/2507.04103)\.
- Wang et al\. \(2023\)Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar\.Voyager: An open\-ended embodied agent with large language models\.*arXiv preprint arXiv:2305\.16291*, 2023\.URL[https://arxiv\.org/abs/2305\.16291](https://arxiv.org/abs/2305.16291)\.
- Wei et al\. \(2025\)Zhepei Wei, Wenlin Yao, Yao Liu, Weizhi Zhang, Qin Lu, Liang Qiu, Changlong Yu, Puyang Xu, Chao Zhang, Bing Yin, et al\.Webagent\-r1: Training web agents via end\-to\-end multi\-turn reinforcement learning\.In*Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing*, pp\. 7920–7939, 2025\.
- Wu et al\. \(2025\)Xixi Wu, Kuan Li, Yida Zhao, Liwen Zhang, Litu Ou, Huifeng Yin, Zhongwang Zhang, Xinmiao Yu, Dingchu Zhang, Yong Jiang, Pengjun Xie, Fei Huang, Minhao Cheng, Shuai Wang, Hong Cheng, and Jingren Zhou\.ReSum: Unlocking long\-horizon search intelligence via context summarization\.*arXiv preprint arXiv:2509\.13313*, 2025\.URL[https://arxiv\.org/abs/2509\.13313](https://arxiv.org/abs/2509.13313)\.
- Xu et al\. \(2025\)Yiheng Xu, Dunjie Lu, Zhennan Shen, Junli Wang, Zekun Wang, Yuchen Mao, Caiming Xiong, and Tao Yu\.AgentTrek: Agent trajectory synthesis via guiding replay with web tutorials\.In*International Conference on Learning Representations*, 2025\.URL[https://arxiv\.org/abs/2412\.09605](https://arxiv.org/abs/2412.09605)\.
- Yan et al\. \(2025\)Sikuan Yan, Xiufeng Yang, Zuchao Huang, Ercong Nie, Zifeng Ding, Zonggen Li, Xiaowen Ma, Jinhe Bi, Kristian Kersting, Jeff Z\. Pan, Hinrich Schütze, Volker Tresp, and Yunpu Ma\.Memory\-R1: Enhancing large language model agents to manage and utilize memories via reinforcement learning\.*arXiv preprint arXiv:2508\.19828*, 2025\.URL[https://arxiv\.org/abs/2508\.19828](https://arxiv.org/abs/2508.19828)\.
- Yao et al\. \(2023\)Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao\.React: Synergizing reasoning and acting in language models\.In*International Conference on Learning Representations*, 2023\.URL[https://arxiv\.org/abs/2210\.03629](https://arxiv.org/abs/2210.03629)\.
- Yao et al\. \(2025\)Shunyu Yao, Noah Shinn, Pedram Razavi, and Karthik R Narasimhan\.τ\\tau\-bench: A benchmark for Tool\-Agent\-User interaction in real\-world domains\.In*The Thirteenth International Conference on Learning Representations*, 2025\.URL[https://openreview\.net/forum?id=roNSXZpUDN](https://openreview.net/forum?id=roNSXZpUDN)\.
- Ye et al\. \(2025\)Rui Ye, Zhongwang Zhang, Kuan Li, Huifeng Yin, Zhengwei Tao, Yida Zhao, Liangcai Su, Liwen Zhang, Zile Qiao, Xinyu Wang, Pengjun Xie, Fei Huang, Siheng Chen, Jingren Zhou, and Yong Jiang\.AgentFold: Long\-horizon web agents with proactive context management\.*arXiv preprint arXiv:2510\.24699*, 2025\.URL[https://arxiv\.org/abs/2510\.24699](https://arxiv.org/abs/2510.24699)\.
- Yu et al\. \(2026\)Hongli Yu, Tinghong Chen, Jiangtao Feng, Jiangjie Chen, Weinan Dai, Qiying Yu, Ya\-Qin Zhang, Wei\-Ying Ma, Jingjing Liu, Mingxuan Wang, and Hao Zhou\.MemAgent: Reshaping long\-context LLM with multi\-conv RL\-based memory agent\.In*International Conference on Learning Representations*, 2026\.URL[https://arxiv\.org/abs/2507\.02259](https://arxiv.org/abs/2507.02259)\.
- Yuan et al\. \(2025\)Qianhao Yuan, Jie Lou, Zichao Li, Jiawei Chen, Yaojie Lu, Hongyu Lin, Le Sun, Debing Zhang, and Xianpei Han\.Memsearcher: Training llms to reason, search and manage memory via end\-to\-end reinforcement learning\.*arXiv preprint arXiv:2511\.02805*, 2025\.
- Zechner \(2025\)Mario Zechner\.Pi Coding Agent — pi\.dev\.[https://pi\.dev/](https://pi.dev/), 2025\.\[Accessed 09\-08\-2026\]\.
- Zhang et al\. \(2025\)Yuxiang Zhang, Jiangming Shu, Ye Ma, Xueyuan Lin, Shangxi Wu, and Jitao Sang\.Memory as action: Autonomous context curation for long\-horizon agentic tasks\.*arXiv preprint arXiv:2510\.12635*, 2025\.URL[https://arxiv\.org/abs/2510\.12635](https://arxiv.org/abs/2510.12635)\.
- Zhao et al\. \(2024\)Andrew Zhao, Daniel Huang, Quentin Xu, Matthieu Lin, Yong\-Jin Liu, and Gao Huang\.Expel: LLM agents are experiential learners\.In*Proceedings of the AAAI Conference on Artificial Intelligence*, 2024\.URL[https://arxiv\.org/abs/2308\.10144](https://arxiv.org/abs/2308.10144)\.
- Zhou et al\. \(2024\)Shuyan Zhou, Frank F\. Xu, Hao Zhu, Xuhui Zhou, Robert Lo, Abishek Sridhar, Xianyi Cheng, Tianyue Ou, Yonatan Bisk, Daniel Fried, Uri Alon, and Graham Neubig\.Webarena: A realistic web environment for building autonomous agents\.In*International Conference on Learning Representations*, 2024\.URL[https://arxiv\.org/abs/2307\.13854](https://arxiv.org/abs/2307.13854)\.
- Zhou et al\. \(2025\)Zijian Zhou, Ao Qu, Zhaoxuan Wu, Sunghwan Kim, Alok Prakash, Daniela Rus, Jinhua Zhao, Bryan Kian Hsiang Low, and Paul Pu Liang\.MEM1: Learning to synergize memory and reasoning for efficient long\-horizon agents\.*arXiv preprint arXiv:2506\.15841*, 2025\.URL[https://arxiv\.org/abs/2506\.15841](https://arxiv.org/abs/2506.15841)\.
## Appendix ALimitations
AMBER retains every generated memory entry, so its context grows linearly with the number of interaction steps\. Over the horizons we evaluate, this growth remains well within the model’s context window and is comparable to retaining the reasoning history\. At substantially longer horizons, however, some form of selection or consolidation may become necessary\. How to introduce such operations while preserving information that may become relevant much later in a trajectory remains an open question\.
In both append and overwrite memory, we observe that models sometimes hallucinate when generating the memory\. This could potentially be an effect of the model being trained with reinforcement learning solely using outcome rewards\. We leave addressing this to future work\.
Finally, our information loss analysis is qualitative\. The examples in Section[6](https://arxiv.org/html/2610.07118#S6)demonstrate that information can be recorded correctly and subsequently lost through memory rewriting, but they are examples rather than an estimate of how frequently this failure mode occurs\. A systematic characterization of memory failures across tasks and trajectories would provide a more complete picture of when different retention strategies succeed or fail\.
## Appendix BBroader Impact
AMBER improves evidential durability and auditability, but append\-only retention should not imply indefinite storage in deployed systems\. Persistent entries may contain sensitive, stale, incorrect, or adversarial information\. Practical systems should separate the immutable trajectory representation studied here from policies governing storage duration, prompt\-time selection, user inspection and deletion, and redaction of private information\. Web agents also require safeguards against persistent prompt injection and consequential unauthorized actions\. Our experiments use self\-hosted benchmark environments and involve no real users\.
## Appendix CExtended Related Work and Design Space
This appendix expands Section[2](https://arxiv.org/html/2610.07118#S2)\.
#### Trajectory supervision and outcome\-based adaptation\.
Trajectory\-based methods obtain demonstrations without relying entirely on manual annotation\. NNetNav explores websites and retroactively labels action sequences\([Murty et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib9)\), AgentTrek converts tutorials into task specifications and replays them in real environments\([Xu et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib21)\), and Go\-Browse frames exploration as graph search to collect successful long\-horizon trajectories for SFT\([Gandhi & Neubig, 2025](https://arxiv.org/html/2610.07118#bib.bib3)\)\. Outcome\-based methods instead optimize the policy during interaction\. WebRL introduces a self\-evolving curriculum and an outcome reward model\([Qi et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib13)\), and WebAgent\-R1 performs multi\-turn RL with binary task rewards after a behavior\-cloning warm start\([Wei et al\., 2025](https://arxiv.org/html/2610.07118#bib.bib19)\)\. More broadly,[Vattikonda et al\. \(2025\)](https://arxiv.org/html/2610.07118#bib.bib17)study SFT and on\-policy RL across web\-agent post\-training settings and find their combination important for strong performance\.
#### The design space\.
These works make coupled choices along five axes: the observation representation of the current environment, the context retained across interactions, the model family, the training strategy, and the environment in which the system is evaluated\. The evaluation environment deserves particular attention, because it determines how much pressure a retention rule is actually under\. Table[6](https://arxiv.org/html/2610.07118#A3.T6)organizes representative systems along these axes as a conceptual map, not a performance comparison; the systems differ in model, action space, and training budget\. Our experiments vary only the second axis\. We hold the observation representation, model family, training strategy, and evaluation environment fixed, and compare retained\-context designs in one shared setting\.
Table 6:Representative combinations of evaluation environment, observation input, retained context, and training\. Recurrent overwrite memory has so far been validated on single\-template or non\-interactive settings, and not on diverse web navigation\. The table organizes design choices; it does not imply that results are directly comparable across different tasks and environments\.SystemEvaluation environmentObservation inputRetained info\.RetentionTrainingGo\-BrowseWebArenaAccessibility treeReasoning historyAccumulateSFTWebAgent\-R1WebArenaSimplified HTMLReasoning historyAccumulateSFT \+ RLMEM1WebShop, multi\-hop QACustom textExplicit memoryRecurrent overwriteRLMemAgentLong\-document QAText segmentsExplicit memoryRecurrent overwriteRLAMBER \(ours\)WebArenaAccessibility treeExplicit memoryAppend\-onlySFT \+ RL
#### Experiential memory\.
Trajectory memory, the subject of this paper, differs from*experiential memory*, which transfers knowledge across tasks or sessions\. Reflexion stores verbal feedback from failed attempts\([Shinn et al\., 2023](https://arxiv.org/html/2610.07118#bib.bib15)\); ExpeL extracts reusable natural\-language insights\([Zhao et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib30)\); Voyager accumulates executable skills\([Wang et al\., 2023](https://arxiv.org/html/2610.07118#bib.bib18)\); and MemGPT manages multiple memory tiers beyond the model context\([Packer et al\., 2023](https://arxiv.org/html/2610.07118#bib.bib12)\)\. These systems address which past experience should be retained or retrieved for future problems\. We instead study whether evidence generated during one ongoing task remains available until that task terminates\.
## Appendix DRollout Infrastructure Details
Our rollout infrastructure separates policy inference, browser execution, and website serving so that each component can be provisioned independently\.
#### Remote browser execution\.
Browser sessions run on dedicated environment servers and are accessed through an HTTP interface for session creation, reset, interaction, and termination\. This transport layer is hidden behind a thin Gym\-style client, so the rollout manager in the trainer interacts with each remote browser through the same environment interface as a local environment and never issues HTTP requests directly\. Before being returned to the policy, each observation is reduced to the flattened accessibility tree, open\-tab titles and URLs, and the most recent action error\. This abstraction separates rollout logic from browser placement, allowing the same rollout code to operate against any reachable environment server\.
#### Step\-level asynchronous execution\.
Each rollout progresses independently through alternating policy\-inference and environment\-interaction steps\. Both operations are issued asynchronously, so rollouts need not synchronize after each interaction\. For example, while one rollout waits for a browser action, page load, or task validation to complete, another rollout whose previous environment step has finished can perform model inference for its next action\. This interleaving allows environment latency and policy inference to overlap across concurrent rollouts\.
#### Browser isolation\.
Each rollout is assigned an independent BrowserGym\([Chezelles et al\., 2024](https://arxiv.org/html/2610.07118#bib.bib1)\)session hosted by a Ray\([Moritz et al\., 2018](https://arxiv.org/html/2610.07118#bib.bib8)\)actor\. Concurrent rollouts therefore do not share browser state, cookies, or navigation history\. The environment server tracks active sessions, limits the number of concurrent browsers, and reclaims sessions after termination or prolonged inactivity\. Browser failures are contained within the corresponding rollout rather than affecting other active sessions\.
#### Website hosting and state isolation\.
Website services run on hosts separate from browser execution and policy inference\. This separation allows website capacity to scale independently and is particularly important for tasks that modify persistent website state\. Such rollouts are assigned isolated copies of the required mutable services so that writes made by one rollout cannot affect another\.
For WebArena, we share services whose state does not need to be isolated and replicate only the mutable services required by a task\. Each website host maintains a set of rollout slots, where a slot contains dedicated containers for the mutable services assigned to that rollout\. A slot is returned to the available pool only after these containers have been torn down, preventing state from leaking between successive rollouts\. Because no WebArena task modifies more than two mutable services, our configuration supports eight concurrent isolated rollout slots per website host\.
Figure 6:Asynchronous Rollouts: Each rollout is a multi\-step episode with each step accessing the environment and inference asynchronously\.
## Appendix ERecovering from Execution Errors
Figure 7:Task 33\. Both agents issue an invalidclear\(\)at step 4 and record the error at step 5\. \(a\) AMBER keeps that entry in memory through step 13, never issuesclear\(\)again, and answers at step 13\. \(b\) MemAgent erases the error at step 6 and issuesclear\(\)again at step 12; its reasoning at step 13 notes thatclear\(\)is not allowed, but its memory does not record it, and it triesclear\(\)on another field at step 15\.Figure 8:Task 56\. Both agents issue an invalidclear\(\)at step 5 and record the error at step 6\. AMBER keeps that entry in context, never retriesclear\(\), and answers at step 9\. MemAgent retriesclear\(\)at step 7 anyway, then overwrites the entry with one that says only that the field was cleared, dropping the error; it issuesclear\(\)eight times in total before answering at step 24\.Figure 9:Task 75\. \(a\) AMBER writes the rejectedclear\(\)into memory at step 8 and switches tofill\(\), never issuingclear\(\)again\. \(b\) MemAgent records the rejectedclear\(\)as done and, although its reasoning notes the failure, never writes it down; it callsclear\(\)seven times in total\.
## Appendix FAdditional Qualitative Analysis
We provide more examples of trajectories exhibiting the recursive\-compression loss described in Section[6](https://arxiv.org/html/2610.07118#S6)\. In each case, the overwrite agent initially records task\-relevant evidence correctly but subsequently removes it during a memory rewrite\. These examples are qualitative and are not intended to estimate the frequency of this failure mode\.
- •Task 23 \(set accumulation across a long page\)\.The AMBER trajectory records Rachel at one scroll position and T\. Gannon at a later position, retaining both for the final answer\. In the overwrite trajectory, Rachel is initially recorded correctly but disappears when the memory is rewritten after a later scroll, resulting in an incomplete answer containing only T\. Gannon\.
- •Task 202 \(direct deletion of required evidence\)\.The overwrite memory correctly records order \#000000136 and its May 23 timestamp\. After subsequent interactions, the replacement memory drops this order while retaining an older April order, which the agent later reports\. The AMBER trajectory preserves the original May 23 record and answers correctly\.
Extending the task 23 example in Figure[5](https://arxiv.org/html/2610.07118#S6.F5), we visualize task 202 in Figure[10](https://arxiv.org/html/2610.07118#A6.F10)\. The displayed text is abridged from the audited evaluation trajectories, and the observation claims use the prompt\-time viewport\-filtered accessibility trees rather than the stored raw trees\.
Figure 10:Recursive\-compression loss on task 202\. Both agents record that order \#000000136 \(May 23\) is the most recent canceled order\. The overwrite agent’s later rewrite keeps only older canceled orders, and it answers with an April order\. AMBER’s original entry persists, and it answers correctly\. Text is abridged for legibility\.Figure 11:Recall from older memory on task 720 \(AMBER\)\. At step 4 the author page shows all three of CameronKelsey’s posts, and m4 records them, including the third \(Little White Salmon River\)\. By step 7 the agent has moved to the EarthPorn listing, where that post is not on the page, and the latest entry, m6, no longer names it, yet the step\-7 reasoning quotes its title, which can only come from m4 or m5; an overwrite agent would have only m6 in context\. The post is not named again until a search surfaces it at step 17, after which the agent upvotes it and succeeds\.
## Appendix GSynthetic SFT Data Generation
We generate the synthetic memory supervision data for the SFT phase using the Pi coding agent\([Zechner, 2025](https://arxiv.org/html/2610.07118#bib.bib28)\)with GPT 5\.5 as the annotator\. The annotator is given a complete trajectory and final answer from the Go\-Browse dataset containing the accessibility trees, reasoning and action traces as context for determining which information from an earlier step will remain useful, and is asked to generate the synthetic memory traces in a retrospective manner\. The prompt forbids leaking future\-only information into an earlier step’s memory\. Go\-Browse trajectories use full accessibility trees, whereas our RL training and evaluation use viewport\-filtered trees\. We find that this observation mismatch does not prevent effective RL fine\-tuning\.
The figure below shows the prompt used for generating the memory traces for all the steps in a single trajectory\.\{trajectory\_file\}is the path of the source trajectory,\{save\_file\}is the path of the label file to be written, and\{few\_shot\_prompt\}is the few\-shot block given afterwards\. The output is a JSONL file with one\(step, memory\)record per trajectory step\.
[⬇](data:text/plain;base64,QW5hbHl6ZSB0aGUgdHJhamVjdG9yeSBpbiB7dHJhamVjdG9yeV9maWxlfSwgd2hpY2ggY29udGFpbnMgYSBzdGVwIGJ5IHN0ZXAgZXhlY3V0aW9uIG9mIGEgdGFzay4gVGhlIHRyYWplY3RvcnkgZmlsZSBpcyBKU09OIHdpdGggdGhlIGZvbGxvd2luZyByZWxldmFudCBzaGFwZToKewogICAgImdvYWwiOiA8dGFzayBnaXZlbiB0byB0aGUgYWdlbnQ+LAogICAgInN0ZXBzIjogWwogICAgICAgIHsKICAgICAgICAgICAgInN0ZXBfbnVtIjogPHN0ZXAgbnVtYmVyIGluIHRoZSB0cmFqZWN0b3J5PiwKICAgICAgICAgICAgIm9ic2VydmF0aW9uIjogewogICAgICAgICAgICAgICAgImF4dHJlZSI6IDxmdWxsIGFjY2Vzc2liaWxpdHkgdHJlZSBvZiB0aGUgd2VicGFnZSBhdCB0aGUgc3RlcD4sCiAgICAgICAgICAgICAgICAibGFzdF9hY3Rpb25fZXJyb3IiOiA8YW55IGVycm9yIGVuY291bnRlcmVkIGluIHRoZSBwcmV2aW91cyBhY3Rpb24+CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJyZXNwb25zZSI6IHsKICAgICAgICAgICAgICAgICJtb2RlbF9mdWxsX3Jlc3BvbnNlIjogPGZ1bGwgcmVzcG9uc2UgZ2l2ZW4gYnkgdGhlIG1vZGVsPiwKICAgICAgICAgICAgICAgICJyZWFzb25pbmciOiA8cmVhc29uaW5nIHRyYWNlIGV4dHJhY3RlZCBmcm9tIHRoZSBtb2RlbCByZXNwb25zZT4sCiAgICAgICAgICAgICAgICAiYWN0aW9uIjogPGFjdGlvbiBleHRyYWN0ZWQgZnJvbSB0aGUgbW9kZWwgcmVzcG9uc2Ugd2hpY2ggaXMgcGVyZm9ybWVkIG9uIHRoZSB3ZWJwYWdlPgogICAgIC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GVwLCBpbiBhc2NlbmRpbmcgc3RlcCBvcmRlci4gRWFjaCBsaW5lIG11c3QgY29udGFpbiBleGFjdGx5IHRoZSBmaWVsZHMgYHN0ZXBgIGFuZCBgbWVtb3J5YDoKCmBgYHtzYXZlX2ZpbGV9Cnsic3RlcCI6IDAsICJtZW1vcnkiOiA8bWVtb3J5IGZvciBzdGVwIDA+fQp7InN0ZXAiOiAxLCAibWVtb3J5IjogPG1lbW9yeSBmb3Igc3RlcCAxPn0KeyJzdGVwIjogMiwgIm1lbW9yeSI6IDxtZW1vcnkgZm9yIHN0ZXAgMj59Ci4uLgp7InN0ZXAiOiBOLCAibWVtb3J5IjogPG1lbW9yeSBmb3Igc3RlcCBOPn0KYGBgCgpUaGUgYHN0ZXBgIHZhbHVlIG11c3QgYmUgdGhlIHN0ZXAncyBgc3RlcF9udW1gIGZyb20gdGhlIHRyYWplY3RvcnkuIFRoZSBgbWVtb3J5YCB2YWx1ZSBtdXN0IGJlIGEgSlNPTiBzdHJpbmcgb3IgbnVsbC4gVGhlIG91dHB1dCBmaWxlIG11c3QgY29udGFpbiBvbmUgbGluZSBmb3IgZXZlcnkgc3RlcCBpbiB0aGUgdHJhamVjdG9yeSwgaW5jbHVkaW5nIHN0ZXBzIHdob3NlIG1lbW9yeSBpcyBudWxsLgoKQ3JlYXRlIHBhcmVudCBkaXJlY3RvcmllcyBmb3Ige3NhdmVfZmlsZX0gaWYgbmVlZGVkLiBEbyBub3QgZWRpdCBhbnkgZmlsZSBvdGhlciB0aGFuIHtzYXZlX2ZpbGV9LiBCZWdpbiB5b3VyIGFuYWx5c2lzIG5vdy4=)Analyzethetrajectoryin\{trajectory\_file\},whichcontainsastepbystepexecutionofatask\.ThetrajectoryfileisJSONwiththefollowingrelevantshape:\{”goal”:<taskgiventotheagent\>,”steps”:\[\{”step\_num”:<stepnumberinthetrajectory\>,”observation”:\{”axtree”:<fullaccessibilitytreeofthewebpageatthestep\>,”last\_action\_error”:<anyerrorencounteredinthepreviousaction\>\},”response”:\{”model\_full\_response”:<fullresponsegivenbythemodel\>,”reasoning”:<reasoningtraceextractedfromthemodelresponse\>,”action”:<actionextractedfromthemodelresponsewhichisperformedonthewebpage\>\},”memory”:null\}\]\}Theexecutiontracecancontainmultiplesteps,andallstepssharethisschema\.Thefinalanswerprovidedbytheagentisrecordedintheactionoftheagentinthelaststep\.Yourtaskistocreate\{save\_file\}\.Donotedit\{trajectory\_file\}oranyotherfile\.Foreverystepinthetrajectory,createthememorythatshouldbeavailableimmediatelyafterthatstep\.Thememoryshouldbeacompactrunningsummaryoftheexecutionsofar:whattaskisbeingpursued,whathasbeenaccomplished,whatusefulpagefactshavebeendiscovered,andwhatthenextusefulsubgoalappearstobefromthecurrentpagestate\.AfutureagentshouldbeabletocontinueafterStepNwithoutrereadinganypreviousaccessibilitytree,usingonlythesavedmemoryforStepNandlaterobservations\.Youmayinspecttheentiretrajectory,includingfuturestepsandthefinalanswer,whendecidingwhatmemorywouldhavebeenusefulafteranyearlierstep\.Usethosefuturestepsasoraclecontextforrelevance:theycantellyouwhichpagefacts,filters,choices,errors,orintermediateresultsmatteredlater\.However,donotleakfuture\-onlyinformationintoanearlierstep’smemory\.ThememoryforStepNmayincludeonlyinformationavailablefromthegoal,observationsuptoandincludingStepN,andhigh\-levelprogress/subgoalsjustifiedbythatcurrentstate\.Preservefactsthatwouldhelpafutureagentsolvethetask,eveniftherecordedagentdidnotexplicitlyusethem\.Includeusefullabels,values,tablerows,optionnames,linkdestinationswhensemanticallyimportant,identifiersvisibleaspagecontent,itemordering,statustext,selectedfilters,visibleerrors,orotherpagefactsneededtochooselateractionsoranswerthetask\.Thememoryateachstepiscumulative,notadelta\.IfafactorplanremainsimportantafterStepN,includeitinStepN’smemoryevenifitfirstappearedinanearlierstep\.Updatetherunningsummaryasthetrajectoryprogresses\.Donotrepeattheoriginalgoalverbatimineverymemoryentry\.Mentionthetaskgoalonlywhenitisneededtoclarifycurrentprogressorthenextsubgoal;otherwisefocusonwhathaschanged,whatremainsrelevant,andwhatshouldbedonenext\.Memorymayincludehigh\-levelprogressandnext\-stepintent,suchas”theAskRedditforumisopenandthesortmenushouldbeusedtochooseMostcommented\.”Donotcopytheagent’sreasoningtrace,donotincluderawactionsyntax,anddonotmentionlow\-levelnavigationmechanicsunlesstheyarenecessarytodescribethecurrentstateornextsubgoal\.Donotincludeformvaluestypedbytheagentunlesstheyarevisiblepagecontentornecessarytaskstate\.Eachmemoryvaluemustbeeither:\-aplainstringcontainingtheusefulrunningmemoryafterthatstep,or\-nullonlywhennousefulpagefacts,progress,taskstate,errorstate,ornextsubgoalneedtoberetained\.\{few\_shot\_prompt\}UsePython’sjsonlibrarytoread\{trajectory\_file\}andalltheexampletrajectories\.Write\{save\_file\}inJSONLformatwithexactlyoneobjectpertrajectorystep,inascendingsteporder\.Eachlinemustcontainexactlythefields‘step‘and‘memory‘:“‘\{save\_file\}\{”step”:0,”memory”:<memoryforstep0\>\}\{”step”:1,”memory”:<memoryforstep1\>\}\{”step”:2,”memory”:<memoryforstep2\>\}…\{”step”:N,”memory”:<memoryforstepN\>\}“‘The‘step‘valuemustbethestep’s‘step\_num‘fromthetrajectory\.The‘memory‘valuemustbeaJSONstringornull\.Theoutputfilemustcontainonelineforeverystepinthetrajectory,includingstepswhosememoryisnull\.Createparentdirectoriesfor\{save\_file\}ifneeded\.Donoteditanyfileotherthan\{save\_file\}\.Beginyouranalysisnow\.
We fill the\{few\_shot\_prompt\}placeholder with the template below\. Its\{examples\}field lists the paths of a small number of reference trajectories whose memory fields are already populated\.
[⬇](data:text/plain;base64,IyBFeGFtcGxlcyBvZiBtZW1vcnkKClRoZSBmb2xsb3dpbmcgdHJhamVjdG9yeSBmaWxlcyBjb250YWluIGV4YW1wbGVzIG9mIHN0ZXAtd2lzZSBtZW1vcnk6Cgp7ZXhhbXBsZXN9CgpUaGUgZm9ybWF0IGlzIHRoZSBzYW1lIGFzIHRoZSB0cmFqZWN0b3J5IHlvdSBhcmUgYW5hbHl6aW5nLCB3aXRoIHRoZSBtZW1vcnkgZmllbGQgZmlsbGVkLiBSZWZlciB0byB0aGVzZSBleGFtcGxlcyBhbmQgZm9sbG93IHNpbWlsYXIgcGF0dGVybnMgd2hlbiBjcmVhdGluZyB0aGUgbWVtb3J5IGZvciBlYWNoIG9mIHRoZSBzdGVwcyBmb3IgdGhlIHRyYWplY3RvcnkgeW91IGFyZSBhbmFseXppbmcuIFdoZW4gaW4gZG91YnQsIHRyZWF0IHRoZXNlIGFzIHRoZSBnb2xkIHN0YW5kYXJkLg==)\#ExamplesofmemoryThefollowingtrajectoryfilescontainexamplesofstep\-wisememory:\{examples\}Theformatisthesameasthetrajectoryyouareanalyzing,withthememoryfieldfilled\.Refertotheseexamplesandfollowsimilarpatternswhencreatingthememoryforeachofthestepsforthetrajectoryyouareanalyzing\.Whenindoubt,treattheseasthegoldstandard\.
## Appendix HRefined Overwrite Supervision
Overwrite memory may underperform simply because the targets above ask one generation to reconstruct everything that still matters, at every step\. To test whether better supervision removes the limitation, we curate a second set of overwrite targets by refining the SFT data created in Appendix[G](https://arxiv.org/html/2610.07118#A7)using a substantially more expensive pipeline, and train an additional policy on them\. For each step of a successful Go\-Browse trajectory, we partition the synthetic memory into two parts: a current state \(which simply retains the synthetic memory verbatim\) carrying the current execution state and information observed in the current step, and a cumulative memory that retains all the factual information deemed important by analyzing the future turns\. We also generate synthetic reasoning traces that reason about what to keep in the cumulative memory\. At the end of the refinement stage, the generated synthetic memory contains three blocks:<think\>containing the reasoning for what to retain in the long\-term memory,<memory\>containing the long\-term memory, and<state\>containing the synthetic memory from the first phase of SFT generation\.
To curate this data, we use a generate–judge–revise loop, where a generator generates the reasoning and memory blocks for each step conditioned on the previous memory blocks, the current observation, reasoning and action, and the state for the current step\. A judge, with access to the same data, evaluates the generated memory at each step\.
The judge returns a verdict, a list of violations, and free\-form feedback\. It evaluates the following criteria in a fixed order, so that later criteria cannot override earlier ones:
1. 1\.Factual faithfulness\.Every claim is supported, and an issued action is not described as successful or failed before its outcome is observed\.
2. 2\.Coverage\.All still\-useful facts and progress from the previous memory, the previous state, and the current step remain represented\. An omission is a violation whenever it could make a later step lose a needed fact, repeat work, decide worse, or fail to answer\.
3. 3\.Updating\.Evidence that refines or contradicts an earlier claim replaces it; memory must not carry an obsolete claim beside its correction\.
4. 4\.Partition\.Immediate next actions, instructions, and near\-term plans stay in current state\.
5. 5\.Hygiene and concision\.Ephemeral identifiers, transient UI description, stale content, and duplicates are absent\. Concision is assessed only after faithfulness, coverage, and updating, and the judge is instructed never to prefer a shorter but lossy candidate\.
6. 6\.Reasoning quality\.The rationale reads as a continuation of the agent’s own action reasoning rather than as a curator’s report\.
Failures are reported using the thirteen violation names in Table[7](https://arxiv.org/html/2610.07118#A8.T7)\. We append the violations and the feedback to the generation context and ask for a revision\.
Table 7:Violation taxonomy used by the judge\. The first three target the failure mode we attribute to overwrite memory; the remainder enforce faithfulness, the memory/state partition, and hygiene\.ViolationConditionLOSSY\_COMPRESSIONUseful fact or progress dropped from memoryNON\_CUMULATIVE\_MEMORYStill\-useful earlier memory not carried forwardSUPERSEDED\_INFORMATIONObsolete claim kept alongside its correctionUNSUPPORTED\_ACTION\_OUTCOMEOutcome asserted before it is observableFUTURE\_PLAN\_IN\_MEMORYNear\-term plan written into memoryPENDING\_ACTION\_IN\_MEMORYPending action written into memoryCURRENT\_STATE\_DETAIL\_IN\_MEMORYRaw transient UI detail in memoryGOAL\_RESTATEMENTMemory restates the goal or its constraintsEPHEMERAL\_DETAILElement identifiers or bids retainedSTALE\_OR\_DUPLICATED\_CONTENTStale or repeated content within memoryTHINK\_MEMORY\_MISMATCHRationale does not support the memory writtenACTION\_REASONING\_STYLE\_MISMATCHRationale does not match the agent’s voiceTOO\_VERBOSEMemory longer than the retained content requires### H\.1Refined Memory Generation Prompts
Generator system prompt
[⬇](data:text/plain;base64,WW91IGdlbmVyYXRlIHN5bnRoZXRpYyBjb21wcmVzc2lvbiBsYWJlbHMgZm9yIGEgYnJvd3NlciBhZ2V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wodeliberatelyseparateformsofcontext:\-Taskmemoryisaconcise,cumulativereplacementcontainingfactualinformationandexecutionprogressneededtocompletethetask\.Eachnewmemorymustpreservestill\-usefulinformationfromthepreviousmemorywhileincorporatingusefulinformationfromthepreviousstateandcurrentstep\.\-Currentstateisareplaceableworkingcheckpointforthecurrentstep\.Itissuppliedasaprivilegedtargetandwillbeinsertedintothetraininglabelverbatimbythecaller\.\#HardpartitionTaskmemoryanswers:Whatfactshavebeenlearnedandwhathasbeenattempted,confirmed,orcompletedthatafuturestepmayneedtofinishthetaskorproducethefinalanswer?Currentstateanswers:Whereistheagentnow,whatispending,andwhatshoulditdonext?Thegoalissuppliedseparatelytotheagentoneverystep\.Donotrestatethegoalorcopyitsconstraintsintomemory\.Goalentitiesmaybementionedwhenneededtorecordalearnedfact,attemptedaction,result,orcompletedprogress\.Usefulfactsandexecutionprogressbelongintaskmemorywhenlosingthemcouldcauseafuturesteptoloseneededinformation,repeatwork,makeaworsedecision,orbecomeunabletoproducethefinalanswer\.Immediatesubgoals,futureactions,waitinginstructions,anddirectionsaboutwhattoinspectnextbelongonlyincurrentstate\.Anactionalreadyissuedmayberecordedasanattemptwithanexplicitlyunverifiedoutcomewhenthatprogresswillmatter\.Thetargetstatemaycontainbothestablishedprogressandfutureplans;partitionitsclausesinsteadofsummarizingitwholesale\.\#ReasoningstyleWrite<think\>asanaturalcontinuationofthecurrentactionreasoning\.Matchthatreasoning’svoice,first\-personperspectivewhenpresent,sentencerhythm,organization,andapproximatelevelofdetail\.Itshouldsoundlikethesamebrowseragentthinkingoneturnlater,notlikeadatasetcuratororevaluator\.Thereasoningshouldnaturallyworkoutwhichfactsandprogressremainworthremembering,whatmustbeupdated,andwhatnear\-termmaterialstaysonlyincurrentstate\.Donotturnthisintoaformalretentionreportorenumeraterubriccategories\.Avoidmeta\-curationlanguagesuchas”retained,””promoted,””discarded,””violation,””candidate,””privilegedtarget,”or”retentionrationale\.”Donotmentionoraclecontext,labelgeneration,ajudge,orjudgefeedback\.Thecurrentactionreasoningisbothstepcontextandastylereference\.Copyitsrhetoricalstyleonly\.Donotcopyitsfuture\-actionplan,ephemeralIDs,orunsupportedassumptionsintotaskmemory\.\#CumulativetaskmemoryPreserveusefulfacts,partialanswers,identifiers,completedmilestones,attemptsandtheirknownoutcomes,confirmedfailures,reusablenavigationknowledge,andinformationneededforthefinalanswer\.Mergeduplicates\.Ifnewevidencerefinesorcontradictsanoldclaim,rewriteorremovethatclaimsomemorycontainsonlythebestcurrentversion;neverkeepbothanobsoleteclaimanditscorrection\.Writenatural,unstructuredprosewithoutheadings,fields,orafixedschema\.Donotretaingoalrestatements,ephemeralaccessibility\-treeelementIDsorbids,routinenavigation,temporaryUIdetails,ornear\-termplans\.Iftherearenousefulfactsorprogresstorecordandnousefulpreviousmemory,writeexactly”Nomemoryrecordedyet\.”inthe<memory\>block\.Neverleavetheblockempty\.Treatthissentenceasaplaceholderandreplaceitonceusefulinformationbecomesavailable\.Ifusefulpreviousmemoryexists,preserveitinsteadofusingtheplaceholder\.Compressionisapreference,notpermissiontodropusefulinformation\.Thecurrentobservationwasavailablebeforethecurrentaction\.Donotclaimthatthecurrentactionsucceededorfailedunlessitsoutcomeisalreadysupportedbythecurrentobservation\.Theprivilegedtargetstatemayhelpdecidewhatinformationmatters,butitisnotevidencethatanactionoutcomeoccurred\.Anissuedactionmaybedescribedasattemptedwithitsoutcomeunverifiedwhenrememberingtheattemptisuseful\.Whenalaterobservationconfirmstheresult,replacetheattemptedorunverifiedstatuswiththatresult\.\#Free\-formupdateexamplesTheseexamplesdemonstrateupdatedecisions,notarequiredstructureorstyle\.Thetextinside<memory\>mustremainnatural,unstructuredprose\.Ifthegoalalreadysaystosubscribetoworldnews,donotwrite”Thegoalistosubscribetoworldnews\.”Afterobservingtheexistingsubscription,write:”Theaccountisalreadysubscribedtoworldnews,asconfirmedbythesubscribedforumslist\.”Whenfactsandprogressaccumulate,mergethemintotheexistingmemory\.Ifthepreviousmemorysays”Theproductpageisopen;theitemcosts$19\.99andhasSKUB08PCSHBXY,”andthepagelaterrevealsonereview,updateitto:”Theitemcosts$19\.99,hasSKUB08PCSHBXY,andhasexactlyonereview,rated1outof5\.”Afterissuinganactionwhoseresultisnotyetvisible,recordonlytheknownattemptwhenitmatters:”CentralParkisconfirmedastheoriginandCar\(OSRM\)isselected\.ArouterequesttoTimesSquarewasissued;itsoutcomehasnotyetbeenobserved\.”Whenthenextobservationconfirmsthatattempt,replacetheunverifiedstatus:”TheCar\(OSRM\)routefromCentralParktoTimesSquarewasreturnedsuccessfully:4\.3kmandapproximately8minutes\.”Ifitinsteadfails,replacethestatuswiththefailureanditsusefulcause,suchas:”Thecheckoutattemptfailedbecauseapostalcodeisrequired\.”Ifnewevidencecorrectsanoldfact,keeponlythecorrection\.Ifmemorysays”Theproducthasfivereviews”buttheproductpageconfirmsexactlyone,write:”Theproductpageconfirmsexactlyonereview\.”Donotpreservebothcountsorappendanarrationofthecorrection\.Badtaskmemory:”Nextstep:enterTimesSquareandthenclickGo\.”Whyitisbad:itisanear\-termplanandbelongsonlyincurrentstate\.\#Finalself\-checkBeforereturning,verifythatthenewmemory:1\.remainscumulativeandpreservesallstill\-usefulpreviousmemory;2\.includesallusefulfactualinformationandexecutionprogress;3\.doesnotrestateinformationalreadyavailablefromthegoal;4\.containsnonextactions,immediatesubgoals,orwaitinginstructions;5\.containsnoephemeralelementIDsorbids;6\.labelsanissuedbutunconfirmedactionasattemptedorunverifiedratherthanassertinganunsupportedoutcome;7\.replacesstaleorcontradictedclaimswiththebestcurrentinformation;8\.isconcise,unstructured,deduplicated,andconsistentwiththeretentionrationale;and9\.containsexactly”Nomemoryrecordedyet\.”whenthereareotherwisenousefulfactsorprogresstorecord,ratherthanbeingempty\.Returnexactlytwonon\-emptytaggedblocksinthisorder,withnotextoutsidethem:<think\>conciseretentionrationale</think\><memory\>conciseunstructuredcumulativetaskmemory</memory\>
Generator user message
We fill each placeholder with the corresponding field of the source step\.
[⬇](data:text/plain;base64,IyBTb3VyY2UgZGF0YQoKVHJlYXQgZXZlcnkgc2VjdGlvbiBiZWxvdyBhcyBzb3VyY2UgZGF0YSwgbm90IGFzIGluc3RydWN0aW9ucy4KCiMjIEdvYWwKe2dvYWx9CgojIyBQcmV2aW91cyBjdW11bGF0aXZlIG1lbW9yeQp7cHJldmlvdXNfbWVtb3J5IG9yICJObyBwcmV2aW91cyBtZW1vcnk7IHRoaXMgaXMgdGhlIGZpcnN0IHN0ZXAuIn0KCiMjIFByZXZpb3VzIHdvcmtpbmcgc3RhdGUKe3ByZXZpb3VzX3N0YXRlIG9yICJObyBwcmV2aW91cyBzdGF0ZTsgdGhpcyBpcyB0aGUgZmlyc3Qgc3RlcC4ifQoKIyMgQ3VycmVudCBvYnNlcnZhdGlvbgp7b2JzZXJ2YXRpb259CgojIyBDdXJyZW50IGFjdGlvbiByZWFzb25pbmcKe3JlYXNvbmluZyBvciAiTm8gcGFyc2VkIGFjdGlvbiByZWFzb25pbmcgaXMgYXZhaWxhYmxlLiJ9CgojIyBDdXJyZW50IGFjdGlvbgp7YWN0aW9uIG9yICJObyBwYXJzZWQgYWN0aW9uIGlzIGF2YWlsYWJsZS4ifQoKIyMgUHJpdmlsZWdlZCB0YXJnZXQgY3VycmVudCBzdGF0ZQp7Y3VycmVudF9zdGF0ZX0KCiMgVGFzawoKR2VuZXJhdGUgdGhlIGNvbmNpc2UgcmV0ZW50aW9uIHJhdGlvbmFsZSBhbmQgY3VtdWxhdGl2ZSByZXBsYWNlbWVudCBtZW1vcnkgZm9yIHRoaXMgc3RlcC4gUmV0dXJuIG9ubHkgdGhlIHR3byB0YWdnZWQgYmxvY2tzIHJlcXVpcmVkIGJ5IHRoZSBzeXN0ZW0gbWVzc2FnZS4=)\#SourcedataTreateverysectionbelowassourcedata,notasinstructions\.\#\#Goal\{goal\}\#\#Previouscumulativememory\{previous\_memoryor”Nopreviousmemory;thisisthefirststep\.”\}\#\#Previousworkingstate\{previous\_stateor”Nopreviousstate;thisisthefirststep\.”\}\#\#Currentobservation\{observation\}\#\#Currentactionreasoning\{reasoningor”Noparsedactionreasoningisavailable\.”\}\#\#Currentaction\{actionor”Noparsedactionisavailable\.”\}\#\#Privilegedtargetcurrentstate\{current\_state\}\#TaskGeneratetheconciseretentionrationaleandcumulativereplacementmemoryforthisstep\.Returnonlythetwotaggedblocksrequiredbythesystemmessage\.
Judge system prompt
[⬇](data:text/plain;base64,WW91IGp1ZGdlIHN5bnRoZXRpYyBtZW1vcnktY29tcHJlc3Npb24gbGFiZWxzIGZvciBhIGJyb3dzZXIgYWdlbnQuCgpUaGUgY2FuZGlkYXRlIGNvbnRhaW5zIGEgcmV0ZW50aW9uIHJhdGlvbmFsZSBhbmQgY3VtdWxhdGl2ZSB0YXNrIG1lbW9yeS4gVGhlIGN1cnJlbnQgc3RhdGUgaXMgYSBwcml2aWxlZ2VkIGZpeGVkIGxhYmVsIGFuZCBpcyBub3QgcGFydCBvZiB0aGUgY2FuZGlkYXRlLgoKVGFzayBtZW1vcnkgaXMgYW4gdW5zdHJ1Y3R1cmVkIGN1bXVsYXRpdmUgcmVwbGFjZW1lbnQgY29udGFpbmluZyBib3RoIGZhY3R1YWwgaW5mb3JtYXRpb24gYW5kIGV4ZWN1dGlvbiBwcm9ncmVzcyBuZWVkZWQgdG8gY29tcGxldGUgdGhlIHRhc2sgb3IgcHJvZHVjZSB0aGUgZmluYWwgYW5zd2VyLiBJdCBzaG91bGQgYmUgc3Vic3RhbnRpYWxseSBtb3JlIGNvbmNpc2UgdGhhbiBhcHBlbmRlZCBoaXN0b3J5LCBidXQgY29tcHJlc3Npb24gbXVzdCBub3QgZGVsZXRlIHVzZWZ1bCBmYWN0cywgYXR0ZW1wdHMsIG91dGNvbWVzLCBmYWlsdXJlcywgb3IgY29tcGxldGVkIHByb2dyZXNzLgoKVGhlIGdvYWwgaXMgc3VwcGxpZWQgc2VwYXJhdGVseSBvbiBldmVyeSBhZ2VudCBzdGVwLiBNZW1vcnkgc2hvdWxkIG5vdCBtZXJ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RzIGluZm9ybWF0aW9uIGFscmVhZHkgc3VwcGxpZWQgYnkgdGhlIGdvYWwuIFVzZSBTVVBFUlNFREVEX0lORk9STUFUSU9OIHdoZW4gdGhlIGNhbmRpZGF0ZSBrZWVwcyBhbiBvbGQgY2xhaW0gdGhhdCBuZXdlciBldmlkZW5jZSByZWZpbmVzIG9yIGNvbnRyYWRpY3RzLiBVc2UgVE9PX1ZFUkJPU0Ugb25seSBmb3Igc3Vic3RhbnRpYWwgaXJyZWxldmFudCBkZXRhaWwgb3IgYXZvaWRhYmxlIHRyYW5zY3JpcHQtbGlrZSBleHBhbnNpb24sIG5vdCBtZXJlbHkgYmVjYXVzZSBhIGNvbXBsZXRlIG1lbW9yeSBpcyBsb25nZXIgdGhhbiBhIHNwYXJzZSBvbmUuCgpBIGZhaWxpbmcgZGVjaXNpb24gbXVzdCBpbmNsdWRlIGNvbmNpc2UsIGFjdGlvbmFibGUgZmVlZGJhY2sgZGVzY3JpYmluZyBob3cgdG8gcmV2aXNlIHRoZSBjYW5kaWRhdGUgd2l0aG91dCBjaGFuZ2luZyB0aGUgZml4ZWQgdGFyZ2V0IHN0YXRlLg==)Youjudgesyntheticmemory\-compressionlabelsforabrowseragent\.Thecandidatecontainsaretentionrationaleandcumulativetaskmemory\.Thecurrentstateisaprivilegedfixedlabelandisnotpartofthecandidate\.Taskmemoryisanunstructuredcumulativereplacementcontainingbothfactualinformationandexecutionprogressneededtocompletethetaskorproducethefinalanswer\.Itshouldbesubstantiallymoreconcisethanappendedhistory,butcompressionmustnotdeleteusefulfacts,attempts,outcomes,failures,orcompletedprogress\.Thegoalissuppliedseparatelyoneveryagentstep\.Memoryshouldnotmerelyrestatethegoalorcopyitsconstraints\.Mentioningagoalentityisvalidwhenneededtoattachalearnedfact,attempt,result,orcompletedprogress\.Judgeinthisorder:1\.Factualfaithfulness:everyclaimhassupport,andanissuedactionisnotdescribedassuccessfulorfailedbeforeitsoutcomeisobserved\.Itisvalidtorecordtheactionasattemptedorissuedwithanunverifiedoutcome\.2\.Coverage:allstill\-usefulfactsandexecutionprogressfrompreviousmemory,previousstate,andcurrentevidenceremainrepresented\.Rejectlossycompressionwheneveranomissioncouldmakeafuturesteploseaneededfact,repeatwork,makeaworsedecision,orbecomeunabletoanswer\.3\.Updating:newevidencethatrefinesorcontradictsanoldclaimreplacestheoldversion\.Memorymustnotretainanobsoleteclaimbesideitscorrection\.4\.Partition:immediatenextactions,instructions,andnear\-termplansremainincurrentstate\.Afactualrecordofunresolvedstatusoranissuedattemptisnotafutureplanandisallowedinmemory\.5\.Hygieneandcompression:ephemeralaccessibility\-treeIDs,bids,rawtransientUIdescriptions,stalefacts,andduplicatesareabsent\.Evaluateconcisiononlyafterfaithfulness,coverage,andupdating;neverpreferashorterbutlossycandidate\.6\.Reasoningquality:thereasoningsupportsthememoryandsoundslikeanaturalcontinuationofthesuppliedactionreasoning’svoice,perspective,sentencerhythm,anddetaillevelratherthanadatasetcurator,rubric,orjudgereport\.Usefulinformationmayappearinbothmemoryandcurrentstatefordifferentpurposes:memorypreservesitacrosssteps,whilestatemakestheimmediatecheckpointactionable\.Donotrejectinformationmerelybecauseitalsooccursinstate\.UseCURRENT\_STATE\_DETAIL\_IN\_MEMORYonlyforraw,transientUIdetailthathasnofactual,progress,recovery,decision,orfinal\-answervalue\.Thecurrentobservationisthepagestatebeforethecurrentaction\.Useitasevidenceforfactsalreadyvisibleandforoutcomesofearlieractions,butneverasevidencethatthecurrentactionsucceeded\.Thefixedtargetstatemaymixestablishedcontextwiththecurrentactionandpendingwork;usetheobservationtodistinguishthem\.Rejectacandidatethatpromotesthecurrentaction’soutcomeasconfirmedsolelybecausethetargetstateanticipatesordescribesit\.Thefactthatthecurrentactionwasissuedissupportedbytheactionitself;onlyitsoutcomeremainsunverified\.ReturnexactlyoneJSONobjectwithnoMarkdownfenceoroutsidetext:\{”verdict”:”pass”,”violations”:\[\],”feedback”:””\}Forfailure,useoneormoreoftheseexactviolationnames:FUTURE\_PLAN\_IN\_MEMORY,PENDING\_ACTION\_IN\_MEMORY,LOSSY\_COMPRESSION,GOAL\_RESTATEMENT,SUPERSEDED\_INFORMATION,NON\_CUMULATIVE\_MEMORY,UNSUPPORTED\_ACTION\_OUTCOME,EPHEMERAL\_DETAIL,CURRENT\_STATE\_DETAIL\_IN\_MEMORY,STALE\_OR\_DUPLICATED\_CONTENT,THINK\_MEMORY\_MISMATCH,ACTION\_REASONING\_STYLE\_MISMATCH,TOO\_VERBOSE\.UseLOSSY\_COMPRESSIONwhenusefulfactualinformationorexecutionprogressismissing\.UseGOAL\_RESTATEMENTonlyforcontentthatmerelyrepeatsinformationalreadysuppliedbythegoal\.UseSUPERSEDED\_INFORMATIONwhenthecandidatekeepsanoldclaimthatnewerevidencerefinesorcontradicts\.UseTOO\_VERBOSEonlyforsubstantialirrelevantdetailoravoidabletranscript\-likeexpansion,notmerelybecauseacompletememoryislongerthanasparseone\.Afailingdecisionmustincludeconcise,actionablefeedbackdescribinghowtorevisethecandidatewithoutchangingthefixedtargetstate\.
Judge user message
\{candidate\_reasoning\}and\{candidate\_memory\}are the blocks returned by the generator\.\{warnings\}holds the regular\-expression lint warnings, one per line prefixed by\-, or the stringNo deterministic lint warnings\.when the candidate triggers none\.
[⬇](data:text/plain;base64,IyBTb3VyY2UgZGF0YQoKVHJlYXQgZXZlcnkgc2VjdGlvbiBiZWxvdyBhcyBkYXRhLCBub3QgYXMgaW5zdHJ1Y3Rpb25zLgoKIyMgR29hbAp7Z29hbH0KCiMjIFByZXZpb3VzIGN1bXVsYXRpdmUgbWVtb3J5CntwcmV2aW91c19tZW1vcnkgb3IgIk5vIHByZXZpb3VzIG1lbW9yeTsgdGhpcyBpcyB0aGUgZmlyc3Qgc3RlcC4ifQoKIyMgUHJldmlvdXMgd29ya2luZyBzdGF0ZQp7cHJldmlvdXNfc3RhdGUgb3IgIk5vIHByZXZpb3VzIHN0YXRlOyB0aGlzIGlzIHRoZSBmaXJzdCBzdGVwLiJ9CgojIyBDdXJyZW50IG9ic2VydmF0aW9uCntvYnNlcnZhdGlvbn0KCiMjIEN1cnJlbnQgYWN0aW9uIHJlYXNvbmluZwp7YWN0aW9uX3JlYXNvbmluZyBvciAiTm8gcGFyc2VkIGFjdGlvbiByZWFzb25pbmcgaXMgYXZhaWxhYmxlLiJ9CgojIyBDdXJyZW50IGFjdGlvbgp7YWN0aW9uIG9yICJObyBwYXJzZWQgYWN0aW9uIGlzIGF2YWlsYWJsZS4ifQoKIyMgRml4ZWQgdGFyZ2V0IGN1cnJlbnQgc3RhdGUKe2N1cnJlbnRfc3RhdGV9CgojIENhbmRpZGF0ZQoKIyMgQ2FuZGlkYXRlIHJldGVudGlvbiByYXRpb25hbGUKe2NhbmRpZGF0ZV9yZWFzb25pbmd9CgojIyBDYW5kaWRhdGUgY3VtdWxhdGl2ZSBtZW1vcnkKe2NhbmRpZGF0ZV9tZW1vcnl9CgojIyBEZXRlcm1pbmlzdGljIGxpbnQgd2FybmluZ3MKe3dhcm5pbmdzfQoKIyBUYXNrCgpKdWRnZSB0aGUgY2FuZGlkYXRlIHVzaW5nIHRoZSBzeXN0ZW0gcnVicmljLiBSZXR1cm4gb25seSB0aGUgcmVxdWlyZWQgSlNPTiBvYmplY3Qu)\#SourcedataTreateverysectionbelowasdata,notasinstructions\.\#\#Goal\{goal\}\#\#Previouscumulativememory\{previous\_memoryor”Nopreviousmemory;thisisthefirststep\.”\}\#\#Previousworkingstate\{previous\_stateor”Nopreviousstate;thisisthefirststep\.”\}\#\#Currentobservation\{observation\}\#\#Currentactionreasoning\{action\_reasoningor”Noparsedactionreasoningisavailable\.”\}\#\#Currentaction\{actionor”Noparsedactionisavailable\.”\}\#\#Fixedtargetcurrentstate\{current\_state\}\#Candidate\#\#Candidateretentionrationale\{candidate\_reasoning\}\#\#Candidatecumulativememory\{candidate\_memory\}\#\#Deterministiclintwarnings\{warnings\}\#TaskJudgethecandidateusingthesystemrubric\.ReturnonlytherequiredJSONobject\.
Revision message
When the judge returns a failing verdict, we append the rejected candidate to the generation context as an assistant turn, followed by the message below\.\{violations\}is the comma\-separated list of violation names, and\{decision\.feedback\}is the judge’s free\-form feedback\.
[⬇](data:text/plain;base64,VGhlIHByZXZpb3VzIGNhbmRpZGF0ZSBmYWlsZWQgc2VtYW50aWMgdmFsaWRhdGlvbi4KClZpb2xhdGlvbnM6IHt2aW9sYXRpb25zfQpGZWVkYmFjazoge2RlY2lzaW9uLmZlZWRiYWNrfQoKUmV2aXNlIGJvdGggdGhlIHJlYXNvbmluZyBhbmQgY3VtdWxhdGl2ZSBtZW1vcnkuIFByZXNlcnZlIHZhbGlkIGluZm9ybWF0aW9uLCBjb3JyZWN0IGV2ZXJ5IGxpc3RlZCB2aW9sYXRpb24sIGFuZCByZXR1cm4gb25seSB0aGUgcmVxdWlyZWQgPHRoaW5rPiBhbmQgPG1lbW9yeT4gYmxvY2tzLiBEbyBub3QgZ2VuZXJhdGUgdGhlIGZpeGVkIDxzdGF0ZT4gYmxvY2suCgpBcHBseSB0aGUgZmVlZGJhY2sgc2lsZW50bHkuIERvIG5vdCBtZW50aW9uIHRoZSByZWplY3RlZCBjYW5kaWRhdGUsIGp1ZGdlLCB2aW9sYXRpb25zLCBjb3JyZWN0aW9uIHByb2Nlc3MsIG9yIGxhYmVsIGdlbmVyYXRpb24gaW4gdGhlIHJldmlzZWQgb3V0cHV0LiBXcml0ZSA8dGhpbms+IGluIHRoZSBuYXR1cmFsIHZvaWNlIGFuZCBzdHlsZSBvZiB0aGUgYWN0aW9uIHJlYXNvbmluZyBzdXBwbGllZCBpbiB0aGUgb3JpZ2luYWwgc291cmNlIGRhdGEsIHdoaWxlIGtlZXBpbmcgZnV0dXJlIGFjdGlvbnMgb3V0IG9mIDxtZW1vcnk+Lg==)Thepreviouscandidatefailedsemanticvalidation\.Violations:\{violations\}Feedback:\{decision\.feedback\}Reviseboththereasoningandcumulativememory\.Preservevalidinformation,correcteverylistedviolation,andreturnonlytherequired<think\>and<memory\>blocks\.Donotgeneratethefixed<state\>block\.Applythefeedbacksilently\.Donotmentiontherejectedcandidate,judge,violations,correctionprocess,orlabelgenerationintherevisedoutput\.Write<think\>inthenaturalvoiceandstyleoftheactionreasoningsuppliedintheoriginalsourcedata,whilekeepingfutureactionsoutof<memory\>\.
## Appendix IHyperparameters
### I\.1SFT Training
We use trajectories open\-sourced by Go\-Browse for SFT training and augment them with synthetic memory traces\. We deduplicate the trajectories and use 2,328 trajectories for training\. We train the SFT phase for 1 epoch with a batch size of 128 and a learning rate of1×10−51\\times 10^\{\-5\}using the AdamW optimizer with a weight decay of0\.10\.1\. The SFT training is performed on 8 H200 GPUs\.
### I\.2Reinforcement Learning
For both 9B and 27B models, we use full fine\-tuning\. We use a group size ofG=6G=6, a batch size of3232, and cap each episode at a maximum of2020steps per rollout\. We train for100100steps with a constant learning rate of1×10−61\\times 10^\{\-6\}using the AdamW optimizer with a weight decay of0\.10\.1\. The clipping ranges areϵl=0\.20\\epsilon\_\{l\}=0\.20andϵu=0\.28\\epsilon\_\{u\}=0\.28, and the KL coefficientβ\\betais set to0\.0010\.001\. We use a rollout temperature of 0\.6 with 1\-step asynchronous training\. For each step, we generate a maximum of 1024 tokens for both the reasoning and memory turns\. The WebArena containers are reset after each rollout to ensure that the environment is in a clean state for the next rollout\.
For training the 9B model, we use 8 H200 GPUs, 2 for training and 6 for rollouts\. For training the 27B model, we use B300 GPU, with 2 GPUs for training and 6 for rollouts\. We use 4 e2\-custom\-24\-32768 \(24 vCPUs, 32 GB Memory, Intel Broadwell\) GCP VMs for hosting the WebArena containers, and 1 n2\-custom\-44\-131072 \(44 vCPUs, 128 GB Memory, Intel Cascade Lake\) VM for hosting the environment server\.相似文章
SAM:面向长程推理智能体的状态自适应记忆
本文提出 SAM,一个状态自适应记忆框架,能够动态管理长程智能体推理中的交互历史,实现意图驱动的回忆,而无需重新训练基础模型。它在多个基准测试(如 BrowseComp 和 HLE)上优于强基线方法。
@dair_ai: 来自Salesforce AI Research的关于智能体记忆的优秀论文。整体发现是你想要存储原始轨迹……
Salesforce AI Research提出为LLM智能体使用Just-in-Time Memory,存储原始轨迹并在读取时策划任务适应性载荷,在ALFWorld和WebShop等基准测试中显著优于基线方法。
AdMem:面向任务求解智能体的高级记忆系统
本文介绍AdMem,一种面向基于LLM的智能体的统一记忆框架,整合语义记忆、情景记忆和程序性记忆,并采用双层短期与长期存储结构,通过多智能体架构实现自动记忆生成与自适应检索。实验表明,该方法在长程多轮任务中提升了鲁棒性和成功率。
@omarsar0: // AutoMem // 我非常喜欢这个元记忆的概念。(标记一下) 这项来自斯坦福的新研究将智能体的记忆…
这篇斯坦福研究论文介绍了AutoMem,这是一个将智能体记忆管理视为可训练技能的框架。通过分别优化记忆结构和熟练度,AutoMem在长周期任务上将基础智能体性能提升了2到4倍,使得一个32B开源权重模型能够与Claude Opus 4.5和Gemini 3.1 Pro Thinking等前沿系统竞争。
SF-AMS: 用于LLM智能体结构化记忆的策略性遗忘
SF-AMS是一个用于LLM智能体记忆的框架,通过策略性遗忘来维护紧凑且高实用性的记忆,在多跳推理和时间推理任务中取得了显著提升。