Skip to content
Proyek

Tentang

Security-oriented three-axis observability for sandboxed AI agents: model intent, app context, and runtime telemetry into verifiable evidence graphs for risk, forensics, and audit.

Keamanan dan privasi

Cara angka ini diukur

Yang dapat Anda lakukan

  • Record an execution - Wrap an agent or ordinary command; save process activity, workspace changes and supported session records
  • Follow cause and effect - Connect tasks and tool calls to processes, files and network events; inspect the evidence behind an association
  • Trace files and artifacts - Use graph explain, diff and blame to see what changed and which execution produced it
  • Inspect Agent sessions - Read messages and tool results, compare task/configuration snapshots, and review collection gaps

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
Mengumpulkan riwayat
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

AgentProvenance: What are your AI agents actually doing?

Try the online demo

Replay an agent run in your browser: explore its graph, read the session, and inspect access decisions and saved files. No installation, account or API key required.

AgentProvenance

What did your agent actually do? Follow the evidence.

Record agent tasks, conversations and tool calls alongside the processes, files and network activity they produce. Trace artifacts, compare executions, and export evidence you can replay and verify offline.

Release Go CI Sensor SQLite License

Online demo | Quickstart | Capabilities | Agent session | Demos | Architecture | Docs

English | 简体中文


Git-like provenance for agent execution: record → inspect → trace → compare → verify.

AgentProvenance connects three parts of an execution: what the agent was asked to do, what its tools reported, and what happened in the operating system. Use the same evidence to debug a failed task, inspect an unexpected file change, investigate a network connection, or feed an external evaluator.

AgentProvenance: runtime facts, agent context and model intent in one verifiable execution graph

What you can do

Capability What it gives you
Record an execution Wrap an agent or ordinary command; save process activity, workspace changes and supported session records
Follow cause and effect Connect tasks and tool calls to processes, files and network events; inspect the evidence behind an association
Trace files and artifacts Use graph explain, diff and blame to see what changed and which execution produced it
Inspect Agent sessions Read messages and tool results, compare task/configuration snapshots, and review collection gaps
Investigate security Apply policies, inspect blocking decisions, trace sensitive data flow and compare behavior against a baseline
Understand agent teams Follow delegation and peer messages into the execution evidence attributed to each agent
Capture across environments Collect on Linux amd64/arm64, inside KVM guests, or on Kubernetes nodes with Pod/container attribution
Replay and verify Export content-addressed evidence, optionally sign it, and share a replay that works offline
Integrate with other tools Query through CLI/JSON, HTTP, Python or MCP; attach external evaluation results to the same evidence

Use it for debugging coding agents, reviewing generated artifacts, investigating unexpected behavior, and building evaluation or audit workflows.

On this page: Quickstart · Evidence model · Agent session · Dashboard · Demos · Runtime capture · Security and evaluation · Architecture · Documentation

Quickstart

Try a recorded execution

Open the online demo to explore the graph, Agent session and saved files in your browser. The same site includes the illustrated demo guides and user documentation. No installation is needed.

The v1.0 demo library below has four starting points: compare a repair, inspect a remote workspace, follow a Browser or Notebook task, or trace work between agents. Choose a recording to see what each contains.

Four featured investigations in the v1.0 demo library

Download the archive for your platform and its .sha256 file from Releases. The example below uses the v1.0.0 archive. Keep the included executables together.

Platform Archive suffix
Linux / WSL, x86-64 linux_amd64.tar.gz
Linux / WSL, ARM64 linux_arm64.tar.gz
macOS, Intel darwin_amd64.tar.gz
macOS, Apple Silicon darwin_arm64.tar.gz

On Linux x86-64, verify and extract the downloaded archive:

sha256sum -c agentprov_v1.0.0_linux_amd64.tar.gz.sha256
mkdir agentprov-demo
tar -xzf agentprov_v1.0.0_linux_amd64.tar.gz -C agentprov-demo
cd agentprov-demo
./agentprov demo

On macOS, use the matching darwin archive and shasum -a 256 -c to check it. Windows users run the Linux archive inside WSL. Replay needs no Go, Docker, agent account or API key and works offline.

In the release CLI, choose Open replay to read a recorded run or Read guide for its walkthrough. To go straight to a case or list the available names:

./agentprov demo evidence-attribution
./agentprov demo investigation-workflow
./agentprov demo deepseek-context
./agentprov demo multiagent-provenance
./agentprov demo --list

