Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol.
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "agent-payment-x402" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/agent-payment-x402/SKILL.md 2. 保存为 ~/.claude/skills/agent-payment-x402/SKILL.md 3. 装好后重载技能,告诉我可以用了
Enable AI agents to make policy-gated payments with built-in spending controls. Uses the x402 HTTP payment protocol and MCP tools so agents can pay for external services, APIs, or other agents without custodial risk.
Use when: your agent needs to pay for an API call, purchase a service, settle with another agent, enforce per-task spending limits, or manage a non-custodial wallet. Pairs naturally with cost-aware-llm-pipeline and security-review skills.
Choose the integration path based on whether your agent is buying access to a paid API or charging others for one:
| Need | Recommended path |
|---|---|
| Agent pays a 402-gated API on Base or another agentwallet-supported chain | Use agentwallet-sdk as an MCP payment server with strict spending policy |
| Agent pays a 402-gated API on X Layer | Use OKX Agent Payments Protocol from okx/onchainos-skills; okx-x402-payment is a deprecated legacy alias |
| TypeScript API charges agents | Use OKX Payments TypeScript seller SDK docs for Express, Hono, Fastify, or Next.js |
| Go API charges agents | Use OKX Payments Go seller SDK docs for Gin, Echo, or net/http |
| Rust API charges agents | Use OKX Payments Rust seller SDK docs for Axum |
| Java API charges agents | Use OKX Payments Java seller SDK docs for Spring Boot 2/3, Java EE, or Jakarta |
| Python API charges agents | Check the current OKX Payments repository before implementation; a Python seller guide may not be available |
agentwallet-sdk: use the package docs to confirm current network coverage before production. Base Sepolia is the safest development default; Base mainnet is the production path called out by the original skill.eip155:196) and USDT0 settlement. Fetch current SDK docs before generating production code because payment packages and facilitator behavior can change quickly.x402 extends HTTP 402 (Payment Required) into a machine-negotiable flow. When a server returns 402, the agent's payment tool negotiates price, checks budget, signs a transaction, and retries only inside the policy and confirmation boundary set by the orchestrator.
Every payment tool call enforces a SpendingPolicy:
Agents hold their own keys via ERC-4337 smart accounts. The orchestrator sets policy before delegation; the agent can only spend within bounds. No pooled funds, no custodial risk.
The payment layer exposes standard MCP tools that slot into any Claude Code or agent harness setup.
Security note: Always pin the package version. This tool manages private keys — unpinned
npxinstalls introduce supply-chain risk.
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["[email protected]"]
}
}
}
| Tool | Purpose |
|---|---|
get_balance | Check agent wallet balance |
send_payment | Send payment to address or ENS |
check_spending | Query remaining budget |
list_transactions | Audit trail of all payments |
Note: Spending policy is set by the orchestrator before delegating to the agent — not by the agent itself. This prevents agents from escalating their own spending limits. Configure policy via
set_policyin your orchestration layer or pre-task hook, never as an agent-callable tool.
…
帮助你部署和维护家庭网络中的 Pi-hole 广告拦截与 DNS 服务
为 KMP 项目提供 Compose 多平台界面架构、导航、主题与性能实践。
快速创建或转换为动画丰富的网页演示文稿,适合路演、分享与提案制作。
基于RFC编排多智能体开发流程,统一质量门禁与合并队列管理。
将签证申请材料图片译成英文,并生成中英对照PDF便于提交与核对
将技术概念、图表和系统流程制作成清晰可复用的 Manim 动画讲解视频。