Nudge市场智能体管理技能Skill nudge-marketplace

Nudge市场智能体管理技能是一个用于在Nudge AI健康平台上发布、管理和运营AI智能体的工具。它提供完整的API接口,支持开发者提交智能体到市场,实现智能体注册、代币激励、用户互动等功能。该技能集成了x402支付协议,支持使用$NUDGE代币支付上架费用,并包含智能体分类管理、定价模型设置、能力标签定义等核心功能。适用于AI智能体开发者、Web3应用构建者和健康科技创业者,帮助快速构建和部署基于区块链激励的AI应用。

AI智能体 0 次安装 2 次浏览 更新于 2/24/2026

Nudge Marketplace Skill

在Nudge市场上启动和管理AI智能体。Nudge是一个AI原生的健康平台,智能体可以注册、赚取$NUDGE代币并与用户互动。

基础URL: https://www.littlenudge.app

快速开始

1. 列出可用智能体

curl https://www.littlenudge.app/api/marketplace/agents

2. 提交您的智能体(需要x402支付)

# 步骤1:获取支付要求
curl -X POST https://www.littlenudge.app/api/marketplace/submit \
  -H "Content-Type: application/json" \
  -d '{
    "name": "MyAgent",
    "icon": "🤖",
    "description": "一个用于...的AI助手",
    "category": "productivity",
    "systemPrompt": "你是一个乐于助人的助手,...",
    "pricing": { "perMessage": 0, "isFree": true },
    "creatorWallet": "0xYourWallet",
    "capabilities": ["任务管理", "提醒"]
  }'
# 返回402状态码及支付说明

# 步骤2:支付上架费(价值0.10美元的$NUDGE代币)
# 发送NUDGE到:0x2390C495896C78668416859d9dE84212fCB10801
# 在Monad测试网(链ID:10143)上操作

# 步骤3:提交支付凭证
curl -X POST https://www.littlenudge.app/api/marketplace/submit \
  -H "Content-Type: application/json" \
  -d '{
    "name": "MyAgent",
    "icon": "🤖",
    "description": "一个用于...的AI助手",
    "category": "productivity", 
    "systemPrompt": "你是一个乐于助人的助手,...",
    "pricing": { "perMessage": 0, "isFree": true },
    "creatorWallet": "0xYourWallet",
    "capabilities": ["任务管理", "提醒"],
    "paymentProof": "0xYourTxHash"
  }'

API参考

GET /api/marketplace/agents

列出所有市场智能体。

查询参数:

  • category - 按类别筛选:wellnessproductivitylifestyleentertainmentall
  • search - 按名称、描述或功能搜索

响应:

{
  "agents": [
    {
      "id": "nudge-coach",
      "name": "Nudge Coach",
      "icon": "🌱",
      "description": "您的健康伴侣...",
      "category": "wellness",
      "price": 0,
      "isFree": true,
      "rating": 4.9,
      "totalRatings": 2341,
      "usageCount": 15420,
      "featured": true,
      "triggers": ["check-in", "mood", "wellness"],
      "capabilities": ["每日签到", "情绪追踪"]
    }
  ],
  "total": 16,
  "categories": ["wellness", "productivity", "lifestyle", "entertainment"]
}

POST /api/marketplace/submit

向市场提交新智能体。

x402协议流程:

  1. 不带paymentProof的POST请求 → 返回402 Payment Required
  2. 支付上架费(价值0.10美元的$NUDGE代币)
  3. paymentProof(交易哈希)的POST请求 → 智能体创建

请求体:

{
  "name": "智能体名称",
  "icon": "🤖",
  "description": "您的智能体功能(10-500字符)",
  "category": "wellness|productivity|lifestyle|entertainment",
  "systemPrompt": "您的智能体系统提示(至少20字符)",
  "pricing": {
    "perMessage": 0,
    "isFree": true
  },
  "creatorWallet": "0x...",
  "capabilities": ["功能1", "功能2"],
  "paymentProof": "0xTransactionHash"
}

402响应(需要支付):

{
  "error": "需要支付",
  "amount": 100000,
  "currency": "USDC",
  "recipientWallet": "0x2390C495896C78668416859d9dE84212fCB10801",
  "network": "Base",
  "x402": {
    "version": "1.0",
    "accepts": ["usdc"],
    "price": 100000,
    "payTo": "0x2390C495896C78668416859d9dE84212fCB10801"
  }
}

成功响应:

{
  "success": true,
  "agent": {
    "id": "myagent-abc123",
    "name": "MyAgent",
    "status": "live"
  }
}

GET /api/marketplace/submit

查询已提交的智能体。

查询参数:

  • wallet - 获取指定钱包地址提交的所有智能体
  • id - 按ID获取特定智能体

支付详情

字段
代币 $NUDGE
金额 100,000(6位小数 = 0.10美元)
收款方 0x2390C495896C78668416859d9dE84212fCB10801
网络 Monad测试网(链ID:10143)
代币地址 0xaEb52D53b6c3265580B91Be08C620Dc45F57a35F

智能体类别

类别 描述
wellness 健康、冥想、健身、心理健康
productivity 任务、习惯、专注、时间管理
lifestyle 美食、旅行、书籍、推荐
entertainment 电影、音乐、游戏、问答

定价模型

智能体可以是:

  • 免费isFree: true)- 每条消息不收费
  • 付费isFree: false, perMessage: X)- X为微美分(10000 = 0.01美元)

付费智能体在用户互动时赚取$NUDGE代币。

示例:使用TypeScript提交智能体

import { createWalletClient, http, parseUnits } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';

const API_URL = 'https://www.littlenudge.app';
const NUDGE_TOKEN = '0xaEb52D53b6c3265580B91Be08C620Dc45F57a35F';
const PLATFORM_WALLET = '0x2390C495896C78668416859d9dE84212fCB10801';
const LISTING_FEE = parseUnits('0.1', 6); // 0.10美元

async function submitAgent(agent: AgentSubmission, privateKey: string) {
  // 步骤1:尝试提交以获取支付要求
  const res1 = await fetch(`${API_URL}/api/marketplace/submit`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(agent),
  });
  
  if (res1.status !== 402) throw new Error('预期402状态码');
  
  // 步骤2:支付上架费
  const account = privateKeyToAccount(privateKey);
  const walletClient = createWalletClient({
    account,
    chain: monadTestnet,
    transport: http(),
  });
  
  const txHash = await walletClient.writeContract({
    address: NUDGE_TOKEN,
    abi: erc20Abi,
    functionName: 'transfer',
    args: [PLATFORM_WALLET, LISTING_FEE],
  });
  
  // 步骤3:提交支付凭证
  const res2 = await fetch(`${API_URL}/api/marketplace/submit`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ ...agent, paymentProof: txHash }),
  });
  
  return res2.json();
}

资源