a2a-proof
Black-box contract tests for A2A agents.
a2a-proof discovers a deployed agent, sends real A2A requests, and checks its observable
behavior. It needs no access to the agent's source code, framework, prompts, or model provider.
The official A2A TCK checks protocol conformance,
A2A ITK checks interoperability between SDKs, and the
A2A Inspector supports interactive debugging.
a2a-proof adds repeatable contracts for the behavior of your deployed agent.
It targets A2A 1.0 over JSON-RPC, HTTP+JSON, and gRPC. The SDK compatibility layer also supports AP2 v0.2.0 agents that expose A2A 0.3 JSON-RPC, including signed mandate-to-receipt payment flows.
What you can prove
| Risk | Contract |
|---|---|
| A prompt, model, or backend change alters an answer | Text, structured data, JSON Schema, and file integrity assertions |
| An LLM succeeds only some of the time or gets slower | Repeated trials, statistically bounded pass rates, parallel runs, and p50/p95 latency |
| A long-running task breaks after acceptance | State trajectories, stream resumption, cancellation, persistence, and push delivery |
| Staging no longer behaves like production | Agent Card preflight and deployment diff |
| A contract change needs review without a live agent | Recorded cassettes replayed offline |
| Agent text leaks a secret or system prompt | Global invariants and bounded failure evidence |
| An orchestrator stops calling its specialist, or forwards credentials to it | Delegation contracts against a recording downstream agent |
| An agent produces an invalid payment proof | Signed AP2 mandate-chain and receipt verification |
Quick start
With uv installed, try a real loopback A2A exchange without an API key or external service:
uvx a2a-proof demo
uvx a2a-proof demo --fail
The second command deliberately shows a contract failure and exits 1.
Point the runner at your agent:
uvx a2a-proof init https://agent.example.com
init reads the Agent Card and creates a2a-proof.yaml. Replace its smoke scenario with behavior
your users depend on:
version: 1
agent:
url: https://agent.example.com
defaults:
trials: 5
pass_rate: 0.8
scenarios:
- name: billing dispute routing
message: A customer says their card was charged twice for order 4815.
latency:
p95_seconds: 15
expect:
state: completed
data:
- path: /queue
equals: billing-disputes
- path: /priority
matches: "(?i)^high$"
$ uvx a2a-proof run
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━┓
┃ Result ┃ Scenario ┃ Trials ┃ Time ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━┩
│ PASS │ billing dispute routing │ 4/5 │ 3.2s │
└────────┴─────────────────────────┴────────┴──────┘
1 scenario passed in 3.2s
Run one scenario, save failure evidence, or compare the same contract against another deployment:
uvx a2a-proof run --scenario "billing dispute routing"
uvx a2a-proof run --format junit --output a2a-proof.xml --evidence evidence
uvx a2a-proof diff --against https://candidate-agent.example.com
uvx a2a-proof record --output cassette.json && uvx a2a-proof run --replay cassette.json
GitHub Actions
After checking out the repository, one step runs its default contract as a CI check:
- uses: aspix2k/a2a-proof@v0.16.0
Set config only when the contract is not a2a-proof.yaml.
Documentation
- Writing contracts
- Assertions
- Task lifecycle
- Push notifications
- Delegation contracts
- Recording and replay
- AP2 contracts
- External agent showcases
- Running in development and CI
- Configuration schema
The schema provides completion and inline validation in YAML-aware editors. init links it
automatically.
Safety
Agent responses and file metadata are treated as untrusted input. Requests, response parts, regular expressions, embedded schemas, evidence, and local file access are bounded. Redirects, credential-bearing URLs, external schema references, and cross-origin interfaces are rejected by default. Remote file URLs are never fetched or written to reports. Requests recorded by the delegation agent stay in memory and are never written to reports or evidence.
See SECURITY.md for private vulnerability reports.
Contributions follow CONTRIBUTING.md. Licensed under the MIT License.
Metadata
Release files for a2a-proof 0.16.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 |
|---|---|---|---|---|
| a2a_proof-0.16.0.tar.gz | 56.0 kB | With provenance | Details for a2a_proof-0.16.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| a2a_proof-0.16.0-py3-none-any.whl | Python 3 | none | any | Details for a2a_proof-0.16.0-py3-none-any.whl |
Total release size: 121.2 kB
Release files / a2a_proof-0.16.0.tar.gz
| Download URL | a2a_proof-0.16.0.tar.gz |
|---|---|
| Size | 56.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6224e067075155d360e93cbb6611fa81226bf0faf0924da1c53865a284ea8984
|
|
BLAKE2b-256 checksum How to use checksums |
000863adfec6ccf9ad69df7427f66b1f1771b156e0d15f525fc86728bf1cd01e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 25, 2026.
Transparency logRelease files / a2a_proof-0.16.0-py3-none-any.whl
| Download URL | a2a_proof-0.16.0-py3-none-any.whl |
|---|---|
| Size | 65.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
458f48caef331e1be943a349fb6ce9ef059d240ecea1f534178a28ebd629f90d
|
|
BLAKE2b-256 checksum How to use checksums |
a459938fea2a5ae29203d17566e3ba9b1ac8951aa4235fbf56d33c827db84ef4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 25, 2026.
Transparency logSecurity for a2a-proof 0.16.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.
Attestation for a2a_proof-0.16.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 Jul 25, 2026.
Transparency logA 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.