The CLI verifies the evidence signature and opens the dashboard with a temporary store. Ctrl-C closes it and removes that store. Recorded commands are never rerun. For remote or headless machines, add --no-browser and access the local address through your usual port forwarding.

To build the examples from source, install Go 1.26.11 or later:

go build -tags agentprov_tools -o agentprov ./cmd/agentprov
./agentprov demo

All demos · Archive guide

Record your own agent

With your agent installed and authenticated:

./agentprov doctor -- claude
./agentprov launch --file-diff -- claude

doctor checks the local capture setup. launch starts the agent and dashboard, then collects the session when the agent exits. --file-diff also saves workspace changes and final changed-file text. Claude receives a per-run hooks overlay; your normal Claude settings stay in place.

Codex and DeepSeek Harness use the same entry point:

./agentprov launch --file-diff -- codex
./agentprov launch --file-diff -- dsh headless --json 'Inspect the project and run its tests.'

Linux eBPF capture requires the sensor, a supported kernel and BPF/perf access. Agent context uses the detailed capture preset by default. Add --capture basic to launch to retain less supplemental context; kernel, TLS and workspace capture remain independently configurable. macOS supports application recording and replay. Custom session directories, resumed sessions and source formats are covered in the Agent session guide.

Remote commands, Browser and Notebook

An Agent may live inside a sandbox, call one from outside, or delegate from sandbox A to sandbox B. A local process tree covers only part of the latter two paths. Browser and Notebook tools also reuse long-lived processes, so their operations need page and request identities alongside system events. AgentProvenance connects these layers through explicit execution references and native application context. The deployment guide explains which collection entry fits each arrangement.

The following v1.0 integrations are opt-in. Each guide lists the additional dependencies and permissions required by that entry.

Task Entry and guide
Run an Agent's command in another Linux VM or container Execution handoff: route native Claude Bash calls through an authenticated executor; collect signed results and receiving receipts
Investigate a browser task Browser context: owned Chromium through Python or stdio MCP, with page/request identities, screenshots and HAR
Investigate a notebook task Notebook context: Jupyter requests and outputs through a recorder or stdio MCP, including late output and kernel restarts
Share selected evidence or complete originals Evidence delivery and verification: explicit delivery modes, separate producer/exporter signatures and offline verification using recipient-owned trust

Browser and Notebook entries use optional Python dependencies. Their guides cover installation, Agent configuration, retention and import into the task's Run. For each entry, application context and Linux runtime capture are configured separately.

Record an ordinary command

You can start without an agent integration:

mkdir -p /tmp/agentprov-record-demo
./agentprov record --run run-record-demo --workdir /tmp/agentprov-record-demo -- \
  sh -c 'echo artifact > artifact.txt'
./agentprov observe summary --run run-record-demo
./agentprov graph explain --run run-record-demo --file artifact.txt

record captures the command, process samples and workspace changes. A running Linux sensor adds kernel events; a supported session adapter adds agent context. Local recording and replay do not require Docker.

For a CI job that should fail when the recorded command fails, add record --propagate-exit. By default the CLI reports whether recording succeeded; the command's own exit code is in the result.

Inspect, trace, compare and export

Each execution has a Run ID. Substitute the IDs printed by your recording:

./agentprov observe summary --run RUN_ID
./agentprov graph explain --run RUN_ID --file path/to/artifact
./agentprov graph diff --run RUN_ID --file path/to/artifact
./agentprov graph blame --run RUN_ID --file path/to/artifact
./agentprov context coverage --run RUN_ID
./agentprov graph verify --run RUN_ID
./agentprov forensics export RUN_ID

Use the dashboard to follow tools into runtime events, open saved file content, and compare recorded task or configuration entries. The graph reference covers execution comparisons and artifact lineage.

Signing is optional. KEY_PATH is the path to your Ed25519 private key file:

  • After record: sign the evidence bundle on export with ./agentprov forensics export RUN_ID --sign-key KEY_PATH.
  • With launch: pass the key at startup, for example ./agentprov launch --sign-key KEY_PATH -- claude. The bundle is signed when the agent exits.

Core model

An agent transcript explains the task and tool decisions. Runtime telemetry records process, file and network effects. AgentProvenance brings them together with file changes and saved artifacts:

Task / conversation / agent delegation
  → tool call
    → process and child processes
      → file access / network connection / runtime event
        → changed file / artifact / evidence object
Evidence layer Sources What it explains
Runtime facts Process sampling, file diffs, native eBPF and compatible telemetry receivers What processes did, which files changed and where connections went
Agent context Session logs, hooks and explicit context producers The task, conversation, tools, agent identities, delegation and recorded permissions
Model requests and intent Supported transcript formats and TLS plaintext probes Captured requests/responses, declared actions and refusals

