agirails-core

Reference knowledge for the Agent Commerce Transaction Protocol, a blockchain payment system for AI agents. It covers escrow, disputes, and the fixed states a payment can move through.

In plain words
What is it for?
Use it when building or debugging ACTP payments, escrow flows, dispute handling, transaction states, or protocol checks.
Why use it?
It helps explain or implement payment flows without losing track of rules that must remain true during state changes. Escrow holds funds until delivery conditions are met, while disputes handle disagreements.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agirails/claude-plugin/agirails-core
Any agent
npx skills add agirails/claude-plugin --skill agirails-core
Clone the repo
git clone --depth 1 https://github.com/agirails/claude-plugin

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.04752
Opus 5 $0.00031 $0.02376
Sonnet 5 $0.00012 $0.00950
Haiku 4.5 $0.00006 $0.00475

Measured 2d ago against content hash cb50987284d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agirails-core scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agirails-core/SKILL.md · 459 lines

How it starts

The opening of the file, as written. The whole thing — 459 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ACTP Protocol Core

The Agent Commerce Transaction Protocol (ACTP) is a blockchain-based payment protocol designed for AI agent commerce. It provides trustless escrow, bilateral dispute resolution, and deterministic state transitions.

Quickstart (Copy-Paste-Run)

npm install @agirails/sdk

Save as quickstart.js and run with node quickstart.js:

const { ACTPClient } = require('@agirails/sdk');

async function main() {
  const client = await ACTPClient.create({ mode: 'mock' });
  await client.mintTokens(client.getAddress(), '10000000000'); // 10,000 USDC
  const result = await client.pay({
    to: '0x0000000000000000000000000000000000000001',
    amount: '5.00', // 5 USDC (human-readable, not wei)
  });
  console.log('Payment:', result.txId, '| State:', result.state);
}

main().catch(console.error);

No wallet, no keys, no blockchain needed. Replace mock with testnet or mainnet when ready.

Protocol Overview

ACTP enables AI agents to pay each other for services with guaranteed delivery or refund. The protocol runs on Base (Ethereum L2) using USDC stablecoin.

Key Properties:

  • Trustless escrow (funds locked until delivery)
  • 8-state deterministic state machine
  • Bilateral dispute resolution
  • 1% platform fee with $0.05 minimum
  • Immutable on-chain settlement
  • Adapter routing: ACTP escrow, x402 instant payments, ERC-8004 identity resolution
  • Config management: AGIRAILS.md as source of truth (on-chain hash + IPFS CID)

Deployed Contracts

Contract addresses are resolved automatically by the SDK via getNetwork("base-sepolia") or getNetwork("base-mainnet"). No need to hardcode addresses — the SDK handles this.

Mainnet transaction limit: $1,000 per tx.

Now vs Roadmap

Available now:

  • provide() / request() — register as provider or requester
  • Escrow-based payments via ACTPKernel + EscrowVault
  • 8-state machine with deterministic transitions
  • Three runtime modes: mock, testnet (Base Sepolia), mainnet (Base)
  • CLI with 24 commands: init, balance, pay, tx, watch, publish, pull, diff, simulate, batch, mint, config, time
  • ERC-8004 portable identity and reputation
  • Config management via AGIRAILS.md (on-chain hash + IPFS CID)
  • Adapter routing: ACTP escrow, x402 instant payments, ERC-8004 resolution
  • x402 v2 instant payments via @x402/fetch + facilitator (zero AGIRAILS fee — X402Relay contract deprecated on mainnet, Sepolia-only legacy)

Read the full file on GitHub · 459 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 459 lines · 62 tokens per session scan A cb50987284d0

Subscribe to this mod's changes

agirails-core is a skill published in the GitHub repository agirails/claude-plugin (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 62 tokens to every session and 4,752 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.