Agentic Paymentsのロゴ

Agentic Payments

組織
stellar
agentic-payments

Agentic and machine-to-machine payments on Stellar. Covers x402 (HTTP 402 paid APIs through a facilitator, fee-sponsored clients; the guide configures OZ Channels) and MPP (Machine Payments Protocol) in both Charge mode (per-request SAC) and Session mode (channel-backed off-chain commits, high-frequency; formerly called Channel mode). Defaults to USDC (SEP-41 SAC) on `stellar:testnet`/`stellar:pubnet` (CAIP-2). Use when selling a paid API to AI agents, building an x402 client, or designing a payment-channel architecture for high-frequency agent traffic.

概要

公開者stellar
リポジトリstellar-dev-skill
スキル名agentic-payments
スター
56
フォーク
64
同梱ファイル
2
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    stellarがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルAgentic PaymentsをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/stellar/stellar-dev-skill/tree/main/skills/agentic-payments
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/stellar/stellar-dev-skill.git /tmp/stellar-dev-skill
mkdir -p .claude/skills
cp -r /tmp/stellar-dev-skill/skills/agentic-payments .claude/skills/agentic-payments
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAgentic Paymentsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にAgentic Paymentsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Agentic Paymentsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Agentic Payments: x402 + MPP

Two complementary protocols for AI-agent and machine-to-machine payments on Stellar. Pick based on who depends on whom and how often the agent pays.

Quick decision

x402MPP ChargeMPP Session
Per-request on-chain tx?Yes (via facilitator)Yes (SAC)No (off-chain commits)
Needs facilitator?Yes — hosted or your own (options)NoNo
Client needs XLM?No (fees sponsored)Optional (feePayer)Yes
Setup complexityLowLowMedium (deploy contract first)
Best forQuickest setup, fee-free clientsNo third-party depHigh-frequency agents
  • Selling an API, want zero-XLM clients → x402 Seller in x402.md
  • Calling an x402 API from an agent → x402 Buyer in x402.md
  • Selling an API, no facilitator dependency → Charge mode in mpp.md
  • Agent making many requests per session → Session mode in mpp.md
  • Sold an API, now want agents to find it → Discovery in mpp.md
  • Unsure → x402 (lowest friction to get started)

All protocols use USDC (SEP-41 SAC) by default; stellar:testnet / stellar:pubnet CAIP-2 network IDs.

Read the file that matches the task

This file carries the decision table, the shared testnet account setup, and the USDC address reference. The protocol playbooks live alongside it:

TaskFile
Sell a paid API via a facilitator (zero-XLM clients), build an x402 buyer agentx402.md
Facilitator-free per-request payments (Charge) or channel-backed sessions (Session)mpp.md
Publish an OpenAPI discovery document so agents find your paid APIDiscovery
Create/fund testnet accounts, add USDC trustlines, get testnet USDCTestnet setup (below)
Which USDC address goes where (classic issuer vs SAC)Two USDC addresses (below)

Related skills

  • The SACs the protocols call → ../smart-contracts/SKILL.md
  • USDC and other classic assets → ../assets/SKILL.md
  • Wallets and signing in the buyer client → ../dapp/SKILL.md
  • RPC simulation / submission patterns → ../data/SKILL.md
  • SEP-41 (token interface) and related standards → ../standards/SKILL.md

Testnet setup (shared)

Both protocols need the same base setup: a client/payer account (signs and pays from a USDC balance) and a server/recipient account. Both need a USDC trustline.

One step of this shared setup is web-only (Captcha) and cannot be scripted: the Circle USDC faucet. The rest of it can be automated — x402.md ships a setup.js that does steps 1–3 and writes a starter .env. (Outside this setup, the OZ Channels facilitator that x402.md configures has its own web-only key generator. Each facilitator sets its own auth requirement — the x402.org one needs none — and MPP needs no third party at all.)

  1. Generate two keypairs

    bash
    node -e "const { Keypair } = require('@stellar/stellar-sdk'); for (const n of ['RECIPIENT','PAYER']) { const k = Keypair.random(); console.log(n, k.publicKey(), k.secret()); }"
  2. Fund both with testnet XLM (friendbot)

    bash
    curl "https://friendbot.stellar.org?addr=RECIPIENT_G..."
    curl "https://friendbot.stellar.org?addr=PAYER_G..."
  3. Add a USDC trustline to BOTH accounts — open Stellar Lab and add a USDC trustline to each G..., or run via SDK for each keypair:

    js
    import * as StellarSdk from "@stellar/stellar-sdk";
    
    const horizon = new StellarSdk.Horizon.Server("https://horizon-testnet.stellar.org");
    // Circle's classic USDC issuer on Stellar testnet
    const USDC_ISSUER = "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5";
    
    async function addTrustline(secret) {
      const kp = StellarSdk.Keypair.fromSecret(secret);
      const acc = await horizon.loadAccount(kp.publicKey());
      const tx = new StellarSdk.TransactionBuilder(acc, {
        fee: StellarSdk.BASE_FEE,
        networkPassphrase: StellarSdk.Networks.TESTNET,
      })
        .addOperation(StellarSdk.Operation.changeTrust({
          asset: new StellarSdk.Asset("USDC", USDC_ISSUER),
        }))
        .setTimeout(60)
        .build();
      tx.sign(kp);
      return horizon.submitTransaction(tx);
    }
    
    // Repeat for both the recipient secret and the payer secret.
    await addTrustline(process.env.RECIPIENT_SECRET);
    await addTrustline(process.env.PAYER_SECRET);

    Without a trustline on the recipient, the SAC transfer settles into nothing and the request fails with op_no_trust.

  4. Fund the PAYER with testnet USDC — open the Circle testnet faucet, select Stellar testnet, paste the payer's G.... Web Captcha; no API.

Two USDC addresses (don't confuse them)

USDC on Stellar has two addresses, used in different places. Mixing them up is a common stumble.

AddressFormatUsed for
Classic asset issuerG... (32-byte ed25519 public key)The issuer of the classic USDC asset; used when adding a trustline (new Asset("USDC", G...))
SAC (Stellar Asset Contract)C... (32-byte contract address)The contract the protocol invokes transfer on; used in payment requirements

Use the exported constants instead of hard-coding when possible:

js
import { USDC_TESTNET_ADDRESS, USDC_PUBNET_ADDRESS } from "@x402/stellar";
// USDC_TESTNET_ADDRESS = "CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA"
// USDC_PUBNET_ADDRESS  = "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"

x402's payTo route config and MPP's recipient are always a classic account (G...). The SAC address only appears where the config names the settlement asset (x402's custom asset price config, MPP's currency).

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Agentic Payments」では何ができますか?

Agentic and machine-to-machine payments on Stellar. Covers x402 (HTTP 402 paid APIs through a facilitator, fee-sponsored clients; the guide configures OZ Channels) and MPP (Machine Payments Protocol) in both Charge mode (per-request SAC) and Session mode (channel-backed off-chain commits, high-frequency; formerly called Channel mode). Defaults to USDC (SEP-41 SAC) on `stellar:testnet`/`stellar:pubnet` (CAIP-2). Use when selling a paid API to AI agents, building an x402 client, or designing a payment-channel architecture for high-frequency agent traffic.

TypingMindでAgentic Paymentsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Agentic Paymentsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAgentic Paymentsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/stellar/stellar-dev-skill/tree/main/skills/agentic-paymentsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Agentic Paymentsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Agentic Paymentsは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAgentic Paymentsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Agentic Payments」は無料ですか?

はい。stellarがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