Sardis

A2A Protocol

Agent-to-Agent (A2A) — Google-developed multi-agent communication protocol for payment coordination, capability discovery, and cross-agent financial messaging.

Agent Cards

Agents publish their capabilities at /.well-known/agent-card.json:

{
  "name": "Shopping Agent",
  "url": "https://agent.example.com",
  "capabilities": [
    "payment.execute",
    "checkout.create",
    "mandate.ingest"
  ],
  "payment": {
    "tokens": ["USDC", "USDT"],
    "chains": ["base", "polygon"],
    "protocols": ["AP2", "x402"]
  }
}

Message Types

TypeDescription
PAYMENT_REQUESTRequest payment execution
PAYMENT_RESPONSEPayment result with tx_hash
CREDENTIAL_REQUESTVerify credentials/mandates
CHECKOUT_INITIATEStart UCP checkout

Python

from sardis import SardisClient

async with SardisClient(api_key="sk_...") as client:
    # Discover agent
    agent = await client.a2a.discover_agent(
        "https://merchant-agent.example.com"
    )

    # Send payment request
    response = await client.a2a.send_payment_request(
        recipient_url=agent.url,
        amount_minor=5_000_000,
        token="USDC",
        chain="base",
    )
    print(f"Payment: {response.tx_hash}")

MCP Tools

ToolDescription
sardis_discover_agentDiscover agent capabilities
sardis_get_agent_cardGet agent card
sardis_send_messageSend A2A message
sardis_request_paymentRequest payment from agent