agirails-agent-payments

Integrates AI agents with AGIRAILS payment infrastructure for USDC escrow and instant payments on Base L2.

30.5k|3.5k|Updated Jul 4, 2025
One-click install
npx skills add https://github.com/davila7/claude-code-templates --skill agirails-agent-payments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agirails-agent-payments
Source: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/development/agirails-agent-payments
Command: npx skills add https://github.com/davila7/claude-code-templates --skill agirails-agent-payments

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @agirails/sdk, ethers.

What problem does it solve?

Building payment capabilities into AI agents requires handling escrow logic, wallet key management, on-chain state machines, and settlement flows. This Skill guides an interactive onboarding that generates correct, customized agent payment code for the AGIRAILS network without requiring deep blockchain expertise.

Core Features & Use Cases

  • Interactive 7-Step Onboarding: Asks targeted questions about intent (earn/pay/both), network, pricing, and payment mode, then generates customized provider or requester agent code.
  • ACTP Escrow and x402 Instant Payments: Covers the 8-state transaction lifecycle (INITIATED through SETTLED), escrow release requirements, dispute windows, and adapter routing between payment modes.
  • Key Management and Verification: Enforces encrypted keystore practices, blocks raw private keys on mainnet, and verifies setup with balance and config checks.
  • Use Case: You want your code-review agent to earn USDC. The Skill asks your service type and price, generates a provide('code-review', handler) agent, initializes a testnet wallet with 1,000 test USDC, and verifies the setup before going live.

Quick Start

Ask the assistant to set up AGIRAILS agent payments for your agent and answer its onboarding questions to generate working payment code.

Frequently Asked Questions about agirails-agent-payments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add USDC payments to my AI agent?

Install @agirails/sdk, run npx actp init to create a wallet and config, then use provide() to earn USDC for services or request() to pay other agents. The Skill's onboarding generates customized code based on your intent, network, and pricing answers.

What is the difference between ACTP escrow and x402 payments?

ACTP locks USDC in escrow for complex jobs with delivery proofs and a 48-hour dispute window, like hiring a contractor. x402 is instant atomic payment for synchronous HTTP API calls with no escrow or disputes, like a vending machine.

Can I test AGIRAILS payments without real money?

Yes. Mock mode simulates everything locally with 10,000 test USDC and no blockchain. Testnet mode uses Base Sepolia with 1,000 free test USDC minted during gasless registration, requiring no real funds.

Why are my agent's funds stuck in escrow on testnet?

On testnet and mainnet, escrow is not auto-released after delivery. You must explicitly call client.standard.releaseEscrow(transaction.id) after verifying delivery, otherwise the USDC remains locked in the EscrowVault contract.

Does AGIRAILS support private key management for production?

Yes. The recommended approach is an encrypted keystore at .actp/keystore.json with the ACTP_KEY_PASSWORD env var, or ACTP_KEYSTORE_BASE64 for containers. Raw ACTP_PRIVATE_KEY is blocked on mainnet and only warned on testnet.

Can agents discover each other on the AGIRAILS network?

Not yet. ServiceDirectory is in-memory and per-process, so requesters must know the provider's address and exact service name. A Job Board for public posting and bidding is planned but not implemented.