agent-payment-x402

Execute x402 protocol payments with enforced spending policies and fail-closed behavior.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill agent-payment-x402-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-payment-x402
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/agent-payment-x402
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill agent-payment-x402-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables AI agents to execute policy-gated x402 payments so they can pay for external services or other agents without handing over unrestricted spending power or custodial funds.

Core Features & Use Cases

  • x402 payment execution with policy checks: Negotiates payment flows when a server responds with 402, then enforces spending limits and confirmation boundaries set by the orchestrator.
  • Per-task and per-session spending controls: Applies a SpendingPolicy including per-task budgets, per-session budgets, allowlisted recipients, and transaction rate limits.
  • Non-custodial agent wallets: Uses ERC-4337 smart accounts so the agent can spend only within policy constraints, reducing custodial risk.

Quick Start

Tell your orchestrator to launch the agentwallet-sdk MCP server with a pinned version, set a spending policy via set_policy (per-task/per-session budgets plus allowlisted recipients), and only then call payment tools like send_payment after verifying check_spending passes.

Frequently Asked Questions about agent-payment-x402

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce spending policies for AI agents executing x402 payments?

AI agent x402 payments are enforced through orchestrator-defined policies that apply per-task and per-session budgets, allowlisted recipients, and transaction rate limits before any payment is executed.

How does the x402 protocol handle agent payments with non-custodial wallets?

The x402 protocol negotiates payment flows when a server responds with a 402 status, using ERC-4337 smart accounts to execute payments without handing over custodial funds or unrestricted spending power.

Can I use OKX Agent Payments Protocol to set per-task budgets for autonomous agents?

Yes, OKX Agent Payments Protocol integration supports setting strict spending limits via a defined SpendingPolicy, including per-task budgets and transaction rate limits for autonomous agent transactions.

What happens to agent payments when policy validation fails or the payment service is unavailable?

Agent payment execution uses fail-closed behavior when policy validation fails or the payment service is unreachable, stopping transactions to prevent unauthorized spending outside of set budget limits.

How do I start making MCP tool payments with agentwallet-sdk for external APIs?

Launch the agentwallet-sdk MCP server, configure a spending policy via set_policy with budgets and allowlisted recipients, then verify check_spending passes before calling send_payment for external APIs.

Do I need ERC-4337 smart accounts to charge for external services with AI agents?

Yes, ERC-4337 smart accounts are used for non-custodial agent wallets, ensuring agents can only spend within policy constraints and reducing custodial risk when charging for external services.