agentattest

agentattest-ai/agentattest Checked 2 days ago

Open-source, tamper-evident compliance evidence for AI agents.

Open-source, tamper-evident evidence for AI agents. Python 3.11+, Apache 2.0. AgentAttest records agent activity alongside your gateway and framework, then exports verifiable evidence. It is a library and local CLI, with no runtime dependencies. It is not a gateway, a hosted service, or a compliance certification. Use agentattest --db path/to/evidence.db ... for a different store. Retain the exported checkpoint object separately in trusted storage and supply it with verify --checkpoint checkpoint.json to detect truncation or replacement.

Summary extracted from the README.

AgentAttest

Open-source, tamper-evident evidence for AI agents. Python 3.11+, Apache 2.0.

AgentAttest records agent activity alongside your gateway and framework, then exports verifiable evidence. It is a library and local CLI, with no runtime dependencies. It is not a gateway, a hosted service, or a compliance certification.

Quick start

python3 -m venv .venv
source .venv/bin/activate
pip install -e .
agentattest init
agentattest ingest bifrost examples/bifrost.json
agentattest verify
agentattest export --output evidence.json
agentattest verify --bundle evidence.json

Use agentattest --db path/to/evidence.db ... for a different store. Retain the exported checkpoint object separately in trusted storage and supply it with verify --checkpoint checkpoint.json to detect truncation or replacement.

Integrations

  • ingest otel FILE: OTLP JSON resourceSpans exports, including resource and span attributes. Nanosecond timestamps and durations remain in metadata.
  • ingest bifrost FILE: Bifrost /api/logs response, array, or individual log.
  • ingest langgraph FILE: LangGraph/LangChain astream_events(version="v2") lifecycle events. Token chunks are skipped. Events without source timestamps use ingestion time and are marked accordingly.

Files are JSON; - reads stdin. Batches commit atomically. Replaying an identical event ID is idempotent; conflicting content fails. LangGraph replays require retaining timestamps because native events do not include them. Adapters exclude content by default; --include-content explicitly enables it.

Use --jsonl for newline-delimited exports, including OTel file exporter output. The complete file is validated before the batch is committed.

from agentattest import Event, EvidenceStore
from agentattest.adapters import capture_langgraph

with EvidenceStore("agentattest.db") as store:
    store.append(Event(source="app", action="plan", actor="support-agent",
                       occurred_at="2026-09-09T08:00:00Z",
                       attributes={"purpose": "customer support"}))

# Inside an async function, with your existing compiled graph and open store:
# async for event in capture_langgraph(graph.astream_events(inputs, version="v2"), store):
#     consume(event)

The input formats follow OTLP JSON, Bifrost log exports, and LangGraph streaming. These are format adapters; they do not configure collectors or poll gateways.

Policy gates

agentattest gate --policy examples/policy.json --event examples/refund.json records a blocked refund and exits 2. Integrate GateEngine.execute(event, action) before a real action to enforce the decision. Hard rules block; soft rules warn. See policy semantics and integration.

Reports

agentattest report --system support-agent --output report.json exports a report covering Article 12, selected ISO/IEC 42001:2023 clauses, and NIST AI RMF 1.0 subcategories, with record hashes, coverage gaps, and the full verification bundle. Use --framework eu-ai-act|iso42001|nist-ai-rmf|all to select coverage. --format markdown produces a readable summary. See mapping methodology and applicability.

Evidence boundaries

SQLite serializes writers; SHA-256 links every event to the preceding record. Exports are verified before being returned. A chain cannot independently prove producer truthfulness, completeness, or withstand a full rewrite without an external checkpoint. See the threat model.

Telemetry ingestion happens after actions. Runtime enforcement must be integrated at the action boundary. There is no SSO or access-control server in this package. Regulatory mappings support review; they are not legal advice or a finding of conformity. Your organization owns applicability, retention, and audit judgments.

Roadmap

  • v0.1 — Ingest adapters (OTel, Bifrost, LangGraph) + evidence store
  • v0.2 — Policy/gate engine with hard & soft gates
  • v0.3 — EU AI Act Article 12 report export
  • v0.4 — ISO 42001 + NIST RMF mappings
  • v1.0 — Stable evidence-store schema and release-signing tooling

Schema v1 preserves evidence written by 0.1–0.4. See the schema contract and release build/signature verification. GitHub release signing requires a hosted repository and tag; offline signing requires your existing key. Local builds are unsigned until one of these identities is supplied.

See CHANGELOG.md, CONTRIBUTING.md, SECURITY.md, and LICENSE.