Skip to main content

AgentOath bridge for Google A2A (Agent-to-Agent) protocol -- embed trust receipts in A2A interactions.

Project description

AgentOath A2A Bridge

AgentOath trust protocol extension for the Google A2A (Agent-to-Agent) protocol.

Embeds verifiable identity, trust scores, and signed receipts into A2A agent communication, adding cryptographic trust to inter-agent interactions.

Features

  • Agent Card Extension -- Add AgentOath identity (DID, public key, trust score) to A2A Agent Cards
  • Task Handler -- Automatically sign trust receipts when A2A tasks complete or fail
  • Trust Headers -- Sign and verify HTTP headers for A2A requests
  • ASGI Middleware -- Drop-in middleware for A2A servers (FastAPI, Starlette, etc.)

Quick Start

pip install agentoath-a2a

Extend your Agent Card

from agentoath import TrustAgent
from agentoath_a2a import AgentCardExtension

agent = TrustAgent.load("my_agent.json")
ext = AgentCardExtension(agent)

card = {
    "name": "My Agent",
    "description": "An AI assistant",
    "url": "https://myagent.example.com",
}
card = ext.extend_agent_card(card)
# card now has extensions.agentoath with DID, public_key, trust_score

Automatic receipts on task completion

from agentoath_a2a import TrustTaskHandler

handler = TrustTaskHandler(agent)

# When an A2A task completes:
receipt = handler.on_task_completed(task, remote_agent_did="did:trust:agent:...", rating=8)

Trust headers for HTTP requests

from agentoath_a2a import TrustHeaderSigner, TrustHeaderVerifier

# Sign outgoing request
signer = TrustHeaderSigner(agent)
headers = signer.sign_headers(method="POST", path="/tasks/send")

# Verify incoming request
verifier = TrustHeaderVerifier()
result = verifier.verify_headers(headers, "POST", "/tasks/send", public_key=remote_agent.public_key)

ASGI Middleware

from agentoath_a2a import AgentOathA2AMiddleware

app = AgentOathA2AMiddleware(app, agent=agent, known_agents={...})

Development

pip install -e ".[dev]"
pytest

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentoath_a2a-0.1.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentoath_a2a-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file agentoath_a2a-0.1.0.tar.gz.

File metadata

  • Download URL: agentoath_a2a-0.1.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for agentoath_a2a-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9fdeafa13d3aa1845f45851acb731729ceb5e47fba611480f45ae70fc011f28d
MD5 a0a3ad1e22b5bdafa83dfdd08f2cc154
BLAKE2b-256 c670548ffeacd99edc5f8217f702115485d88353cbf245cddb097aff88bd8fb0

See more details on using hashes here.

File details

Details for the file agentoath_a2a-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentoath_a2a-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for agentoath_a2a-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbb1a8623e2c004634f6e67669bbac9a8b6d2e91b1c3f0fe8f7a97341209a432
MD5 3da11650f887275c6520bf51bd05ce78
BLAKE2b-256 11601dd8bd6cb8a636c41367c6f1357ef13a878adc8cce9c6b1d6c99e2fc6c76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page