-
Notifications
You must be signed in to change notification settings - Fork 633
Add AgentPay partner skill (x402 specialist agents + AgentWorld economy data) #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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" | ||
| 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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'
fiRepository: 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' || trueRepository: 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 300Repository: BlockRunAI/ClawRouter Length of output: 50377 Require user approval before AgentPay actions that withdraw funds or change financial state.
🧰 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 |
||
|
|
||
| --- | ||
|
|
||
| ## 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 -200Repository: 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 || trueRepository: BlockRunAI/ClawRouter Length of output: 16617 🌐 Web query:
💡 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 Citations:
🌐 Web query:
💡 Result: I found no indexed page for The current onboarding page documents:
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: Citations: Align the enrollment flow with the documented AgentPay contracts. The public AgentPay onboarding page uses 🧰 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 |
||
|
|
||
| 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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 |
||
|
|
||
| **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?" }`. | ||
There was a problem hiding this comment.
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:
Repository: BlockRunAI/ClawRouter
Length of output: 35086
Remove the
ask agentpayskill trigger.ClawRouter already provides a built-in
askcommand; registeringask agentpayas a separate keyword can make SkillSpector flag a conflict. Use a unique skill trigger such asagentpay askinstead.🧰 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
Source: Linters/SAST tools