Skip to main content

a2a-doctor

One command, every A2A audit in the family. Dumb math, honest numbers, zero dependencies.

tests License: MIT

The umbrella entry point for the ZidoCode A2A audit suite:

Repo What it audits
a2a-tax token cost of the agent card + polling model
a2a-stream-tax token cost of a recorded SSE stream
a2a-reconnect-tax replayed-event tax across SSE reconnects
a2a-artifact-audit chunk gaps, duplicates, writes after last_chunk
a2a-task-state-audit task resurrection, illegal transitions, unknown states
a2a-context-audit empty IDs, context mutation, orphan contexts (A2A#1309)
a2a-webhook-audit webhook SSRF: metadata IPs, credentials, risky ports (a2a-go#373)
a2a-timeline-replay time-travel explorer — per-task timelines, event windows, raw JSON at any line
a2a-card-lock agent-card pin + drift gate

Each member works standalone. a2a-doctor runs them all in one pass and gives one verdict.

Install

pip install a2a-doctor   # or: copy the .py files (they are all stdlib-only)

Usage

$ a2a-doctor check --card card.json --stream stream.jsonl --lock a2a-card.lock
a2a-doctor check — 7 section(s)

  ✓ card       418 tok estimated
  ✓ polling    ~418 tok/task estimated
  ✓ stream     17 event(s) recorded
  ✗ artifacts  1 critical — event 14: write to 'a1' after last_chunk (artifact already closed)
  ✗ lifecycle  5 critical — line 7: task 'zombie-task' resumed after terminal state 'failed' -> 'working'
  ✓ reconnect  no replayed events
  ✓ lock       card unchanged — hash matches

  verdict: FAIL (artifacts, lifecycle)
$ echo $?
2

check is the CI gate: exit 0 clean, 1 warnings only, 2 critical findings.

Individual sections:

a2a-doctor tax card.json          # card size + $ estimate
a2a-doctor stream stream.jsonl    # token breakdown of a recorded stream
a2a-doctor reconnect stream.jsonl # replayed events across reconnects
a2a-doctor artifacts stream.jsonl # artifact integrity report
a2a-doctor lifecycle stream.jsonl # task state machine audit
a2a-doctor context stream.jsonl   # context/task correlation audit
a2a-doctor webhook stream.jsonl   # webhook SSRF audit (offline)
a2a-doctor timeline stream.jsonl  # time-travel explorer: per-task state chains
a2a-doctor lock card.json a2a-card.lock  # drift check

Stream format

One JSON event per line — record your client's message/stream session, replay it anywhere, anytime. Deterministic: same input, same verdict, byte for byte.

Why

Auditing an A2A endpoint once is easy. Continuously — in CI, on every deploy — is the point. a2a-doctor exists so there is one command to wire into the pipeline, not six. MIT license.

Metadata

Release files for a2a-doctor 0.1.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 a2a-doctor 0.1.0
File Size Uploaded
a2a_doctor-0.1.0.tar.gz 28.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for a2a-doctor 0.1.0
File Interpreter ABI Platform
a2a_doctor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.1 kB

Release files / a2a_doctor-0.1.0.tar.gz

Download URL a2a_doctor-0.1.0.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
71d229452061e187a1f94af51dac2e6996d1bd75d5f19d0ea4ae50a4e796d1bb
BLAKE2b-256 checksum
How to use checksums
0ae4a6c1c9ab2b3284371333f807d93056c5cea16eea2a011391843759f7784f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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":null}

Release files / a2a_doctor-0.1.0-py3-none-any.whl

Download URL a2a_doctor-0.1.0-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
661eb599419e18a00a8b4fb83051ae48f5d662c0789c5385a9075bdc3aa0f161
BLAKE2b-256 checksum
How to use checksums
e49ccf625554f9c6493ef974f78ebeff1014fcd600a42726ab2216ac06995c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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":null}

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

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