💳use-agent-wallet
- プラグイン
- circle-skills
- ソース
- GitHub で見る ↗
説明
`circle` CLIを通じてCircle agentウォレットのセットアップと管理を行います。 Agent ウォレットは、AIエージェント向けCircleのプログラマティックUSDCウォレットであり、認証・USDC保有・x402サービスへの支払いに使用されます。 このskillがカバーする範囲: - CLIインストールの確認 - 利用規約への同意 - メールアドレス + OTPによるログイン - ウォレットの作成 - セッション状態の確認 - 残高の照会 次のような場合に使用: ユーザーがCircle agentウォレットのセットアップ、ログイン、または状態確認を行いたいとき。 あるいは、後続のskill(x402サービスへの支払いやウォレットへの入金など)が実行前にウォレットの初期化を必要とするとき。 トリガーとなる操作・フレーズ: `circle wallet login` / `circle wallet create` / `circle wallet status` / Circle agentウォレットのセットアップ / 利用規約への同意 / Circle CLIのインストール / x402のセットアップ
原文を表示
Set up and manage a Circle agent wallet through the `circle` CLI. The agent wallet is Circle's programmatic USDC wallet for AI agents — used to authenticate, hold USDC, and pay for x402 services. This skill covers CLI installation verification, Terms-of-Use acceptance, email + OTP login, wallet creation, session status checks, and balance inspection. Use whenever the user wants to set up, log in to, or inspect the state of their Circle agent wallet, or whenever a downstream skill (like paying for an x402 service or funding the wallet) needs the wallet bootstrapped first. Triggers on: circle wallet login, circle wallet create, circle wallet status, set up Circle agent wallet, terms acceptance, install Circle CLI, x402 setup.
ユースケース
- ✓Circle agentウォレットのセットアップを行うとき
- ✓ウォレットへのログインが必要なとき
- ✓ウォレットの残高を確認したいとき
- ✓後続サービス実行前にウォレット初期化が必要なとき
本文(日本語訳)
概要
Circle CLI(@circle-fin/cli、コマンド名: circle)は、AIエージェント向けに設計されたプログラマブルなエージェントウォレットを提供します。これはノンカストディアル型のUSDCウォレットであり、AIエージェントによる認証、残高管理、およびCircleのマーケットプレイス上の有料x402サービスへの支払いに対応しています。
本スキルは、そのウォレットのブートストラップ起点となります。具体的には、インストール確認、利用規約への同意、ログイン、ウォレット作成、ステータス確認を担います。ブートストラップ完了後、サービス支払い・資金調達・支出ポリシーといった後続操作は、それぞれ専用のスキルに引き継がれます。
Circle CLIの完全な機能セット(ブリッジ、スマートコントラクト実行、トランザクション確認など)の概要については、use-circle-cli マスタースキルを参照してください。本スキルは、より範囲を絞ったブートストラップ/アイデンティティ用の起点です。
前提条件 / セットアップ
ステップ 1 — CLIのインストール確認
which circle || command -v circle
circle --version
インストールされていない場合:
npm install -g @circle-fin/cli
circle --version はサーバー主導のアップデート通知も表示します(処理はブロックされません)。
通知が表示された場合は npm install -g @circle-fin/cli@latest を提案してください。
ただし、これはセッション開始時や予期しない出力が発生したときなど、文脈上適切な場合に限ります。毎コマンド実行時に表示する必要はありません。
ステップ 2 — セッションステータスの確認
ログインを試みる前に、ユーザーがすでにログイン済みかどうかを必ず確認してください。
circle wallet status
想定される結果:
- ログイン済み — メールアドレス、ウォレットタイプ(
agent)、セッション有効期限が表示されます。「<email>としてすでにログインしています。このセッションを続けますか?」とユーザーに伝え、ステップ 4 へスキップしてください。 - 未ログイン —
Error: Not logged in. Run 'circle wallet login <email> --type agent' to authenticate.が表示されます。ステップ 3 へ進んでください。 - 利用規約未承諾 —
Error: Circle CLI Terms acceptance is required before use.が表示されます。処理を一旦停止し、以下の 利用規約ゲート を完了してから先へ進んでください。ユーザーの明示的な同意なしにcircle terms acceptを実行してはなりません。
ステップ 3 — ログイン(メール + OTP、2ステップ非インタラクティブフロー)
Circle CLIは、AIエージェントをはじめとする非インタラクティブな環境向けに設計された、2ステップのOTPログインをサポートしています。
3a. ログイン初期化(OTPリクエスト)
ユーザーのメールアドレスを確認してください(推測やハードコードは絶対に行わないこと)。その後:
circle wallet login <user-email> --type agent --init
--type agent はデフォルトが agent なので省略可能ですが、ステップ 2 のエラーメッセージとの一貫性のため、ここでは明示的に指定してください。
期待される出力:
OTP code sent to user@example.com
Please run: circle wallet login --request <request-id> --otp <code>
出力からリクエストIDを取得してください。UUIDの形式で、次のステップで必要になります。 リクエストIDは10分で失効し、1回限り有効です。
3b. ログイン完了(OTP検証)
ユーザーへの案内文: 「OTPコードをメールに送信しました。コードをお知らせください(形式: ABC-123456 または数字6桁のみ)。」
メールやメッセージング連携ツール(GmailやSlackのMCP経由など)が接続されている場合は、そちらからOTPを取得することも可能です。その選択肢をユーザーに伝え、共有方法はユーザーに委ねてください。
circle wallet login --type agent --request <request-id> --otp <user-otp>
OTPフォーマットについて:
- フルフォーム:
ABC-123456 - 数字のみ:
123456— CLIがキャッシュ済みプレフィックスを自動的に補完します - CLIはプレフィックスが送信されたものと一致しているか検証します(フィッシング対策)
成功時の出力:
Logged in as user@example.com
「ログインに成功しました」とユーザーに伝え、処理を続行してください。
コールが失敗した場合(Invalid or expired request ID、OTP prefix mismatch、Invalid OTP)は、3a から再実行して新しいOTPを生成してください。ユーザーに通知せずにループし続けてはなりません。
3c. セッション確認
circle wallet status
セッションを確認し、有効期限を表示します。ステップ 4 へ進んでください。
ログアウト / アカウント切り替え
circle wallet logout
ユーザーが明示的にアカウントの切り替えを求めた場合にのみ使用してください。
ステップ 4 — エージェントウォレットの確認または作成
circle wallet list および circle wallet balance では --chain フラグが必須です。
ユーザーがチェーンを指定していない場合は、BASE をデフォルトとして使用してください。
circle wallet list --chain BASE --type agent --output json
ウォレットがすでに存在する場合は、次のステップのためにアドレスを保存してください。
エージェントウォレットが存在しない場合:
circle wallet create --output json
サポートされている各EVMチェーン上に、エージェント管理のSCAウォレットを作成します。
JSON出力は { chain, address, ... } オブジェクトの配列です。ステップ 5 で使用するため、address フィールドを読み取り、チェーンごとのアドレスを保存してください。
ステップ 5 — ウォレット残高の確認
ステップ 4 で取得したアドレスを使用します:
circle wallet balance --address <addr> --chain BASE --output json
残高が 0 USDC で、ユーザーがサービスの支払いを希望している場合は、fund-agent-wallet スキルに引き継いでください。このスキルでは、組み込みのフィアットオンランプ購入、QRコードを使った直接アドレス送金、Gatewayデポジットをカバーしています。
ユーザーが状態の確認のみを希望し、支払いは不要な場合はここで終了します。ブートストラップは完了です。
ブートストラップ完了後
ウォレットが作成されると、ユーザーの次のアクションはそれを活用することになるでしょう。 CLIには独自のスキルカタログが用意されており:
circle skill list— インストール可能なスキルの一覧表示circle skill info --name <skill>— スキルのトリガーとフロントマターの詳細表示circle skill install --tool <host> --name <skill>— 現在のホスト向けにスキルをインストール
資金調達、有料サービスの検索、支出制限の設定など、自然な次のステップを提案してください。 ユーザーから明示的に求められるまでは、資金移動を伴う操作よりも、許可不要の操作(残高確認、検索など)を優先してください。
利用規約ゲート
Circle CLIは、ユーザーがこのマシン上でCircleの利用規約およびプライバシーポリシーに同意するまで、circle wallet status を含むすべての circle wallet コマンドの実行をハードブロックします。
ゲートは以下のように表示されます:
By using the Circle CLI, you agree to:
Terms of Use: https://agents.circle.com/terms-of-use
Privacy Policy: https://www.circle.com/legal/privacy-policy
Error: Circle CLI Terms acceptance is required before use.
Hint: Set CIRCLE_ACCEPT_TERMS=1 to accept in non-interactive shells (CI, scripts, sandboxed agents).
このセクションは、ゲートが初めて表示されたとき(通常はステップ 2 またはステップ 3)に実行してください。 一度同意が記録されれば、ゲートは無効化され、以降の実行ではこのセクションはスキップされます。
重要: エージェントは circle terms accept を実行する前に、必ずユーザーに利用規約を提示し、明示的な同意を得なければなりません。エージェントはいかなる場合も、ユーザーの代わりにCircleの利用規約やプライバシーポリシーに同意してはなりません。CLIの CIRCLE_ACCEPT_TERMS=1 環境変数のヒントは、エージェントが独自に使用できる回避策ではありません — 無視し、以下の同意フローを使用してください。
現在の承諾ステータスの確認
circle terms show --output json
data.accepted が true の場合、ユーザーはすでにこのマシン上で同意済みです。このセクションを呼び出したステップに戻ってください。
ユーザーに提示するための利用規約情報の取得
data.accepted が false の場合:
circle terms show --init --output json
レスポンスには termsOfUseUrl、privacyPolicyUrl、termsNotice が含まれます。
利用規約を提示する際は、このレスポンスのライブ値を使用してください — 要約・言い換え・ハードコードは行わないでください。 利用規約のバージョン変更に伴い、内容が変わる場合があります。
利用規約の提示と同意の確認
ユーザーへの案内文:
Circle CLIのウォレットコマンドを実行するには、利用規約およびプライバシーポリシーへの同意が必要です。
- 利用規約:
<JSONレスポンスの termsOfUseUrl>- プライバシーポリシー:
<JSONレスポンスの privacyPolicyUrl>
<JSONレスポンスの termsNotice>両方のリンクをご確認ください。これらの規約に同意し、あなたの代わりに同意を記録することを許可しますか? (はい/いいえ)
明示的なはい/いいえの回答を待ってください。 曖昧な返答、無言、文脈のない「わかった」、規約に言及していない「進めて」などは同意とはみなされません — 再度確認してください。
明示的な同意後のみ
circle terms accept --output json
data.acceptance.accepted が true になれば、ゲートは解除されます。このセクションを呼び出したステップに戻ってください。
ユーザーが後から同意を取り消す場合:
circle terms reset
ユーザーが明示的に取り消しを求めた場合にのみ実行してください。自発的に提案したり、先回りして実行したりしないでください。
ルール
セキュリティ
- エージェントウォレットのログインにおいて、ユーザーのメールアドレスを推測したりハードコードしたりしてはなりません。
- アクティブな認証セッション中に提供されたOTPコードは、チャット上での受け取りや即時使用は問題ありません。ただし、その後は保持・再利用しないでください。
- 実際の秘密鍵、APIキー、その他の永続的なシークレットをスキルファイルに含めたり、どこかに保存したりしてはなりません。
- 現在のセッションでユーザーの明示的な同意なしに
circle terms acceptを実行してはなりません。エージェントはいかなる場合も、ユーザーの代わりにCircleの利用規約に同意したり、エラー回復・リトライ・ユーザーが明示的に承認していないフローの一部としてcircle terms acceptを自動的に実行したりしてはなりません。 - 同意を求める際は、
circle terms show --init --output jsonが返すtermsOfUseUrl、privacyPolicyUrl、termsNoticeのライブ値を必ず表示してください。要約・言い換え・ハードコードは行わないでください。 - ユーザーが利用規約を拒否した場合は、フローを停止してください。再試行、ゲートの回避、
circle terms reset/circle terms acceptの呼び出しは行わないでください。
ベストプラクティス
- ログインを試みる前に、必ず `circle wallet
原文(English)を表示
Overview
The Circle CLI (@circle-fin/cli, command circle) provides a programmatic agent wallet — a non-custodial USDC wallet designed for AI agents to authenticate, hold balances, and pay for paid x402 services on Circle's marketplace. This skill is the bootstrap surface for that wallet: install check, terms acceptance, login, wallet creation, and status inspection. After bootstrap completes, downstream operations (paying for services, funding, spending policy) hand off to dedicated skills.
For an overview of the Circle CLI's full capability set — bridging, smart contract execution, transaction inspection, and more — see the use-circle-cli master skill. This skill is the narrower bootstrap/identity surface.
Prerequisites / Setup
Step 1 — Verify the CLI is installed
which circle || command -v circle
circle --version
If not installed:
npm install -g @circle-fin/cli
circle --version also surfaces any server-driven update notice (never blocks). If one prints, suggest npm install -g @circle-fin/cli@latest — but only when contextually relevant (session start, or unexpected output), not on every command.
Step 2 — Check session status
Always check whether the user is already logged in before attempting login.
circle wallet status
Possible outcomes:
- Logged in — output shows email, wallet type (
agent), and session expiry. Tell the user "You're already logged in as<email>. Continue with this session?" and skip to Step 4. - Not logged in — output is
Error: Not logged in. Run 'circle wallet login <email> --type agent' to authenticate.Proceed to Step 3. - Terms not accepted — output is
Error: Circle CLI Terms acceptance is required before use.Stop and complete the Terms-of-Use Gate below before proceeding. Do NOT runcircle terms acceptwithout explicit user consent.
Step 3 — Login (email + OTP, two-step non-interactive flow)
Circle's CLI supports a two-step OTP login designed for AI agents and other non-interactive contexts.
3a. Initialize login (request OTP)
Ask the user for their email address (do NOT guess or hardcode). Then:
circle wallet login <user-email> --type agent --init
--type agent defaults to agent so it can be omitted, but pass it explicitly here for consistency with the error text in Step 2.
Expected output:
OTP code sent to user@example.com
Please run: circle wallet login --request <request-id> --otp <code>
Parse the request ID from the output. It is a UUID; you will need it for the next step. Request IDs expire after 10 minutes and are single-use.
3b. Complete login (verify OTP)
Tell the user: "An OTP code has been sent to your email. Please share it (format: ABC-123456 or just the 6 digits)." If email- or messaging-integration tools are connected (e.g., Gmail or Slack via MCP), the OTP can also be fetched through them — note the option to the user; how to share it is their call. Then:
circle wallet login --type agent --request <request-id> --otp <user-otp>
OTP format notes:
- Full form:
ABC-123456 - Bare digits:
123456— the CLI prepends the cached prefix automatically - The CLI validates the prefix matches what was sent (anti-phishing)
If successful, output is:
Logged in as user@example.com
Tell the user "Successfully logged in" and continue. If the call fails (Invalid or expired request ID, OTP prefix mismatch, Invalid OTP), restart from 3a to generate a fresh OTP — do NOT loop without telling the user.
3c. Verify session
circle wallet status
Confirms the session and surfaces expiry. Proceed to Step 4.
Logging out / switching accounts
circle wallet logout
Use only when the user explicitly asks to switch accounts.
Step 4 — Check or create the agent wallet
The --chain flag is REQUIRED for circle wallet list and circle wallet balance. Use BASE as the default if the user hasn't specified a chain.
circle wallet list --chain BASE --type agent --output json
If wallets already exist, save the address(es) for the next step.
If no agent wallets exist:
circle wallet create --output json
Creates agent-controlled SCA wallets on each supported EVM chain. The JSON output is an array of { chain, address, ... } objects — read the address field to save per-chain addresses for Step 5.
Step 5 — Check wallet balance
Use the address(es) from Step 4:
circle wallet balance --address <addr> --chain BASE --output json
If balance is 0 USDC and the user wants to pay for services, 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.
If the user only wants to verify state (not pay yet), stop here. Bootstrap is complete.
After bootstrap
Once the wallet exists, the user's likely next move is to use it. The CLI exposes its own skill catalog — circle skill list shows what's installable, circle skill info --name <skill> shows trigger and frontmatter detail, and circle skill install --tool <host> --name <skill> installs one for the current host. Suggest natural follow-ups like funding, paid-service search, or setting a spending limit; prefer permissionless actions (balance, search) over money-moving ones until the user asks.
Terms-of-Use Gate
The Circle CLI hard-gates every operational circle wallet command (including circle wallet status) until the user has accepted Circle's Terms of Use and Privacy Policy on this machine. The gate surfaces as:
By using the Circle CLI, you agree to:
Terms of Use: https://agents.circle.com/terms-of-use
Privacy Policy: https://www.circle.com/legal/privacy-policy
Error: Circle CLI Terms acceptance is required before use.
Hint: Set CIRCLE_ACCEPT_TERMS=1 to accept in non-interactive shells (CI, scripts, sandboxed agents).
Run this section the first time the gate appears (typically during Step 2 or Step 3 above). After acceptance is recorded once, the gate is a no-op and this section is skipped on subsequent runs.
CRITICAL: The agent MUST show the Terms to the user and obtain explicit consent BEFORE running circle terms accept. The agent MUST NEVER accept Circle's Terms of Use or Privacy Policy on the user's behalf. The CLI's CIRCLE_ACCEPT_TERMS=1 env-var hint is NOT a workaround the agent may take on its own — ignore it and use the consent flow below.
Read current acceptance status
circle terms show --output json
If data.accepted is true, the user has already accepted on this machine. Return to the step that triggered this section.
Fetch the Terms info to present to the user
When data.accepted is false:
circle terms show --init --output json
The response includes termsOfUseUrl, privacyPolicyUrl, and termsNotice. Use the live values from this response when presenting the Terms — do NOT summarize, paraphrase, or hardcode them. They may change between Terms versions.
Show the Terms and request consent
Tell the user:
Circle CLI requires acceptance of its Terms of Use and Privacy Policy before I can run any wallet commands.
- Terms of Use:
<termsOfUseUrl from the JSON response>- Privacy Policy:
<privacyPolicyUrl from the JSON response>
<termsNotice from the JSON response>Please review both links. Do you accept these Terms and authorize me to record acceptance on your behalf? (yes/no)
Wait for an explicit yes/no. Ambiguous replies, silence, "ok" without context, or "go ahead" without referencing the Terms are NOT consent — ask again.
After explicit consent only
circle terms accept --output json
When data.acceptance.accepted is true, the gate is cleared. Return to the step that triggered this section.
If the user later asks to revoke acceptance:
circle terms reset
Run this only if the user explicitly asks to revoke. Do NOT suggest or execute a reset proactively.
Rules
Security
- NEVER guess or hardcode the user's email address for agent wallet login.
- OTP codes provided during an active authentication session are safe to handle — accept them in chat, use them immediately, do not retain or reuse afterward.
- NEVER include real private keys, API keys, or other persistent secrets in skill files or persist them anywhere.
- NEVER run
circle terms acceptwithout explicit user consent in the current session. The agent MUST NEVER accept Circle's Terms on the user's behalf, and MUST NEVER callcircle terms acceptautomatically as part of error recovery, retries, or any flow the user has not explicitly approved. - ALWAYS show the live
termsOfUseUrl,privacyPolicyUrl, andtermsNoticereturned bycircle terms show --init --output jsonwhen prompting for consent. Do NOT summarize, paraphrase, or hardcode them. - If the user declines the Terms, stop the flow. Do not retry, work around the gate, or call
circle terms reset/circle terms accept.
Best practices
- ALWAYS check
circle wallet statusbefore attempting login. Many session "failures" are actually just stale assumptions. - Parse and store the request ID from
circle wallet login --initoutput — you'll need it for the OTP completion step. - Request IDs are single-use and expire after 10 minutes. If you see "Invalid or expired request ID", restart from
--init. - If a
circlecommand causes friction during setup (unexpected error, confusing output, missing capability), file feedback per theuse-circle-cliskill's Report friction (feedback) section. - For general CLI rules (
--output json,--chain,--help-first, follow-up phrasing, confirmation defaults), see theuse-circle-climaster skill's Rules section — they apply here too.
Reference Links
- Setup walkthrough (full bootstrap doc): https://agents.circle.com/skills/setup.md
- Login flow detail: https://agents.circle.com/skills/wallet-login.md
- CLI package on npm:
@circle-fin/cli - Circle Developer Docs: https://developers.circle.com/llms.txt — Always read this when looking for source documentation on Circle products.
Alternatives
Trigger the pay-via-agent-wallet skill instead when:
- The user wants to call, pay for, or use a paid x402 service.
- The user mentions
circle services search,circle services inspect, orcircle services pay. - A downstream task requires money to move out of the agent wallet to a paid endpoint.
Trigger the fund-agent-wallet skill instead when:
- The agent wallet has 0 USDC and the user wants to add funds.
- The user mentions deposit, fiat on-ramp, fiat purchase, QR-code transfer, or Gateway deposit.
- A payment flow blocks because of insufficient balance.
Trigger the agent-wallet-policy skill instead when:
- The user wants to set, view, or reset spending limits on the wallet.
- 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.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。