Codester demo · Scripts & Code → Python
x401 agent identity gateway: signed proof of which agent is asking, plus a wallet where a human approves its actions.
The pause is the product. When an agent asks for proof, the wallet shows the person exactly what is being approved — which agent, which merchant, what ceiling — before anything is signed. This is a captured snapshot of the wallet's real approval page from a live demo run (buttons are inert in the snapshot).
The package's runnable demo: a merchant (verifier), an agent CLI, and the wallet. The agent fetches the challenge, hands it to the wallet, the approval is granted, and the agent retries with signed proof. Real output from the demo orchestrator (auto-approve mode, so no human had to click).
$ python3 -m demo.run_demo --auto-approve
x401-gateway demo (backend: real wallet; real x401 (10/10 modules))
wallet: http://127.0.0.1:8071 (device issuer x401-wallet:JcmhlSkS0KhxzqE0, kid JcmhlSkS0KhxzqE0)
merchant: http://127.0.0.1:8072 (charge USD 49.99)
================================================================
ACTION REQUIRED — open this URL to approve as the person:
http://127.0.0.1:8071/approve/appr-2OR7zPPfwAzm0AXe
================================================================
auto-approved via POST /api/approve/appr-2OR7zPPfwAzm0AXe (HTTP 200)
approved; retrying the merchant ...
HTTP 200
{"granted": true, "scheme": "x401", "version": "0.2.0", "request_id": "demo-purchase-v1-DhvA_5Ys", "mandate": {"issuer": "x401-wallet:JcmhlSkS0KhxzqE0", "agent_id": "demo-agent/1", "merchant": "https://merchant.demo", "action": "purchase", "ceiling": {"currency": "USD", "value": "100.00"}}, "charge": {"currency": "USD", "value": "49.99"}}The PROOF-RESULT the demo merchant returned after approval — the agent's mandate (charge up to USD 100.00 for this merchant) and the USD 49.99 charge it covered.
{
"granted": true, "scheme": "x401", "version": "0.2.0",
"request_id": "demo-purchase-v1-DhvA_5Ys",
"mandate": {"issuer": "x401-wallet:JcmhlSkS0KhxzqE0", "agent_id": "demo-agent/1",
"merchant": "https://merchant.demo", "action": "purchase",
"ceiling": {"currency": "USD", "value": "100.00"}},
"charge": {"currency": "USD", "value": "49.99"}
}Screenshots shipped inside the Codester package.
