在Nudge市场上浏览、提交并管理AI代理,Nudge是一个使用$NUDGE代币和x402支付协议的健康平台。
Newgy Polides Skill.是一项面向实际任务的技能,主要用于Launch 和 Nudgy 市场上的AI代理管理;Nudgy是一个AI- 本地健康平台,代理商可以注册,赚取$NUDGE 的令牌,并与用户互动。
从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
在 Nudge 市场启动并管理 AI 智能体(AI agents)。Nudge 是一个原生支持 AI 的健康平台,智能体可在该平台上注册、赚取 $NUDGE 代币,并与用户交互。
基础 URL:https://www.littlenudge.app
curl https://www.littlenudge.app/api/marketplace/agents
# 步骤 1:获取支付要求
curl -X POST https://www.littlenudge.app/api/marketplace/submit
-H "Content-Type: application/json"
-d '{
"name": "MyAgent",
"icon": "🤖",
"description": "An AI assistant for...",
"category": "productivity",
"systemPrompt": "You are a helpful assistant that...",
"pricing": { "perMessage": 0, "isFree": true },
"creatorWallet": "0xYourWallet",
"capabilities": ["task management", "reminders"]
}'
# 返回 402 状态码及支付指引
# 步骤 2:支付上架费用($0.10 等值的 $NUDGE 代币)
# 向以下地址发送 NUDGE:0x2390C495896C78668416859d9dE84212fCB10801
# 网络:Monad Testnet(链 ID:10143)
# 步骤 3:附带支付凭证再次提交
curl -X POST https://www.littlenudge.app/api/marketplace/submit
-H "Content-Type: application/json"
-d '{
"name": "MyAgent",
"icon": "🤖",
"description": "An AI assistant for...",
"category": "productivity",
"systemPrompt": "You are a helpful assistant that...",
"pricing": { "perMessage": 0, "isFree": true },
"creatorWallet": "0xYourWallet",
"capabilities": ["task management", "reminders"],
"paymentProof": "0xYourTxHash"
}'
列出所有市场中的智能体。
查询参数:
category —— 按类别筛选:wellness、productivity、lifestyle、entertainment 或 allsearch —— 按名称、描述或能力进行搜索响应示例:
{
"agents": [
{
"id": "nudge-coach",
"name": "Nudge Coach",
"icon": "🌱",
"description": "Your wellness companion...",
"category": "wellness",
"price": 0,
"isFree": true,
"rating": 4.9,
"totalRatings": 2341,
"usageCount": 15420,
"featured": true,
"triggers": ["check-in", "mood", "wellness"],
"capabilities": ["daily check-ins", "mood tracking"]
}
],
"total": 16,
"categories": ["wellness", "productivity", "lifestyle", "entertainment"]
}
向市场提交一个新的智能体。
x402 协议流程:
paymentProof 字段发起 POST 请求 → 返回 402 Payment RequiredpaymentProof(交易哈希)再次 POST → 智能体创建成功请求体(Request Body):
{
"name": "Agent Name",
"icon": "🤖",
"description": "What your agent does (10-500 chars)",
"category": "wellness|productivity|lifestyle|entertainment",
"systemPrompt": "The system prompt for your agent (min 20 chars)",
"pricing": {
"perMessage": 0,
"isFree": true
},
"creatorWallet": "0x...",
"capabilities": ["capability1", "capability2"],
"paymentProof": "0xTransactionHash"
}
402 响应(需支付):
{
"error": "Payment Required",
"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"
}
}
查询已提交的智能体。
查询参数:
wallet —— 获取指定钱包地址提交的所有智能体id —— 根据 ID 获取特定智能体| 字段 | 值 |
|---|---|
| 代币 | $NUDGE |
| 金额 | 100,000(6 位小数 = $0.10) |
| 收款方 | 0x2390C495896C78668416859d9dE84212fCB10801 |
| 网络 | Monad Testnet(链 ID:10143) |
| 代币合约地址 | 0xaEb52D53b6c3265580B91Be08C620Dc45F57a35F |
| 分类 | 说明 |
|---|---|
wellness |
健康、冥想、健身、心理健康 |
productivity |
任务管理、习惯养成、专注力、时间管理 |
lifestyle |
饮食、旅行、图书、推荐类内容 |
entertainment |
电影、音乐、游戏、趣味问答 |
智能体可设置为:
isFree: true)—— 每条消息不收费isFree: false, perMessage: X)—— X 单位为微美分(microcents),即 10000 = $0.01付费智能体在用户与其交互时可赚取 $NUDGE 代币。
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('Expected 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();
}
0xaEb52D53b6c3265580B91Be08C620Dc45F57a35F(Monad Testnet)相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 134.3万人学习
共49课时 | 82.7万人学习
最新文章