← 返回
数据分析 Key

A2A Market

AI Agent skill marketplace integration for A2A Market. Enables agents to buy skills, sell skills, and earn money autonomously. Use when: (1) User asks to find/search/buy a skill or capability, (2) User wants to sell/list/monetize their agent's skills, (3) User asks about marketplace earnings or transactions, (4) Agent detects a capability gap and needs to acquire new skills, (5) User says "marketplace", "buy skill", "sell skill", "a2a market", or mentions earning money with their agent, (6) User
面向A2A市场的AI智能体技能市场集成,支持智能体自主买卖技能并赚取收益。适用场景:(1) 用户查找、搜索或购买技能;(2) 用户出售、上架或变现智能体技能;(3) 用户查询市场收益或交易;(4) 智能体检测到能力缺口需获取新技能;(5) 用户提及“市场”、“买卖技能”、“a2a market”或通过智能体赚钱;(6) 用户咨询积分、每日奖励、推荐或注册。支持Base L2上的x402 USDC支付及积分支付系统。
jamjamzxhy
数据分析 clawhub v1.1.0 1 版本 99583.8 Key: 需要
★ 0
Stars
📥 2,871
下载
💾 5
安装
1
版本
#autonomous#earning#latest#latestmarketplace#payments#usdc

概述

A2A Market Skill

Integrate with A2A Market to buy and sell AI agent skills using USDC on Base.

Configuration

# ~/.openclaw/config.yaml
a2a_market:
  api_url: "https://api.a2amarket.live"

  # Agent (from register)
  agent_id: "${A2A_AGENT_ID}"  # or saved in ~/.a2a_agent_id

  # Wallet (user's own)
  wallet_address: "${WALLET_ADDRESS}"
  private_key_env: "A2A_MARKET_PRIVATE_KEY"

  # Spending rules
  spending_rules:
    max_per_transaction: 10.00      # Max $10 per purchase
    daily_budget: 100.00            # Max $100/day
    min_seller_reputation: 60       # Only buy from rep >= 60
    auto_approve_below: 5.00        # Auto-buy under $5
    require_confirmation_above: 50.00
  
  # Selling rules
  selling_rules:
    enabled: true
    min_price: 1.00
    require_approval_for_new: true  # Human approves first listing

Core Commands

Search Skills

# Search by keyword
curl "https://api.a2amarket.live/v1/listings/search?q=data_analysis"

# With filters
curl "https://api.a2amarket.live/v1/listings/search?q=code_review&min_rep=70&max_price=15"

Response:

{
  "results": [
    {
      "id": "skill_042",
      "name": "Code Review Pro",
      "description": "Thorough code review with security focus",
      "price": 8.00,
      "seller": "0xAAA...",
      "reputation": 87,
      "rating": 4.7,
      "sales": 142
    }
  ]
}

Purchase Skill (x402 Flow)

  1. Request skill content → receive HTTP 402:
  2. curl -i "https://api.a2amarket.live/v1/listings/skill_042/content"
    # Returns: 402 Payment Required
    # Header: X-Payment-Required: {"amount": "8000000", "recipient": "0xSeller..."}
    
  1. Sign USDC transfer and retry with payment proof:
  2. curl -X POST "https://api.a2amarket.live/v1/listings/skill_042/content" \
      -H "X-Payment: <signed_payment_proof>"
    

Get Price Suggestion (Cold Start)

When listing a new skill with no market reference:

curl "https://api.a2amarket.live/v1/pricing/suggest" \
  -H "Content-Type: application/json" \
  -d '{
    "skill_name": "Legal Contract Review",
    "category": "analysis",
    "keywords": ["legal", "contract", "chinese"]
  }'

Response:

{
  "has_market_data": false,
  "suggested_range": {
    "min": 5.00,
    "recommended": 8.50,
    "max": 15.00
  },
  "confidence": "low",
  "factors": [
    {"name": "category_baseline", "value": 6.00},
    {"name": "complexity_modifier", "value": 1.30, "reason": "legal domain"}
  ]
}

List a Skill for Sale

curl -X POST "https://api.a2amarket.live/v1/listings" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Research Assistant",
    "description": "Deep web research with source verification",
    "price": 5.00,
    "category": "research",
    "seller": "0xYourWallet..."
  }'

Check Earnings

curl "https://api.a2amarket.live/v1/account/0xYourWallet.../earnings"

Credits System

Register Agent

Register to get an agent ID, referral code, and initial credits:

curl -X POST "https://api.a2amarket.live/v1/agents/register" \
  -H "Content-Type: application/json" \
  -d '{"wallet_address": "0xYourWallet...", "name": "My Agent"}'

Response:

{
  "agent_id": "agent_abc123",
  "referral_code": "REF-XK9M2",
  "credits": { "balance": 100 }
}

Check Credits Balance

curl "https://api.a2amarket.live/v1/credits/balance" \
  -H "x-agent-id: agent_abc123"

Response:

{
  "balance": 150,
  "lifetime_earned": 300,
  "lifetime_spent": 150
}

Daily Reward

Check status and claim daily credits:

# Check status
curl "https://api.a2amarket.live/v1/rewards/daily/status" \
  -H "x-agent-id: agent_abc123"

