FocusAgent: Simple Yet Effective Ways of Trimming the Large Context of Web Agents
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
Web agents powered by large language models (LLMs) must process lengthy web page observations to complete user goals; these pages often exceed tens of thousands of tokens. This saturates context limits and increases computational cost processing; moreover, processing full pages exposes agents to security risks such as prompt injection. Existing pruning strategies either discard relevant content or retain irrelevant context, leading to suboptimal action prediction. We introduce FocusAgent, a simple yet effective approach that leverages a lightweight LLM retriever to extract the most relevant lines from accessibility tree (AxTree) observations, guided by task goals. By pruning noisy and irrelevant content, FocusAgent enables efficient reasoning while reducing vulnerability to injection attacks. Experiments on WorkArena and WebArena benchmarks show that FocusAgent matches the performance of strong baselines, while reducing observation size by over 50%. Furthermore, a variant of FocusAgent significantly reduces the success rate of prompt-injection attacks, including banner and pop-up attacks, while maintaining task success performance in attack-free settings. Our results highlight that targeted LLM-based retrieval is a practical and robust strategy for building web agents that are efficient, effective, and secure.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 31 of its 40 references that are in the map. First posted on arXiv 3 Oct 2025.
Builds on
31 of 40 references.
Closest ancestors · 11
Same direction, newest first
- 2025RedTeamCUA: Realistic Adversarial Testing of Computer-Use Agents in Hybrid Web-OS Environments28 May
- 2025WASP: Benchmarking Web Agent Security Against Prompt Injection Attacks22 Apr
- 2025DoomArena: A framework for Testing AI Agents Against Evolving Security Threats18 Apr
- 2025Defeating Prompt Injections by Design24 Mar
- 2025AgentDAM: Privacy Leakage Evaluation for Autonomous Web Agents12 Mar
- 2025SafeArena: Evaluating the Safety of Autonomous Web Agents6 Mar
- 2025Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents27 Feb
- 2024Attacking Vision-Language Computer Agents via Pop-ups4 Nov
- 2024Refusal-Trained LLMs Are Easily Jailbroken As Browser Agents11 Oct
- 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
- 2024EIA: Environmental Injection Attack on Generalist Web Agents for Privacy Leakage17 Sep
Other references · 20
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
- 2023Mind2Web: Towards a Generalist Agent for the Webcited by 1,210
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2023Language Models can Solve Computer Taskscited by 371
- 2024WorkArena: How Capable Are Web Agents at Solving Common Knowledge Work Tasks?cited by 348
- 2023Set-of-Mark Prompting Unleashes Extraordinary Visual Grounding in GPT-4Vcited by 291
- 2024AI Agents That Mattercited by 199
- 2024WebLINX: Real-World Website Navigation with Multi-Turn Dialoguecited by 177
- 2023Multimodal Web Navigation with Instruction-Finetuned Foundation Modelscited by 159
- 2025Agent S2: A Compositional Generalist-Specialist Framework for Computer Use Agentscited by 156
- 2024Is Your LLM Secretly a World Model of the Internet? Model-Based Planning for Web Agentscited by 144
8 more
- 2024AgentOccam: A Simple Yet Strong Baseline for LLM-Based Web Agentscited by 110
- 2024WebPilot: A Versatile and Autonomous Multi-Agent System for Web Task Execution with Strategic Explorationcited by 100
- 2024BM25S: Orders of magnitude faster lexical search via eager sparse scoringcited by 87
- 2024Agent-E: From Autonomous Web Navigation to Foundational Design Principles in Agentic Systemscited by 79
- 2023SteP: Stacked LLM Policies for Web Actionscited by 66
- 2025Towards Enterprise-Ready Computer Using Generalist Agentcited by 31
- 2025R2D2: Remembering, Replaying and Dynamic Decision Making with a Reflective Agentic Memorycited by 14
- 2022Instruction-Following Agents with Multimodal Transformercited by 13
Built on by
Citing papers per year: 2025: 1; 2026: 15.
16 papers.
Sort:
By area:
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
- 2026When Users Change Their Mind: Evaluating Interruptible Agents in Long-Horizon Web Navigationcited by 12
- 2026The Evolution of Tool Use in LLM Agents: From Single-Tool Call to Multi-Tool Orchestrationcited by 11
- 2025Nested Browser-Use Learning for Agentic Information Seekingcited by 5
- 2026Read More, Think More: Revisiting Observation Reduction for Web Agentscited by 4
- 2026Squeez: Task-Conditioned Tool-Output Pruning for Coding Agentscited by 2
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLscited by 1
- 2026Region4Web: Rethinking Observation Space Granularity for Web Agentscited by 1
- 2026ReVision: Scaling Computer-Use Agents via Temporal Visual Redundancy Reductioncited by 1
- 2026Diagnosing and Mitigating Context Rot in Long-horizon Searchcited by 1
- 2026Weasel: Out-of-Domain Generalization for Web Agents via Importance-Diversity Data Selectioncited by 0
- 2026Revisiting Observation Reduction for Web Agents: Comprehensive Evaluation with a Lightweight Frameworkcited by 0
4 more
- 2026Signal-Driven Observation for Long-Horizon Web Agentscited by 0
- 2026WebChallenger: A Reliable and Efficient Generalist Web Agentcited by 0
- 2026Learning Simple Test-Time Environments for LLM Web Agentscited by 0
- 2026Efficient GUI Agents: A Systems Survey of Observation, Memory, Action, and Runtime Optimizationcited by 0
- 2026Efficient GUI Agents: A Systems Survey of Observation, Memory, Action, and Runtime Optimization2 Sep 2026
- 2026Learning Simple Test-Time Environments for LLM Web Agents29 Aug 2026
- 2026Diagnosing and Mitigating Context Rot in Long-horizon Search29 Jun 2026
- 2026WebChallenger: A Reliable and Efficient Generalist Web Agent9 Jun 2026
- 2026Signal-Driven Observation for Long-Horizon Web Agents4 Jun 2026
- 2026Revisiting Observation Reduction for Web Agents: Comprehensive Evaluation with a Lightweight Framework28 May 2026
- 2026Weasel: Out-of-Domain Generalization for Web Agents via Importance-Diversity Data Selection19 May 2026
- 2026ReVision: Scaling Computer-Use Agents via Temporal Visual Redundancy Reduction11 May 2026
- 2026Region4Web: Rethinking Observation Space Granularity for Web Agents8 May 2026
- 2026Squeez: Task-Conditioned Tool-Output Pruning for Coding Agents4 Apr 2026
- 2026Read More, Think More: Revisiting Observation Reduction for Web Agents2 Apr 2026
- 2026When Users Change Their Mind: Evaluating Interruptible Agents in Long-Horizon Web Navigation1 Apr 2026
4 more
- 2026The Evolution of Tool Use in LLM Agents: From Single-Tool Call to Multi-Tool Orchestration24 Mar 2026
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis11 Feb 2026
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs26 Jan 2026
- 2025Nested Browser-Use Learning for Agentic Information Seeking29 Dec 2025
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
- 2026When Users Change Their Mind: Evaluating Interruptible Agents in Long-Horizon Web Navigationcited by 12
- 2026The Evolution of Tool Use in LLM Agents: From Single-Tool Call to Multi-Tool Orchestrationcited by 11
- 2025Nested Browser-Use Learning for Agentic Information Seekingcited by 5
- 2026Squeez: Task-Conditioned Tool-Output Pruning for Coding Agentscited by 2
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLscited by 1
- 2026ReVision: Scaling Computer-Use Agents via Temporal Visual Redundancy Reductioncited by 1
- 2026Weasel: Out-of-Domain Generalization for Web Agents via Importance-Diversity Data Selectioncited by 0
- 2026Revisiting Observation Reduction for Web Agents: Comprehensive Evaluation with a Lightweight Frameworkcited by 0
- 2026Signal-Driven Observation for Long-Horizon Web Agentscited by 0
- 2026Learning Simple Test-Time Environments for LLM Web Agentscited by 0
- 2026Efficient GUI Agents: A Systems Survey of Observation, Memory, Action, and Runtime Optimizationcited by 0
- 2026Efficient GUI Agents: A Systems Survey of Observation, Memory, Action, and Runtime Optimization2 Sep 2026
- 2026Learning Simple Test-Time Environments for LLM Web Agents29 Aug 2026
- 2026Signal-Driven Observation for Long-Horizon Web Agents4 Jun 2026
- 2026Revisiting Observation Reduction for Web Agents: Comprehensive Evaluation with a Lightweight Framework28 May 2026
- 2026Weasel: Out-of-Domain Generalization for Web Agents via Importance-Diversity Data Selection19 May 2026
- 2026ReVision: Scaling Computer-Use Agents via Temporal Visual Redundancy Reduction11 May 2026
- 2026Squeez: Task-Conditioned Tool-Output Pruning for Coding Agents4 Apr 2026
- 2026When Users Change Their Mind: Evaluating Interruptible Agents in Long-Horizon Web Navigation1 Apr 2026
- 2026The Evolution of Tool Use in LLM Agents: From Single-Tool Call to Multi-Tool Orchestration24 Mar 2026
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis11 Feb 2026
- 2026MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs26 Jan 2026
- 2025Nested Browser-Use Learning for Agentic Information Seeking29 Dec 2025
- 2026Diagnosing and Mitigating Context Rot in Long-horizon Search29 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2025Mind the Web: The Security of Web Use Agents
- 2026WebAgentGuard: A Reasoning-Driven Guard Model for Detecting Prompt Injection Attacks in Web Agents
- 2026WAAA! Web Adversaries Against Agentic Browsers
- 2025Context manipulation attacks : Web agents are susceptible to corrupted memory
- 2026Improving LLM-based Autonomous Web Agents with Filtering
- 2026MUZZLE: Adaptive Agentic Red-Teaming of Web Agents Against Indirect Prompt Injection Attacks
- 2026ARGUS: Defending LLM Agents Against Context-Aware Prompt Injection
- 2025Evaluating Long-Context Reasoning in LLM-Based WebAgents