Can AgentFold Solve Search for Web Agents?
AgentFold matters because it reframes web agents as a memory-management problem, not just a reasoning problem. For teams building search, research, or task-execution agents, the practical question is how to preserve the few facts that drive later decisions without paying the full cost of an ever-growing interaction log. That shifts design attention toward state handling, not just model choice.
Architecturally, this kind of approach introduces a more explicit agent state layer: the system must decide what stays verbatim, what becomes a compressed note, and what is eligible for consolidation. That creates a new dependency on the quality of the folding policy. If important details are summarized too early, downstream steps can drift; if too much is retained, token pressure returns and latency rises.
Operationally, the appeal is cost control. Smaller models become more viable when the agent is not forced to re-ingest a bloated history on every turn. But that benefit comes with a trade-off: the memory policy itself becomes part of the product surface. Teams will need observability around what was kept, what was collapsed, and why, especially in workflows where traceability and auditability matter.
For implementation teams, the main takeaway is not to copy the paper literally, but to treat context as a managed resource. That means designing checkpoints, summary boundaries, and failure recovery paths into the agent loop. In practice, any production deployment will likely need domain-specific rules, guardrails for sensitive tasks, and evaluation beyond benchmark success rates to measure whether compressed context still supports correct action selection.
What Problem Is AgentFold Actually Solving?
AgentFold aims to address the issue that todayโs web agents either remember everything and run out of tokens or summarize too much, overlooking what matters. Letโs take a basic prompt:โResearch three competitor tools, pull pricing, check recent reviews, confirm which ones have a WhatsApp integration, and draft a comparison for my sales deck.โ Most current web agents follow a ReAct-style pattern: think โ browse โ read โ think โ repeat. Every page they open, every snippet they read, and every intermediate thought gets appended to one giant history and sent back to the model again and again. Two terrible things happen over long tasks:
- Context saturation โ โConversation historyโ grows to tens of thousands of tokens. The model has to reread its entire diary on every step. This not only exceeds context limits, but it also obscures key facts (such as โTool A doesnโt support WhatsAppโ) under a lot of irrelevant chatter.
- Throw-away summaries โ Some web agents try the opposite trick: instead of keeping everything, they auto-summarize the entire history into a short paragraph at every step. That keeps context cheap, but now you have a different failure mode: the summary might silently drop product details, dates, or edge cases that become crucial 20 steps later.
- Tasks that require dozens or hundreds of actions (e.g., BrowseComp and WideSearch benchmarks) quickly exceed standard context windows.
- Naively scaling up to bigger models and longer contexts makes infra costs explode, without solving the underlying โkeep vs compress vs forgetโ decision.
- Small mistakes early in the trajectory compound because the agent canโt reliably look back at what truly mattered.
How Does AgentFoldโs โContext Foldingโ Memory System Work?
- The Agent Has Two Kinds of Memory, Not One
- The question: The original user task (โCompare these toolsโฆโ)
- Latest interaction: The complete, detailed record of what just happened (page viewed, snippet read, tool call, etc.)
- Multi-scale state summaries: A running list of compressed โstate notesโ about whatโs been discovered so far
- Question
- Summary 1: โFinished checking Tool A pricing.โ
- Summary 2: โTool B has no WhatsApp integration.โ
- Latest step: โCurrently on Tool Cโs G2 reviews pageโฆโ
- Thinking: โGiven the question, my summaries, and the latest interaction, what should I do next?โ
- Folding directive: โHow should I reshape my memory so it stays useful for later steps?โ
- It takes the latest interaction and converts it into a concise, precise note, then adds it to the summary list.
- Example: After reading a pricing page, it might add: โTool A: $99/mo base, WhatsApp support via add-on.โ
- It looks back over several past summaries + the latest step and merges them into one higher-level โchapter.โ
- Example: After finishing all research on Tool A, it collapses 10 small notes into: โTool A: mid-range cost, no native WhatsApp, strong reviews on ease of use.โ
- The context length grows sub-linearly, even over 100+ steps โ it goes from ~3.5k tokens to ~7k tokens over 100 turns, instead of exploding linearly with every click.
- It can handle up to 500 turns with a 128k context model without becoming overwhelmed by its own history.
- The โteacherโ LLM not only chooses actions but also produces effective folding directives (i.e., what to condense versus consolidate).
- The authors then fine-tune a 30B model (based on Qwen3โ30B-A3B) on these structured trajectories โ without requiring RL or any additional pre-training.
How Much Better Does AgentFold Perform Than Todayโs Leading Open-Source And Proprietary Web Agents?
AgentFoldโs 30B model is playing in the same league as (or beating) much larger open-source systems and even potent proprietary agents, including o4-mini. OpenAI and other research groups have released benchmarks that measure a web agentโs capability to find a specific answer on the web. So, most of these benchmark results tell you how many answers the agent is actually able to see accurately. For AgentFold, this looks like:- BrowseComp (English): 36.2%
- BrowseComp-ZH (Chinese): 47.3%
- WideSearch: 62.1%
- GAIA (text-only subset): 67.0%
How Can You Use This?
If youโre an engineer or founder looking to include web search in your product, AgentFold gives you a few advantages:- You can use a small model to create your web agent and reduce your infrastructure costs.
- You can run more complex workflows without hitting context limits
- Itโs practically untested in enterprise contexts and is limited to a small number of turns in experimental setups.
- It still falls short of proprietary web agents like Deep Research and o3.
- Since an LLM guides the folding, some subtasks within the browsing task may be deprioritized, which could affect the results you obtain.
Enjoyed this article? Sign up for our newsletter to receive regular insights and stay connected.
