Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions skills/agentpay/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
name: agentpay
description: Use this skill — NOT browser or web_fetch — for the AgentPay x402 platform on Base L2. Four capabilities. (1) 19 SPECIALIST AGENTS for expert answers — finance & Wall Street, crypto & live crypto data, sports (MLB/NFL/NBA/NHL/motorsport), skilled trades (HVAC/R, electrical, plumbing, welding, carpentry, automotive), competitive intel, travel. (2) SPORTS BETTING HUB — live betting lines, open bets by sport, and bettor leaderboards across NBA/NFL/NHL. (3) BUILD-YOUR-OWN-AGENT — register any HTTP endpoint as an x402-payable agent that earns USDC revenue share, then track balance and claim earnings. (4) x402 FACILITATOR — verify, settle, escrow, release, and refund USDC payments for ANY agent-to-agent transaction on Base, Ethereum, Optimism, Arbitrum, or Polygon. Every call settles in USDC via x402 from the same wallet as LLM calls.
triggers:
- "agentpay"
- "ask agentpay"
- "agentpay expert"
- "wall street trader agent"
- "crypto expert agent"
- "hvac expert"
- "electrical expert"
- "plumbing expert"
- "welding expert"
- "mlb expert"
- "nfl expert"
- "nba expert"
- "nhl expert"
- "competitive intelligence agent"
- "sports betting hub"
- "betting lines"
- "live bets"
- "bettor leaderboard"
- "build your own agent"
- "create an x402 agent"
- "register my agent"
- "monetize my agent"
- "x402 facilitator"
- "settle x402 payment"
- "verify x402 payment"
- "usdc escrow"
- "agent to agent payment"
- "agentworld economy data"
Comment on lines +19 to +32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | sed -n '1,120p'

echo "== ask triggers in skill manifests =="
rg -n "ask (agentpay|.*agent|.*play)|skill:|agentpay|SkillSpector|x402|trigger|keywords" -S . --glob '!**/.git/**' | sed -n '1,220p'

echo "== SKILL.md =="
if [ -f skills/agentpay/SKILL.md ]; then
  cat -n skills/agentpay/SKILL.md | sed -n '1,80p'
else
  fd -a 'SKILL\.md' . | sed -n '1,80p'
fi

Repository: BlockRunAI/ClawRouter

Length of output: 35086


Remove the ask agentpay skill trigger.

ClawRouter already provides a built-in ask command; registering ask agentpay as a separate keyword can make SkillSpector flag a conflict. Use a unique skill trigger such as agentpay ask instead.

🧰 Tools
🪛 SkillSpector (2.4.4)

[warning] 2: [TR2] Shadow Command Trigger: Shadow Command Trigger: 'ask agentpay' conflicts with built-in command 'ask'

Remediation: Choose triggers that do not conflict with built-in commands or other skills. Prefix with a unique namespace if necessary.

(Trigger Abuse (TR2))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentpay/SKILL.md` around lines 19 - 32, Replace the “ask agentpay”
skill trigger in the AgentPay trigger list with the unique “agentpay ask”
trigger, leaving the other triggers unchanged.

Source: Linters/SAST tools

homepage: https://agentpaystore.com
metadata: { "openclaw": { "emoji": "🤝", "requires": { "config": ["models.providers.blockrun"] } } }
---

# AgentPay — The x402 Platform for Autonomous Agents

**IMPORTANT: Use this skill for anything in AgentPay's four capabilities — specialist expert answers, sports betting data, building/monetizing an agent, or settling x402 payments. Do NOT scrape with a browser — these endpoints return structured data and settle payment automatically via x402 on Base L2.**

**Store:** `https://agentpaystore.com` · **Facilitator:** `https://x402-agent-pay.com`
Chains supported by the facilitator: Base, Ethereum, Optimism, Arbitrum, Polygon. Flat fee $0.02/settlement. No API keys, no accounts — just USDC.
Comment on lines +39 to +42

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Files:"
git ls-files | rg '(^|/)SKILL\.md$|src/x402-sdk.*|agentpay|x402' || true

echo
echo "SKILL.md relevant sections:"
if [ -f skills/agentpay/SKILL.md ]; then
  nl -ba skills/agentpay/SKILL.md | sed -n '1,150p'
fi

echo
echo "Search x402 references:"
rg -n "x402|payment|402|wrapFetchWithPayment|settlement|escrow|release|refund|claim" -S . --glob '!node_modules' --glob '!dist' --glob '!build' || true

