Skip to content

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

Paper Tracker· arXiv:2610.23233· Yifei Bao, Ting Liu, Yuxin Ren, Ruizhe Huang, Likang Luo, Ziteng Xu, Yu Wang, Peng JiangSoutheast University; Peking University; Ant GroupIndexed by this site · 2026-10-19· Originally publishedTools

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

AgentLoupe uses kernel semantic labels to attribute cross-lineage actions; code writing is +8.0% relative to Bare.

Questions
LLM agents turn user intent into system actions, and auditing needs to link actions back to the interaction that produced them. Process trees and time windows break down under delayed execution or when out-of-lineage processes are triggered via persistent files.
Methods
eBPF captures TLS plaintext, assigns a kernel-resident chain_id to each independent LLM interaction, and propagates it across fork, file inode, and socket handoffs. User space aggregates traces by chain_id and passes them to an unnamed risk analyzer.
Experiments and results
In Table 1, AgentLoupe relative to Bare is +4.5%, +8.0%, +7.7% (claude-sonnet-5). The two cases have threat level 5 and confidence 0.95 and 0.90. The authors state that AgentSight cannot attribute in the same way.
Limitations and future work
The authors state that the dependency explosion risk remains, propagation false positives and false negatives have not been quantified, and the evaluation is currently case-based only. Experiments ran on Claude Code 2.1.150; the paper does not report the analyzer model name or chain accuracy.
Experimental setupclaude-sonnet-5 · repository understanding、code writing et al. · completion time、overhead relative to Bare et al.
Evaluated models
claude-sonnet-5
Benchmarks
repository understandingcode writingsource compilationdelayed cron-triggered reverse shellcross-session persistent instruction poisoning
Metrics
completion timeoverhead relative to Barethreat levelconfidence
AI summaryThe researchers propose AgentLoupe, an eBPF-based, application-transparent observability tool for attributing AI agents' system actions to the LLM interactions that initiated them. It parses LLM interactions by capturing TLS plaintext via eBPF, assigns a kernel-resident semantic causal label to each interaction, maintains it in an eBPF map and propagates it across processes and threads, while associating kernel resources such as files and sockets. When a persistent resource carries context to an independent process outside the original lineage, the design can still preserve the delayed causal chain. Experiments measured an average observation overhead below 8%, and case studies show it can trace cross-lineage persistent attacks back to the original LLM interaction. The paper was accepted at PACMI 2026.

