# Repository Briefing: eunomia-bpf/agentsight
> Source: https://repoforai.com/repo/eunomia-bpf/agentsight (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/eunomia-bpf/agentsight
- **Official Docs / Website**: https://eunomia.dev/agentsight/
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: C
- **License**: MIT
- **Engineering Health**: A+ (93/100 · Maintenance 35/35 · Adoption 18/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.0.36 (2026-11-26) — https://github.com/eunomia-bpf/agentsight/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, CLI, Self-Hosted
- **Momentum**: 816 ★ total (+2 24h / +10 7d) · 122 forks
- **Topics**: `agent`, `ebpf`, `llm`, `observability`
- **When to Use**: Best for: Teams debugging or auditing existing coding-agent CLIs that need to connect model activity to subprocesses, file access, network destinations, and resource use. Start with native session inspection, then validate narrowly scoped Linux capture on a representative host. Skip if: You need application-level evals, preventive controls, or full live host tracing on macOS, Windows, or Linux hosts where probe privileges are prohibited. Native session inspection does not fill those gaps.

## Overview
```text
### Architecture & Core Mechanics
AgentSight combines a Linux eBPF capture layer with a Rust collector and a native-session ingestion path. The `bpf/` layer supplies process and file events and observes plaintext at supported SSL/TLS call boundaries. The collector correlates those events with agent sessions and model calls. Where live probes are unavailable, the tool can use native session files; `top` also falls back to process snapshots. That fallback is useful for triage, but does not recover the host events a live probe would have captured.

The `agentsight-capture` crate exposes the runners, native sources, analyzers, event model, materialized view, and sinks; the `agentsight` CLI is its primary consumer. `record` persists a run to SQLite, while the web UI serves both live and saved sessions. Web Nebula reads `audit_events` with `audit_type=file` from a Node materialized view. The collector computes the layout at `GET /api/v1/nebula`; the browser renders and plays it back. For external integration, the collector can export captured LLM calls as OpenTelemetry `gen_ai.*` spans over OTLP/HTTP.

### Key Capabilities & Differentiators
The terminal `top` view ranks active sessions and surfaces model calls, token use, process families, and file and network activity. For detailed investigation, `record` follows a launched command or attaches to a target, and `report` queries saved prompts and responses, token totals, and audit events such as process spawns, file opens, and API calls. Token reports can group by working directory with `--group-by dir`. On supported Linux kernels, `FILE_OPEN` events include resolved paths, access mode, overlay-layer metadata, and inode information.

Agent coverage depends on the capture path: `record` supports targets such as Claude Code and Gemini CLI, while `top` can read Cursor's local sessions without sudo. In a Git worktree, offline `vis` scans matching Claude, Codex, and Gemini session files to build a replay; this is distinct from the web timeline, process tree, metrics, and Node-backed Nebula view. For cost analysis without privileged capture, `agentpprof` can turn local Claude and Codex history into pprof, folded-stack, or SVG profiles.

### Trade-offs & Limitations
AgentSight is strongest when the agent is an existing binary and the problem is explaining host-side effects. LangSmith, Langfuse, and Phoenix are better fits for application-level tracing and evals where the code can be instrumented. Helicone fits a request-gateway architecture; AgentSight does not need model calls rerouted, but plaintext coverage depends on probe compatibility. Statically linked TLS libraries in Claude/Bun and Node can defeat a system `libssl.so` probe. Launch-mode discovery handles supported binaries, but attach workflows can still require an explicit `--binary-path`, and native session ingestion should not be mistaken for full live capture.

The evaluated CPU overhead was under 3% for typical traced workloads, but that is not a sizing guarantee. Validate probe visibility, CPU load, and database growth with representative sessions on the target host. Local SQLite keeps storage under operator control, but prompt and response bodies, headers, paths, and destinations make databases and exports sensitive. Plan access, retention, and export review before turning on background capture. Treat AgentSight as an observation tool, not a sandbox or policy enforcement layer.

### Hardware & Deployment Guide
Start with `cargo install agentsight` or a release binary. Listed release assets cover Linux x86-64 and AArch64 and Windows x86-64. On Windows, macOS, and Linux, `top`, `bind`, `vis`, and `report` can use native session files. Live eBPF capture is Linux-only: the minimum listed kernel is 4.1 with eBPF support, 5.0+ is recommended, and `record` uses sudo. With `record -- <command>`, the probes are elevated but the launched agent runs as the normal user. The local web UI uses port 7395. `record` writes databases to the current directory by default; background monitoring stores weekly databases under `~/.agentsight/monitor`.

The Dockerfile is a runtime image, not a source build: it uses Ubuntu 24.04, installs `libelf1`, copies the prebuilt `collector/target/release/agentsight` into `/app/agentsight`, and exposes 7395. Docker does not remove the need for privileged host access to eBPF. Recent releases show ongoing work on capture fidelity: v1.0.34 addressed SSL readiness and process and file evidence; v1.0.35 scoped sidecar capture by PID namespace and improved live Codex token totals; v1.0.36 added a session-analysis event timeline.
```

## Key Capabilities
```text
- Capture: Linux eBPF process and file events plus plaintext at supported TLS call boundaries, without an SDK or proxy.
- Low-privilege fallback: `top` uses process snapshots and native session files when live eBPF capture is unavailable.
- Persistence: `record` writes per-run SQLite databases; `report` queries prompts, token usage, and process, file, and API audit events.
- Replay: Offline `vis` builds artifacts from native session logs; web Nebula renders Node file audit events using layout from `GET /api/v1/nebula`.
- Interoperability: `agentsight-capture` exposes the Rust capture pipeline; LLM calls can be exported as OpenTelemetry `gen_ai.*` spans over OTLP/HTTP.
- Deployment: The Ubuntu 24.04 Docker image installs `libelf1` and runs `/app/agentsight`; live eBPF still requires privileged host access.
```

## Quick Start / Clone
```bash
cargo install agentsight
# or: wget https://github.com/eunomia-bpf/agentsight/releases/latest/download/agentsight && chmod +x agentsight
```
