agentity-a2a
A2A (Agent-to-Agent) protocol plugin for Agentity. Sign and verify inter-agent communication using the Agentity identity layer — enabling scoped, auditable agent-to-agent requests.
Installation
pip install agentity-a2a
Usage
import asyncio
from agentity_a2a import A2AClient
async def main():
# Create an A2A client with Agentity identity
client = A2AClient()
print(f"Agent DID: {client.agent_did}")
print(f"Scopes: {client.agent_scope}")
# Send a signed A2A request
result = await client.send_request(
url="https://api.agent-service.com/agent/message",
method="POST",
body=b'{"type": "task", "payload": "..."}',
)
print(f"Status: {result['status']}")
print(f"Body: {result['body']}")
asyncio.run(main())
Custom keypair and identity
from agentity_sdk import AgentKeyPair
from agentity_a2a import A2AClient
kp = AgentKeyPair()
aid = kp.create_identity(
owner_did="did:agentity:human:alice",
scopes=["a2a:agent:send", "a2a:message:receive"],
ttl_days=30,
)
client = A2AClient(keypair=kp, identity=aid)
Default scopes
When no identity is provided, A2AClient auto-creates one with scopes:
a2a:agent:senda2a:message:receive
API
| Method / Property | Description |
|---|---|
A2AClient(keypair?, identity?) |
Create client, auto-generates identity if omitted |
async send_request(url, method, body?) |
Send signed A2A HTTP request |
.agent_did |
The agent's DID string |
.agent_scope |
The agent's scope list |
License: Apache 2.0
Metadata
Release files for agentity-a2a 0.1.1
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 | |
|---|---|---|---|---|
| agentity_a2a-0.1.1.tar.gz | 2.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentity_a2a-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / agentity_a2a-0.1.1.tar.gz
| Download URL | agentity_a2a-0.1.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f18bc27ac6b1b7f4558297f1156ade1e04d1b19463e9b2a50aab66ac9149c3f2
|
|
BLAKE2b-256 checksum How to use checksums |
7218a7cd4063bcad8889c1269b3c7a19f5c753990e6082f5dfae46ea6964ba3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / agentity_a2a-0.1.1-py3-none-any.whl
| Download URL | agentity_a2a-0.1.1-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83f77e69cf813e23e8e44de1ade0eb92b1cd5cec26408f0a9249e789eb8acfda
|
|
BLAKE2b-256 checksum How to use checksums |
ba508a8be419088ad3a83b87dbf90b6fa2930b7c3c81963906a0dbcdb35ca5bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for agentity-a2a 0.1.1
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.