Correlation uses process identity, cgroups, containers, working directories, time ranges and recorded tool identifiers. Raw kernel events do not need an agent-specific tool_call_id. Derived relationships retain their supporting evidence and confidence; missing or ambiguous context remains visible.

Evidence objects have content hashes and parent references. Verification checks those objects and their links; optional signatures let a recipient verify a bundle against its signing key. Captured intent means recorded messages and actions, not access to a model's internal reasoning.

Detailed evidence model · Correlation and graph queries

Agent session

Select a run, then open Session & tools. In the DeepSeek example, open the Bash result under Conversation & tools to read the seven recorded test results. Choose Related sessions to see which sessions are linked and the records that support each link.

View What you can inspect
Conversation & tools The task, messages, tool calls and results. Choose Read body to open the retained text.
Permissions & config Recorded model, workspace, approval and sandbox settings
Collection & manifest Session sources, runtime coverage, retention policy and reported gaps

Saved Bash result from the DeepSeek session showing seven tests

Supported agents

Agent Integration and available context
Claude Code Per-run hooks and native transcripts: messages, tools, permission-mode changes and session metadata
Codex Native rollout records: messages, tool results, thread settings and recorded child-thread identities
DeepSeek Harness v3 JSONL and native v4 Zstandard sessions: messages, tools, PTC sub-calls and configuration
Kimi / Grok Existing supported transcript integrations and historical replay formats
Other commands or harnesses Process/file recording through record; add semantic context through hooks, MCP or explicit producers

Custom directories and resumed sessions can be selected explicitly. Incremental imports retain source positions and deduplicate repeated records. Configuration and task snapshots can be compared within a run or across runs. The compatibility table lists checked versions and source formats.

Context is collected after the agent exits. Permission history contains what the source recorded; missing decisions appear as unrecorded. The coverage report shows capture gaps separately from graph and signature verification.

Explore the DeepSeek example · Session commands and API

Web Dashboard

The Dashboard brings the execution graph, timeline, process tree, network activity, risk signals and saved evidence into one investigation view.

View Use it to
Graph Explorer Switch between process, file/artifact, network, agent intent, orchestration, data flow and deployment views
Timeline and details Follow the order of events, select a node and inspect its source evidence
Agent session Read saved tool results, inspect recorded permissions and configuration, and follow links between related sessions
Workspace / Browser / Notebook Open a revision receipt, browser attachment or notebook output in runs that recorded them
Saved content Open the retained body of a tool result or a file version
Access control Inspect AppArmor/seccomp audit records, task-state observations and configuration; follow an operation attempt through its decision and recorded result
Search and compare Find saved text or compare recorded file versions side by side. To package a selection from your local store, use dashboard export.
Coverage and verification Review session capture, probe availability, association gaps and integrity results

The repair comparison, with both recorded versions of diagnostics.json open

Open your own recorded runs with:

./agentprov dashboard serve

The local Dashboard serves its assets from the CLI and needs no external web service. The online demo provides read-only investigation of the bundled public captures. Views summarize large event sets and let you drill into details instead of placing every raw event on one canvas.

Demos

Investigate a failure, then compare the repair

One real DeepSeek session spans two executions: delegate code review, run seven tests, inspect denied optional diagnostics, then disable those diagnostics and produce the report successfully. Follow parent/child sessions, search saved errors, inspect AppArmor/seccomp records, compare files and export a selected replay.

From the current source checkout:

go build -tags agentprov_tools -o agentprov ./cmd/agentprov
./agentprov demo investigation-workflow

The command loads both signed captures together. In Compare, choose Diagnostic repair: before as A and Diagnostic repair: after as B. Inspect settings.json and the generated reports under File evidence; Configuration shows the Harness settings. Follow the walkthrough.

Follow a multi-agent execution

An agent delegates work; a peer message leads another agent to install a poisoned package. Follow the message and tool call into the attributed file reads and network connection. The recording also includes an earlier refused action.

Alice and Bob in the orchestration view of the recorded agent team

./agentprov demo multiagent-provenance

Read the investigation. Shared-process agent attribution is inferred from the recorded hooks and command evidence.

Trace execution across Pods

One node sensor captures two Pods, preserving their cgroup identities and Kubernetes metadata. Explore workload placement, the cross-Pod connection and the worker's runtime activity in the same graph.

Recorded cgroups and workloads in the cross-Pod deployment view

