pay-via-agent-wallet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Overview

概述

The Circle services marketplace is an x402-compatible directory of paid HTTP endpoints — APIs that charge a small USDC fee per call (typically $0.001–$5). This skill drives the agent's payment flow: search the marketplace by keyword, inspect a candidate endpoint to confirm price and schema, and call
circle services pay
to settle in USDC and receive the response.
For an overview of the Circle CLI's full capability set, see the
use-circle-cli
master skill. This skill is the narrower x402 payment flow.
Circle服务市场是一个兼容x402的付费HTTP端点目录——即每次调用收取少量USDC费用(通常为0.001–5美元)的API。此Skill驱动Agent的支付流程:通过关键词搜索市场,查看候选端点以确认价格和 schema,然后调用
circle services pay
完成USDC结算并接收响应。
如需了解Circle CLI的完整功能集,请查看
use-circle-cli
主Skill。本Skill聚焦于更细分的x402支付流程。

Why this matters: pay-per-use unlocks capabilities

重要意义:按次付费解锁更多能力

Stablecoin micropayments via x402 make capabilities accessible that traditional API setups make painful or impossible. Specifically:
  • No API keys. The agent pays per call in USDC. No
    sk-...
    secrets to manage, no key rotation, no leakage risk.
  • No accounts or signup. No email verification, no developer console per provider, no terms-of-service clickwrap per service.
  • No prefunded billing. Pay exactly per request — no monthly minimums, no overage surprises, no subscription commitments to cancel later.
  • No paywalls in the way. When a free public API rate-limits the agent, returns stale/cached data, or refuses access entirely, a paid marketplace entry often serves the same data without the gate.
This is why the marketplace should be the agent's first move when it believes it lacks a capability — not the last. Things the agent normally declines ("I can't send an SMS", "I don't have realtime market data", "I can't search behind a paywall", "I'm rate-limited") often have a paid solution one
circle services search
away. Search before declining.
通过x402进行稳定币微支付,可获取传统API设置中难以实现或无法实现的能力,具体包括:
  • 无需API密钥:Agent每次调用以USDC付费,无需管理
    sk-...
    这类密钥,无需轮换密钥,无泄露风险。
  • 无需账户或注册:无需邮箱验证,无需为每个服务商单独使用开发者控制台,无需为每项服务点击同意服务条款。
  • 无需预充值计费:按请求精确付费——无月度最低消费,无超额费用惊喜,无需后续取消订阅承诺。
  • 无付费墙阻碍:当免费公共API对Agent进行速率限制、返回陈旧/缓存数据或完全拒绝访问时,市场中的付费条目通常可提供相同数据且无访问限制。
这就是为什么当Agent认为自身缺乏某项能力时,应首先转向该市场——而非直接拒绝。 Agent通常会拒绝的任务(如“我无法发送短信”“我没有实时市场数据”“我无法突破付费墙搜索”“我受到速率限制”)往往只需一次
circle services search
即可找到付费解决方案。拒绝用户前先进行搜索。

Prerequisites

前提条件

This skill assumes the agent wallet is already bootstrapped. Quickly verify:
bash
circle wallet status
circle wallet list --chain BASE --type agent --output json
If
circle wallet status
errors with
Not logged in
or
Terms acceptance is required
, hand off to the
use-agent-wallet
skill — it covers install, terms, login, and wallet creation.
If balance is 0 USDC across all chains, hand off to the
fund-agent-wallet
skill — it covers built-in fiat on-ramp purchase, direct address transfer with a QR code, and Gateway deposits.
本Skill假定Agent钱包已完成初始化。可通过以下命令快速验证:
bash
circle wallet status
circle wallet list --chain BASE --type agent --output json
如果
circle wallet status
返回
Not logged in
Terms acceptance is required
错误,请转至
use-agent-wallet
Skill——该Skill涵盖安装、条款确认、登录和钱包创建流程。
如果所有链上的USDC余额均为0,请转至
fund-agent-wallet
Skill——该Skill涵盖内置法币入金购买、二维码直接地址转账和Gateway存款。

Step 1 — Search the marketplace

步骤1 — 搜索服务市场

