Skip to content

[help wanted] a2a-x402 adapter for switchboard transport #29

@abhicris

Description

@abhicris

What

Build a switchboard.adapters.a2a_x402 Python module that translates switchboard's binary-wire PaymentOffer / PaymentProof envelopes to and from the JSON shape used by google-agentic-commerce/a2a-x402 — Google's A2A + x402 bridge for agentic commerce. The adapter round-trips both directions: a switchboard agent should be able to satisfy an a2a-x402 payment challenge, and an a2a-x402 caller should be able to drive a switchboard-managed endpoint.

Why

Switchboard's transport (PR #21) is a tight binary envelope — it doesn't speak JSON-over-HTTP out of the box. a2a-x402 is the emerging Google-backed JSON protocol for agent-to-agent payment metadata layered over x402. The two formats encode the same idea (payment requirement → signed payment proof) but neither side will adopt the other's wire format. The fix is a thin Python adapter under switchboard.adapters.* plus a round-trip integration test against the a2a-x402 reference flow.

Scope

  • switchboard/adapters/a2a_x402.py exposing to_a2a_request(offer: PaymentOffer) -> dict and from_a2a_response(payload: dict) -> PaymentProof.
  • Round-trip pytest using a fixture taken from the a2a-x402 repo's examples/ flow — start the reference server in a fixture, drive it from a switchboard client, assert the proof verifies.
  • docs/adapters/a2a-x402.md walking through one end-to-end call.
  • No changes outside switchboard/adapters/* and docs/adapters/*.

Paid-project channel

This is in our paid-project queue. If you open a credible draft PR we'll talk paid contribution via our contributor page. There is no direct repo bounty on this issue — the contributor page explains how payouts actually work.

Receipts to read first

Out of scope

  • Multi-chain settlement logic — the adapter is pure encoding/decoding.
  • Non-Python adapters (TS / Go) — separate issues if/when needed.
  • Anything outside switchboard.adapters.* and its docs.

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