The year/Independent research

Paper 2510.24699

AgentFold: Long-Horizon Web Agents with Proactive Context Management

Published
Oct 2025
Research lab
Independent
Citations
65
GitHub
Not linked

01 In brief

Summary

AgentFold is a new web agent paradigm that addresses the trade-off between context saturation in ReAct-based agents and information loss from fixed summarization.

It treats context as a dynamic workspace with Multi-Scale State Summaries and a Latest Interaction, using a 'folding' operation with two modes: Granular Condensation (preserving fine details) and Deep Consolidation (abstracting multi-step sub-tasks).

Trained via supervised fine-tuning on Qwen3-30B-A3B using a Fold-Generator pipeline with rejection sampling, AgentFold-30B-A3B achieves 36.2% on BrowseComp, 47.3% on BrowseComp-ZH, 62.1% on WideSearch, and 67.0% on GAIA, surpassing larger open-source models like DeepSeek-V3.1-671B and matching proprietary agents like OpenAI's o4-mini.

Its context grows sub-linearly to ~7k tokens after 100 turns, enabling scaling to 500 turns.

Experiments show it outperforms a 355B GLM-4.5 baseline at all turn limits and continues improving up to 256 turns, while ReAct saturates.

Future work includes reinforcement learning for optimal folding policies.

02 From the paper

Abstract

LLM-based web agents show immense promise for information seeking, yet their effectiveness on long-horizon tasks is hindered by a fundamental trade-off in context management. Prevailing ReAct-based agents suffer from context saturation as they accumulate noisy, raw histories, while methods that fixedly summarize the full history at each step risk the irreversible loss of critical details. Addressing these, we introduce AgentFold, a novel agent paradigm centered on proactive context management, inspired by the human cognitive process of retrospective consolidation. AgentFold treats its context as a dynamic cognitive workspace to be actively sculpted, rather than a passive log to be filled. At each step, it learns to execute a `folding' operation, which manages its historical trajectory at multiple scales: it can perform granular condensations to preserve vital, fine-grained details, or deep consolidations to abstract away entire multi-step sub-tasks. The results on prominent benchmarks are striking: with simple supervised fine-tuning (without continual pre-training or RL), our AgentFold-30B-A3B agent achieves 36.2% on BrowseComp and 47.3% on BrowseComp-ZH. Notably, this performance not only surpasses or matches open-source models of a dramatically larger scale, such as the DeepSeek-V3.1-671B-A37B, but also surpasses leading proprietary agents like OpenAI's o4-mini.