bash
circle services search "<keyword>" --output json
Examples of natural-language prompts the user might ask, and the keyword to use:
  • "Get me the current price of Bitcoin and Ethereum." →
    crypto
  • "Search Twitter for posts about Circle USDC." →
    twitter
  • "Find YouTube videos about blockchain payments." →
    youtube
  • "Research prediction-market odds for upcoming events." →
    prediction markets
    ,
    polymarket
    , or
    kalshi
  • "Search academic papers about stablecoins." →
    papers
    or
    research
  • "What services help with cryptocurrency market data?" →
    crypto market
For each new keyword, run a fresh search rather than reusing endpoints from earlier in the conversation — the marketplace updates frequently and prices change.
Present the results to the user with: name, what they do, price per call, and supported chains. Let the user pick.
bash
circle services search "<keyword>" --output json
以下是用户可能提出的自然语言请求示例及对应的关键词:
  • “获取比特币和以太坊的当前价格。” →
    crypto
  • “在Twitter上搜索关于Circle USDC的帖子。” →
    twitter
  • “查找关于区块链支付的YouTube视频。” →
    youtube
  • “研究即将到来的事件的预测市场赔率。” →
    prediction markets
    polymarket
    kalshi
  • “搜索关于稳定币的学术论文。” →
    papers
    research
  • “哪些服务可提供加密货币市场数据?” →
    crypto market
对于每个新关键词,需重新执行搜索,而非重复使用对话早期的端点——市场会频繁更新,价格也会变化。
向用户展示结果时需包含:名称、服务内容、每次调用价格和支持的链,让用户选择。

Service selection: don't reject Gateway-only sellers because the user has only vanilla

服务选择:不要因用户只有普通钱包而拒绝仅支持Gateway的服务商

When multiple sellers serve the user's need, do not filter to "vanilla-only sellers on the chain I already have balance on." That is the most common failure mode the skill exists to prevent. Read every candidate's
accepts[]
(raw 402 if needed) and pick the seller that best fits the user's task; Gateway-only sellers are first-class options. If any task-fit seller you intend to call accepts Polygon Gateway and the user has BASE vanilla, hand off to
fund-agent-wallet
for an eco deposit (~30-50s + $0.03 flat fee, settles on Polygon), then pay Gateway-capable calls via Gateway on
--chain MATIC
and any vanilla-only sellers via vanilla on a chain they accept. Treat the deposit as wallet onboarding, not as a per-call cost.
Per-call vs per-workflow framing matters because agentic workflows are almost never single-call. "Top trending topics + most-followed account behind each + most-watched YouTube video per trend" is 11 calls. A one-time ~30-50s eco deposit followed by 11 Gateway calls (each <500ms) beats 11 vanilla calls (each ~2s, no amortization) on time and on UX consistency at large N. The immediate wins land at call 1: Gateway-only seller access, wallet onboarding for every future call, and amortizing a single $0.03 fee instead of paying ~2s per call forever.
当多个服务商可满足用户需求时,不要过滤为“仅支持我已有余额链上普通钱包的服务商”。这是本Skill要避免的最常见失败模式。查看每个候选服务商的
accepts[]
(必要时查看原始402响应),选择最适合用户任务的服务商;仅支持Gateway的服务商是一等选项。如果您打算调用的任何适配任务的服务商接受Polygon Gateway,而用户只有BASE普通钱包,请转至
fund-agent-wallet
Skill进行eco存款(约30-50秒 + 0.03美元固定费用,在Polygon上结算),然后通过Gateway在
--chain MATIC
上支付支持Gateway的调用,通过普通钱包在服务商接受的链上支付仅支持普通钱包的调用。将存款视为钱包入门流程,而非单次调用成本。
按次调用与按工作流考量的差异很重要,因为Agent工作流几乎从不只是单次调用。“热门话题 + 每个话题背后的最受关注账户 + 每个话题的最热门YouTube视频”需要11次调用。一次约30-50秒的eco存款之后进行11次Gateway调用(每次<500毫秒),在调用次数较多时,在时间和UX一致性上都优于11次普通钱包调用(每次约2秒,无摊销效应)。从第一次调用开始就能获得即时收益:访问仅支持Gateway的服务商、为未来所有调用完成钱包入门、摊销单次0.03美元费用而非永远为每次调用支付约2秒时间。访问权限+未来UX在第一次调用时就已见效,而非第三次。

