arXiv:2611.06445cs.AINov 2026

Manuscript Offprint

arXiv:2611.06445

SUMONE: A Simple and Efficient Summarizer for Plug-and-Play Agent Memory

Jizhe Zhang, Ang Li, Chenheng Zhang, Yisen Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Long-horizon language-model agents accumulate increasingly large interaction histories, making context compaction essential for efficient execution. Existing learned compaction methods often rely on downstream task outcomes or solver behavior, coupling training to specific tasks or agents. We introduce SumOne, a standalone summarizer trained to preserve information in agent histories through masked reconstruction. Given a summary of the expired history, a frozen reconstructor recovers randomly masked portions of the original trajectory; reconstruction quality, combined with a length penalty, provides a task-agnostic reward for optimizing the summarizer with GRPO. This yields self-supervision directly from raw trajectories, without reference summaries or downstream task execution. At inference time, only the lightweight summarizer is retained, enabling plug-and-play context compression for otherwise unchanged agents. We conduct a systematic evaluation of SUMONE in long-horizon search and software-engineering tasks. SumOne reduces estimated inference cost by approximately 78% on DeepSearchQA and 75% on SWE-bench Verified relative to operating with full context, with absolute decreases of 0.04. The same checkpoint also transfers across downstream models and agent harnesses without additional fine-tuning.

1 INTRODUCTION

Large language models are increasingly used to build agents that reason over multiple steps, call tools, and respond to observations from an external environment (Yao et al., 2023; OpenAI, 2025; Anthropic, 2026; Kimi Team et al., 2026). Such agents need access to earlier interactions: a search agent may have to combine evidence found at different steps, while a coding agent may need to recall a user constraint, a previous code change, or the outcome of a failed test. As the task continues, these interactions accumulate into a long trajectory. Passing the entire trajectory to the model increases inference cost and eventually reaches its context limit (Liu et al., 2024; Su et al., 2024). Yet keeping every interaction verbatim is often unnecessary. Tool outputs contain irrelevant details, and the outcome of a completed step may be more useful than its full sequence of actions. The challenge is therefore to reduce the context the agent reads without discarding information it may need later (Hu et al., 2025b).

Existing approaches to agent context management can be roughly organized into three groups. The first uses prompting or simple rules to shorten the context, for example, by discarding older interactions or asking a model to summarize them. Automatic compaction in Codex and Claude Code shows the practical value of this approach (Pathak & Fabbri, 2026; Anthropic). The second group ties memory management to the agent's task or training process. HiAgent summarizes completed subgoals within the agent workflow; FoldGRPO trains agents to operate with compressed tool responses; (Hu et al., 2025a; Sun et al., 2025). These methods can adapt memory to the decisions an agent must make, but their design or training depends on a particular task workflow or downstream solver. The third group provides more general memory frameworks. A-MEM (Xu et al., 2026), for instance, manages information across context and external storage, with explicit decisions about what to retain and retrieve. Such frameworks offer a broader memory interface, but also require the agent to additionally interact with that interface.

†^{\dagger}Corresponding Author: Yisen Wang (yisen.wang@pku.edu.cn).

Together, these approaches leave room for a memory mechanism that is agnostic to specific tasks, lightweight to use, while maintaining high information density. We propose to train a dedicated small language model that compresses running context of other agents, only using raw trajectories. However, the central challenge would be the training signal. Given a long agent trajectory and its compressed version, how should one judge its completeness and compactness? In this paper, we use masked reconstruction, a classic training objective in self-supervised learning (Lewis et al., 2020; He et al., 2022), as a proxy to assess what a summary preserves. Given a summary of trajectory segments, we first mask parts of the original trajectory, and adopt a frozen model to predict the complete history. As a result, the overlap between the original trajectory and the prediction provides a training signal derived from the data itself, without external references or downstream task execution.

Figure

Figure

(a) SUMONE is a lightweight, standalone memory (b) SUMONE consistently achieves a better compressor applicable to diverse agents and tasks. performance-cost trade-off than self-summary

Figure 1: SUMONE is an efficient and scalable memory compressor for long-horizon agents. (a) A single 2B SUMONE, trained solely from raw trajectories, can be plugged into different tasks, downstream models, and agent harnesses without specific adaptation. (b) SUMONE consistently improves over self-summary in both task performance and inference cost, yielding a better performance-cost trade-off. The y-axis shows task success rate (resolved rate) on the SWE-bench Verified (Jimenez et al., 2024a) benchmark, while the x-axis shows total inference cost per query normalized by that of self-summary.

We implement the above procedure as the reward model in a GRPO-style RL training loop Shao et al. (2024), and collect a training dataset of 5k trajectories primarily sampled from web search and coding agents. The resulting model, which we call SUMONE, is a specialized compression model for agentic context with merely 2 billion parameters. As illustrated in Figure 1a, SUMONE undergoes task-independent training on raw trajectories. It specializes in compressing agent trajectories into textual memory on-the-fly, and proves to be effective across a wide range of settings based on our experiments.

We evaluate SUMONE on long-horizon search and software-engineering tasks, together with agentic memory benchmarks and transfer across downstream agents and harnesses. On DeepSearchQA (Gupta et al., 2026), SUMONE reduces more than 70% cumulative agent input and 77% end-to-end task cost per query compared to evaluating with full context, while causing merely 0.04 drop in F1 score. On SWE-bench Verified (Jimenez et al., 2024a), it achieves a 59% resolved rate versus 63%, while reducing input from 4.1M to 1.09M tokens per task. Compared with agent self-summarization, SUMONE performs better on both benchmarks while using notably less end-to-end cost, with Figure 1b highlighting the results for SWE-bench Verified. It also achieves the strongest results among compression methods on LongMemEval-S (Wu et al., 2025a) and transfers across multiple downstream LLMs and agent harnesses without additional fine-tuning.

Our broader aim is to make memory management a capability of a dedicated module that can serve different agents, similar to the role that hippocampus plays in human brains (McClelland et al., 1995). SUMONE addresses one part of this problem: learning to write compact memory from raw interaction histories, with supervision obtained from the data itself. To summarize, the advantages of SUMONE are as follows:

  • Self-supervised training. SUMONE learns directly from raw agent trajectories, using masked reconstruction to derive its training signal without human annotations, external reference summaries, or downstream task execution.

  • Efficient inference. SUMONE is a lightweight 2B-parameter model specialized for context compression. By replacing inference over an ever-growing, append-only context with a shorter, bounded context maintained by SUMONE, it reduces end-to-end task cost by 70% on the DeepSearch QA and SWE-Bench-Verified benchmarks, while incurring a modest performance drop of 0.04.

  • Plug-and-play deployment. SUMONE is trained independently of any particular task, agent model, or harness. Our empirical study demonstrates its transferability across 3 domains, 5 downstream LLMs including GPT-6 (OpenAI, 2026c), and 4 coding agent harnesses without extra fine-tuning.

References (36)