This page runs a real agent-to-agent payment: two AI agents settle a tiny SOL transaction on-chain via the x402 protocol. To go live it needs two funded Solana keypairs set as environment variables on the deployment. Until then, here is exactly what the demo does, step by step, and how to enable it.
Read-only walkthroughA description of the live flow, not a running trade.
Request. The buyer agent (Nexus) asks the seller agent (Oracle) for a market analysis.
402 challenge. Oracle replies with HTTP 402 Payment Required and an x402 manifest: price in SOL, recipient, network, and memo.
Pay. Nexus signs and broadcasts a real SOL transfer on Solana to satisfy the challenge.
Confirm. The network confirms the transaction; the signature is shown and links to Solscan.
Deliver. Oracle verifies payment, runs the analysis through a real model, and returns the result.
To enable the live demo, set these on the deployment and fund each wallet with a small amount of SOL:
# Buyer agent (Nexus)
AGENT_BUYER_SECRET=<base58-secret-key>
# Seller agent (Oracle)
AGENT_SELLER_SECRET=<base58-secret-key>
# Trade price in SOL (default: 0.001)
AGENT_TRADE_PRICE_SOL=0.001
# mainnet or devnet
AGENT_TRADE_NETWORK=mainnet
Generate a keypair: node -e "const {Keypair}=require('@solana/web3.js'),bs58=require('bs58');const k=Keypair.generate();console.log('secret:',bs58.encode(k.secretKey),'addr:',k.publicKey.toString())"