SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deployment
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
The performance of large language model (LLM) agents depends critically on the execution harness, the system layer that orchestrates tool use, context management, and state persistence. Yet this same architectural centrality makes the harness a high-value attack surface: a single compromise at the harness level can cascade through the entire execution pipeline. We observe that existing security approaches suffer from structural mismatch, leaving them blind to harness-internal state and unable to coordinate across the different phases of agent operation. In this paper, we introduce safeharness, a security architecture in which four proposed defense layers are woven directly into the agent lifecycle to address above significant limitations: adversarial context filtering at input processing, tiered causal verification at decision making, privilege-separated tool control at action execution, and safe rollback with adaptive degradation at state update. The proposed cross-layer mechanisms tie these layers together, escalating verification rigor, triggering rollbacks, and tightening tool privileges whenever sustained anomalies are detected. We evaluate safeharness on benchmark datasets across diverse harness configurations, comparing against four security baselines under five attack scenarios spanning six threat categories. Compared to the unprotected baseline, safeharness achieves an average reduction of approximately 38% in UBR and 42% in ASR, substantially lowering both the unsafe behavior rate and the attack success rate while preserving core task utility.
Key facts. Cited by 14 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 47 references that are in the map. First posted on arXiv 15 Apr 2026.
Builds on
31 of 47 references.
Closest ancestors · 14
Same direction, newest first
- 2026AgentSentry: Mitigating Indirect Prompt Injection in LLM Agents via Temporal Causal Diagnostics and Context Purification26 Feb
- 2026Spider-Sense: Intrinsic Risk Sensing for Efficient Agent Defense with Hierarchical Adaptive Screening5 Feb
- 2026AgentDoG: A Diagnostic Guardrail Framework for AI Agent Safety and Security26 Jan
- 2025A-MemGuard: A Proactive Defense Framework for LLM-Based Agent Memory29 Sep
- 2025Attractive Metadata Attack: Inducing LLM Agents to Invoke Malicious Tools4 Aug
- 2025Manipulating LLM Web Agents with Indirect Prompt Injection Attack via HTML Accessibility Tree20 Jul
- 2025Design Patterns for Securing LLM Agents against Prompt Injections10 Jun
- 2025Think Twice Before You Act: Enhancing Agent Behavioral Safety with Thought Correction16 May
- 2025LlamaFirewall: An open source guardrail system for building secure AI agents6 May
- 2025AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agents24 Mar
- 2025Unveiling Privacy Risks in LLM Agent Memory17 Feb
- 2024Agent-SafetyBench: Evaluating the Safety of LLM Agents19 Dec
2 more
Other references · 17
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
- 2024Executable Code Actions Elicit Better LLM Agentscited by 537
- 2023NeMo Guardrails: A Toolkit for Controllable and Safe LLM Applications with Programmable Railscited by 347
- 2026Meta-Harness: End-to-End Optimization of Model Harnessescited by 248
- 2023Igniting Language Intelligence: The Hitchhiker's Guide From Chain-of-Thought Reasoning to Language Agentscited by 72
- 2026AutoHarness: improving LLM agents by automatically synthesizing a code harnesscited by 63
5 more
- 2026Natural-Language Agent Harnessescited by 54
- 2025LLM-based Agents Suffer from Hallucinations: A Survey of Taxonomy, Methods, and Directionscited by 49
- 2024ShieldLM: Empowering LLMs as Aligned, Customizable and Explainable Safety Detectorscited by 48
- 2025General Modular Harness for LLM Agents in Multi-Turn Gaming Environmentscited by 9
- 2026SWE-Bench Mobile: Can Large Language Model Agents Develop Industry-Level Mobile Applications?cited by 8
Built on by
Citing papers per year: 2026: 14.
14 papers.
Sort:
By area:
- 2026Safeguarding LLM Agents against Long-Horizon Threats via Shadow Memorycited by 6
- 2026SHE: Trajectory-driven Safety Harness Evolution for LLM Agentscited by 6
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden Statescited by 3
- 2026EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agentscited by 2
- 2026CARE: Pre-Execution Command Verification for Shell-Executing LLM Agentscited by 1
- 2026S3: Improving Agent Safety through Multi-Stage Defensecited by 1
- 2026FinHarness: An Inline Lifecycle Safety Harness for Finance LLM Agentscited by 0
- 2026Where Is the Tradeoff in Using Third-Party API Routers for Agentic Software Development?cited by 0
- 2026Distributing Security Controls Through Harness Engineeringcited by 0
- 2026Safety Does Not Compose: Non-Decaying Loop State for Autonomous LLM Agentscited by 0
- 2026DS-Lighting: Making Agent Harnesses Explicit for Data-Science Automationcited by 0
- 2026MIRAGE: How Conversation State Shapes Historical Evidence Use in Multimodal Personal Agentscited by 0
- 2026HARDE: Optimizing Agent Harnesses for Runtime Risk Detection and Execution Control29 Sep 2026
- 2026SafeCoEvo: Co-Evolving Safety Harnesses and Guards for LLM Agents at Test-Time29 Sep 2026
- 2026EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents5 Sep 2026
- 2026Safety Does Not Compose: Non-Decaying Loop State for Autonomous LLM Agents27 Aug 2026
- 2026MIRAGE: How Conversation State Shapes Historical Evidence Use in Multimodal Personal Agents25 Aug 2026
- 2026SHE: Trajectory-driven Safety Harness Evolution for LLM Agents10 Aug 2026
- 2026S3: Improving Agent Safety through Multi-Stage Defense3 Aug 2026
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden States1 Aug 2026
- 2026Distributing Security Controls Through Harness Engineering28 Jul 2026
- 2026Where Is the Tradeoff in Using Third-Party API Routers for Agentic Software Development?26 Jul 2026
- 2026CARE: Pre-Execution Command Verification for Shell-Executing LLM Agents21 Jul 2026
- 2026DS-Lighting: Making Agent Harnesses Explicit for Data-Science Automation1 Jun 2026
2 more
- 2026Safeguarding LLM Agents against Long-Horizon Threats via Shadow Memorycited by 6
- 2026SHE: Trajectory-driven Safety Harness Evolution for LLM Agentscited by 6
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden Statescited by 3
- 2026EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agentscited by 2
- 2026CARE: Pre-Execution Command Verification for Shell-Executing LLM Agentscited by 1
- 2026S3: Improving Agent Safety through Multi-Stage Defensecited by 1
- 2026FinHarness: An Inline Lifecycle Safety Harness for Finance LLM Agentscited by 0
- 2026Where Is the Tradeoff in Using Third-Party API Routers for Agentic Software Development?cited by 0
- 2026Distributing Security Controls Through Harness Engineeringcited by 0
- 2026Safety Does Not Compose: Non-Decaying Loop State for Autonomous LLM Agentscited by 0
- 2026DS-Lighting: Making Agent Harnesses Explicit for Data-Science Automationcited by 0
- 2026SafeCoEvo: Co-Evolving Safety Harnesses and Guards for LLM Agents at Test-Timecited by 0
12 most cited of 13 All 13 (JSON)
- 2026HARDE: Optimizing Agent Harnesses for Runtime Risk Detection and Execution Control29 Sep 2026
- 2026SafeCoEvo: Co-Evolving Safety Harnesses and Guards for LLM Agents at Test-Time29 Sep 2026
- 2026EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents5 Sep 2026
- 2026Safety Does Not Compose: Non-Decaying Loop State for Autonomous LLM Agents27 Aug 2026
- 2026SHE: Trajectory-driven Safety Harness Evolution for LLM Agents10 Aug 2026
- 2026S3: Improving Agent Safety through Multi-Stage Defense3 Aug 2026
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden States1 Aug 2026
- 2026Distributing Security Controls Through Harness Engineering28 Jul 2026
- 2026Where Is the Tradeoff in Using Third-Party API Routers for Agentic Software Development?26 Jul 2026
- 2026CARE: Pre-Execution Command Verification for Shell-Executing LLM Agents21 Jul 2026
- 2026DS-Lighting: Making Agent Harnesses Explicit for Data-Science Automation1 Jun 2026
- 2026FinHarness: An Inline Lifecycle Safety Harness for Finance LLM Agents26 May 2026
12 newest of 13 All 13 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026HarnessRisk: A Lifecycle-Oriented Benchmark for Agent Harness Safety
- 2026SafeHarbor: Defining Precise Decision Boundaries via Hierarchical Memory-Augmented Guardrail for LLM Agent Safety
- 2026SafeAgent: A Runtime Protection Architecture for Agentic Systems
- 2026SecureClaw: Clawing Back Control of LLM Agents
- 2026SafeClawBench: Separating Semantic, Audit-Evidence, and Sandbox Harm in Tool-Using LLM Agents
- 2025Breaking Agent Backbones: Evaluating the Security of Backbone LLMs in AI Agents
- 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluation
- 2026Taming OpenClaw: Security Analysis and Mitigation of Autonomous LLM Agent Threats