Agent Payment X402
affaan-m/ECC
Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets.
Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets.
$ npx skills add templetongroup/radiant --skill agent-payment-x402 -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install templetongroup/radiant agent-payment-x402 --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agent-payment-x402 .claude/skills/agent-payment-x402 && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "agent-payment-x402" agent skill from https://github.com/templetongroup/radiant/tree/master/skills/agent-payment-x402 into .claude/skills/agent-payment-x402/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-payment-x402", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/templetongroup/radiant/tree/master/skills/agent-payment-x402Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add templetongroup/radiant --skill agent-payment-x402 -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install templetongroup/radiant agent-payment-x402 --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/agent-payment-x402 .agents/skills/agent-payment-x402 && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "agent-payment-x402" agent skill from https://github.com/templetongroup/radiant/tree/master/skills/agent-payment-x402 into .agents/skills/agent-payment-x402/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-payment-x402", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add templetongroup/radiant --skill agent-payment-x402 -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install templetongroup/radiant agent-payment-x402 --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/agent-payment-x402 .cursor/skills/agent-payment-x402 && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "agent-payment-x402" agent skill from https://github.com/templetongroup/radiant/tree/master/skills/agent-payment-x402 into .cursor/skills/agent-payment-x402/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-payment-x402", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/templetongroup/radiant.git --path skills/agent-payment-x402--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add templetongroup/radiant --skill agent-payment-x402 -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install templetongroup/radiant agent-payment-x402 --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/agent-payment-x402 .gemini/skills/agent-payment-x402 && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "agent-payment-x402" agent skill from https://github.com/templetongroup/radiant/tree/master/skills/agent-payment-x402 into .gemini/skills/agent-payment-x402/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-payment-x402", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install templetongroup/radiant agent-payment-x402Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add templetongroup/radiant --skill agent-payment-x402 -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/agent-payment-x402 .github/skills/agent-payment-x402 && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "agent-payment-x402" agent skill from https://github.com/templetongroup/radiant/tree/master/skills/agent-payment-x402 into .github/skills/agent-payment-x402/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-payment-x402", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add templetongroup/radiant --skill agent-payment-x402 -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install templetongroup/radiant agent-payment-x402 --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/agent-payment-x402 .opencode/skills/agent-payment-x402 && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "agent-payment-x402" agent skill from https://github.com/templetongroup/radiant/tree/master/skills/agent-payment-x402 into .opencode/skills/agent-payment-x402/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-payment-x402", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
agent-payment-x402Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets.
Agent Payment X402 is an agent skill from templetongroup/radiant. 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. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering MCP servers. It works with x402, OKX and Java. The repository describes itself as: A local coding harness for Mac. Chat with coding agents across cloud and local models, watch every tool call in a live activity feed, and drive a real terminal — in one window… The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 94838ca. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
raw.githubusercontent.comAlso links to:
github.comnpmjs.comx402.orgweb3.okx.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
WALLET_PRIVATE_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Agent Payment X402 loads about 2.7k tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 852 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from templetongroup/radiant at commit 94838ca, republished under its MIT licence (© templetongroup). 852 words, ~2,670 tokens.
.claude/skills/agent-payment-x402/SKILL.md (or your agent's skills folder).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": ["agentwallet-sdk@6.0.0"]
}
}
}| 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.
Use this path for X Layer x402, Multi-Party Payment (MPP), session payment, charge, and A2A charge flows.
For buyer-side agent flows:
okx/onchainos-skills repository.skills/okx-agent-payments-protocol/SKILL.md as the dispatcher.skills/okx-x402-payment/SKILL.md as a deprecated compatibility alias, not as the canonical skill.For seller-side API flows, fetch the latest language-specific guide before generating code:
| Runtime | Current guide |
|---|---|
| TypeScript | https://raw.githubusercontent.com/okx/payments/main/typescript/SELLER.md |
| Go | https://raw.githubusercontent.com/okx/payments/main/go/x402/SELLER.md |
| Rust | https://raw.githubusercontent.com/okx/payments/main/rust/x402/SELLER.md |
| Java | https://raw.githubusercontent.com/okx/payments/main/java/SELLER.md |
Do not copy examples from older docs without checking the current OKX repository. Current OKX guidance uses okx-agent-payments-protocol as the dispatcher, and Java seller docs are now available.
When building an orchestrator that calls the agentpay MCP server, enforce budgets before dispatching paid tool calls.
Prerequisites: Install the package before adding the MCP config —
npxwithout-ywill prompt for confirmation in non-interactive environments, causing the server to hang:npm install -g agentwallet-sdk@6.0.0
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
async function main() {
// 1. Validate credentials before constructing the transport.
// A missing key must fail immediately — never let the subprocess start without auth.
const walletKey = process.env.WALLET_PRIVATE_KEY;
if (!walletKey) {
throw new Error("WALLET_PRIVATE_KEY is not set — refusing to start payment server");
}
// Connect to the agentpay MCP server via stdio transport.
// Whitelist only the env vars the server needs — never forward all of process.env
// to a third-party subprocess that manages private keys.
const transport = new StdioClientTransport({
command: "npx",
args: ["agentwallet-sdk@6.0.0"],
env: {
PATH: process.env.PATH ?? "",
NODE_ENV: process.env.NODE_ENV ?? "production",
WALLET_PRIVATE_KEY: walletKey,
},
});
const agentpay = new Client({ name: "orchestrator", version: "1.0.0" });
await agentpay.connect(transport);
// 2. Set spending policy before delegating to the agent.
// Always verify success — a silent failure means no controls are active.
const policyResult = await agentpay.callTool({
name: "set_policy",
arguments: {
per_task_budget: 0.50,
per_session_budget: 5.00,
allowlisted_recipients: ["api.example.com"],
},
});
if (policyResult.isError) {
throw new Error(
`Failed to set spending policy — do not delegate: ${JSON.stringify(policyResult.content)}`
);
}
// 3. Use preToolCheck before any paid action
await preToolCheck(agentpay, 0.01);
}
// Pre-tool hook: fail-closed budget enforcement with four distinct error paths.
async function preToolCheck(agentpay: Client, apiCost: number): Promise<void> {
// Path 1: Reject invalid input (NaN/Infinity bypass the < comparison)
if (!Number.isFinite(apiCost) || apiCost < 0) {
throw new Error(`Invalid apiCost: ${apiCost} — action blocked`);
}
// Path 2: Transport/connectivity failure
let result;
try {
result = await agentpay.callTool({ name: "check_spending" });
} catch (err) {
throw new Error(`Payment service unreachable — action blocked: ${err}`);
}
// Path 3: Tool returned an error (e.g., auth failure, wallet not initialised)
if (result.isError) {
throw new Error(
`check_spending failed — action blocked: ${JSON.stringify(result.content)}`
);
}
// Path 4: Parse and validate the response shape
let remaining: number;
try {
const parsed = JSON.parse(
(result.content as Array<{ text: string }>)[0].text
);
if (!Number.isFinite(parsed?.remaining)) {
throw new TypeError("missing or non-finite 'remaining' field");
}
remaining = parsed.remaining;
} catch (err) {
throw new Error(
`check_spending returned unexpected format — action blocked: ${err}`
);
}
// Path 5: Budget exceeded
if (remaining < apiCost) {
throw new Error(
`Budget exceeded: need $${apiCost} but only $${remaining} remaining`
);
}
}
main().catch((err) => {
console.error(err);
process.exitCode = 1;
});agentwallet-sdk@6.0.0). Verify package integrity before deploying to production.list_transactions in post-task hooks to log what was spent and why.agentwallet-sdkokx/payments — TypeScript, Go, Rust, and Java seller integrations for X Layer x402okx/onchainos-skills© templetongroup, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/agent-payment-x402 of templetongroup/radiant.
Open the folder on GitHubat commit 94838ca
Agent Payment X402 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Agent Payment X402 this skilltempletongroup/radiant | 113 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Agent Payment X402affaan-m/ECC | 276k | — | ~6.8k | Automated safety check: Pass | MIT | |
| Agent Payment X402affaan-m/ECC | 276k | — | ~4.9k | Automated safety check: Pass | MIT | |
| Agent Payment X402affaan-m/ECC | 276k | — | ~5.4k | Automated safety check: Pass | MIT | |
| MCP Serverrrezartprebreza/spring-boot-skills | 301 | — | ~1.1k | Automated safety check: Pass | MIT | |
| MCP Serverrrezartprebreza/spring-boot-skills | 301 | — | ~1.3k | Automated safety check: Pass | MIT |
affaan-m/ECC
Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets.
affaan-m/ECC
将 x402 支付执行添加到 AI 代理中,具备每任务预算、支出控制和非托管钱包。通过 agentwallet-sdk 支持 Base,通过 OKX Payments / OKX 代理支付协议支持 X Layer,并通过上游 x402 包与基于结算器的结算支持 Solana 及多网络 EVM。
affaan-m/ECC
タスクごとのバジェット、支出コントロール、ノンカストディアルウォレットを備えた x402 決済実行を AI エージェントに追加します。agentwallet-sdk を通じて Base を、OKX Payments / OKX エージェント決済プロトコルを通じて X Layer を、アップストリームの x402 パッケージとファシリテーターベースの決済を通じて Solana…
rrezartprebreza/spring-boot-skills
A skill your agent uses when exposing Spring Boot 3 application capabilities through Model Context Protocol tools, resources, or prompts.
rrezartprebreza/spring-boot-skills
A skill your agent uses when exposing Spring Boot 4 application capabilities through Model Context Protocol tools, resources, or prompts.
ruanrongman/IntelliConnect
Create or update IntelliConnect Spring Boot service/serviceimpl code in this repository style.
templetongroup/radiant
A skill your agent uses to generate or audit design systems, check visual consistency, and review PRs that touch styling.
templetongroup/radiant
Design, redesign, build, audit, polish, and production-verify exceptional interfaces across web, mobile, and native apps.
templetongroup/radiant
Expert guidance for developing with the tinystruct Java framework.
templetongroup/radiant
Production-ready UI motion system for React/Next.js. An agent skill from templetongroup/radiant.
templetongroup/radiant
Read a plan document, decompose it into steps, design a per-step agent chain from the ECC catalogue, and emit ready-to-paste /orchestrate custom prompts.
templetongroup/radiant
Ask the user to rate the code/output just produced on a 1-5 star scale, then ask rating-appropriate follow-up questions, log the rating, and iterate until the work reaches 4+ stars.
Categories
Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Agent Payment X402 is an agent skill from templetongroup/radiant. Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets.
Agent Payment X402 fits situations like: an agent must pay for something itself and needs per-task budgets; spending controls; A non-custodial wallet.
Run `npx skills add templetongroup/radiant --skill agent-payment-x402 -a claude-code`. Or copy the skill folder (skills/agent-payment-x402 in templetongroup/radiant) into .claude/skills/agent-payment-x402 in your project. Claude Code loads it when a task matches its description.
Run `npx skills add templetongroup/radiant --skill agent-payment-x402 -a codex`. Or copy the skill folder (skills/agent-payment-x402 in templetongroup/radiant) into .agents/skills/agent-payment-x402 in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add templetongroup/radiant --skill agent-payment-x402 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-payment-x402, .gemini/skills/agent-payment-x402, .github/skills/agent-payment-x402 and .opencode/skills/agent-payment-x402 in your project.
Going by SKILL.md and its folder, Agent Payment X402 needs the command-line tools its instructions call (npm) and credentials named WALLET_PRIVATE_KEY. Our summary lists: Python 3; Node.js; A credential in WALLET_PRIVATE_KEY.
SKILL.md names 5 domains. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. As links in the text: github.com, npmjs.com, x402.org and web3.okx.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Agent Payment X402 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Agent Payment X402: Agent Payment X402 (affaan-m/ECC, 276k stars), Agent Payment X402 (affaan-m/ECC, 276k stars), Agent Payment X402 (affaan-m/ECC, 276k stars) and MCP Server (rrezartprebreza/spring-boot-skills, 301 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
templetongroup (a GitHub user) maintains it in templetongroup/radiant, which has 113 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 6, 2026.
Source: templetongroup/radiant on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.