AI agents pay USDT within on-chain budgets, with human approval for larger payments

How do you let an AI agent buy something on your behalf and still decide how much it can spend? With Countersign, you give the agent a spending mandate. You choose its budget, which merchants it can pay, and when it needs your approval. A smart contract enforces those rules when USDT moves.
In our Whitechain Sepolia demo, an agent paid 0.50 USDT for an API resource on its own. A 1.50 USDT purchase reached the approval threshold and paused until the owner signed in through the World ID Agent Pass sandbox and approved that exact payment with their wallet. We also tested a stale sign-in, which the system rejected before any transaction was sent.
The agent held zero USDT and zero WBT throughout. It signed the payment terms, the relayer paid for gas, and the merchant received USDT directly from the owner’s wallet. The agent’s ENSv2 name, "agent1.countersign.eth", publishes its endpoint and spending policy. The app compares supported policy records with the live Whitechain mandate and flags discrepancies.
The agent signs an EIP-712 intent for an exact amount, merchant, and order. Our Solidity "Mandate" contract checks that signature againhe owner’s spending rules and verifies the merchant’s payout address through "MerchantRegistry". It checks the nonce, order ID, expiry, and mandate epoch to block replay and reject outdated approvals. If the checks pass, the contract transfers USDT from the owner’s allowance directly to the merchant on Whitechain Sepolia.
For payments at or above the approval threshold, our Node.js API starts a fresh World ID Agent Pass sandbox sign-in using OIDC and PKCE. It checks the token’s signature and freshness server-side and confirms the World account belongs to the owner bound to the mandate. A separate attestor then signs the approval. The contract requires both the attestor and the owner to sign off on the same payment.
We built GasGuard because sponsoring transactions gives the relayer its own budget to protect. It simulates each payment, sponsors only the Mandate’s "pay" function, and reserves gas against per-mandate and global budgets in SQLite before broadcasting. After three confirmations, the chain observer marks the payment settled. The merchant SDK handles payment requests and signed webhook verification, and the Next.js app provides the approval page and receipts.
On ENSv2, we gave "agent1.countersign.eth" its own "PermissionedResolver". The agent can update its ENSIP-26 endpoint and context records, while the owner controls the spending policy records. The app reads both testnets live to check whether the published policy matches the contract that enforces it.