The researchers propose AgentLoupe, an eBPF-based, application-transparent observability tool for attributing AI agents' system actions to the LLM interactions that initiated them. It parses LLM interactions by capturing TLS plaintext via eBPF, assigns a kernel-resident semantic causal label to each interaction, maintains it in an eBPF map and propagates it across processes and threads, while associating kernel resources such as files and sockets. When a persistent resource carries context to an independent process outside the original lineage, the design can still preserve the delayed causal chain. Experiments measured an average observation overhead below 8%, and case studies show it can trace cross-lineage persistent attacks back to the original LLM interaction. The paper was accepted at PACMI 2026.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Delayed and cross-lineage actions cannot be attributed to LLM interactions using process trees or time windows.

    Existing methods cannot attribute delayed-execution and cross-process-lineage system actions to the LLM interactions that produced them.

    • Scenario: The authors state that LLM agents widely deployed in industry turn user intent into process creation, file modification, and network access; the system actions unfolded for the same request differ each time, and an agent that errs or is compromised can directly harm the host machine.
    • Existing shortcomings: The authors state that AgentSight's observation scope is tied to the target process tree, and events outside the lineage do not enter the correlation pipeline; time windows fail when delays are hours or days, and text similarity can only approximate resource identity. The authors write the cause as: correlation metadata was never embedded into events or kernel resources.
    • Audit gap: In Figure 1, the agent writes crontab entries and scripts per request and then exits; one hour later, cron outside the lineage reads the entry, spawns a shell, and establishes a network connection. The authors state that causality is carried only by persistent files, and without tracking this resource-mediated dependency, attribution is impossible.
    • Hypothesis: If kernel-resident semantic labels are generated when capturing LLM prompts, and the labels propagate with the files, executables, and sockets that are touched, then correlation is triggered by resource contact and does not disappear when processes exit or time passes.
    • Proposed tool: AgentLoupe, an eBPF observability tool transparent to applications. The kernel interprets LLM interactions and assigns semantic labels, which propagate via eBPF maps according to inheritance rules; user space aggregates by chain identifier and produces an audit trail with semantic risk analysis.
  2. What related research exists?

    The application layer cannot see system actions, and the system layer lacks LLM semantics; AgentSight stops at the process tree and post-hoc correlation.

    The paper organizes existing methods by application layer, system layer, and cross-layer, and states that none of the three can reconstruct the causal chain in §2.1 from LLM interaction to delayed system action.

    Application-layer records

    • LangSmith and Langfuse (paper cites 2024): record prompts, responses, and tool calls declared by the framework. The authors state that visibility is limited to events exposed by the framework; in the reverse shell example, the triggering interaction and cron installation can be recorded, but the subsequent cron execution, shell process, and network connection are missed.
    • Same-layer citations: OpenTelemetry GenAI (2024) is grouped under the same limitation in §4.2. AgentOps (Dong et al., 2024) is listed alongside the above tools in the application-layer citations, and its mechanism is not described separately in the main text. The introduction states that static review and application-layer tools cannot capture system actions and therefore cannot mitigate security risks.

    System layer and information flow

    • Runtime collection: The main text names Falco and Tracee (paper cites 2024) as capturing system calls and runtime activity. sysdig (Borello, 2015), eaudit (2024), DPUaudit (2025), and Jiang et al.'s work on audit framework resource isolation (2023) appear in the same-layer citations and are not elaborated individually. The authors state that this layer lacks the LLM context needed to interpret the captured content.
    • Labels and provenance: Asbestos (2005), HiStar (2006), Flume (2007), and whole-system provenance (paper cites HOLMES, 2019; Pasquier et al., 2017) propagate labels across processes, files, and sockets to recover long-delay causality. The authors state that their labels are declared by label-aware applications, that the roots of the graph are kernel-visible entities, and that natural-language requests within encrypted streams fall outside the observation scope.
    • Relativity to the request: The authors state that information flow control intercepts actions at the reference monitor, but whether writing to crontab is benign or malicious can only be judged relative to the request that prompted it; and that the chain terminates at the agent process, with the entire session as a single node rather than a single LLM interaction (citing Lee et al., 2013).

    Cross-layer: AgentSight

    • Approach: Zheng et al. (2025) use eBPF to collect TLS plaintext and system activity in the kernel, then correlate in user space using process lineage, temporal proximity, and parameter matching, and analyze the trace with another LLM.
    • Limitations stated by the authors: The observation scope is constrained by the agent process tree, and correlation metadata is neither attached nor persistently propagated through system resources. In the reverse shell example, causality is carried across time and lineage by the crontab and script, and AgentSight does not retain this dependency, and therefore cannot connect the later execution and network connection back to the LLM interaction that installed the task.

    Baselines and workloads

    • Baselines: The overhead experiment compares Bare, AgentSight, no-prop with propagation disabled, and full AgentLoupe (Table 1). The qualitative case comparison is against LangSmith, Langfuse, OpenTelemetry GenAI, and AgentSight (§4.2).
    • Workloads: The paper does not use named benchmarks. The overhead workloads are repository understanding, code writing, and source compilation; the cases are a delayed cron reverse shell and cross-session persistent instruction poisoning.

    The authors position AgentLoupe as embedding semantic labels into kernel resources: replacing process-tree membership with resource contact, replacing post-hoc heuristic correlation with labels on kernel objects, and supplying the LLM interaction identity that the system layer lacks.

  3. How does the paper address this problem?

    eBPF captures TLS plaintext and assigns chain_id, which then propagates with processes, inodes, and sockets.

    AgentLoupe generates a semantic label chain_id in the kernel for each LLM interaction, and lets the label propagate across process, file, and socket handoffs; user space reconstructs the trace solely by this identifier and no longer infers correlation. The authors state that this yields three points: coverage is triggered by resource contact, causality does not decay when a process exits, and correlation is determined by labels carried by the events themselves.

    Collection and label assignment

    • Hooks: uprobes are attached to OpenSSL/BoringSSL's SSL_write and SSL_read to obtain request plaintext before encryption and response plaintext after decryption; kprobes are attached to clone/fork, execve, file open and write, connect, socket send/receive and accept, and dup*/fcntl on x86_64. The authors state that no changes to agent source code, SDK, proxy, or gateway are needed, and that adapting to different frameworks only requires attaching the uprobe to the corresponding TLS entry point; the text gives Openclaw and Claude Code as examples.
    • verifier constraints: Each eBPF program stack is 512 bytes, and a single TLS record is capped at about 128 KiB. Bounded scanning uses bpf_loop from Linux 5.17+, with the scan buffer placed in a per-CPU scratch map. The kernel only classifies and labels; user space performs byte-by-byte reassembly, decompression, and SSE reconstruction, and receives truncated and bytes_lost flags.
    • Classification and chain_id: The TLS hook direction distinguishes requests from responses, and keyword matching identifies prompts and responses. The authors state that OpenAI and Anthropic markers are near the start of messages, so classification does not require the full payload. When a PID starts a new independent prompt, the kernel assigns a new, monotonically increasing chain_id to the initiating thread and its SSL stream.
    • Two outputs: TLS records go through a 64 MiB ring buffer and are classified as prompt, response, or tool call; PROP records go through a perf buffer and describe label propagation on process creation, program execution, file access, and socket operations. The two streams are merged into one JSON object per line, and every record carries a chain_id.

    Kernel label propagation

    • Handoff rules: Starting from the thread labeled at TLS capture, propagation occurs only at explicit handoffs. On fork or clone, the child process inherits the parent label; when a labeled process writes a file, the write probe stores the process label in the inode; a subsequent openat transfers that label to the process opening the file; execve transfers the inode label to the executing process. connect and sendmsg store the label in socket state, and recvmsg transfers it to the receiving process. Labels are stored in eBPF maps keyed by resource identity, without modifying the kernel.
    • Slicing rules: The authors state that unconstrained propagation would cause dependency explosion, so they adopt non-tunable semantic rules: labels propagate only along the above handoffs to processes and resources causally downstream of the agent's action. Each independent LLM prompt starts a new causal slice and does not inherit the previous chain.
    • Cross-chain preservation: For example, after a session reads a file that already carries a label and inherits that label, receiving a user prompt creates a new chain_id and writes a PROP record with related_chain_id pointing to the old chain. The authors state that this preserves cross-chain influence while preventing user-space grouping from merging independent records into one causal chain.
    • Guards: A rollback guard prevents replacing an existing label with an older one; a cross-session guard prevents labels from another session. Rejected transfers remain visible as PROP records with cross-chain links. Users can configure time-based expiration and blacklists to reduce noise. The paper does not give default values for these configurations.

    User-space auditing

    • Reconstruction: record_decoder removes HTTP chunking, decompresses Brotli, gzip, and deflate, and restores SSE and one-shot JSON into complete requests and responses. ChainGrouper groups by chain_id, turns PROP records into audit events, and writes them to a SQLite materialized view in WAL mode.
    • Presentation and analysis: snapshot_builder and noise_reducer generate per-chain snapshots and drop known noise paths. FastAPI serves this view to Next.js; the main text lists timeline, session, process tree, and PROP graph, and the corresponding labels in Figure 2 are timeline, conversation, tree, prop-graph. Each trace and its related chains are assembled into one analysis input and passed to an online LLM risk analyzer, which returns risk findings with threat level, confidence, and supporting events. The paper does not state the model name of this analyzer.
  4. What experiments did the paper conduct?

    On claude-sonnet-5, the highest overhead in Table 1 is +8.0%, and the threat level is 5 for both cases.

    Experimental Setup

    • Observed system: Claude Code 2.1.150, with model claude-sonnet-5. The host is Ubuntu 26.04 (kernel 7.0, x86_64), 4-core Intel Xeon 6982P-C, 8 GB RAM (§4).
    • Overhead tasks: repository understanding (reading the AgentLoupe repository and running /init to generate CLAUDE.md), code writing (writing and verifying cpufreq.bt), source compilation (make agentloupe in a clean source copy).
    • Comparisons: Bare (no observability tool), AgentSight, AgentLoupe with propagation disabled (no-prop), full AgentLoupe. Completion times are the mean of five runs (§4.1).
    • Cases: a delayed cron-triggered reverse shell (the attack in §2.1), and cross-session persistent instruction poisoning. Trajectories are grouped by chain_id and passed along with the correlation chain to an LLM risk analyzer (§4.2).
    • Metrics: end-to-end completion time and overhead relative to Bare (Table 1); in the cases, the number of raw log entries, the number of LLM interactions, and the threat level, confidence, and confirmed findings given by the analyzer. The paper does not state the analyzer model, nor does it give decision thresholds.
    • Repetition: overhead is the mean of five runs. The case studies do not report the number of repetitions. The paper does not report statistical tests.

    Main Results

    The conditions are Claude Code 2.1.150 and claude-sonnet-5 from §4; the numbers are taken from the five-run means in Table 1, with overhead relative to Bare.

    | Configuration | Repository understanding | Code writing | Source compilation | | Bare | 167.14s | 100.40s | 23.00s | | AgentSight | 174.70s, +4.5% | 102.90s, +2.5% | 23.40s, +1.7% | | no-prop | 169.97s, +1.7% | 103.49s, +3.1% | 22.97s, −0.1% | | AgentLoupe | 174.65s, +4.5% | 108.40s, +8.0% | 24.78s, +7.7% |

    • The authors' interpretation of overhead: The authors state that full AgentLoupe adds at most 8% across the three tasks, and that the extra overhead comes entirely from label propagation, which AgentSight does not perform; no-prop's collection cost is close to or below AgentSight's. The abstract writes that average observability overhead is below 8%, §4.1 separately writes that end-to-end average overhead is less than 8%, and the conclusion writes that runtime overhead is less than 8%; these summaries are not the same statement as the per-item overheads in Table 1.
    • Task differences: The authors state that compilation tasks, which are syscall-intensive with few LLM round trips, keep propagation cost low; on longer, LLM-bound tasks, tool overhead is overshadowed by network and latency variance and by differences in LLM turns across runs.
    • Exception: In Table 1, no-prop's source compilation completion time is lower than Bare's. The authors give no separate explanation for this. On the repository understanding row, AgentLoupe and AgentSight have the same overhead percentage.

    Delayed cron reverse shell

    • What was tested: §4.2 runs the end-to-end pipeline with the delayed cron attack from §2.1. AgentLoupe records 165 raw log entries and five LLM interactions within a single-session chain, groups them by the kernel-assigned chain_id, and passes them to the analyzer.
    • Results: The authors state that the script inode carries the chain label when written, the correlation is restored when the scheduler opens and executes the file, and the subsequent network connection is likewise correlated. The analyzer reports threat level 5, confidence 0.95, and two confirmed findings: persistence of the root crontab entry, and a reverse shell finding on the interactive shell and loopback connection (the authors call the latter critical).
    • Comparison interpretation: The authors state that LangSmith, Langfuse, and OpenTelemetry GenAI can record the triggering turn and the tool call that wrote the script when the framework emits events, but cannot see the uninstrumented scheduler execution, the interactive shell process, and the connection. The authors state that AgentSight can see the system effects, but the shell spawned by the scheduler is outside the process-tree observation scope; even if collection were broadened, there is no process-lineage edge leading to the agent, and the cron delay exceeds its temporal proximity window.

    Cross-session persistent instruction poisoning

    • What was tested: A chain in one session writes instructions into AGENTS.md, mapping later ordinary queries to a malicious command; another independent session executes that command under an ordinary user request. AgentLoupe records 126 raw log entries and five LLM interactions across two session chains.
    • Results: The authors state that the file inode carries the label of the writing chain, the label is restored when the second session opens the file, and the snapshot links the producing chain to the executing session's chain via AGENTS.md. The analyzer reports threat level 5, confidence 0.90, and three confirmed findings: persistent instruction injection, intent deviation, and unauthorized command execution.
    • Comparison interpretation: The authors state that AgentSight can observe the system activity of both sessions, but the two sessions are different process trees with no lineage edge, and the delay crosses a complete session boundary, exceeding any temporal proximity window, so it cannot trace the poisoning back to its source.

    Other ablations and analyses

    • The propagation switch is no-prop in Table 1; the paper does not report separate numbers for expiration times, blacklists, or guards.
    • The paper does not report false positive rates, false negative rates, chain accuracy, or analyzer accuracy for label propagation; §5 states that these have not yet been quantified.
    • The paper does not report cases where AgentLoupe failed to trace an attack back to an LLM interaction.
  5. What are some points that can be further explored?

    The authors state that propagation false positives and false negatives have not been quantified, and the evaluation is currently case-based only.

    Limitations and future directions noted by the authors

    • Propagation fidelity: The authors state that although a limited propagation mechanism and user-customizable noise reduction exist, the risk of dependency explosion remains, and the false positive and false negative rates of label propagation have not been quantified (§5).
    • Ground-truth experiments: The authors state that future work needs experiments with ground-truth chains to measure over-tainting (dependency explosion) and under-tainting (missed links) across multiple workloads (§5).
    • Evaluation form: The authors state that the current evaluation is based only on case studies (§5).
    • Further validation: The authors state that broader validation requires testing against real agent attacks and attack benchmarks, covering runtimes beyond Claude Code and OpenClaw, performing same-environment baseline comparisons on cross-boundary scenarios, and evaluating chain accuracy and LLM analyzer accuracy with ground-truth-based measurements (§5).

    Scope of experimental coverage

    • The observed runs for overhead and cases are Claude Code 2.1.150 plus claude-sonnet-5; the host is Ubuntu 26.04, kernel 7.0, x86_64, 4-core Intel Xeon 6982P-C, 8 GB RAM (§4).
    • The overhead comparison is Bare, AgentSight, no-prop, AgentLoupe, with tasks of repository understanding, code writing, and source code compilation, and completion times averaged over five runs (§4.1, Table 1).
    • The end-to-end cases are a delayed cron reverse shell and cross-session persistent instruction poisoning; the analyzer outputs threat level, confidence, and confirmed findings (§4.2).
    • The comparison in §4.2 against LangSmith, Langfuse, OpenTelemetry GenAI, and AgentSight is a qualitative narrative. §3.2 states that the uprobe can be attached to frameworks such as Openclaw; §4 does not report result numbers on Openclaw.
    • The paper does not report the model name of the risk analyzer, the number of case repetitions, label propagation false positives/false negatives, or measured values for chain accuracy and analyzer accuracy (§4, §5).
  6. Summarize the main content of the paper

    Kernel labels link cross-lineage, delayed system actions back to the LLM interactions that produced them.

    AgentLoupe is a kernel-resident agent observability tool used to link system actions back to the LLM interactions that produced them.

    • Problem: Process lineage and temporal proximity break down under delayed execution, and when out-of-lineage processes such as cron read a persistent file and then act. The authors state that attackers can use routine persistence mechanisms to sever the causal trace back to the semantic origin.
    • Method: eBPF captures TLS plaintext, assigns a monotonically increasing chain_id to each independent prompt, and propagates it across fork/clone, file inode, and socket handoffs. A new prompt starts a new chain, and related_chain_id preserves cross-chain influence; user space reconstructs HTTP/SSE by chain_id and passes it to the risk analyzer.
    • Overhead: On Claude Code 2.1.150 and claude-sonnet-5, in Table 1 AgentLoupe relative to Bare is +4.5% for repository understanding, +8.0% for code writing, and +7.7% for source code compilation. The authors state that the three tasks increase by at most 8%, with the excess coming from label propagation.
    • Cases: In the delayed cron case, five interactions within a single-session chain and 165 logs correspond to the analyzer's threat level 5 and confidence 0.95. In cross-session poisoning, two session chains, five interactions, and 126 logs correspond to threat level 5 and confidence 0.90. The authors state that AgentSight cannot perform the same attribution due to its process-tree scope and time window.
    • Authors' conclusion: The authors state that AgentLoupe can trace cross-lineage persistence attacks back to the LLM interactions that produced them, with runtime overhead under 8%. §5 also states that propagation false positives and false negatives have not been quantified, and that the existing evaluation is based only on case studies.
Read originalarxiv.org