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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agentity_a2a-0.1.1.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentity_a2a-0.1.1.tar.gz.
File metadata
- Download URL: agentity_a2a-0.1.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f18bc27ac6b1b7f4558297f1156ade1e04d1b19463e9b2a50aab66ac9149c3f2
|
|
| MD5 |
50d6a4ec7b61843408742846996d2831
|
|
| BLAKE2b-256 |
7218a7cd4063bcad8889c1269b3c7a19f5c753990e6082f5dfae46ea6964ba3d
|
File details
Details for the file agentity_a2a-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentity_a2a-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83f77e69cf813e23e8e44de1ade0eb92b1cd5cec26408f0a9249e789eb8acfda
|
|
| MD5 |
ba8b5f4ddef0e0568a001c4574d3b4f5
|
|
| BLAKE2b-256 |
ba508a8be419088ad3a83b87dbf90b6fa2930b7c3c81963906a0dbcdb35ca5bc
|