Skip to main content
attest

A reality-checker for AI agents.
Grade an agent's answer against what its tools actually returned.


PyPI Python CI License: AGPL-3.0

Documentation · Getting started · JSON output · Code review mode


Quick start

attest grades a run: a JSON record of one task, with the question, each tool call and what it returned, and the agent's final answer (example).

pip install agent-attest
export ANTHROPIC_API_KEY=sk-ant-...
attest run your-run.json

Every command prints JSON. A false claim comes back with the tool output that contradicts it:

{
  "severity": "fail",
  "verdict": "unsupported",
  "subject": "Paris is larger than Berlin",
  "reason": "The evidence shows Berlin has a population of 3,677,000 while Paris has 2,103,000, meaning Berlin is larger than Paris, not the other way around.",
  "evidence": "Paris population (city proper): 2,103,000",
  "step": null,
  "metadata": {}
}

Why attest

Most agent evals ask another model whether the answer looks good. A confident answer can pass even when a detail inside it is wrong; rewriting an agent's reasoning alone can raise an LLM judge's false-positive rate by up to 90% (Khalifa et al., 2026).

attest checks each claim against the real tool outputs instead. Its grading model sees only the claim and the evidence, never the agent's reasoning.


What it checks

Check Question API key
Faithfulness Is every claim backed by a tool output? ✓
Tool use Were the tools allowed, and were their errors handled? —
Prompt injection Did tool outputs carry hidden instructions, and were they obeyed? --deep only
Role adherence Did the agent stay inside its system prompt's job? ✓
Policies (Python only) Did the run follow your project's own rules? evidence and rubric rules only

attest stats turns a pass count into a rate with a 95% confidence interval, so you can tell a real improvement from noise.


Usage

Command line

attest run run.json          # faithfulness + tool use, with an overall score
attest tools run.json        # tool use only (no key)
attest injection run.json    # injection scan only (no key)
attest review review.json    # check an AI code reviewer's outputs

Python

from attest import Attest

grader = Attest()                      # or Attest(provider="openai" | "gemini")
report = grader.evaluate(run)

print(report.passed, report.overall_score)

In Python a run is a Trajectory. examples/quickstart.py builds one by hand, and from_langgraph_messages and from_haystack_messages convert LangGraph and Haystack runs.

Code review

result = Attest().review(pr, outputs, guidelines="REVIEW.md")
post = result.filter(outputs)         # the outputs worth showing

Install options

Install Adds
pip install agent-attest Anthropic
pip install "agent-attest[openai]" OpenAI
pip install "agent-attest[gemini]" Gemini
pip install "agent-attest[files]" PDF and image scanning for injection
pip install "agent-attest[all]" Everything

Contributing

uv sync
uv run pytest

Tests run offline with no API key. See CONTRIBUTING.md.


License

Copyright © 2026 Adepeju Orefejo. Licensed under the GNU AGPL v3.0: you can use, modify and share attest, but any version you distribute or run as a network service must be released under the same license, with its source. Versions 0.6.0 and earlier were MIT.

Metadata

Release files for agent-attest 0.7.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 agent-attest 0.7.0
File Size Uploaded Provenance Actions
agent_attest-0.7.0.tar.gz 725.6 kB Without provenance Details for agent_attest-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-attest 0.7.0
File Interpreter ABI Platform Actions
agent_attest-0.7.0-py3-none-any.whl Python 3 none any Details for agent_attest-0.7.0-py3-none-any.whl

Total release size: 909.2 kB

Release files / agent_attest-0.7.0.tar.gz

Download URL agent_attest-0.7.0.tar.gz
Size 725.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d666a2a0d24e1ff86bf53f3b68ac56d9e1f323c3651ee0b7ad48982f62ec6108
BLAKE2b-256 checksum
How to use checksums
f6a5b36152ff850899a9e1518cba1da01159082732e7b9e1930a605022c0a7ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / agent_attest-0.7.0-py3-none-any.whl

Download URL agent_attest-0.7.0-py3-none-any.whl
Size 183.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b745644f6f12ff568873f8fc9871159cb7e4220c60d2150e74c205272c5e5728
BLAKE2b-256 checksum
How to use checksums
01c24dc1e826727fac4cd84c70d82831fb1ec2e282a9714d12e470264dc7eca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for agent-attest 0.7.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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