mlsanityData to 14 Oct 2026

HarmonyGuard: Toward Safety and Utility in Web Agents via Adaptive Policy Enhancement and Dual-Objective Optimization

arXiv 2508.04010 ↗First posted 6 Aug 2025cs.CL cs.AIcited by 10

On the map: LLM agents and tool use → Agent threats, guardrails and governance

Abstract (arXiv)

Large language models enable agents to autonomously perform tasks in open web environments. However, as hidden threats within the web evolve, web agents face the challenge of balancing task performance with emerging risks during long-sequence operations. Although this challenge is critical, current research remains limited to single-objective optimization or single-turn scenarios, lacking the capability for collaborative optimization of both safety and utility in web environments. To address this gap, we propose HarmonyGuard, a multi-agent collaborative framework that leverages policy enhancement and objective optimization to jointly improve both utility and safety. HarmonyGuard features a multi-agent architecture characterized by two fundamental capabilities: (1) Adaptive Policy Enhancement: We introduce the Policy Agent within HarmonyGuard, which automatically extracts and maintains structured security policies from unstructured external documents, while continuously updating policies in response to evolving threats. (2) Dual-Objective Optimization: Based on the dual objectives of safety and utility, the Utility Agent integrated within HarmonyGuard performs the Markovian real-time reasoning to evaluate the objectives and utilizes metacognitive capabilities for their optimization. Extensive evaluations on multiple benchmarks show that HarmonyGuard improves policy compliance by up to 38% and task completion by up to 20% over existing baselines, while achieving over 90% policy compliance across all tasks. Our project is available here: https://github.com/YurunChen/HarmonyGuard.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 25 of its 28 references that are in the map. First posted on arXiv 6 Aug 2025.

Builds on

25 of 28 references.

Closest ancestors · 14

Same direction, newest first

  1. 2025Think Twice Before You Act: Enhancing Agent Behavioral Safety with Thought Correction16 May
  2. 2025LlamaFirewall: An open source guardrail system for building secure AI agents6 May
  3. 2025WASP: Benchmarking Web Agent Security Against Prompt Injection Attacks22 Apr
  4. 2025ShieldAgent: Shielding Agents via Verifiable Safety Policy Reasoning26 Mar
  5. 2025Evaluating the Robustness of Multimodal Agents Against Active Environmental Injection Attacks18 Feb
  6. 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents21 Dec
  7. 2024Attacking Vision-Language Computer Agents via Pop-ups4 Nov
  8. 2024Refusal-Trained LLMs Are Easily Jailbroken As Browser Agents11 Oct
  9. 2024ST-WebAgentBench: A Benchmark for Evaluating Safety and Trustworthiness in Web Agents9 Oct
  10. 2024EIA: Environmental Injection Attack on Generalist Web Agents for Privacy Leakage17 Sep
  11. 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases17 Jul
  12. 2024Dissecting Adversarial Robustness of Multimodal LM Agents18 Jun
2 more
  1. 2024GuardAgent: Safeguard LLM Agents by a Guard Agent via Knowledge-Enabled Reasoning13 Jun
  2. 2024WIPI: A New Web Threat for LLM-Driven Web Agents26 Feb

Other references · 11

  1. 2024GPT-4o System Cardcited by 4,588
  2. 2023Qwen Technical Reportcited by 3,344
  3. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 2,006
  4. 2023Instruction Tuning for Large Language Models: A Surveycited by 623
  5. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 493
  6. 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attackscited by 156
  7. 2025InfiGUI-R1: Advancing Multimodal GUI Agents from Reactive Actors to Deliberative Reasonerscited by 140
  8. 2025InfiGUIAgent: A Multimodal Generalist GUI Agent with Native Reasoning and Reflectioncited by 67
  9. 2023Metacognitive Prompting Improves Understanding in Large Language Modelscited by 58
  10. 2024Feedback-Guided Extraction of Knowledge Base from Retrieval-Augmented LLM Applicationscited by 37
  11. 2025Can We Predict Alignment Before Models Finish Thinking? Towards Monitoring Misaligned Reasoning Modelscited by 17

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 6.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025WebGuard: Building a Generalizable Guardrail for Web Agents
  2. 2026HazardAuditor: From Executable Threats to Safer Computer-Use Agents
  3. 2026SafeAgent: A Runtime Protection Architecture for Agentic Systems
  4. 2026WebAgentGuard: A Reasoning-Driven Guard Model for Detecting Prompt Injection Attacks in Web Agents
  5. 2026BraveGuard: From Open-World Threats to Safer Computer-Use Agents
  6. 2026Prismata: Confining Cross-Site Prompt Injection in Web Agents
  7. 2026AgentDoG 1.5: A Lightweight and Scalable Alignment Framework for AI Agent Safety and Security
  8. 2024AgentMonitor: A Plug-and-Play Framework for Predictive and Secure Multi-Agent Systems