Skip to content

eunomia-bpf/agentsight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AgentSight: Zero-Instrumentation LLM Agent Observability with eBPF

License: MIT Build Status

AgentSight is a observability tool designed specifically for monitoring LLM agent behavior through SSL/TLS traffic interception and process monitoring. Unlike traditional application-level instrumentation, AgentSight observes at the system boundary using eBPF technology, providing tamper-resistant insights into AI agent interactions with minimal performance overhead.

โœจ Zero Instrumentation Required - No code changes, no new dependencies, no SDKs. Works with any AI framework or application out of the box.

Quick Start

wget https://github.com/eunomia-bpf/agentsight/releases/download/v0.0.78/agentsight && chmod +x agentsight
# Record agent behavior from claude
sudo ./agentsight record -c "claude"
# Record agent behavior from gemini-cli (comm is "node")
sudo ./agentsight record -c "node"

Visit http://127.0.0.1:8080 to view the recorded data.

AgentSight Demo - Process Tree Visualization

Real-time process tree visualization showing AI agent interactions and file operations

AgentSight Demo - Timeline Visualization

Real-time timeline visualization showing AI agent interactions and system calls

๐Ÿš€ Why AgentSight?

Traditional Observability vs. System-Level Monitoring

Challenge Application-Level Tools AgentSight Solution
Framework Adoption โŒ New SDK/proxy for each framework โœ… Drop-in daemon, no code changes
Closed-Source Tools โŒ Limited visibility into operations โœ… Complete visibility into prompts & behaviors
Dynamic Agent Behavior โŒ Logs can be silenced or manipulated โœ… Kernel-level hooks, tamper-resistant
Encrypted Traffic โŒ Only sees wrapper outputs โœ… Captures real unencrypted requests/responses
System Interactions โŒ Misses subprocess executions โœ… Tracks all process behaviors & file operations
Multi-Agent Systems โŒ Isolated per-process tracing โœ… Global correlation and analysis

AgentSight captures critical interactions that application-level tools miss:

  • Subprocess executions that bypass instrumentation
  • Raw encrypted payloads before agent processing
  • File operations and system resource access
  • Cross-agent communications and coordination

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              AI Agent Runtime                   โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚    Application-Level Observability      โ”‚   โ”‚
โ”‚   โ”‚  (LangSmith, Helicone, Langfuse, etc.)  โ”‚   โ”‚
โ”‚   โ”‚         ๐Ÿ”ด Tamper Vulnerable             โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                     โ†• (Can be bypassed)         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ† System Boundary
โ”‚  ๐ŸŸข AgentSight eBPF Monitoring (Tamper-proof)   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚   SSL Traffic   โ”‚  โ”‚    Process Events   โ”‚   โ”‚
โ”‚  โ”‚   Monitoring    โ”‚  โ”‚    Monitoring       โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         Rust Streaming Analysis Framework       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚   Runners   โ”‚  โ”‚  Analyzers   โ”‚  โ”‚ Output โ”‚  โ”‚
โ”‚  โ”‚ (Collectors)โ”‚  โ”‚ (Processors) โ”‚  โ”‚        โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           Frontend Visualization                โ”‚
โ”‚     Timeline โ€ข Process Tree โ€ข Event Logs       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core Components

  1. eBPF Data Collection (Kernel Space)

    • SSL Monitor: Intercepts SSL/TLS read/write operations via uprobe hooks
    • Process Monitor: Tracks process lifecycle and file operations via tracepoints
    • <3% Performance Overhead: Operates below application layer with minimal impact
  2. Rust Streaming Framework (User Space)

    • Runners: Execute eBPF programs and stream JSON events (SSL, Process, Agent, Combined)
    • Analyzers: Pluggable processors for HTTP parsing, chunk merging, filtering, logging
    • Event System: Standardized event format with rich metadata and JSON payloads
  3. Frontend Visualization (React/TypeScript)

    • Timeline View: Interactive event timeline with zoom and filtering
    • Process Tree: Hierarchical process visualization with lifecycle tracking
    • Log View: Raw event inspection with syntax highlighting
    • Real-time Updates: Live data streaming and analysis

Data Flow Pipeline

eBPF Programs โ†’ JSON Events โ†’ Runners โ†’ Analyzer Chain โ†’ Frontend/Storage/Output

Usage

Prerequisites

  • Linux kernel: 4.1+ with eBPF support (5.0+ recommended)
  • Root privileges: Required for eBPF program loading
  • Rust toolchain: 1.88.0+ (for building collector)
  • Node.js: 18+ (for frontend development)
  • Build tools: clang, llvm, libelf-dev

Installation

# Clone repository with submodules
git clone https://github.com/eunomia-bpf/agentsight.git --recursive
cd agentsight

# Install system dependencies (Ubuntu/Debian)
make install

# Build all components (frontend, eBPF, and Rust)
make build

# Or build individually:
# make build-frontend  # Build frontend assets
# make build-bpf       # Build eBPF programs  
# make build-rust      # Build Rust collector

โ“ Frequently Asked Questions

General

Q: How does AgentSight differ from traditional APM tools?
A: AgentSight operates at the kernel level using eBPF, providing tamper-resistant monitoring that agents cannot bypass. Traditional APM requires instrumentation that can be compromised.

Q: What's the performance impact?
A: Minimal impact (<3% CPU overhead). eBPF runs in kernel space with optimized data collection.

Q: Can agents detect they're being monitored?
A: Detection is extremely difficult since monitoring occurs at the kernel level without code modification.

Technical

Q: Which Linux distributions are supported?
A: Any distribution with kernel 4.1+ and eBPF support. Tested on Ubuntu 20.04+, CentOS 8+, RHEL 8+.

Q: Can I monitor multiple agents simultaneously?
A: Yes, use combined monitoring modes for concurrent multi-agent observation with correlation.

Q: How do I filter sensitive data?
A: Built-in analyzers can remove authentication headers and filter specific content patterns.

Troubleshooting

Q: "Permission denied" errors
A: Ensure you're running with sudo or have CAP_BPF and CAP_SYS_ADMIN capabilities.

Q: "Failed to load eBPF program" errors
A: Check kernel version and eBPF support. Update vmlinux.h for your architecture if needed.

๐Ÿค Contributing

We welcome contributions! See our development setup:

# Clone with submodules
git clone --recursive https://github.com/eunomia-bpf/agentsight.git

# Install development dependencies  
make install

# Run tests
make test

# Frontend development
cd frontend && npm run dev

# Build debug versions with AddressSanitizer
make -C bpf debug

Key Resources

๐Ÿ“„ License

MIT License - see LICENSE for details.


๐Ÿ’ก The Future of AI Observability: As AI agents become more autonomous and capable of self-modification, traditional observability approaches become insufficient. AgentSight provides the independent, tamper-resistant monitoring foundation needed for safe AI deployment at scale.