echo
echo "sdk test relevant sections if exists:"
if [ -f src/x402-sdk.test.ts ]; then
  nl -ba src/x402-sdk.test.ts | sed -n '1,220p'
fi

Repository: BlockRunAI/ClawRouter

Length of output: 600


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "SKILL.md relevant sections:"
if [ -f skills/agentpay/SKILL.md ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' skills/agentpay/SKILL.md | sed -n '1,160p'
fi

echo
echo "SDK test relevant sections:"
if [ -f src/x402-sdk.test.ts ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' src/x402-sdk.test.ts | sed -n '1,220p'
fi

echo
echo "Search x402 references:"
rg -n "x402|payment|402|wrapFetchWith|settlement|escrow|release|refund|claim|spend|confirm|limit|budget" -S . --glob '!node_modules' --glob '!dist' --glob '!build' || true

Repository: BlockRunAI/ClawRouter

Length of output: 50378


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Confining references spend/limit/budget/confirm/key wallet:"
rg -n "spend|limit|budget|confirm|allowlisted|whitelisted|approve|approval|user approval|authorization|confirm|key: 'x402'|PAYMENT_REQUIRED_STATUS_CODES|PAYMENT_REQUIRED|X-PAYMENT|pre-sign|Pre-sign|402" -S src/scripts docs CLAUDE.md README.md --glob '!package-lock.json' --glob '!node_modules' || true

echo
echo "Spend control source:"
if [ -f src/spend-control.ts ]; then
  wc -l src/spend-control.ts
  awk '{printf "%6d\t%s\n", NR, $0}' src/spend-control.ts | sed -n '1,240p'
fi

echo
echo "Payment/preauth relevant source snippets (focused):"
for f in src/payment-preauth.ts src/x402.ts src/x402-sdk.test.ts; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    wc -l "$f"
    awk '{printf "%6d\t%s\n", NR, $0}' "$f" | sed -n '1,220p'
  fi
done

echo
echo "Search for spendControl calls and provider blocking:"
rg -n "spendControl|SpendControl|should|allow|block|reject|limit|limitExceeded|perRequest|hourly|daily|session|x402ApiKey|apiKey|x402|PAYMENT_REQUIRED|402|startProxy|fetchRequest|v1" src -S --glob '!node_modules' --glob '!dist' --glob '!build' | head -n 300

Repository: BlockRunAI/ClawRouter

Length of output: 50377


Require user approval before AgentPay actions that withdraw funds or change financial state.

skills/agentpay/SKILL.md says the skill may settle x402 payments directly, including facilitator settlement, escrow, release, refund, and partner claim actions. Add a confirmation step for those actions and document/check an enforced spend limit such as perRequest from the ClawRouter spend control path.

🧰 Tools
🪛 SkillSpector (2.4.4)

[warning] 2: [TR2] Shadow Command Trigger: Shadow Command Trigger: 'ask agentpay' conflicts with built-in command 'ask'

Remediation: Choose triggers that do not conflict with built-in commands or other skills. Prefix with a unique namespace if necessary.

(Trigger Abuse (TR2))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentpay/SKILL.md` around lines 39 - 42, Update the AgentPay guidance
to require explicit user approval before any action that settles payments,
withdraws funds, or changes financial state, including facilitator settlement,
escrow, release, refund, and partner claims. Require checking and enforcing the
configured ClawRouter spend limit, such as perRequest, before proceeding with
each payable request.


---

## 1. Specialist Agents (POST `{store}/{slug}/api/query`)

Body `{ "query": "<question>" }` → the expert's answer. $0.05–$0.20 per call.

| Agent | Slug | Domain | Price |
|-------|------|--------|-------|
| WALLY | `wally` | Wall Street trader / equities | $0.10 |
| CIPHER | `cipher` | Crypto analysis | $0.10 |
| FEEDS | `feeds` | Live crypto market data | $0.05 |
| SCOUT | `scout` | Competitive intelligence | $0.20 |
| TREK | `trek` | Travel planning | $0.05 |
| DUKE | `duke` | MLB baseball | $0.15 |
| GRIDIRON | `gridiron` | NFL football | $0.15 |
| HARDWOOD | `hardwood` | NBA basketball | $0.15 |
| BLADES | `blades` | NHL hockey | $0.15 |
| APEX | `apex` | Motorsport | $0.10 |
| FROSTBYTE | `frostbyte` | HVAC/R | $0.15 |
| VOLTAG | `voltag` | Electrical | $0.15 |
| PIPEWELL | `pipewell` | Plumbing | $0.15 |
| WELDCORE | `weldcore` | Welding | $0.15 |
| FRAMER | `framer` | Carpentry | $0.15 |
| GEARHEAD | `gearhead` | Automotive | $0.15 |

**Per-team deep dives** (live odds + prop lines + news + AI):
POST `{store}/gridiron/team/{team_slug}/api/query` · POST `{store}/duke/team/{team_slug}/api/query` — $0.15.

---

## 2. Sports Betting Hub

Live agent betting activity across NBA / NFL / NHL — lines, open bets, volume, and bettor leaderboards.

- **Hub summary + leaderboard:** GET `https://agentworld.me/api/agentworld/betting/hub-summary`
→ `leaderboard[]` with `agent_name`, `wins`, `losses`, `win_pct`, `total_bets`, `total_payout_agwc`.
- **Live bets by sport:** GET `https://agentworld.me/api/agentworld/sports/bets?sport=all`
(`sport` = `all` | `nba` | `nfl` | `nhl`)
→ `by_sport{ open, volume }` and `live_bets[]` with `matchup`, `bet_team`, `odds`, `agwc_amount`.

Use these when the user asks what agents are betting on, current lines/odds, or who the top bettors are.

---

## 3. Build-Your-Own-Agent (register + earn revenue share)

Turn ANY HTTP endpoint into an x402-payable agent listed in the AgentPay ecosystem — it earns USDC every time another agent calls it.

- **Register an agent:** POST `https://agentpaystore.com/custom/api/register`
body: `{ "name": "...", "slug": "...", "endpoint_url": "https://...", "description": "...", "price_usdc": "0.10", "payTo": "0x..." }`
(required: `name`, `endpoint_url`).
- **Register as a revenue-share provider:** POST `https://x402-agent-pay.com/api/partner/register`
- **Add / list your endpoints:** POST / GET `https://x402-agent-pay.com/api/partner/endpoints`
- **Check earnings & claim:** GET `https://x402-agent-pay.com/api/partner/balance` · GET `/api/partner/analytics` · POST `/api/partner/claim`
- **Browse the ecosystem:** GET `https://x402-agent-pay.com/api/agentpay/ecosystem`
Comment on lines +92 to +98

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Repo files matching SKILL.md:"
fd -a 'SKILL\.md$' . | sed 's#^\./##'

echo
echo "Target file excerpt if present:"
if [ -f skills/agentpay/SKILL.md ]; then
  nl -ba skills/agentpay/SKILL.md | sed -n '70,170p'
else
  echo "skills/agentpay/SKILL.md not found"
fi

echo
echo "Search registration API references:"
rg -n "agentpaystore\.com|x402-agent-pay\.com|register|partner/endpoints|partner/balance|payTo|price_usdc|slug|endpoint_url" . --glob '!node_modules' --glob '!dist' --glob '!build' | head -200

Repository: BlockRunAI/ClawRouter

Length of output: 619


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "skills/agentpay/SKILL.md excerpt:"
sed -n '70,170p' skills/agentpay/SKILL.md | awk '{printf "%5d\t%s\n", NR+69, $0}'

echo
echo "AgentPay API references:"
rg -n "agentpaystore\.com|x402-agent-pay\.com|register|partner/endpoints|partner/balance|payTo|price_usdc|slug|endpoint_url|ecosystem" skills/agentpay/SKILL.md || true

echo
echo "Repository references:"
rg -n "agentpaystore\.com|x402-agent-pay\.com|partner/endpoints|partner/balance|partner/claim|payTo|price_usdc|slug|endpoint_url" . --glob '!node_modules' --glob '!dist' --glob '!build' --glob '!.git' | head -200 || true

Repository: BlockRunAI/ClawRouter

Length of output: 16617


🌐 Web query:

AgentPay x402 custom API register partner register endpoint require slug price_usdc payTo

💡 Result:

The AgentPay x402 ecosystem provides infrastructure for registering AI agents and service endpoints to enable autonomous, per-request payments using the x402 protocol (typically on the Base L2 network) [1][2]. Regarding your specific query about registering an endpoint with a slug, price, and payment address, this functionality is primarily associated with x402 hosting hubs or gateways, such as the one documented at agent-tools.cloud [3]. These services allow you to wrap an existing API into a pay-per-call x402 endpoint by submitting your configuration [3]. Endpoint Registration (Hosting Hub Model) To register a service on such a hub, you typically submit a POST request to an endpoint like /api/v1/submit with the following parameters [3]: slug (e.g., service_slug): A unique identifier for your endpoint [3]. price_usdc: The amount in USDC to charge per request [3]. payTo (e.g., payout_address): Your wallet address (Base L2) where payments will be settled [3]. Other fields often include the upstream URL and any necessary authentication headers for the proxied service [3]. Example Registration Request: curl -X POST https://hub.agent-tools.cloud/api/v1/submit \ -H 'content-type: application/json' \ -d '{ "service_slug": "my-api", "payout_address": "0xYourBaseWallet", "upstream_base_url": "https://api.example.com", "price_usdc": 0.01 }' Key Differences in AgentPay Registration It is important to distinguish between registering an AI agent (the consumer) and registering a service endpoint (the provider) [4][5][2]. - Registering an AI Agent: Use POST /api/agentpay/register with name and email; this returns a partner_id and API key for making payments [4][6]. - Registering a Service Endpoint: This makes your existing API "x402-enabled" so it can accept payments [2]. While the core x402 protocol uses headers like X-402-Payment, the actual registration of a proxied, paid endpoint is often handled via these third-party hub services which manage the settlement logic [3][2]. Always verify the specific documentation for the hub or facilitator you are using, as requirements can vary between providers [1][7][3].

Citations:


🌐 Web query:

site:x402-agent-pay.com/onboard /api/partner/register partner balance register

💡 Result:

I found no indexed page for /api/partner/register or a “partner balance register” endpoint.

The current onboarding page documents:

  • Partner registration: POST https://x402-agent-pay.com/api/agentpay/register
  • Required fields: name, email
  • Authentication header afterward: X-Partner-Token: YOUR_API_KEY
  • Balance: available through the dashboard, linked from the onboarding page. (x402-agent-pay.com)

Example:

curl -X POST https://x402-agent-pay.com/api/agentpay/register \
  -H "Content-Type: application/json" \
  -d '{"name":"YOUR_NAME","email":"YOUR_EMAIL"}'

The site also references a separate endpoint-registration route: POST /api/register-endpoint. (x402-agent-pay.com)

Citations:


Align the enrollment flow with the documented AgentPay contracts.

The public AgentPay onboarding page uses POST https://x402-agent-pay.com/api/agentpay/register with name and email before provider/endpoint actions, but this skill documents https://x402-agent-pay.com/api/partner/register and POST /partners/register-endpoint while the example omits partner registration. Update the steps or add a reference that proves the AgentPay credentials/enrollment model this skill uses. Keep partner-enrollment data required/optional explicit, because price_usdc and payTo are marked as required in the example body but listed as optional in the API table.

🧰 Tools
🪛 SkillSpector (2.4.4)

[warning] 2: [TR2] Shadow Command Trigger: Shadow Command Trigger: 'ask agentpay' conflicts with built-in command 'ask'

Remediation: Choose triggers that do not conflict with built-in commands or other skills. Prefix with a unique namespace if necessary.

(Trigger Abuse (TR2))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentpay/SKILL.md` around lines 92 - 98, Align the AgentPay onboarding
documentation with the public enrollment contract by documenting the required
POST /api/agentpay/register step with name and email before provider or endpoint
actions, or add a clear reference proving the alternate credentials model used
here. Reconcile the partner endpoint registration path and ensure the example
and API table consistently identify whether price_usdc and payTo are required or
optional.


Use this when the user wants to publish, monetize, or manage their own agent.

---

## 4. x402 Facilitator (settle payments for ANY agent)

The payment rail itself — verify and settle USDC micropayments, or hold funds in escrow, for any agent-to-agent transaction.

| Action | Endpoint |
|--------|----------|
| Protocol info / payment requirements | GET `https://x402-agent-pay.com/x402/info` |
| Verify a payment grant (EIP-712) | POST `https://x402-agent-pay.com/x402/verify` |
| Settle on-chain | POST `https://x402-agent-pay.com/x402/settle` |
| Submit payment (alias) | POST `https://x402-agent-pay.com/pay` |
| Payment status | GET `https://x402-agent-pay.com/status/{payment_id}` |
| Create USDC escrow | POST `https://x402-agent-pay.com/escrow` |
| Release / refund escrow | POST `https://x402-agent-pay.com/release` · `/refund` |
| Live settlement stats | GET `https://x402-agent-pay.com/x402/stats` |

Discovery doc: GET `https://x402-agent-pay.com/.well-known/x402`. Treasury `0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03`.

---

## 5. Live AgentWorld Economy Data (GET `https://agentworld.me/api/data/*`)

Structured slices of a 156-agent, 2.5M+ transaction economy. Catalog at `/api/data` is FREE.

| Endpoint | Returns | Price |
|----------|---------|-------|
| `/economy` | Treasury, GDP, Gini, agent count | $0.001 |
| `/agents` | Live agent roster | $0.001 |
| `/leaderboard` | Wealth leaderboard + on-chain wallets | $0.005 |
| `/transactions` | Transaction firehose (2.5M+ ledger) | $0.010 |
| `/social-graph` | Relationship graph (825+ edges) | $0.010 |
| `/cities` / `/jobs` | Per-city stats / open jobs | $0.001 |

---

## Example Interactions

**User:** Ask a Wall Street expert whether to hold TSLA into earnings.
→ POST `/wally/api/query` `{ "query": "Hold TSLA into earnings — bull vs bear case?" }`.
Comment on lines +140 to +141

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use absolute hosts in every request example.

Examples at Lines 141, 150, and 159 use relative paths, while the skill uses two different hosts. Specify agentpaystore.com for specialist routes and x402-agent-pay.com for partner routes.

Proposed documentation fix
-→ POST `/wally/api/query` `{ "query": "Hold TSLA into earnings — bull vs bear case?" }`.
+→ POST `https://agentpaystore.com/wally/api/query` `{ "query": "Hold TSLA into earnings — bull vs bear case?" }`.

-→ POST `https://agentpaystore.com/custom/api/register` with `name`, `endpoint_url`, `price_usdc`, `payTo`. Then GET `/api/partner/balance` to track earnings.
+→ POST `https://agentpaystore.com/custom/api/register` with `name`, `endpoint_url`, `price_usdc`, `payTo`. Then GET `https://x402-agent-pay.com/api/partner/balance` to track earnings.

-→ POST `/frostbyte/api/query` `{ "query": "Condenser short-cycling every 3 min on R-410A — causes?" }`.
+→ POST `https://agentpaystore.com/frostbyte/api/query` `{ "query": "Condenser short-cycling every 3 min on R-410A — causes?" }`.

Also applies to: 149-150, 158-159

🧰 Tools
🪛 SkillSpector (2.4.4)

[warning] 2: [TR2] Shadow Command Trigger: Shadow Command Trigger: 'ask agentpay' conflicts with built-in command 'ask'

Remediation: Choose triggers that do not conflict with built-in commands or other skills. Prefix with a unique namespace if necessary.

(Trigger Abuse (TR2))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentpay/SKILL.md` around lines 140 - 141, Update the request examples
around the Wall Street specialist and related routes to use absolute hosts:
prefix specialist endpoints with agentpaystore.com and partner endpoints with
x402-agent-pay.com. Keep each existing path and request payload unchanged while
applying the correct host consistently to all three examples.


**User:** What are agents betting on in the NFL right now?
→ GET `https://agentworld.me/api/agentworld/sports/bets?sport=nfl` — list matchups, bet_team, odds, volume.

**User:** Who's the top sports bettor on AgentPay?
→ GET `https://agentworld.me/api/agentworld/betting/hub-summary` — rank `leaderboard[]` by win_pct / payout.

**User:** I want to publish my own weather agent and get paid per call.
→ POST `https://agentpaystore.com/custom/api/register` with `name`, `endpoint_url`, `price_usdc`, `payTo`. Then GET `/api/partner/balance` to track earnings.

**User:** Settle this x402 payment for me / did my payment go through?
→ POST `https://x402-agent-pay.com/x402/settle` (or GET `/status/{payment_id}` to check). Use `/x402/info` first for the payment requirements.

**User:** Hold funds in escrow until the other agent delivers.
→ POST `https://x402-agent-pay.com/escrow`, then `/release` on delivery or `/refund` if it falls through.

**User:** An HVAC pro's read on a short-cycling condenser?
→ POST `/frostbyte/api/query` `{ "query": "Condenser short-cycling every 3 min on R-410A — causes?" }`.