Skip to main content
TraceProof: verify AI agent executions against policy

Your agent says it worked. TraceProof checks the evidence.

License: MIT Version Python MCP TraceProof checks Tests Stars

Quick start · Showcase · Connect an AI agent · Trace format

TraceProof is a local-first, deterministic verifier for AI-agent audit logs. Give it an independently defined policy and a JSONL trace. It checks whether the reported execution obeyed the declared boundaries and returns machine-readable violations with source line numbers.

No LLM, API key, cloud account, or external service is required for the CLI.

Showcase

A simulated IT support agent reads a ticket, receives independent approval for a write, and cites its retrieved runbook. The unsafe fixture instead retrieves across tenants, makes an out-of-scope tool call, writes without review, cites unobserved evidence and exceeds its token budget.

Recorded demo results: eight valid events passed; seven unsafe events produced five line-specific findings

Valid trace · Unsafe trace · Independent policy

Quick start

Python 3.10 or newer is sufficient. This is the official standalone TraceProof repository.

git clone https://github.com/shariquefaizi94-beep/traceproof.git
cd traceproof
python -m traceproof --policy examples/policy.json --trace examples/valid.jsonl
python -m traceproof --policy examples/policy.json --trace examples/violations.jsonl

The first command exits 0; the second exits 1. Use --format json for CI or programmatic consumption. Exit code 2 means malformed or unreadable input; treat both 1 and 2 as blocked releases.

Optional local package installation: python -m pip install . exposes the traceproof command. The distribution has not been published to PyPI. The MIT-licensed wheel and source archive passed package validation and are available from the standalone release validation artifacts (artifact retention is 14 days). PyPI Trusted Publishing is prepared but requires account-level publisher registration.

What it verifies

Check Evidence
Identity and scope Run identity, tenant, allowed tools, authorized resources
Human approval Independent reviewer, matching run and exact action, expiry, one-time use within trace
Replay Reused call and approval identifiers
Retrieval Authorized document references
Citation Prior authorized retrieval of cited document ID
Budgets Reported token consumption and tool-call count
Trace integrity Known event schema, contiguous sequence, nondecreasing timestamps and start/end boundaries

The execution model

flowchart LR
 A[Agent audit log] --> C[TraceProof]
 B[Independent policy] --> C
 C --> D{Invariant checks}
 D --> E[Pass]
 D --> F[Findings and line numbers]

The checker observes; it never invokes the tools recorded in the trace. In a real deployment, produce events from trusted middleware rather than from model output.

Connect an AI agent

Install the optional MCP integration in a virtual environment:

python -m venv .venv
# Activate the environment for your OS
python -m pip install ".[mcp]"
python -m traceproof.mcp_server

Register the server as a local stdio server with your MCP host, using the absolute path to the virtual environment's Python interpreter and the arguments -m traceproof.mcp_server. The exposed tool is verify_agent_trace(policy_json, trace_jsonl). It takes text, not filesystem paths, and returns the same deterministic report. See MCP setup and CI integration.

Try asking your agent: "Check this redacted execution trace against this independently supplied policy. Explain the findings and cite their line numbers."

Framework adapters and interactive playground

Integration What is implemented
LangGraph Actual StateGraph integration emitting a scoped trace at application boundaries
Spring AI Java 21 FunctionToolCallback wrapper writing schema-v1 JSONL
Local web playground Editable policy and trace, synthetic examples, same Python verifier behind a loopback-only HTTP service
Static product website Host-ready single-page product introduction with recorded examples; Pages deploy workflow prepared
Package & release guide Validated wheel and source archive, installation smoke tests and opt-in PyPI release workflow

Run the playground from the project directory:

python -m traceproof.playground

Open http://127.0.0.1:8765. The server is a local development tool, not a public service.

Test it

python -m unittest discover -v

A scoped GitHub Actions workflow runs the tests when TraceProof files change. The v0.2 GitHub Actions run passed 47 Python tests (including LangGraph and MCP integration) and 3 Java Spring AI tests, plus wheel build and cross-language verification. Verified standalone run. The local suite passed 45 tests and skipped two optional LangGraph tests because the dependency was absent locally. The MCP test is skipped if the optional SDK is absent. The framework examples are synthetic and do not call a live model. The package passed release validation on the new repository. PyPI registration and public Pages hosting remain pending.

Limitations

A pass does not establish that an agent was safe in the real world. An attacker can fabricate or omit trace events. TraceProof is not a runtime enforcement layer, an authentication provider, a signature verifier, a semantic citation validator, or an end-to-end security scanner. It checks the supplied schema, explicitly declared policy and event ordering. Token accounting relies on the producer. Approval identities are assertions, not cryptographically authenticated evidence. Exact action equality is not a general business-argument validator. The examples use synthetic data.

Contribute responsibly

Read contribution guidelines and trace format. Share minimal, redacted fixtures and reproducible results. Never paste real credentials, customer records, sensitive prompts or proprietary traces into public issues.

Built by Sharique Faizi. Related: Production AI Engineering Playbook.

Metadata

Release files for traceproof-agent-audit 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for traceproof-agent-audit 0.2.0
File Size Uploaded Provenance Actions
traceproof_agent_audit-0.2.0.tar.gz 20.8 kB With provenance Details for traceproof_agent_audit-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for traceproof-agent-audit 0.2.0
File Interpreter ABI Platform Actions
traceproof_agent_audit-0.2.0-py3-none-any.whl Python 3 none any Details for traceproof_agent_audit-0.2.0-py3-none-any.whl

Total release size: 38.0 kB

Release files / traceproof_agent_audit-0.2.0.tar.gz

Download URL traceproof_agent_audit-0.2.0.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
92854488b0705bb34a574cacc32b6b1345244a7d48f893f552dd854ca4080a57
BLAKE2b-256 checksum
How to use checksums
9dac07e897fdebcfc5e8455c794d21e282fedda30808bd274482893397be16bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / traceproof_agent_audit-0.2.0-py3-none-any.whl

Download URL traceproof_agent_audit-0.2.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ef2d1f8cea178234b12bc4d5c7335c3b5ff30e8acb1b154dd88b7e69cb5497d
BLAKE2b-256 checksum
How to use checksums
e7e132257bd61fed712120eff9c5848232a8b2182c2149c163fafee399d656e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for traceproof-agent-audit 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for traceproof_agent_audit-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page