mlsanityData to 7 Oct 2026

Agent Safety From Within: Detecting Harmful Trajectories from LLM Internal States

arXiv 2609.33039 ↗First posted 27 Sep 2026cs.AIcited by 0

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

Abstract (arXiv)

Language model agents can now perform sophisticated sequences of actions via tools and harnesses, which has increased the scope of the damage they can cause. Guard models, however, are mainly built for content moderation and thus are not well-suited to detecting this agentic risk. To address this, we proceed by first conducting a representational analysis, then use the resulting insights to build a solution. In our analysis, we focus on two types of trajectory-level agentic harms: harmful content, which is expressed directly, and unsafe tool use, which depends on whether an action is consistent with the interaction that produced it. We investigate how open-source guard models represent these two types of harm and find that they are linearly readable inside the model, even though guard models predict no better than chance on pairs that differ only in the called tool's schema. The two harm types also follow nearly orthogonal internal directions, and neither reliably serves as a proxy for the other. These results motivate reading trajectory safety directly from internal states. We introduce TACIT, a readout of a frozen backbone's internal states that decodes no tokens. Trained on six trajectory-safety benchmarks, a linear probe raises mean macro-F1 from 62.3 for the strongest open guard to 80.7, and refined readouts reach 86.2. With each benchmark held out of training entirely, the refined readouts still lead the strongest guard (65.7 vs. 61.1). With the same backbone, training data and test split, the frozen readout is on par with full safety fine-tuning, and it improves the fine-tuned model further when applied on top. The probe trains about one millionth as many parameters as full fine-tuning in about a sixth of the time, and TACIT has the lowest latency of the guards we evaluate.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 38 of its 45 references that are in the map. First posted on arXiv 27 Sep 2026.

Builds on

38 of 45 references.

Closest ancestors · 11

Same direction, newest first

  1. 2026AgentLens: Interpretable Safety Steering via Mechanistic Subspaces for Multi-Turn Coding Agent21 Jun
  2. 2026TraceSafe: A Systematic Assessment of LLM Guardrails on Multi-Step Tool-Calling Trajectories8 Apr
  3. 2026ATBench: A Diverse and Realistic Agent Trajectory Benchmark for Safety Evaluation and Diagnosis2 Apr
  4. 2026AgentDoG: A Diagnostic Guardrail Framework for AI Agent Safety and Security26 Jan
  5. 2026ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback15 Jan
  6. 2025OpenAgentSafety: A Comprehensive Framework for Evaluating Real-World AI Agent Safety8 Jul
  7. 2025AgentAuditor: Human-Level Safety and Security Evaluation for LLM Agents31 May
  8. 2024Agent-SafetyBench: Evaluating the Safety of LLM Agents19 Dec
  9. 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
  10. 2024R-Judge: Benchmarking Safety Risk Awareness for LLM Agents18 Jan
  11. 2023Identifying the Risks of LM Agents with an LM-Emulated Sandbox25 Sep

Other references · 27

  1. 2024The Llama 3 Herd of Modelscited by 14,192
  2. 2025Qwen3 Technical Reportcited by 8,195
  3. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
  4. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
  5. 2016Understanding intermediate layers using linear classifier probescited by 1,279
  6. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
  7. 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,009
  8. 2023Steering Language Models With Activation Engineeringcited by 824
  9. 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 733
  10. 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 679
  11. 2023The Internal State of an LLM Knows When It's Lyingcited by 644
  12. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 579
15 more
  1. 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMscited by 460
  2. 2023Language Models Represent Space and Timecited by 306
  3. 2022Confident Adaptive Language Modelingcited by 297
  4. 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 275
  5. 2019Depth-Adaptive Transformercited by 227
  6. 2023Linearity of Relation Decoding in Transformer Language Modelscited by 190
  7. 2025Qwen3Guard Technical Reportcited by 125
  8. 2024How Alignment and Jailbreak Work: Explain LLM Safety through Intermediate Hidden Statescited by 92
  9. 2025LLMs Encode Harmfulness and Refusal Separatelycited by 75
  10. 2024HiddenGuard: Fine-Grained Safe Generation with Specialized Representation Routercited by 16
  11. 2023SPIN: Sparsifying and Integrating Internal Neurons in Large Language Models for Text Classificationcited by 10
  12. 2026LLM Safety From Within: Detecting Harmful Content with Internal Representationscited by 10
  13. 2026SafeGEO: Understanding Generative Engine Optimization Risks in Recommendation Agentscited by 4
  14. 2026MINER: Mining Multimodal Internal Representation for Efficient Retrievalcited by 2
  15. 2026Synthetic Persona Pretraining: Alignment from Token Zerocited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026PASTABench: Proactive Assessment of Sequential Trajectories for Agent Safety
  2. 2026Boiling the Frog: A Multi-Turn Benchmark for Agentic Safety
  3. 2026Agent Safety Is Action Alignment
  4. 2026AgentHazard: A Benchmark for Evaluating Harmful Behavior in Computer-Use Agents
  5. 2026Mind the GAP: Text Safety Does Not Transfer to Tool-Call Safety in LLM Agents
  6. 2026Representation Transitions Reveal Emerging Safety Risks in Multi-Turn LLM Agents
  7. 2026Tool Specifications Matter: Uncovering and Mitigating Safety Risks in AI Agents
  8. 2026SafeClawBench: Separating Semantic, Audit-Evidence, and Sandbox Harm in Tool-Using LLM Agents