Skip to main content

Offline contract tests for A2A-style agent cards and task lifecycle behavior.

Project description

a2a-contract-test

a2a-contract-test is a small offline contract-test kit for A2A-style agent cards and task lifecycle behavior. It validates agent cards, capabilities, structured payloads, errors, cancellation behavior, and terminal task states without making network calls.

This project is not an official A2A compliance suite and is not affiliated with the Linux Foundation or any A2A standards body. It is a practical PR gate for teams that want predictable agent-to-agent behavior.

Quick start

python -m pip install -e .
a2a-contract-test run --agent-card examples/passing_agent/agent-card.json
a2a-contract-test run --agent-card examples/failing_agent/agent-card.json --out report.md

The runner looks for contract-transcript.json next to the agent card unless a custom transcript is supplied with --transcript.

What it checks

  • Required agent-card fields and endpoint shape.
  • Declared capabilities and JSON content parts.
  • Task lifecycle transitions from submitted to terminal states.
  • Cancellation support when declared.
  • Error payload structure and unsupported capability negotiation.
  • Redacted HTTP-style transcript snippets for reproducibility.

Reports

Use --format json for machine-readable CI output or the default Markdown format for PR comments and issue attachments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a2a_contract_test-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

a2a_contract_test-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file a2a_contract_test-0.1.0.tar.gz.

File metadata

  • Download URL: a2a_contract_test-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for a2a_contract_test-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eccfea7a5d5c7eb7878e2237552afdcfcb66e7cf0ac919817a04150723d3854d
MD5 5788e2033029e435587d1fb3f428d4fe
BLAKE2b-256 2548da4a69b4474f644e5abef9d254e80a4fd50b2ad59d20db15b9d27a67725d

See more details on using hashes here.

File details

Details for the file a2a_contract_test-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for a2a_contract_test-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e2bd5a406cf3bb44b6391955e520afd6f06793921d3a925d6ec4cba637e09af
MD5 4f5ec8d7e4923f003248c9fab18e411d
BLAKE2b-256 66867da21dfbe3f7bacf87bf6391deaea400470b3f5b6a1b938e454bded74c5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page