Agentloupe traces ai tool actions back to original language inputs

AgentLoupe: Kernel-Resident Semantic Causal Labels for AI Agent Observability

Cryptography and Security

Summary

When AI programs take actions based on what people ask them, it's important to know exactly which request caused which action, especially for security checks. The authors created AgentLoupe, a tool that watches AI actions inside the computer system without changing the AI software. It tags pieces of data inside the system's core with labels that show which AI request they came from. This helps catch delayed or complicated cases where actions happen much later or through several steps. AgentLoupe works with low slowdown and helps find security problems by tracing attacks back to their real causes.

What this means in practice

  • For security teams: Identify the original AI requests behind suspicious system actions to improve attack investigations in complex multi-process environments.
  • For system administrators: Monitor AI-driven operations across processes to diagnose and prevent unexpected delayed actions without modifying AI software.

Authors

Yifei Bao, Ting Liu, Yuxin Ren, Ruizhe Huang, Likang Luo, Ziteng Xu, Yu Wang, Peng Jiang

Abstract

AI agents translate user intents into system actions via tool invocations. Accurately attributing these actions to their originating LLM interactions is essential for security auditing, yet existing methods, such as AgentSight, fail for delayed execution and cross-process-lineage behaviors. We present AgentLoupe, an application-transparent eBPF-based observability tool. The core insight of AgentLoupe is to embed causal identity into kernel resources.AgentLoupe employs eBPF to capture TLS plaintext to interpret LLM interactions, and assigns each a kernel-resident semantic label.It maintains labels in eBPF maps, then propagates this label across processes and threads, associates it with kernel resources such as files and sockets. When a persistent resource carries context to an independent process outside the original lineage, this design preserves the delayed causal association.Experiments show that the average observation overhead of AgentLoupe is below 8%, and case studies confirm AgentLoupe traces cross-lineage persistent attacks back to their originating LLM interactions.