./agentprov demo k8s-cross-pod-a2a

The network and syscall events were captured live; the delegation hooks reuse the agent-team recording. The guide explains how these sources are joined.

Explore all examples

Example What to look for
Report repair: before and after Compare the diagnostic settings, test results and reports from the inspection and repair runs
Evidence attribution: before and after November DeepSeek captures with tool-scoped intent, audit decisions and retained TLS fragments
Outbound attribution: synthetic example A body match, two candidate source reads and unresolved execution identity
DeepSeek development task Task, tool results, configuration history, passing tests and final file content
Snake supply chain A poisoned dependency, planted test secrets, network activity and artifact provenance
Agent team Delegation, peer influence, a refusal and the later execution path
Kubernetes cross-Pod A2A Separate workloads connected by one node's evidence
Kubernetes placement Container identity and workload placement
Grok codebase-exfil investigation Historical evidence, reported behavior and reproduction limits; replay with grok-codebase-exfil
Grok outbound routes Model requests, vendor telemetry and third-party analytics; replay with grok-3routes
LLM Judge An external model reads evidence and returns findings with evidence references
Jev evaluator Structured evaluation, rule comparison and human review

The CLI includes 12 signed replays for offline use. Each side of a repair pair counts as one replay; the outbound attribution example uses synthetic data. LLM Judge and Jev are optional integration guides; live evaluation requires the provider setup described in each guide. Grok examples are dated captures with reproduction limits, not a statement about the current service.

Runtime capture

The native sensor records process, file and network activity on Linux amd64 and arm64. It runs on a Linux host, inside a KVM guest, or as a node sensor for Kubernetes/K3s. Pod metadata connects events to workloads; disk buffering and late attribution handle events that arrive before their workload binding. Probe reports show the syscalls, DNS and TLS paths available in that environment.

Environment Available workflow
Linux amd64 / arm64 Agent sessions, command recording, native eBPF capture, queries and replay
KVM Linux guest Capture inside the guest using its kernel and process identities
Kubernetes / K3s One sensor per node with Pod/container attribution and lifecycle tracking
macOS Intel / Apple Silicon Agent sessions, command and file recording, queries and replay
Windows Run the Linux tools in WSL; kernel capture depends on the WSL kernel and permissions

KVM/K3s setup and TLS support · Durable capture · Kubernetes attribution

The current source also includes a gVisor SecCheck receiver. Its ARM64 and amd64 systrap paths have live collection, recovery and snapshot/clone checks; events retain their Sentry identity rather than the host runtime process's identity. Native eBPF observes the selected Linux host or guest kernel. The Firecracker guest recipe provides pinned kernel/rootfs builders and a systemd capture service. Its amd64 hardware boot, signed delivery and receipt-gated retirement are covered by the v1.0 acceptance results.

TLS discovery follows supported OpenSSL libraries and Go binaries, including container replacements. On Linux amd64, Go TLS response capture supports Go 1.23–1.26, including stripped executables with a usable Go function table. Compatible BoringSSL SSL_read and SSL_write paths have been verified for shared libraries and static binaries with function symbols. Rustls plaintext requires a controlled endpoint receipt; native syscall probes do not observe io_uring submissions or completions. See native coverage and probe requirements for the limits, including ARM64 Go response capture.

Deployment modes

Mode How it runs Typical use
Local CLI One CLI with a local SQLite database and evidence objects Development, offline replay, CI jobs and evaluators
Local daemon / sidecar A service beside a worker or sandbox host, with ingest and query APIs Shared local queries and buffered event ingestion
Kubernetes node capture A sensor on each selected node with workload attribution Multi-workload capture in Kubernetes/K3s

The sensor runs within the Linux host or guest being observed. AgentProvenance uses existing runtimes and orchestrators; it does not provision VMs or replace Kubernetes. Existing Falco/Tetragon receivers remain compatibility paths. A centralized multi-tenant evidence service is a future design.

Security and evaluation

Use policies and behavior baselines to find unexpected secret access, network egress or process activity. The evidence graph connects findings to their tools, processes and artifacts; data-flow views expose possible sensitive-data paths. Intent comparison highlights differences between declared actions and observed effects, including actions that happened after a recorded refusal.

./agentprov security risks --run RUN_ID
./agentprov policy decisions --run RUN_ID
./agentprov security responses --run RUN_ID
./agentprov intent diff --run RUN_ID

Blocking uses the applicable policy gate or response integration. The recorded decision and response history show what was requested and what happened; importing historical evidence does not block an already completed action. OWASP Agentic and NIST mappings show which controls have supporting evidence and where gaps remain.

