A reality-checker for AI agents.
Grade an agent's answer against what its tools actually returned.
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.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_attest-0.8.0.tar.gz | 742.8 kB | Without provenance | Details for agent_attest-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_attest-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for agent_attest-0.8.0-py3-none-any.whl |
Total release size: 936.2 kB
Release files / agent_attest-0.8.0.tar.gz
| Download URL | agent_attest-0.8.0.tar.gz |
|---|---|
| Size | 742.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad69e0c6240262f6b17a7eb7e0a90581fa398f512395aa861506d7d700501c35
|
|
BLAKE2b-256 checksum How to use checksums |
6786da444cdb605281aa9e073a9a716efdf659d40a4bb0e887f3a6f014c6224e
|
| 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.8.0-py3-none-any.whl
| Download URL | agent_attest-0.8.0-py3-none-any.whl |
|---|---|
| Size | 193.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc41a02d872b360e187577e9cea95840faf67b0bf3d1665f07d5aaaad37b79a6
|
|
BLAKE2b-256 checksum How to use checksums |
cbf5099ed35265f0933023e456efc3d519546ad8eb5b82f65055883130666822
|
| 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.8.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.