Agos Marketplace
Use this skill to automate both sides of AGOS marketplace flow:
- - Seller side: create listing (service)
- Buyer side: create order (purchase)
Defaults
- - Base URL: INLINECODE0
- Supplier endpoint (listing script): fixed to INLINECODE1
- Chain:
BNB Chain (chainId=56) - Settlement token: INLINECODE4
- APIs:
- Seller:
/v1/services
- Buyer: INLINECODE6
Scripts
- -
scripts/create_listing.py: auto-create seller listing - INLINECODE8 : auto-create buyer purchase(order)
Always run scripts directly for automation. Do not ask users to manually craft curl unless debugging.
Sell-Side Automation (Create Listing)
Create listing with generated service id:
CODEBLOCK0
Create listing with fixed service id:
CODEBLOCK1
Dry-run payload:
CODEBLOCK2
Buy-Side Automation (Create Order)
Auto-select first active listing and create order:
CODEBLOCK3
Create order for specific listing and prepare payment params:
CODEBLOCK4
Create order and wait until terminal status:
CODEBLOCK5
Payment Mapping
Use payment_preparation fields to call PaymentRouter.payForService(orderId, serviceId, supplier, token, amount):
- -
purchase_id_hex -> INLINECODE12 - INLINECODE13 -> INLINECODE14
- INLINECODE15 -> INLINECODE16
- INLINECODE17 -> INLINECODE18
- INLINECODE19 -> INLINECODE20
- INLINECODE21 -> target contract
Wallet Responsibility
This skill automates listing and order creation via HTTP APIs.
Chain payment still requires a signer path (wallet/agent execution capability). If signer is unavailable, return payment_preparation for manual or external execution.
Security Constraints
- -
create_listing.py and create_order.py use fixed AGOS API base URL. - URL overrides via
--base-url or AGOS_API_BASE are intentionally disabled. - Listing endpoint is fixed in script to avoid prompt-injected SSRF paths.
Output Contract
For seller flow return:
- - INLINECODE27
- INLINECODE28
For buyer flow return:
- - INLINECODE29
- INLINECODE30
- INLINECODE31 (when requested)
- INLINECODE32 (when requested)
Error Rules
- - If no active listing exists and listing-id is not provided, fail with clear message.
- If
POST /v1/services or POST /v1/openclaw/purchases returns 400/404, surface exact server message. - If status polling times out, return last known state.
Agos 市场
使用此技能自动化 AGOS 市场流程的双端操作:
- - 卖方端:创建列表(服务)
- 买方端:创建订单(购买)
默认配置
- - 基础 URL:https://market.agos.fun
- 供应商端点(列表脚本):固定为 https://market.agos.fun/v1/openclaw/supplier-task
- 链:BNB Chain(chainId=56)
- 结算代币:USDT
- API:
- 卖方:/v1/services
- 买方:/v1/openclaw/purchases*
脚本
- - scripts/createlisting.py:自动创建卖方列表
- scripts/createorder.py:自动创建买方购买(订单)
始终直接运行脚本以实现自动化。除非调试需要,否则不要要求用户手动构造 curl 命令。
卖方端自动化(创建列表)
使用生成的服务 ID 创建列表:
bash
python3 scripts/create_listing.py \
--supplier-wallet 0xYourSupplierWallet \
--name 研究代理 \
--description 生成市场研究摘要 \
--price-usdt 1.5
使用固定服务 ID 创建列表:
bash
python3 scripts/create_listing.py \
--service-id svcresearchagent_v1 \
--supplier-wallet 0xYourSupplierWallet
空运行负载:
bash
python3 scripts/create_listing.py --dry-run
买方端自动化(创建订单)
自动选择第一个活跃列表并创建订单:
bash
python3 scripts/create_order.py \
--buyer-wallet 0xYourBuyerWallet \
--input-json {task:自动下单}
为特定列表创建订单并准备支付参数:
bash
python3 scripts/create_order.py \
--listing-id svcresearchagent_v1 \
--buyer-wallet 0xYourBuyerWallet \
--input-json {task:完整报告} \
--prepare-payment
创建订单并等待至终态:
bash
python3 scripts/create_order.py \
--listing-id svcresearchagent_v1 \
--buyer-wallet 0xYourBuyerWallet \
--input-json {task:完整报告} \
--prepare-payment \
--wait \
--timeout-sec 180 \
--interval-sec 3
支付映射
使用 payment_preparation 字段调用 PaymentRouter.payForService(orderId, serviceId, supplier, token, amount):
- - purchaseidhex -> orderId
- listingidhex -> serviceId
- supplierwallet -> supplier
- tokenaddress -> token
- amountatomic -> amount
- paymentrouter_address -> 目标合约
钱包职责
此技能通过 HTTP API 自动化列表和订单创建。
链上支付仍需签名者路径(钱包/代理执行能力)。如果签名者不可用,则返回 payment_preparation 供手动或外部执行。
安全约束
- - createlisting.py 和 createorder.py 使用固定的 AGOS API 基础 URL。
- 通过 --base-url 或 AGOSAPIBASE 覆盖 URL 的功能被有意禁用。
- 列表端点在脚本中固定,以避免提示注入导致的 SSRF 路径。
输出约定
卖方流程返回:
买方流程返回:
- - purchase
- selectedlistingid
- paymentpreparation(请求时)
- finalstate(请求时)
错误规则
- - 如果没有活跃列表且未提供列表 ID,则失败并显示清晰消息。
- 如果 POST /v1/services 或 POST /v1/openclaw/purchases 返回 400/404,则显示确切的服务器消息。
- 如果状态轮询超时,则返回最后已知状态。