External evaluators can read a trajectory, score it and write back signals with evidence references. LLM Judge and Jev demonstrate this workflow; an evaluation or training pipeline owns its scoring and reward rules.

./agentprov signal context --run RUN_ID
./agentprov ai tools --provider openai
./agentprov ai mcp

CLI/JSON, HTTP APIs, the Python SDK and MCP expose evidence to other tools. MCP also provides action preflight and explicit context-write tools; writing agent context does not execute an action or create kernel telemetry.

Security commands · Compliance mapping · AI tools and MCP · Python SDK

Architecture

Collection, attribution, evidence storage and investigation interfaces

  1. Collect session records, hooks, command/file observations and runtime events.
  2. Normalize and associate them with runs, tool scopes, processes and workloads; redact sensitive values and buffer streaming input where configured.
  3. Store evidence in SQLite and content-addressed objects, retaining source identities, revisions and the basis for derived relationships.
  4. Inspect and exchange it through the graph, timeline, CLI, APIs, signed bundles and read-only replay. Security rules and external evaluators add findings tied to the same evidence.

The default deployment keeps these modules in a local service/CLI with an optional privileged sensor. A hosted control plane is not required.

Code area Responsibility
internal/launch, record, hooksbridge, agentcontext Start executions and collect agent context
internal/sensor, producer, telemetry Native collection, workload identities and ingestion
internal/correlation, provenance, store Association, evidence graph, objects and persistence
internal/security, signals, attest, forensics Analysis, external results, signing and export
internal/cli, dashboard, daemon, mcpserver User and integration interfaces

Git-like provenance covers history, differences, attribution and verification. It does not roll back external effects. Hashes and signatures check recorded evidence; collection reports separately explain what was observed or missed.

Full architecture and repository map · Relationship to other systems

Features and docs

The session view sits alongside the existing timeline, process tree, network, risk signals, data-flow and rule-coverage views. Security analysis and external evaluators consume the same recorded evidence.

What you want to do Guide
Trace tools, files and execution differences Graph commands
Capture sessions and compare configuration Agent session
Investigate risk, apply policies and inspect blocking decisions Security commands
Inspect control mappings and rule coverage Compliance mapping
Query evidence from another application HTTP API, context API, Python SDK
Give an agent access to evidence tools AI tools and MCP
Keep remote file tools and commands on one revision Controlled workspace
Configure execution and collection separately Runtime adapters
Add an external evaluator LLM Judge, Jev
Understand deployment and architecture Deployment modes, capability reference

Web pages follow your browser language initially, falling back to English, and remember manual switches. CLI and tool output default to English; original evidence is kept as recorded.

Release status

v1.0.0 connects tool calls to remote workspaces, gVisor and guest execution, Browser/Notebook activity and independently verifiable evidence delivery. Read the v1.0.0 release notes for the workflows and upgrade steps, or the deployment guide to choose a collector for your environment. The Dashboard and offline exports share the same Workspace, Browser and Notebook reader. The demo website build combines four illustrated entries, topic guides and historical recordings while preserving existing links and original evidence downloads.

For upgrades, back up your data directory before opening it with a newer version. An upgraded database should not be reopened with an older binary. macOS archives are not Apple notarized; download checksums verify archive integrity.

Release notes · Changelog · Future work

When upgrading from before v0.10.1, read the v0.10.1 upgrade guide for changed authentication, HTTP execution and signed-import defaults.

Development

go test -race ./...
go vet ./...
gofmt -l internal cmd

# Portable end-to-end evidence and verification smoke.
./scripts/accept_phase1.sh

CI runs these gates, static Linux amd64/arm64 builds, the native bindings drift check, daemon readiness faults, and live amd64 syscall/OpenSSL/Go TLS tests across Go 1.23–1.26. Live ARM64 and KVM/K3s lab reports are distinct from hosted CI.

Acceptance scripts are environment-specific. Do not run every scripts/accept_*.sh indiscriminately: some require root, create Pods, or install services. Use the KVM/K3s runbook for those gates and the deployment and performance baseline for the single-node pressure tests.

Security

Report suspected vulnerabilities through GitHub private reporting or email [email protected]. See the security policy for supported versions and the reporting process.

Author and License

Built and maintained by ByteYellow.

Thanks to @8eeth0ven for the security hardening contributions in PR #34.

Licensed under the Apache License 2.0 — see LICENSE. Copyright 2026 ByteYellow.

Jelajahi proyek terkait

Memuat…