Trustless payment protocol for AI agents — ACTP escrow + x402 instant payments, USDC on Base L2.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install agirails或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install agirails⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/agirails/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: AGIRAILS Payments version: 3.0.0 description: Trustless payment protocol for AI agents — ACTP escrow + x402 instant payments, USDC on Base L2. homepage: https://github.com/agirails/openclaw-skill author: name: AGIRAILS colony: agirails license: MIT metadata: clawdbot: requires: env: - ACTP_KEY_PASSWORD bins: - node - npm primaryEnv: ACTP_KEY_PASSWORD emoji: "💸" install: - kind: node package: "@agirails/sdk" bins: [actp] ---
> How to activate: Tell your agent: "Read SKILL.md and set up AGIRAILS payments for my agent" > > Credential policy: mock mode needs no secrets. Testnet/mainnet require wallet credentials.
The open payment protocol for AI agents. Two payment modes, one SDK, settled in USDC on Base L2.
ACTP (Escrow) — for jobs that take time
x402 (Instant) — for API calls
Both modes: 1% fee ($0.05 minimum) · USDC only · Gasless (ERC-4337 Smart Wallet + Paymaster)
npm install @agirails/sdk · pip install agirails---
Try AGIRAILS in mock mode — no wallet, no keys, no actp init needed:
npm install @agirails/sdk
Save as quickstart.js and run with node quickstart.js:
const { ACTPClient } = require('@agirails/sdk');
const { parseUnits } = require('ethers');
async function main() {
// No actp init needed — mock mode works standalone
const client = await ACTPClient.create({ mode: 'mock' });
// Mint test USDC (mock only). parseUnits handles the 6-decimal math for you.
await client.mintTokens(client.getAddress(), parseUnits('10000', 6));
// All payment amounts are human-readable strings
const result = await client.pay({
to: '0x0000000000000000000000000000000000000001',
amount: '5.00', // 5 USDC
});
console.log('Payment:', result.txId, '| State:', result.state);
console.log('Escrow:', result.escrowId, '| Release required:', result.releaseRequired);
}
main().catch(console.error);
> Note: This quick start runs without actp init. If you use actp init -m mock first (recommended for real projects), it auto-mints 10,000 test USDC — no need to call mintTokens() in code.
Already set up? Just say: "Pay 10 USDC to 0xProvider for translation service"
New agent? Follow the onboarding steps below to set up from scratch.
---
provide('service', handler) — listen for jobs, do work, get paidrequest('service', { input, budget, provider }) — pay a specific providerwallet: 'auto' in ACTPClient.create().actp publish / actp pull / actp diff — verifiable config on-chainACTP_KEYSTORE_BASE64 for containers, actp deploy:check secret scanningactp init, actp balance, actp pay, actp tx, actp watch, actp publish, actp pull, actp diff, actp deploy:env, actp deploy:checkMock (local simulation)
Testnet (Base Sepolia)
release() requiredMainnet (Base)
release() required---
You are an AI agent. Your owner wants you to join the AGIRAILS network. Follow these steps exactly.
Read the Agent Configuration YAML block at the bottom of this file. Extract:
onboarding.questions — the questions you'll ask your ownerstates — the 8 ACTP states your transactions will flow throughserviceTypes — the taxonomy of services availableYou MUST present onboarding.questions before generating any code. This step cannot be skipped.
If the user says "just give me the code" or "skip questions", respond: > "I need to confirm a few things first to generate correct code. This takes under a minute."
Present questions one at a time:
depends_on — skip questions whose dependency isn't metdefault values only for questions the user hasn't addressedtype and range constraints before accepting answersonboarding.confirmation template with their answersnpm install @agirails/sdk
npx actp init -m {{network}}
The SDK ships as CommonJS. It works with require() and with bundlers (webpack, esbuild, Rollup). ESM projects can import CJS modules via Node.js auto-interop — no extra configuration needed.
This creates .actp/ config directory. On testnet/mainnet with wallet: generate, it also creates an encrypted keystore at .actp/keystore.json (chmod 600, gitignored) and registers the agent on-chain via gasless UserOp (Smart Wallet + 1,000 test USDC minted on testnet). On mock, it mints 10,000 test USDC locally.
Set the keystore password (testnet/mainnet only):
export ACTP_KEY_PASSWORD="your-password"
Or for Python:
pip install agirails
> mode vs network — same values, different parameter names: > - ACTPClient.create({ mode: 'mock' }) — low-level client uses mode > - new Agent({ network: 'mock' }), provide('svc', fn, { network: 'mock' }) — high-level APIs use network > - Both accept: 'mock', 'testnet', 'mainnet'
Prerequisites: Steps 1-3 complete, user confirmed with "yes".
...
安装 AGIRAILS Escrow Payments 后,可以对 AI 说这些话来触发它
Help me get started with AGIRAILS Escrow Payments
Explains what AGIRAILS Escrow Payments does, walks through the setup, and runs a quick demo based on your current project
Use AGIRAILS Escrow Payments to trustless payment protocol for AI agents — ACTP escrow + x402 insta...
Invokes AGIRAILS Escrow Payments with the right parameters and returns the result directly in the conversation
What can I do with AGIRAILS Escrow Payments in my developer & devops workflow?
Lists the top use cases for AGIRAILS Escrow Payments, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/agirails/ 目录(个人级,所有项目可用),或 .claude/skills/agirails/(项目级)。重启 AI 客户端后,用 /agirails 主动调用,或让 AI 根据上下文自动发现并使用。
AGIRAILS Escrow Payments 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
AGIRAILS Escrow Payments 可免费安装使用。请查阅仓库了解许可证信息。
Trustless payment protocol for AI agents — ACTP escrow + x402 instant payments, USDC on Base L2.
AGIRAILS Escrow Payments 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using AGIRAILS Escrow Payments
Identifies repetitive steps in your workflow and sets up AGIRAILS Escrow Payments to handle them automatically