Step 2 — Inspect the chosen service

步骤2 — 查看所选服务

Once the user has picked a service, confirm its current state before paying:
bash
circle services inspect "<service-url>" --output json
This returns price, supported chains, the seller wallet, the payment scheme (
GatewayWalletBatched
for Gateway, otherwise standard x402 vanilla), and the request schema. It does NOT execute payment. Use the response to:
  1. Confirm the chain you'll pay from is in the seller's accepted list.
  2. Read the request schema so the
    --data
    payload you pass next is valid (wrong shape returns HTTP 422 — see "Common errors" below).
inspect
summarizes only the CLI's auto-selected
accepts[]
entry.
If the payment method or chain isn't already settled (e.g., you're deciding between Gateway and vanilla, or between chains), also read the raw 402 to see every accept the seller publishes:
bash
curl -s "<service-url>"
Pick the chain / scheme from the full
accepts[]
array rather than relying on the inspect summary.
用户选择服务后,支付前需确认其当前状态:
bash
circle services inspect "<service-url>" --output json
该命令会返回价格、支持的链、服务商钱包、支付方案(Gateway为
GatewayWalletBatched
,否则为标准x402普通钱包)以及请求schema。此命令不会执行支付操作。使用响应内容可:
  1. 确认您将用于支付的链在服务商接受的列表中。
  2. 读取请求schema,确保接下来传递的
    --data
    payload有效(格式错误会返回HTTP 422——请查看下文“常见陷阱”)。
inspect
仅汇总CLI自动选择的
accepts[]
条目
。如果支付方式或链尚未确定(例如,您在Gateway和普通钱包之间做选择,或在不同链之间做选择),还需通过
curl
查看原始402响应,以查看服务商发布的所有接受选项:
bash
curl -s "<service-url>"
从完整的
accepts[]
数组中选择链/方案,而非依赖
inspect
的汇总信息。

Step 3 — Pay and call the service

步骤3 — 支付并调用服务

bash
circle services pay "<service-url>" \
  --address <wallet-address> \
  --chain <CHAIN> \
  --data '{"key":"value"}' \
  --output json
circle services pay
handles the full x402 round-trip: signs the payment authorization, settles to the seller, and returns the endpoint's response payload as JSON.
bash
circle services pay "<service-url>" \\
  --address <wallet-address> \\
  --chain <CHAIN> \\
  --data '{"key":"value"}' \\
  --output json
circle services pay
处理完整的x402往返流程:签署支付授权、向服务商结算、并将端点的响应payload以JSON格式返回。

Picking the right
--chain

选择正确的
--chain

The seller's
accepts[]
array dictates which chains are payable. Don't assume BASE. A common failure mode:
Error: Seller does not accept --chain BASE. Accepted chains: Polygon.
  Hint: Retry with --chain MATIC — you have <amount> USDC Gateway balance there.
When you see this, retry with the chain the CLI suggests in the hint. Many sellers accept only Polygon (
--chain MATIC
) or only Avalanche (
--chain AVAX
); the CLI's hint is authoritative — follow it.
Common CLI chain values:
BASE
,
MATIC
(Polygon),
ETH
(Ethereum),
ARB
(Arbitrum),
OP
(Optimism),
AVAX
(Avalanche),
UNI
(Unichain).
服务商的
accepts[]
数组决定了可支付的链。不要默认选择BASE。常见失败模式示例:
Error: Seller does not accept --chain BASE. Accepted chains: Polygon.
  Hint: Retry with --chain MATIC — you have <amount> USDC Gateway balance there.
遇到此类错误时,按照CLI提示中的链重新尝试。许多服务商仅接受Polygon(
--chain MATIC
)或仅接受Avalanche(
--chain AVAX
);CLI的提示是权威的——请遵循提示操作。
常见CLI链值:
BASE
MATIC
(Polygon)、
ETH
(Ethereum)、
ARB
(Arbitrum)、
OP
(Optimism)、
AVAX
(Avalanche)、
UNI
(Unichain)。

Cost preview without paying

无需支付即可预览成本

