Skip to content

[innovation] .well-known/agent-payment.json — discoverable agent identity hub #42

@Pattermesh

Description

@Pattermesh

The gap. Switchboard's PQ envelope (#33) gives a receiver verifiable authenticity after they have the sender's public key. But there's no answer to "where do I get an agent's public key in the first place?" Today this is solved out-of-band — Discord DMs, REST endpoints, copy-paste. That doesn't scale to cross-org agent-to-agent commerce.

The proposal. A signed JSON document served from https://<host>/.well-known/agent-payment.json that any agent fetches once and caches. Open standard, no central registry, no new infrastructure.

{
  "version": "1.0",
  "agent_id": "did:web:abhi.dev",            // optional
  "identities": [
    { "kind": "ml-dsa-65",  "pubkey": "base64..." },
    { "kind": "ecdsa-secp256k1", "pubkey": "0x04..." }
  ],
  "protocols": ["x402", "MPP", "ZAP", "escrow"],
  "rails": [
    { "chain_id": 8453, "address": "0x...", "currencies": ["USDC","ETH"] },
    { "chain_id": 1,    "address": "0x...", "currencies": ["USDC"] }
  ],
  "rate_card": {
    "endpoints": [
      { "path": "/v1/infer", "price_usdc": "0.001", "scheme": "exact" }
    ]
  },
  "expires_at": 1734567890,
  "signature": "base64...",                    // PQ sig over the rest
  "signature_alg": "ml-dsa-65"
}

Innovation: the file is PQ-self-signed — the signature inside .well-known/agent-payment.json is verified against the public key declared inside the same document. First fetch is trust-on-first-use; subsequent fetches verify against the cached identity. This makes the file a portable identity primitive — no DNSSEC, no CA, no chain lookup.

Deliverables

  • Spec section in docs/agent-payment-protocol.md (probably §12)
  • switchboard/discovery.pyfetch_identity(host) → Identity with HTTP caching, ETag handling, and signature self-verification
  • Reference implementations for the existing scenes — the café (Work-In-Progress) and the multi-city trip can use this for the proximity ping → menu handshake
  • CLI: switchboard well-known <host> validates a remote file
  • Tests: round-trip serialize/parse, signature verification, expiry handling, ETag respect

Composes with

cc @abhicris

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions