Agent Auth for x402
Agents are beginning to pay for API calls, data, and services through machine-to-machine protocols such as x402. Programmable wallets can protect keys and enforce transaction-level rules. They do not usually know which task authorized a payment, which tool initiated it, or how that payment affects the task’s aggregate budget.
Agent Auth for x402 is open-source authorization middleware that connects payments to trusted agent tasks. Before the configured wallet signs, it checks the actual payment against a short-lived task grant, resource scope, deterministic policy, and budget. Payments outside that authority are denied or escalated for approval, with evidence linking the task, decision, signature, and outcome.
The technical preview supports x402 exact payments using USDC on Base. It works with the official x402 client and is designed to complement—not replace—wallet-native security. If you are building agents that spend money, you can try the package, contribute, or help shape the broader agent-authorization platform.
- What the package adds. Signed, short-lived task grants issued outside the model’s control; scopes for agent, tool, method, domain, path, recipient, network, asset, amount and task total; budget reservations before signing; single-use permits bound to the exact payment; an optional permit-bound remote signer so the agent never holds wallet credentials.
- What stays where it is. x402 owns requirement selection, payment payloads, headers and retries. The wallet owns keys, simulation, allowlists, MFA and quorum approval. The merchant, facilitator and network own verification and settlement. Wallet-native policy stays switched on as the final loss boundary.
- Where it stands. Not production-ready. In library-only mode the middleware blocks signing in the configured client but cannot stop a compromised process from using another signer; that needs the gateway deployment. The local demo runs against a fixture merchant and does not settle on-chain. x402 is the first adapter; the grant, policy, permit and evidence model is protocol-neutral.