arXiv:2610.23233cs.CROct 2026

Manuscript Offprint

arXiv:2610.23233

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

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

CCS Concepts: • Software and its engineering → Software maintenance tools; • Security and privacy → Information flow control.

Keywords: AI Agents, observability, eBPF, causal provenance, information flow tracking

ACM Reference Format:

Yifei Bao, Ting Liu, Yuxin Ren, Ruizhe Huang, Likang Luo, Ziteng Xu, Yu Wang, and Peng Jiang. 2026. AgentLoupe: Kernel-Resident Semantic Causal Labels for AI Agent Observability. In Practical Adoption Challenges of ML for Systems (PACMI '26), September 29–October 2, 2026, Prague, Czech Republic. ACM, New York, NY, USA, 5 pages. https://doi.org/10.1145/3843967.3844687

1 Introduction

LLM-powered agents are widely deployed in industry [1, 14], autonomously translating user intents into system actions such as process spawning, file modification, and network access [4, 20]. However, agents introduce nontrivial security and reliability risks since an agent that errs or is subverted can directly damage the host infrastructure. As agents are non-deterministic, the same request expands into a different, unpredictable set of system actions on each run [20]. Static vetting and application-layer observability tools [10, 11, 15] cannot capture system actions and fail to mitigate security risks [20]. Therefore, the community has converged on that auditing of actual system actions is essential for agent observability, with AgentSight [20] representing the state-of-the-art approach of eBPF-based in-kernel tracing.

AgentSight [20] uses eBPF [8] to capture TLS plaintext and system activity in the kernel. AgentSight then correlates concrete actions with LLM responses in a user-space engine using process lineage, temporal proximity, and argument matching, followed by a secondary LLM that analyzes the resulting traces. However, AgentSight faces two limitations. First, its observation scope is bound to the target agent's process tree, so events from lineage-external processes do not directly enter the correlation pipeline. Second, the causal association remains ambiguous. Time-window matching breaks when execution is delayed by hours or days, and textual similarity can only approximate resource identity rather than prove it. The root cause is that correlation metadata is never embedded into the events or the kernel resources they operate on.

These limitations directly break auditability in AgentSight under realistic attacks. Consider a simple cron-triggered reverse shell attack detailed in §2.1. A compromised agent installs a malicious crontab entry for hourly execution. Long after the agent process exits, the system cron daemon spawns a process that runs the malicious entry. AgentSight fails on two fronts. First, its process-tree bounded scope excludes the cron daemon and its child processes, so the actual execution-phase attack events are never captured. Second, the multi-hour delay exceeds any temporal proximity window, and AgentSight cannot establish causal attribution to the originating compromised agent. Thus, attackers can launder malicious actions through standard system persistence mechanisms, severing the causal trail back to its semantic origin and rendering runtime security forensics fundamentally incomplete.

∗^{*}Corresponding author.

To resolve these limitations, our core insight is to generate a kernel-resident semantic label when LLM prompt is captured and let that label travel with the resources the agent touches. We not only capture system actions, but also embeds causal identity and association into kernel resource (such as files, executables, and sockets) that bridge

Figure

This work is licensed under a Creative Commons Attribution 4.0 International License.

PACMI '26, September 29–October 2, 2026, Prague, Czech Republic

© 2026 Copyright held by the owner/author(s).

ACM ISBN 979-8-4007-2998-0/26/09

https://doi.org/10.1145/3843967.3844687 cross-boundary execution. This design delivers three advantages. 1) Coverage is complete because association is triggered by resource contact rather than process-tree membership, naturally capturing actions from lineage-external system daemons. 2) Causality is persistent because the label resides on kernel objects and does not decay when processes exit or time passes, supporting long-delayed and cross-session attribution. 3) Association is definitive because each event carries its semantic label derived from LLM interaction, eliminating the ambiguity of heuristic post-hoc correlation.

Based on the insight, we implement AgentLoupe, an application transparent system-level observability tool for AI agents. In the kernel, AgentLoupe leverages eBPF probes on TLS libraries and system calls to capture TLS plaintext, recognize LLM interaction, and generate associated chain identifiers. Identifier association is maintained in eBPF maps and propagated across processes, files, and sockets under controlled inheritance rules. TLS interaction records and system propagation events are emitted to user space through dedicated buffers. The user-space layer reconstructs application protocols, aggregates events by chain identifiers, and provides a unified audit trail with semantic risk analysis. One engineering challenge is to recognize LLM interaction payload under the eBPF verifier's limited stack and instruction budget. AgentLoupe resolves it via bounded keyword scanning, per-CPU scratch buffers, and user-space reconstruction for truncated payloads. Evaluation shows that AgentLoupe introduces less than 8% average end-to-end overhead. Two case studies confirm that AgentLoupe can trace cross-lineage and delayed persistent attacks back to their originating LLM interactions, while AgentSight cannot due to its process-tree scope and ambiguous correlation.