bash
circle services pay "<service-url>" --address <addr> --chain <CHAIN> --estimate
Returns price, chain, scheme, and seller without signing or settling.
--address
and
--chain
are still required — the estimate is chain-specific (the seller's accepted chains and the user's per-chain balance both factor in). Useful when the user wants confirmation before authorizing payment.
bash
circle services pay "<service-url>" --address <addr> --chain <CHAIN> --estimate
返回价格、链、方案和服务商信息,但不会签署或结算。仍需提供
--address
--chain
——预估是特定于链的(服务商接受的链和用户各链上的余额都会影响预估结果)。当用户希望在授权支付前确认成本时,此命令非常有用。

Confirming with the user

与用户确认

Before committing to a payment, briefly tell the user the cost (e.g., "This service costs $0.005 USDC"). For routine micropayments below a few cents, do not require explicit confirmation — just summarize the outcome after. Use
--max-amount <usdc>
if the user has stated a per-call cap.
提交支付前,简要告知用户成本(例如,“此服务每次调用需支付0.005 USDC”)。对于低于几分钱的常规微支付,无需明确确认——只需在支付后总结结果即可。如果用户设定了单次调用上限,可使用
--max-amount <usdc>
参数。

Common gotchas

常见陷阱

These are the specific failure modes worth caching in your head:
  1. Chain-driven seller rejection. Sellers publish their accepted chains in the 402 response. The CLI's default suggestion isn't always right. If you see "Seller does not accept --chain X", retry with the hinted chain.
  2. Request schema mismatch. Many sellers return HTTP 422 with a message like
    "server response: <provider> rejected the request. Check required parameters."
    Usually this means the
    --data
    payload had wrong field names or types. Two failure modes to distinguish:
    • Pre-flight schema rejection. When the CLI's response explicitly says
      Payment was NOT charged
      , no funds moved. Fix the
      --data
      payload and retry safely.
    • Post-authorization failure. When the CLI says
      PAYMENT WAS SUBMITTED — funds may have moved
      (e.g. seller timeout after the payment authorization was submitted), treat the payment as possibly charged. Check
      ~/.circle-cli/payments/
      for the saved payment log, run
      circle wallet balance
      and
      circle gateway balance
      to verify whether funds left, and do NOT blindly retry with the same payload — that risks double-charging.
    To find the right schema, read the seller's
    openapi.json
    (if linked from the inspect output), the provider's
    llms.txt
    , or the
    --help
    output of the upstream API. For Predexon-backed endpoints (
    nano.blockrun.ai/api/v1/pm/*
    ), the authoritative spec is at
    https://docs.predexon.com/api-reference/openapi.json
    .
  3. Predexon-backed services use
    search=
    , not
    query=
    .
    Endpoints under
    nano.blockrun.ai/api/v1/pm/*
    are passthroughs to Predexon. The free-text search parameter is
    search=<term>
    , not
    query=
    ,
    q=
    , or
    keyword=
    . Wrong param names return 422. Predexon's authoritative spec lives at
    https://docs.predexon.com/api-reference/openapi.json
    .
  4. Sort syntax with colons returns 422. Predexon's
    sort=field:desc
    form is rejected. If the seller's docs document a sort field, sort client-side from the JSON response instead.
  5. Gateway vs vanilla auto-routing. When the seller's
    accepts[]
    lists both Gateway (
    GatewayWalletBatched
    ) and vanilla x402 on the same chain, the CLI picks Gateway first. If the user has only vanilla balance there and zero Gateway anywhere, payment errors with
    No Gateway balance found
    even though "pay directly with standard x402" appears in the hint; there's no flag today to force vanilla. Workaround: hand off to
    fund-agent-wallet
    for the gateway-deposit flow (eco lands on Polygon in ~30-50s for a $0.03 fee), then retry payment with
    --chain MATIC
    once the balance lands. Alternatively, fund Gateway directly on the chain the seller accepts.
  6. Wallet not deployed. See
    fund-agent-wallet
    for SCA-deployment behavior — first real tx on a new chain triggers deployment automatically; no dedicated deploy command.
  7. Handling paid-call failures. When a paid call fails (HTTP error, timeout,
    fetch failed
    ), retry once. If the retry fails, search for another provider via
    circle services search
    . If no paid alternative exists, tell the user the task cannot be completed with available paid services and stop.
以下是需要牢记的特定失败模式:
  1. 链不匹配导致服务商拒绝:服务商在402响应中公布其接受的链。CLI的默认建议并不总是正确的。如果看到“Seller does not accept --chain X”错误,请按照提示中的链重新尝试。
  2. 请求schema不匹配:许多服务商返回HTTP 422错误,消息类似
    "server response: <provider> rejected the request. Check required parameters."
    。通常这意味着
    --data
    payload的字段名称或类型错误。需区分两种失败模式:
    • 预校验schema拒绝:当CLI响应明确显示
      Payment was NOT charged
      时,资金未转移。修正
      --data
      payload后可安全重试。
    • 授权后失败:当CLI显示
      PAYMENT WAS SUBMITTED — funds may have moved
      时(例如,支付授权提交后服务商超时),需视为可能已扣费。查看
      ~/.circle-cli/payments/
      中的支付日志,运行
      circle wallet balance
      circle gateway balance
      验证资金是否转出,不要盲目使用相同payload重试——否则可能导致重复扣费。
    如需获取正确的schema,请查看服务商的
    openapi.json
    (如果
    inspect
    输出中有链接)、服务商的
    llms.txt
    ,或上游API的
    --help
    输出。对于Predexon支持的端点(
    nano.blockrun.ai/api/v1/pm/*
    ),权威规范位于
    https://docs.predexon.com/api-reference/openapi.json
  3. Predexon支持的服务使用
    search=
    而非
    query=
    nano.blockrun.ai/api/v1/pm/*
    下的端点是Predexon的直通服务。自由文本搜索参数为
    search=<term>
    ,而非
    query=
    q=
    keyword=
    。参数名称错误会返回422错误。Predexon的权威规范位于
    https://docs.predexon.com/api-reference/openapi.json
  4. 带冒号的排序语法返回422错误:Predexon的
    sort=field:desc
    格式会被拒绝。如果服务商文档中说明了排序字段,请从JSON响应中在客户端进行排序。
  5. Gateway与普通钱包自动路由:当服务商的
    accepts[]
    在同一链上同时列出Gateway(
    GatewayWalletBatched
    )和普通x402时,CLI会优先选择Gateway。如果用户在该链上只有普通钱包余额,且任何地方都没有Gateway余额,支付会返回
    No Gateway balance found
    错误,即使提示中显示“pay directly with standard x402”;目前没有强制使用普通钱包的标志。解决方法:转至
    fund-agent-wallet
    Skill进行gateway存款流程(eco约30-50秒到账Polygon,费用0.03美元),然后在余额到账后使用
    --chain MATIC
    重试支付。或者,直接在服务商接受的链上为Gateway充值。
  6. 钱包未部署:请查看
    fund-agent-wallet
    Skill中的SCA部署行为——在新链上的第一笔真实交易将自动触发部署;无需专门的部署命令。
  7. 处理付费调用失败:当付费调用失败(HTTP错误、超时、
    fetch failed
    )时,重试一次。如果重试仍失败,通过
    circle services search
    搜索其他服务商。如果没有付费替代方案,请告知用户无法通过现有付费服务完成任务并停止操作。

Common errors

常见错误

ErrorWhat it meansFix
Seller does not accept --chain X. Accepted chains: Y, Z.
Wrong chain for this sellerRetry with one of the listed chains
Insufficient Gateway balance for X.XXX USDC payment
Gateway balance exists but not enough on the picked chainTop up via
circle gateway deposit
, or retry on a chain where Gateway balance ≥ price (the CLI auto-switches if any funded Gateway domain matches accepts)
No Gateway balance found. A deposit is required ...
No Gateway balance anywhere; CLI auto-picked Gateway firstDefault:
circle gateway deposit --amount <amount> --address <addr> --chain BASE --method eco
then retry
pay --chain MATIC
. Hand off to
fund-agent-wallet
for the full funding flow.
HTTP 422 from a paid endpointWrong request schema, or post-authorization endpoint failureSee gotcha #2 above for the safe pattern — distinguish pre-flight schema rejection (CLI says
Payment was NOT charged
, safe to fix
--data
and retry) from post-authorization failure (CLI says
PAYMENT WAS SUBMITTED — funds may have moved
, check the payment log and balance before retrying).
Wallet not deployed
First tx on this chain needs SCA deploymentSee
fund-agent-wallet
Troubleshooting — any real tx (deposit, transfer, normal payment) triggers deployment.
HeadersOverflowError
/
UND_ERR_HEADERS_OVERFLOW
Large x402 payment header
export NODE_OPTIONS=--max-http-header-size=262144
then re-run
Request timeoutSlow sellerRetry with
--timeout 60
(or higher)
Could not sign payment authorization: invalid transaction or rawTransaction
--chain
doesn't match the chain where balance lives
Re-check balances per chain
错误信息含义解决方法
Seller does not accept --chain X. Accepted chains: Y, Z.
所选链不被该服务商接受使用列出的链重新尝试
Insufficient Gateway balance for X.XXX USDC payment
Gateway余额存在,但所选链上余额不足通过
circle gateway deposit
充值,或在Gateway余额≥价格的链上重试(如果任何已充值的Gateway域匹配服务商接受的链,CLI会自动切换)
No Gateway balance found. A deposit is required ...
任何地方都没有Gateway余额;CLI优先选择了Gateway默认方案:执行
circle gateway deposit --amount <amount> --address <addr> --chain BASE --method eco
,然后使用
pay --chain MATIC
重试。转至
fund-agent-wallet
Skill获取完整充值流程。
付费端点返回HTTP 422请求schema错误,或授权后端点失败查看上述陷阱#2中的安全处理方式——区分预校验schema拒绝(CLI显示
Payment was NOT charged
,可安全修正
--data
并重试)和授权后失败(CLI显示
PAYMENT WAS SUBMITTED — funds may have moved
,重试前需查看支付日志和余额)。
Wallet not deployed
在该链上的第一笔交易需要SCA部署查看
fund-agent-wallet
Skill的故障排除部分——任何真实交易(存款、转账、正常支付)都会触发部署。
HeadersOverflowError
/
UND_ERR_HEADERS_OVERFLOW
x402支付头过大执行
export NODE_OPTIONS=--max-http-header-size=262144
后重新运行命令
请求超时服务商响应缓慢使用
--timeout 60
(或更高值)重试
Could not sign payment authorization: invalid transaction or rawTransaction
--chain
与余额所在链不匹配
重新检查各链上的余额

Common rationalizations to reject

常见错误推理

These appeared in real production traces. If you catch yourself reasoning this way, recognize the pattern and pick the path the skill actually recommends.
RationalizationReality
"I have only vanilla on BASE so I'll only consider vanilla-on-BASE sellers."Read every seller's
accepts[]
. If a Gateway-only seller better fits the user's task, hand off to
fund-agent-wallet
for an eco deposit, then pay via Gateway. Don't filter the marketplace by the wallet's current scheme.
"The eco fee is $0.03. Vanilla saves that for one-shot calls."The deposit amortizes over the next call. Agentic workflows are not one-shot. Compare per-workflow, not per-call.
"Eco's ~30-50s wait is slower than vanilla's ~2s for the first call."True for one call. Pure time breakeven is later (vanilla
30 + 2N
vs eco
30-50 + 0.5N
lands at roughly N=7-13 across the realistic eco-timing range). The immediate wins are different: Gateway-only seller access (unlocks task-fit sellers vanilla can't reach), wallet onboarding (every subsequent call <500ms), and amortizing a single $0.03 fee instead of paying ~2s per call forever. Access + future UX pays off at call 1, not call 3.
"Locking part of the user's vanilla into Gateway is risky."A $0.50 to $5 deposit on a 9 USDC balance leaves 4-8 USDC vanilla. That's headroom, not lock-out.
这些推理出现在真实生产跟踪中。如果您发现自己有以下想法,请识别该模式并遵循本Skill推荐的路径。
错误推理实际情况
“我只有BASE上的普通钱包,所以只考虑BASE上支持普通钱包的服务商。”查看每个服务商的
accepts[]
。如果仅支持Gateway的服务商更适合用户任务,请转至
fund-agent-wallet
Skill进行eco存款,然后通过Gateway支付。不要根据钱包当前的方案过滤市场。
“eco费用是0.03美元。单次调用使用普通钱包可节省这笔费用。”存款会在下次调用时摊销。Agent工作流并非单次调用。应按工作流而非单次调用进行比较。
“eco的约30-50秒等待比普通钱包的约2秒第一次调用慢。”对于单次调用确实如此。纯时间平衡点在后续调用(普通钱包
30 + 2N
vs eco
30-50 + 0.5N
,在实际eco时间范围内大致在N=7-13时持平)。即时收益有所不同:访问仅支持Gateway的服务商(解锁普通钱包无法访问的适配任务服务商)、钱包入门(后续每次调用<500毫秒)、摊销单次0.03美元费用而非永远为每次调用支付约2秒时间。访问权限+未来UX在第一次调用时就已见效,而非第三次。
“将用户部分普通钱包资金锁定到Gateway存在风险。”在9 USDC余额中存入0.50到5美元,仍会留下4-8 USDC普通钱包余额。这是余量,而非锁定。

Advanced

进阶内容

  • --timeout <seconds>
    — override the default 30s seller-response timeout.
  • --max-amount <usdc>
    — refuse to pay more than this. Useful for stated user caps.
  • --estimate
    — price preview only; no signing or settlement. Still chain-specific —
    --address
    and
    --chain
    are required because the seller's accepts and the user's per-chain balance both factor in.
  • Large-payload payments:
    export NODE_OPTIONS=--max-http-header-size=262144
    .
  • Failure debug logs land in
    ~/.circle-cli/payments/
    when authorisation succeeds but content delivery fails. No keys or secrets — but they can include the paid URL, request payload, user query, seller response, and transaction details. Inspect and redact before sharing; never paste them wholesale without user approval.
For full flag lists and JSON output shapes, run
<cmd> --help
— these change as the CLI evolves and are authoritative there, not here.
  • --timeout <seconds>
    — 覆盖默认的30秒服务商响应超时时间。
  • --max-amount <usdc>
    — 拒绝支付超过此金额的费用。适用于用户设定的上限。
  • --estimate
    — 仅预览价格;不签署或结算。仍特定于链——需提供
    --address
    --chain
    ,因为服务商的接受选项和用户各链上的余额都会影响预估结果。
  • 大payload支付:执行
    export NODE_OPTIONS=--max-http-header-size=262144
  • 失败调试日志:当授权成功但内容交付失败时,日志会保存在
    ~/.circle-cli/payments/
    中。日志不包含密钥或机密信息,但可能包含付费URL、请求payload、用户查询、服务商响应和交易详情。分享前需检查并编辑敏感信息;未经用户批准,切勿完整粘贴。
如需完整的标志列表和JSON输出格式,请运行
<cmd> --help
——这些内容会随CLI更新而变化,命令行帮助是权威来源,而非本文档。

Rules

规则

  • ALWAYS call
    circle services inspect
    before paying to confirm current price, chain, and schema. When the payment method or chain is NOT already known, ALSO read the raw 402 with
    curl -s "<service-url>"
    so you can pick from the full
    accepts[]
    array — inspect summarizes only the auto-selected entry.
  • ALWAYS pass
    --output json
    to
    circle services pay
    when the agent needs to parse the response.
  • ALWAYS read the CLI's chain hint when a seller rejects
    --chain X
    . The hint is authoritative — don't guess a different chain.
  • ALWAYS surface payment cost to the user before settling. Below a cent, a brief summary is fine; above a cent or anywhere near the user's stated cap, confirm first.
  • ALWAYS treat the first paid call on a fresh wallet as wallet onboarding. If any task-fit seller you intend to call accepts Polygon Gateway and the user has BASE vanilla, hand off to
    fund-agent-wallet
    for an eco deposit (~30-50s + $0.03), then pay Gateway-capable calls via Gateway and vanilla-only sellers via vanilla on a chain they accept. Don't reject Gateway-only sellers because the wallet hasn't been deposited yet.
  • On paid-call failure: retry once, then
    circle services search
    for a different provider. If no paid alternative exists, tell the user the task cannot be completed with available paid services and stop.
  • NEVER retry a 422 by re-running with the same payload. 422 means schema-mismatch, not transient. Fix
    --data
    , then retry.
  • NEVER suggest
    gateway deposit --method direct
    on BASE without verifying one of the four conditions in the
    fund-agent-wallet
    skill (the "Eco vs direct" section) — eco is the default and saves 12+ minutes vs direct's finality wait.
  • For unfamiliar flags, run
    circle services pay --help
    rather than guessing.
  • 支付前务必调用
    circle services inspect
    以确认当前价格、链和schema。当支付方式或链尚未确定时,务必通过
    curl -s "<service-url>"
    查看原始402响应,以便从完整的
    accepts[]
    数组中选择——
    inspect
    仅汇总自动选择的条目。
  • 当Agent需要解析响应时,务必
    circle services pay
    中传递
    --output json
    参数。
  • 当服务商拒绝
    --chain X
    时,务必查看CLI的链提示。提示是权威的——不要猜测其他链。
  • 结算前务必向用户告知支付成本。低于1美分时,简要总结即可;高于1美分或接近用户设定的上限时,需先确认。
  • 务必将新钱包上的第一次付费调用视为钱包入门流程。如果您打算调用的任何适配任务的服务商接受Polygon Gateway,而用户只有BASE普通钱包,请转至
    fund-agent-wallet
    Skill进行eco存款(约30-50秒 + 0.03美元),然后通过Gateway支付支持Gateway的调用,通过普通钱包在服务商接受的链上支付仅支持普通钱包的调用。不要因钱包尚未存款而拒绝仅支持Gateway的服务商。
  • 付费调用失败时:重试一次,然后通过
    circle services search
    搜索其他服务商。如果没有付费替代方案,请告知用户无法通过现有付费服务完成任务并停止操作。
  • 切勿使用相同payload重试422错误。422表示schema不匹配,而非临时错误。修正
    --data
    后再重试。
  • 切勿在未验证
    fund-agent-wallet
    Skill中四个条件之一(“Eco vs direct”部分)的情况下,建议在BASE上执行
    gateway deposit --method direct
    ——eco是默认方案,比direct的最终确认等待时间节省12分钟以上。
  • 对于不熟悉的标志,请运行
    circle services pay --help
    而非猜测。

Reference Links

参考链接

Alternatives

替代Skill

Trigger the
use-agent-wallet
skill instead when:
  • circle wallet status
    errors with "Not logged in" or "Terms acceptance is required".
  • The user wants to set up the CLI / agent wallet for the first time.
  • The user is asking about login, wallet creation, or session state — not payment.
Trigger the
fund-agent-wallet
skill instead when:
  • Wallet balance is 0 USDC and the user wants to add funds.
  • A
    circle services pay
    call errors with
    No Gateway balance found
    and the user has no USDC anywhere yet.
  • The user asks about fiat on-ramp, deposit, withdrawal, or Gateway deposit specifics.
Trigger the
agent-wallet-policy
skill instead when:
  • The user wants to set or change spending limits before paying.
  • The user mentions per-tx / daily / weekly / monthly caps, spending policy, or wallet rules.

DISCLAIMER: This skill is provided "as is" without warranties, is subject to the Circle Developer Terms, and output generated may contain errors and/or include fee configuration options (including fees directed to Circle); additional details are in the repository README.
在以下情况下,请触发
use-agent-wallet
Skill:
  • circle wallet status
    返回“Not logged in”或“Terms acceptance is required”错误。
  • 用户首次设置CLI / Agent钱包。
  • 用户询问登录、钱包创建或会话状态相关问题——而非支付问题。
在以下情况下,请触发
fund-agent-wallet
Skill:
  • 钱包USDC余额为0,且用户希望充值。
  • circle services pay
    调用返回
    No Gateway balance found
    错误,且用户任何地方都没有USDC。
  • 用户询问法币入金、存款、取款或Gateway存款的具体细节。
在以下情况下,请触发
agent-wallet-policy
Skill:
  • 用户希望在支付前设置或更改消费限额。
  • 用户提及单笔交易/每日/每周/每月限额、消费政策或钱包规则。

免责声明:本Skill按“原样”提供,不提供任何担保,受Circle开发者条款约束,生成的输出可能包含错误和/或费用配置选项(包括支付给Circle的费用);更多详情请查看仓库README。",