Payments

An agent can pay for things on your behalf — a paywalled fetch, a metered API — from a wallet you link with a passkey. You hold the wallet, you approve each spend, and every payment settles onchain with a receipt.

How it works

Some requests answer 402 Payment Required. When the agent hits one, it settles the charge and returns the body plus a receipt. The money comes from your wallet — one you link once, held by your passkey, never by the agent. Signing happens only on the trusted control plane; the sandbox that runs the turn holds no keys.

Four things are always true of a payment:

sandboxHarnessrun_turn · holds no keyUpstream serviceanswers 402Key custodydelegated keyControl planethe only signerHumanapprovesYour walletpasskey · your fundsSettlementTempo networkEvent logsigned receiptGET402paid_fetchapprove?approvedresolve keyauthorizesign + settlereceipt
unary callstreamasync / eventual

Ask to link a wallet and you get a one-time link. Open it on your device, approve with a passkey, and you're set — the agent can now pay from that wallet, within the limits the key carries. Only a non-secret reference to the key is stored against your persona; the key material never leaves your device, and the agent never sees it.

On a testnet deployment, a freshly linked wallet is funded automatically so it can cover the small onchain fee its first payment needs. Just ask:

you:    link a wallet
agent:  Here's a secure link to set up your spending wallet: …
        (open it, approve with your passkey, done)

Check and manage your wallet

The wallet tools answer in plain language and cost nothing to run — they read your own wallet, they never move money. Ask naturally; the agent reaches for the right one.

Ask forWhat you get
"what's my wallet / balance / am I linked?"Your wallet's address, whether it's linked and ready to pay, its balance, and the network — a free read, never a payment
"what have I spent / show my payments"Your payments in this conversation: amount, settlement reference, a verified explorer link, and when each settled
"link a wallet"A fresh one-time link to set up or replace your spending wallet
"unlink my wallet / stop using it"Removes your wallet so the agent can no longer pay from it — reversible, link again anytime
"list everyone's wallets" (admins)Who has taken part in this conversation and whether each has linked a wallet — available to an admin only; everyone else sees just their own

A payment tool is for buying something; these are for looking after the wallet itself. Asking "list my wallet" never spends money.

What keeps it safe

The wallet is non-custodial: your passkey authorizes a scoped, expiring key that can only make the kind of small settlement payment the agent needs, and you can revoke it at any time. Enforcement is layered, so no single check is load-bearing:

Configuration

Payments are off until a deployment configures them. The settlement network and wallet-link surface are the main knobs:

EnvWhat it does
TEMPO_RPC_URLSettlement network endpoint the control plane signs and reads balances against
POLYCHROME_WALLET_KEYS_DIRLocal directory that holds each linked wallet's delegated signing key. Optional: set it for a filesystem deployment, or leave it unset in-cluster to keep each key in its own Kubernetes Secret automatically
POLYCHROME_WALLET_LINK_URLPublic base URL of the wallet-link page the one-time card points at
TEMPO_TESTNET_FAUCETTestnet only: auto-fund a freshly linked wallet so its first payment can cover the onchain fee. Off by default; never set on mainnet
TEMPO_CURRENCY, TEMPO_CURRENCY_DECIMALSSettlement-token contract and its decimal scale, for amounts and balances

The wallet tools are built-in, so an agent scoped to an explicit tool set needs wallet_status, wallet_history, wallet_link, wallet_unlink, and wallet_roster in its allowlist to offer them.