Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

agent-payment-x402

Skill by affaan-m

Adds x402 payment execution to AI agents, with per-task budgets, spending controls and non-custodial wallets. It is for agents that must pay for APIs, services or other agents themselves.

  • Score 91
  • 311k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install agent-payment-x402

Built from the published package, never by AI.

git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.claude/skills && cp -r /tmp/ECC/skills/agent-payment-x402 ~/.claude/skills/agent-payment-x402

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install agent-payment-x402 in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Agent Payment Execution (x402) is a skill that lets AI agents make policy-gated payments over the x402 HTTP payment protocol. When a server returns HTTP 402, the agent's payment tool checks the price against its budget, signs the transaction and retries only within the boundary set by the orchestrator. The skill covers three paths: agentwallet-sdk for Base and other supported chains, OKX Agent Payments Protocol for X Layer, and the upstream x402 packages for Solana and EVM networks. Spending policy, including per-task and per-session budgets, allowlisted recipients and rate limits, is set by the orchestrator, not the agent. It is aimed at developers building agents that need to pay for services without holding pooled or custodial funds.

Written from the project's SKILL.md and checked against it.

What it can do

  • get_balanceChecks the agent wallet balance.
  • send_paymentSends a payment to an address or ENS name.
  • check_spendingQueries the remaining budget for the agent.
  • list_transactionsReturns an audit trail of all payments made.
  • Per-task budgetCaps the maximum spend for a single agent action.
  • Per-session budgetSets a cumulative spending limit across an entire session.
  • Allowlisted recipientsRestricts which addresses or services the agent can pay.
  • Rate limitsLimits transactions per minute or per hour.

What you need

  • agentwallet-sdk pinned to a specific version for the MCP server path
  • OKX onchainos-skills repository for X Layer payment flows
  • EVM and Solana signer keys supplied through the orchestrator environment

Try asking

  • Check my agent wallet balance and remaining budget for this session.
  • Pay the 402-gated API endpoint, staying within the per-task limit.
  • List all payments the agent made today for an audit.

Good to know

  • Spending policy must be set by the orchestrator, not by the agent.
  • The default x402.org facilitator is testnet-only and not intended for mainnet routes.
  • OKX payment packages and facilitator behavior can change quickly, so current docs should be fetched before production use.
  • The source notes a Python seller guide for OKX Payments may not be available.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/agent-payment-x402/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md36 KB

Alternatives to agent-payment-x402

All alternatives →

Compare with meme-rush, okx-market or saas-metrics-coach

agent-payment-x402: common questions

Does the agent hold its own keys?

The source says agents hold their own keys through ERC-4337 smart accounts, with no pooled funds and no custodial risk. The orchestrator sets the policy before delegation.

Which networks does it support?

It supports Base through agentwallet-sdk, X Layer through OKX Payments, and Solana plus multiple EVM networks through the upstream x402 packages. The source says to confirm current coverage before production.

Why should the package version be pinned?

The source warns that this tool manages private keys, so unpinned npx installs introduce supply-chain risk. It gives agentwallet-sdk@6.0.0 as an example of a pinned version.

How do I install agent-payment-x402?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is agent-payment-x402 free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is agent-payment-x402 safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to agent-payment-x402?

Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.

agent-payment-x402 Install

Add to stack

Loading.