AgentSwing: Adaptive Parallel Context Management Routing for Long-Horizon Web Agents

arXiv cs.CL / 3/31/2026

📰 NewsSignals & Early TrendsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper addresses a key bottleneck for long-horizon web agents: finite LLM context capacity, where existing methods use fixed (non-adaptive) context management strategies across an entire trajectory.
  • It introduces a probabilistic framework to formalize long-horizon success using two dimensions—search efficiency and terminal precision—to better analyze context strategies.
  • The proposed AgentSwing method performs state-aware, adaptive parallel context management routing by expanding multiple context-managed branches in parallel and using lookahead routing to pick promising continuations at trigger points.
  • Experiments on multiple benchmarks and agent backbones show AgentSwing outperforms strong static context management baselines, often achieving similar or better performance with up to 3× fewer interaction turns and raising the ceiling of final web-agent performance.

Abstract

As large language models (LLMs) evolve into autonomous agents for long-horizon information-seeking, managing finite context capacity has become a critical bottleneck. Existing context management methods typically commit to a single fixed strategy throughout the entire trajectory. Such static designs may work well in some states, but they cannot adapt as the usefulness and reliability of the accumulated context evolve during long-horizon search. To formalize this challenge, we introduce a probabilistic framework that characterizes long-horizon success through two complementary dimensions: search efficiency and terminal precision. Building on this perspective, we propose AgentSwing, a state-aware adaptive parallel context management routing framework. At each trigger point, AgentSwing expands multiple context-managed branches in parallel and uses lookahead routing to select the most promising continuation. Experiments across diverse benchmarks and agent backbones show that AgentSwing consistently outperforms strong static context management methods, often matching or exceeding their performance with up to 3\times fewer interaction turns while also improving the ultimate performance ceiling of long-horizon web agents. Beyond the empirical gains, the proposed probabilistic framework provides a principled lens for analyzing and designing future context management strategies for long-horizon agents.