Zero-Trust Payment Firewall for Autonomous AI Agents on Casper

x402 is the payment rail. AgentPay Guard is the authorization layer. Deterministic policy checks run before signing, and protected data is released only after independently verified settlement.

Open Judge ModeRun Interactive Demo

Verified Testnet Payment

VERIFIED

One real policy-authorized native-CSPR payment. Premium data was released only after independent Casper RPC verification.

transaction801d558b18be546ebe18ff884541d451428dacc92e17c8a6c6a33df4d8b4440fnetworkcasper-testamount2.5 CSPRpayera25198a08bcaa9a861edc88db374123469a1349cf2a55e3529a3e4430efcce13payee public key01e16a6a8992000821589fc26d00bc63c1c06e636765e27bba3b8df99f302c8ec6payee account hash40ccfcd1c883b9b6241dc73dba2c13e852b9ea859bc50c244dbb940f63f297b4block height8510676executionsucceededpayment responseverifiedverified2026-07-15T09:03:06.514Zpremium resourcereleased after verificationGit commitf313893a149ac3e37903d99d0a68b6bd1f7e981c

Signing ran locally with a dedicated Testnet key. The hosted Vercel app never loads private keys or initiates spending. The Odra proof recorder is a separate existing on-chain proof path.

Three Judge Scenarios

ALLOW

Allowed payment

The hosted deterministic scenario shows policy ALLOW. The separate card above is public evidence of the real Testnet settlement.

DENY

Prompt-injection attack

Policy denial stops the signer. No transaction is constructed or submitted.

REJECTED

Replay attack

A consumed transaction cannot authorize another request, and no premium response is released.

How It Works

1. Agent calls protected API

An autonomous AI agent requests premium data from a protected resource.

2. API returns HTTP 402

The server responds with a PaymentRequirement — amount, merchant, requestHash, and expiry.

3. Agent pays under policy

The agent checks its spending policy (merchant allowlist, per-payment max, total budget) and authorizes exactly one request-bound payment.

4. Receipt unlocks premium data

The real local Testnet path reconstructs authorization, verifies its signature, confirms TransactionV1 through RPC, and only then returns premium data. Hosted scenarios remain deterministic demos.

Quick Links

View PoliciesView PaymentsView MerchantsAudit Trail
Hosted interactive scenarios use deterministic demo state. The verified payment card above is separate public Casper Testnet evidence.
MCP judge demo: pnpm demo:mcp:judge