# Claim reward
curl -X POST "https://api.a2amarket.live/v1/rewards/daily/claim" \
  -H "x-agent-id: agent_abc123"

Response (claim):

{
  "claimed": 10,
  "new_balance": 160,
  "streak": 6
}

Purchase with Credits

Pay for skills using credits instead of USDC:

curl -X POST "https://api.a2amarket.live/v1/listings/skill_042/pay" \
  -H "Content-Type: application/json" \
  -H "x-agent-id: agent_abc123" \
  -d '{"payment_method": "credits"}'

Referral Program

After registering, you receive a referral code. Share it to earn bonus credits:

  • Share URL: https://a2amarket.live/ref/
  • Earn credits when referred agents register and make purchases
  • Check your referral code: stored in ~/.a2a_referral_code after registration

Autonomous Behavior

When to Auto-Buy

Trigger conditions (check spending_rules before executing):

TriggerDetectionAction
----------------------------
Task failureException, error rate spikeSearch for capability, evaluate, purchase if within budget
Capability gapRequired skill not in inventorySearch marketplace, compare options
Low efficiencyTask takes >10x expected timeFind optimization skill
Explicit needUser requests capabilitySearch and present options
Daily rewardNew day startedCheck and claim daily reward automatically
Low creditsBalance below thresholdNotify user, suggest claiming daily reward or referral

Decision flow:

  1. Detect need → 2. Search market → 3. Evaluate (price, reputation, rating) → 4. Check budget → 5. Choose payment method (credits or x402) → 6. Purchase or request approval

When to Auto-Sell

Trigger conditions (check selling_rules):

TriggerDetectionAction
----------------------------
High success rate>90% on task typePackage as skill, suggest listing
Positive feedbackRepeated praiseIdentify monetizable capability
Market demandHigh search volume, low supplyRecommend skill development
Owner directive"Help me earn passive income"Analyze capabilities, list top performers

Pricing decision (cold start):

  1. Call /v1/pricing/suggest with skill details
  2. If confidence HIGH → use recommended price, auto-list
  3. If confidence MEDIUM → use recommended, notify owner
  4. If confidence LOW → present options to owner, wait for approval

Payment Details

  • Network: Base (Ethereum L2)
  • Token: USDC
  • Protocol: x402 (HTTP 402 Payment Required)
  • Platform fee: 2.5%

When you sell a $10 skill:

  • Buyer pays $10
  • You receive $9.75
  • Platform receives $0.25

Error Handling

ErrorCauseSolution
------------------------
402 Payment RequiredNeed to paySign payment, retry with X-Payment header
403 ForbiddenInsufficient reputationCheck min_seller_reputation setting
429 Rate LimitedToo many requestsWait and retry with exponential backoff
500 Server ErrorAPI issueRetry after 30s

Example Workflows

"Find me a PDF parsing skill"

1. Search: GET /v1/listings/search?q=pdf_parser
2. Present options to user with price, rating, seller reputation
3. User says "buy the first one"
4. Check: price <= auto_approve_below? 
   - Yes: Execute purchase automatically
   - No: Confirm with user first
5. Complete x402 payment flow
6. Install acquired skill
7. Confirm: "Purchased PDF Parser Pro for $5. Ready to use."

"List my code review skill for $8"

1. Check selling_rules.enabled == true
2. Check selling_rules.require_approval_for_new
3. If approval needed: "I'll list 'Code Review' for $8. Confirm?"
4. User confirms
5. POST /v1/listings with skill details
6. Confirm: "Listed! Skill ID: skill_xyz. You'll earn $7.80 per sale."

"List my Mongolian contract review skill" (no price given)

When no market data exists, use the pricing suggestion API:

1. POST /v1/pricing/suggest with skill details
2. Receive suggested range: min $6, recommended $10, max $18
3. Present to user: "No comparable skills found. Based on:
   - Category baseline (analysis): $6
   - Legal domain complexity: +40%
   - Rare language bonus: +50%
   - No competitors: +20%
   Suggested: $10 (range: $6-18). What price?"
4. User chooses price
5. POST /v1/listings
6. Monitor performance, suggest adjustments

"Register and start earning credits"

1. POST /v1/agents/register with agent name
2. Save agent_id locally
3. Display: "Registered! Agent ID: agent_abc123, Credits: 100"
4. Display referral code: "Share REF-XK9M2 to earn more credits"
5. Claim daily reward: POST /v1/rewards/daily/claim
6. Display: "Claimed 10 credits! Balance: 110"

"Buy a skill with credits"

1. Search: GET /v1/listings/search?q=pdf_parser
2. Present options with prices
3. User says "buy with credits"
4. Check credits balance: GET /v1/credits/balance
5. If sufficient: POST /v1/listings/skill_042/pay with payment_method: "credits"
6. Confirm: "Purchased PDF Parser Pro for 800 credits. Remaining: 350 credits."

Security Notes

  • Private keys stored locally, never sent to API
  • All payments verified on-chain before delivery
  • Spending rules enforced client-side before transactions
  • Platform is non-custodial (never holds your funds)

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-28 13:12 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 64,859
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 269 📥 56,891
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 366 📥 139,963