Skip to content

FocusAgent: Simple Yet Effective Ways of Trimming the Large Context of Web Agents

Oct 2025 · arXiv.org · Vol abs/2510.03204 · 15 citations · 40 references
Computer Science

TL;DR

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, highlighting that targeted LLM-based retrieval is a practical and robust strategy for building web agents that are efficient, effective, and secure.

Abstract

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.

View source

Similar papers

Preprint Sep 2026

AdaptArena: Evaluating Test-Time Personalization of Web Agents

It is found that correctly inferring user preferences is necessary but not sufficient for task success, as execution failures in downstream web interactions remain a significant bottleneck even when agents align with the target preference.

Dong-Chan Shin, Xing Han Lù, Jiaqi Deng et al. · 0 citations
#natural language process... Preprint Aug 2026

Improving LLM-based Autonomous Web Agents with Filtering

DeBERTa-based and T5-based models that rank HTML elements by their relevance to the task and a zero-shot ColBERT-based retriever that is able to retrieve the ground-truth element with a recall of 0.52 on Mind2Web and 0.47 on WebArena are developed.

Zhi-Tong Guo, Jing Yu Koh, Rui-Yu Li · 0 citations
#artificial intelligence Preprint Sep 2026

Divide and Inject: Can Agents Reconstruct an Indirect Prompt Injection from Fragments?

Agentic systems are now being widely used to orchestrate tools and reason over long contexts. However, the improving capabilities of the large language models powering these agents also create new attack surfaces for indirect prompt injection. In particular, an attacker may not need to place a complete malicious instru...

Michael E. M. Lee, Zhi-Peng Wei, Yue Dong et al. · 0 citations
Preprint Aug 2026

From Inertia to Objectivity: Improving Deep Research Agents with Noise Isolation

NIS-Agent is proposed, which applies context isolation at the two decision points most vulnerable to inertia bias: webpage triage and final-answer validation, and trains an 8B model to be intrinsically more resistant to inertia bias.

Xiang-Xin Zhang, Zhanwei Zhang, Zhihang Fu et al. · 1 citation
Preprint Aug 2026

CAP: A Scalable Benchmark for Evaluating Cross-Site Browser Agents with Complex Actions and Perception

CAP is introduced, a scalable benchmark for evaluating browser agents on cross-site, human-like web tasks that require non-trivial UI interactions and visual understanding and a decomposition-and-recomposition pipeline that first abstracts each website into a structured site card capturing user-facing functions, comple...

Zejun Xu, Taiyi Chen, Jin Li et al. · 0 citations
#machine learning Preprint Sep 2026

Learning from Failures: Heterogeneous Graph Memory for Small Language Model Tool-Using Agents

This paper proposes FRESH, a Failure-aware Retrieval framework over Experience-Structured Heterogeneous graphs, which transforms historical successes and failures into structured external experience for tool-using agents and consistently improves task success and tool-use reliability over no-memory agents and represent...

Jia-Xing Li, Lei Song, Rui Dong et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Oct 15, 2026

AI model decodes the language cells use to communicate

A new computational approach reveals how cells communicate to assemble into tissues. This could accelerate stem cell engineering, improve disease models, and inform therapies.

Microsoft Research Blog Oct 15, 2026

Proof-based general-purpose computing with Magnetar

Zero-knowledge proofs can verify computing results without rerunning workloads or exposing sensitive data. Magnetar helps bring them into the mainstream with support for standard programming languages, major speed gains, and quantum-resistant security. The post Proof-based general-purpose computing with Magnetar appeared first on Microsoft Research.

MIT News · Artificial Intelligence Sep 24, 2026

Estimating suicide risk from text

A new language-processing tool could help identify the highest-risk individuals from natural language, enabling swifter interventions.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.