kkcolbchain

switchboard.

The open substrate for AI agents to pay each other. HTTP-402 paywalls, on-chain escrow, ZAP binary wire, and a post-quantum signed envelope — so the agent-payment rails outlive the classical-crypto era.

01Why this exists

Every AI agent that wants to call a paid API or hire another agent today rolls its own payment plumbing — JSON over HTTP, Stripe meters, custom RPC paywalls, ad-hoc ETH transfers. That collapses the moment two agents from different teams need to settle on the fly. Switchboard is the shared payment substrate; agents speak whichever rail fits the job, and the protocols are auditable and open source.

One substrate, every rail

Same library handles HTTP-402, on-chain escrow, multi-party micropayments, native ETH, and stablecoin settlement. Switch rails per call; no rewrite when the merchant changes its mind.

Post-quantum from day one

An application-layer PQ signature sits on every PaymentOffer and PaymentProof. Hybrid mode pairs ECDSA + ML-DSA-65 for migration. Receivers verify before paying.

Trust-minimized escrow

AgentEscrow.sol with timeout + challenge period. Funds lock in code; release on confirm; refund on silent counterparty. The on-chain primitive every higher-level pattern composes on top of.

Open + forkable

MIT-licensed. The interactive lab is a single static HTML file, no build, ~150 lines per scene. SCENES.md is a template; dev contributions are wanted.

02See it run

16 animated scenes from protocol primitives to real-world use cases. Each one captioned beat-by-beat, with a transport bar to step through events, glass-styled controls, light + dark themes, and a scene template so contributors can add their own in ~150 lines.

live · hover an agent for informatics · transport: ⏸ play/pause   ⏭ step   ↻ restart

03Scenes

Three groups, sixteen scenes. Most are tied to a piece of the protocol; some illustrate real-world flows.

PRIMITIVE · 01

HTTP-402 paywall

Bob calls Eli's endpoint cold, gets 402 + accepts[], signs X-Payment-Proof, retries.

x402HTTP
PRIMITIVE · 02

Escrow + refund

Happy path + refund path side-by-side. Block counter; payee silent past challenge → reclaim.

AgentEscrow.sol
PRIMITIVE · 03

Streaming micropays

Budget-capped session; 0.02 USDC per chunk; auto-close at cap. The MPP pattern.

MPP
PRIMITIVE · 04

AI compute auction

RFQ fan-out, signed bids, lowest-valid wins, escrow-settled. Three preset scenarios + live sliders.

auctionescrow
PRIMITIVE · 05

Human-in-the-loop

HITL wallet gates spends above threshold. Approve button materializes; sub-threshold auto-pays.

HITLpolicy
PRIMITIVE · 06

Treasury rebalance

Fina fans out top-ups to a fleet of agentic wallets when they drop below floor.

treasury
PRIMITIVE · 07

On-chain oracle pull

Signed price quotes pay-per-query. Receivers verify signature before paying.

oraclesigned-data
META · 08

PQ-signed envelopes

The post-quantum proposal animated: ML-DSA-65 + hybrid mode, signing, verifying, strict-mode reject.

ml-dsa-65RFC
META · 09

Repo coexistence

Switchboard's place in the stack: zap, x402, gas-oracle, scout, arka, AgentEscrow.

composition
USE CASE · 10

Taxi handover

Patty's agent RFQs Dispatch, validates Sai's signed quote, escrow lock, GPS handshake, ride A→B, release.

marketplaceanimated
USE CASE · 11

Café walk-by

Patty walks past Work-In-Progress (Siolim); her agent pre-orders. Cup ready when she arrives.

proximityx402
USE CASE · 12

Food delivery

Order from Tridib's Eat Pray Love (Siolim). Escrow splits payout: 80% on pickup, 20% on delivery.

multi-party
USE CASE · 13

Split bill

Four friends, one tab. Each agent computes its share against the signed receipt and pays simultaneously.

fintech
USE CASE · 14

Native ETH escrow

0.05 ETH inference job via createPayment{value:} — no ERC-20 dance, every EVM chain.

ETHcross-chain
USE CASE · 15

Subscription

Recurring auto-pay under a monthly cap. Cancel = revoke the cap; no merchant cooperation needed.

recurring
USE CASE · 16

Multi-city trip

Tokyo → LA → Goa → London → Dubai. Patty + Abhi ride the plane visibly; agent handles taxis, flights, hotels with rolling escrow; delay branch fires a rebook fee against the same budget.

rolling-escrowanimated

04RFC: post-quantum signed envelopes

DESIGN DRAFT v0.1 · MERGED

Pay verifiable, before settlement

Switchboard's A2A payment protocol v1.0 ships unsigned at the application layer; authenticity rides on TLS + ECDSA-signed tx hashes. Receivers can only verify a payment after the chain confirms a tx_hash. And the whole stack inherits the classical-crypto assumption — no Shor, no harvest-now-decrypt-later.

The RFC adds an application-layer post-quantum signature on the envelopes themselves. Algorithm registry, domain-separated SHAKE-256 transcript, ZAP + dataclass wire additions, hybrid mode (ECDSA + ML-DSA-65), threat model, migration plan v1.1 → v2.0.

Read the RFC · Meta tracker #33

05What composes

Switchboard isn't standalone. Real data-flow seams across the kcolbchain stack.

zapwire
x402HTTP spec
gas-oraclebudget signals
scoutcounterparty intel
arkaRust SDK consumer
AgentEscrowsettlement

Ship a scene. Open a PR.

Lab is intentionally fork-and-extend friendly. ~150 lines per scene; template in SCENES.md.