What does this skill do?

The x402 Payments for AI Agents Skill enables artificial intelligence agents to execute payments autonomously and securely using the x402 HTTP protocol. It sets budgets per task or session, controls spending with strict policies, and operates with non-custodial wallets using ERC-4337 smart contracts on networks such as Base and X Layer.

Payments to Protected APIs
Allows the agent to automatically pay for the use of external APIs protected by an HTTP 402 error.
Transactions Between Agents
Settle services or transactions with other independent agents without human intervention.
Budget Control
Set strict spending limits per task or per session before authorizing any payment.
Non-custodial wallets
Manage payments using ERC-4337 smart contracts without relinquishing custody of the funds.

Usage examples

💳 API Payment
My agent needs to use an API protected by an HTTP 402 error that costs $0.05 per call. Set up the spending policy and process the payment.
💰 Budget per task
Set a maximum budget of $2 per task for the agent and check how much is left before each transaction.
🤖 Payments between agents
Configure the agent so that it can settle transactions with another autonomous agent on Base using a non-custodial ERC-4337 wallet.
📋 Expense Audit
Displays the complete history of transactions made by the agent during this session, including recipients and amounts.

Features

HTTP x402 Protocol Native support for conditional payments using the HTTP 402 standard in AI agents.
Configurable spending policies Use `set_policy` to define per-task budget, session budget, allowed addresses, and rate limits.
ERC-4337 Non-Custodial Wallets Trade using smart contracts without relinquishing custody of your funds through the ERC-4337 standard.
Multi-network support Compatible with Base via agentwallet-sdk and with X Layer via OKX Agent Payments.
Fail-closed audit Transaction logging in post-task hooks and automatic rollback if the policy is violated or the service is unavailable.

Frequently asked questions

It supports Base via agentwallet-sdk and X Layer via the OKX Agent Payments protocol. Both networks are compatible with ERC-4337 smart contracts.
You must configure the MCP agentpay server using agentwallet-sdk (for Base) or the OKX Agent Payments protocol (for X Layer). It is important to specify the exact version of the package to avoid supply chain risks.
The orchestrator configures the per-task budget, the session budget, the allowed addresses, and the rate limits using `set_policy`. The agent consults `check_spending` before each transaction, and the payment is blocked if the budget is exceeded.
Yes. The design is fail-safe: if the spending policy is violated or the service is unavailable, the payment transaction is automatically blocked. Additionally, the wallets are non-custodial, so the agent never holds the funds.
Payments x402 for AI Agents — Secure Self-Employed Payments with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.