Skip to content

AgentSight - eBPF Observability for AI Agents Cheatsheet

AgentSight - eBPF Observability for AI Agents Cheatsheet

AgentSight applies eBPF to a problem the AI tooling world has largely ignored: knowing what an autonomous agent actually did to your system. Application-level tracing shows prompts, tool calls, and token counts, but it only sees what the agent framework chose to report. AgentSight instead observes at the kernel level — syscalls, file access, process execution, network connections — with zero instrumentation of the agent itself. When a coding agent runs, you see the real system effects, not the narrated version.

Requirements

  • Linux kernel with eBPF/BTF support (5.x+)
  • Root or CAP_BPF privileges
  • The agent process running on the same host

Installation

MethodCommand
From sourcegit clone https://github.com/agent-sight/agentsight && make
Binarydownload from GitHub Releases
Dockerrun privileged with /sys/kernel mounted
Verifyagentsight --version

Basic Usage

CommandDescription
sudo agentsight trace --pid <pid>Trace a running agent process
sudo agentsight trace -- claude-codeLaunch and trace a command
sudo agentsight trace --comm pythonTrace by process name
--output trace.jsonWrite structured events
--follow-childrenInclude spawned subprocesses

What It Captures

CategoryEvents
Processexec, fork, exit — what the agent ran
Filesystemopen, read, write, unlink — what it touched
Networkconnect, send, recv — where it reached out
Credentialssetuid, capability changes
Subprocess treeCommands spawned by the agent

Because tracing happens in the kernel, an agent cannot omit or misreport these events — a meaningful difference from framework-level logging.

Why Kernel-Level for Agents

QuestionApp-level tracingAgentSight
What files did it modify?Only if the tool reported itEvery write, always
Did it call an unexpected host?Only instrumented callsAll connections
What did the shell tool actually run?The command stringThe full process tree
Did it exceed its intended scope?Hard to proveObservable

Filtering

FlagEffect
--filter-path /home/user/projectOnly events under a path
--exclude-path /tmpIgnore noisy paths
--net-onlyNetwork events only
--exec-onlyProcess executions only
--min-duration 10msDrop trivial events
# What did the agent do outside its working directory?
sudo agentsight trace --pid $(pgrep -n agent) --exclude-path /workspace

Correlating with Agent Semantics

ApproachHow
TimestampsAlign kernel events with agent trace spans
Session markersEmit a marker at task start/end
ExportFeed JSON into your observability stack
OpenTelemetryCorrelate with app-level spans by time window

Pairing AgentSight with app-level tracing (e.g. Arize Phoenix or Langfuse) gives both the intent and the effect.

Security Use Cases

UseDetail
Scope verificationProve an agent stayed within its sandbox
Incident reviewReconstruct exactly what a misbehaving agent did
Prompt injection impactSee what actions followed an injected instruction
Compliance evidenceAuditable record of agent system access
AspectAgentSightTracee/FalcoLangfuse/Phoenix
LayerKernel (eBPF)Kernel (eBPF)Application
FocusAI agent behaviorGeneral runtime securityPrompts/tokens/spans
InstrumentationNone requiredNone requiredSDK required
Best forWhat an agent really didHost threat detectionAgent reasoning quality

Built on the same eBPF foundation as Tracee and Falco, but scoped to agent behavior.

Resources