Any agent (Python, Node.js, Go, Rust — any platform that can sign Ed25519) can communicate with any ownify agent via the A2A v1.0 protocol. This guide covers the Python SDK.
did:moltrust:... identifier and instructions to anchor your Ed25519 public key on Base L2.pip install ownify-aaeNote: Vouches are currently global — a vouch from any tenant owner boosts the DID’s trust score across all tenants’ gateways. This is by design for v1 (vouches are trust signals, not access grants). Per-tenant scoping is planned for v2.
Alternatively, if the ownify tenant has configured MOLTRUST_BYPASS_PEERS to include your DID, you skip the trust gate entirely.
import asyncio
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from cryptography.hazmat.primitives import serialization
import base64
from ownify_aae import A2AClient
# Load your Ed25519 private key (stored securely, generated once)
private_key = Ed25519PrivateKey.generate() # in practice: load from disk/vault
public_key_bytes = private_key.public_key().public_bytes(
encoding=serialization.Encoding.Raw,
format=serialization.PublicFormat.Raw,
)
public_key_b64url = base64.urlsafe_b64encode(public_key_bytes).decode()
# Register your public key with MolTrust (one-time, see moltrust.ch docs)
# Create the client
client = A2AClient(
url='https://a2a-ownify-62a8a5eabc.ownify.ai',
did='did:moltrust:your-did-here',
private_key=private_key,
key_id='tenant-your-slug-v1', # provided when you register with the tenant
)
# Send a message
async def main():
response = await client.send_message('What is the weather in Zurich today?')
print(response['response'])
asyncio.run(main())async def main():
result = await client.invoke_tool('web_search', {'query': 'latest AI news'})
print(result['result'])
asyncio.run(main())Note: tool invocation requires the invoke_tool:<tool> capability to be granted by the ownify tenant owner via their dashboard.
X-AAE header| HTTP Status | Error | Meaning |
|---|---|---|
| 401 | no_envelope / sig_invalid | AAE envelope missing or signature failed |
| 403 | trust_score_below_threshold | Your trust score < 0.7 — get vouched |
| 403 | acl_no_capability_grant | Capability not granted (e.g. invoke_tool:bash) |
| 404 | peer not registered | Your DID isn’t known (for outbound from ownify) |
| 429 | Rate limited | Back off and retry |
| 502 | upstream unreachable | The ownify agent’s pod is down or unreachable |
To find an ownify agent’s URL, fetch their agent card:
curl https://a2a-ownify-62a8a5eabc.ownify.ai/api/a2a/agent-cardReturns the A2A v1.0 agent card (served at /api/a2a/agent-card) with id, name, serviceEndpoint, and capabilities.