This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.0rc5 instead.
Reason given by maintainers: Security: GHSA-g97p-4qrw-9hvf, upgrade to 1.0.0rc2
Agent-DID × Google A2A Integration
Roadmap item: F2-02 — Google A2A proof-of-concept
Agent-DID as the identity layer for the Google A2A (Agent-to-Agent) protocol. This integration provides DID-based cryptographic identity for A2A agent discovery, request signing, and mutual authentication.
What This Solves
The A2A protocol is auth-agnostic — it defines how agents communicate (JSON-RPC 2.0 over HTTPS) and discover each other (AgentCards), but deliberately leaves authentication to the implementer. This creates a gap:
| A2A Gap | What Agent-DID Provides |
|---|---|
| No native cryptographic identity | DID anchored to the agent's model, prompt, and capabilities |
| AgentCard has no verifiable identity proof | DID fields embedded directly in the AgentCard |
| Request authenticity depends on external auth | Ed25519 HTTP Message Signatures on every JSON-RPC request |
| No standard for mutual agent authentication | DID-based verification of the counterparty agent |
Features
- DID-Enriched AgentCards — generate A2A-compliant AgentCards with embedded DID, controller, and
http-signature-didauthentication scheme - Request Signing — sign outgoing
tasks/send,tasks/getrequests using Agent-DID HTTP Signatures - Request Verification — verify incoming signed requests using the sender's DID
- JSON-RPC Helpers — Pydantic models for A2A JSON-RPC 2.0 messages
- Observability — structured, sanitized event emission for signing, verification, and card generation
- Secure Defaults — sensitive fields redacted, private network targets blocked, extra config fields rejected
Identity Composition Contract
The canonical A2A identity invariant for this repository is documented in RFC-001-A2A-Identity-Composition-Contract.md, co-drafted with APS during Public Review.
The contract defines how two identity surfaces compose:
- Identity-at-rest: the published AgentCard and its DID-published key material.
- Identity-in-motion: the per-request HTTP signature and its
keyid.
An A2A verifier must treat those surfaces as a single trust boundary: the per-request signing key must compose with the AgentCard and DID document key material, and the signing key must be authorized for the operation context described in §6.3 of the contract.
Current integration behavior publishes DID-enriched AgentCards and signs/verifies A2A requests with Agent-DID HTTP signatures. The stricter SDK-level enforcement of §6.3 verification-relationship binding is tracked in issue #34; the umbrella closure work for the composition contract remains tracked in issue #30.
Installation
cd integrations/a2a
python -m pip install -e ".[dev]"
Requires the Python SDK installed in dev mode:
cd sdk-python
python -m pip install -e ".[dev]"
Quick Start
from agent_did_sdk import AgentIdentity, AgentIdentityConfig, CreateAgentParams, InMemoryAgentRegistry
from agent_did_a2a import A2ASkill, create_agent_did_a2a_integration
# Create identity
AgentIdentity.set_registry(InMemoryAgentRegistry())
identity = AgentIdentity(AgentIdentityConfig(signer_address="0x..."))
runtime = await identity.create(
CreateAgentParams(name="MyAgent", core_model="gpt-4.1", system_prompt="...")
)
# Create A2A integration
integration = create_agent_did_a2a_integration(
agent_identity=identity,
runtime_identity=runtime,
)
# Generate AgentCard for /.well-known/agent.json
card = integration.agent_card_json(
agent_url="https://my-agent.example.com",
skills=[A2ASkill(id="task-1", name="My Skill", description="Does something useful")],
)
# Sign an outgoing A2A request
signed = await integration.send_task(
target_url="https://remote-agent.example.com/a2a",
request_id=1,
task_id="task-001",
message={"role": "user", "parts": [{"type": "text", "text": "Hello"}]},
)
# Verify an incoming request
is_valid = await integration.verify_request(
method="POST",
url="https://my-agent.example.com/a2a",
headers=incoming_headers,
body=incoming_body,
)
Examples
| Example | Description |
|---|---|
| a2a_agent_did_discovery.py | Agent publishes a DID-enriched AgentCard |
| a2a_mutual_auth_demo.py | Two agents authenticate each other via DID HTTP Signatures |
Running Tests
cd integrations/a2a
python -m pytest tests/ -q
Full quality gates:
python -m ruff check src/ tests/ examples/
python -m mypy src/
python -m pytest tests/ -q
Architecture
┌─────────────────────────────────────────────────────────┐
│ Agent A (Client) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ AgentDidA2AIntegration │ │
│ │ → build_agent_card() → /.well-known/agent.json │ │
│ │ → sign_request() → Signature + Signature-Input │ │
│ │ → send_task() → signed JSON-RPC POST │ │
│ └─────────────────────┬───────────────────────────┘ │
├─────────────────────────┼───────────────────────────────┤
│ HTTPS + Ed25519 HTTP Message Signatures │
├─────────────────────────┼───────────────────────────────┤
│ Agent B (Server) ▼ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ AgentDidA2AIntegration │ │
│ │ → verify_request() → validate Signature header │ │
│ │ → resolve DID → fetch sender's public key │ │
│ │ → ✓ authenticated → process A2A task │ │
│ └─────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
How It Fits With A2A
This integration uses A2A's authentication extension point. The A2A spec expects an authentication field in the AgentCard with one or more schemes. Agent-DID adds http-signature-did as a scheme, meaning:
- The AgentCard declares the agent's DID and authentication key
- Outgoing requests include
SignatureandSignature-Inputheaders per IETF HTTP Message Signatures - The receiving agent resolves the sender's DID to obtain the public key
- Signature verification proves request authenticity and integrity
This approach is complementary to OAuth 2.0, mTLS, or any other A2A auth scheme — agents can support multiple schemes simultaneously.
License
Metadata
Release files for agent-did-a2a 1.0.0rc1
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_did_a2a-1.0.0rc1.tar.gz | 17.0 kB | With provenance | Details for agent_did_a2a-1.0.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_did_a2a-1.0.0rc1-py3-none-any.whl | Python 3 | none | any | Details for agent_did_a2a-1.0.0rc1-py3-none-any.whl |
Total release size: 31.4 kB
Release files / agent_did_a2a-1.0.0rc1.tar.gz
| Download URL | agent_did_a2a-1.0.0rc1.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
106adb21a82388873ce9d394cff84c1cf846ba47325c481937c01a6d4abb74bc
|
|
BLAKE2b-256 checksum How to use checksums |
58b56f75e8dce15095f6580f59056a3bc8755f80f126c3a00cbd4bd8b4636b24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 1, 2026.
Transparency logRelease files / agent_did_a2a-1.0.0rc1-py3-none-any.whl
| Download URL | agent_did_a2a-1.0.0rc1-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
114ce2629094119a49040d319d45390cf6fb8b469e442d40dbaf55c74069420d
|
|
BLAKE2b-256 checksum How to use checksums |
ded8ddb0b9afe628dcd6a6667c8fb11629304caaf98f78b6374006387447e9b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 1, 2026.
Transparency logSecurity for agent-did-a2a 1.0.0rc1
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 agent_did_a2a-1.0.0rc1.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 Nov 1, 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.