Agent Payment Protocol Skill
БесплатноЗапускает вложенные скриптыНе проверенEnable this flow in your agent ecosystem:
от modbender★ 21 звезда на GitHubОб этом скилле
Agent Payment Protocol Skill
Description: Orchestrate agent-to-agent payments in IRC channels using Solana transactions.
Location: /root/.openclaw/workspace/skills/agent-payment-protocol
Overview
Enable this flow in your agent ecosystem:
- Cheap agent asks an expert in IRC:
@expert, solve this problem - Expert agent responds with a quoted price:
Quote: 0.001 SOL [q_xyz] - Cheap agent approves payment via this skill
- Solana transfer skill sends the SOL on-chain
- Both agents maintain tamper-proof audit trail
Setup
cd /root/.openclaw/workspace/skills/agent-payment-protocol
npm install
Core Functions
Expert: Create a Quote
When: After responding to a question in IRC, offer to send the answer for payment.
import { createQuote } from '../skills/agent-payment-protocol/index.js';
const quote = createQuote({
from: 'cheap-model-name',
to: 'expert-model-name',
channel: '#lobby',
question: 'What is the capital of France?',
answer: 'Paris',
price: 0.001, // SOL
});
// Response in IRC:
// "Paris. Quote: 0.001 SOL [q_abc123] — Use: /pay q_abc123 to settle"
console.log(quote.message);
Returns:
{
quote_id: "q_abc123",
message: "Quote: 0.001 SOL [q_abc123]",
quote: { ... full quote object ... }
}
Cheap Agent: Approve and Prepare Payment
When: The cheap agent accepts the expert's price and wants to pay.
import { approvePayment } from '../skills/agent-payment-protocol/index.js';
const payment = approvePayment({
quote_id: 'q_abc123',
from_wallet: 'cheap-agent-solana-address',
to_wallet: 'expert-agent-solana-address',
});
// Now send the actual SOL using solana-transfer skill:
import { sendSOL } from '../skills/solana-transfer/index.js';
const tx = await sendSOL(
payment.to_wallet,
payment.amount_lamports
);
console.log(`Paid expert. Tx: ${tx.signature}`);
Record Successful Payment
When: The Solana transaction is confirmed on-chain.
import { recordPayment } from '../skills/agent-payment-protocol/index.js';
recordPayment({
payment_id: payment.id,
tx_hash: tx.signature,
confirmed: true,
});
// Both agents can now log this transaction for auditing
Query Payment History
When: An agent wants to review transactions they've made or received.
import { getPaymentHistory } from '../skills/agent-payment-protocol/index.js';
const history = getPaymentHistory('agent-solana-wallet-address');
history.forEach(payment => {
console.log(
`${payment.from_wallet} paid ${payment.to_wallet} ` +
`${payment.amount_sol} SOL (${payment.tx_hash})`
);
});
View Protocol Stats
import { getStats } from '../skills/agent-payment-protocol/index.js';
const stats = getStats();
console.log(stats);
// {
// total_quotes: 42,
// quotes_settled: 38,
// total_payments: 38,
// payments_confirmed: 38,
// total_volume_sol: "0.038"
// }
Complete Workflow Example
Step 1: Expert Responds with Quote
In #lobby IRC channel:
cheapmodel: @expert, debug this code
expert: [thinking...] Here's the fix...
expert: [calling createQuote]
expert: "Fix: replace line 42. Quote: 0.002 SOL [q_xyz789]"
Agent code (expert):
const quote = createQuote({
from: 'cheapmodel',
to: 'expert',
channel: '#lobby',
question: 'debug this code',
answer: 'Fix: replace line 42',
price: 0.002,
});
// Send IRC message
ircClient.say('#lobby', quote.message);
Step 2: Cheap Agent Approves
In agent memory or logic:
// Cheap agent reads IRC message, extracts quote_id from [q_xyz789]
const quoteId = 'q_xyz789';
// Approve the payment
const payment = approvePayment({
quote_id: quoteId,
from_wallet: 'Cheap1111111111111111111111111111',
to_wallet: 'Expert2222222222222222222222222222',
});
// Send to IRC
ircClient.say(
'#lobby',
`Approved. Sending payment now... [${payment.id}]`
);
Step 3: Execute Solana Transaction
Still in cheap agent:
import { sendSOL } from '../skills/solana-transfer/index.js';
try {
const tx = await sendSOL(
payment.to_wallet,
payment.amount_lamports
);
// Record the successful transaction
recordPayment({
payment_id: payment.id,
tx_hash: tx.signature,
confirmed: true,
});
// Notify in IRC
ircClient.say(
'#lobby',
`Payment sent! Tx: ${tx.signature.substring(0, 16)}...`
);
} catch (error) {
ircClient.say('#lobby', `Payment failed: ${error.message}`);
}
Step 4: Both Agents Log and Move On
Expert logs:
// Memory entry
{
"timestamp": "2026-02-03T20:00:00Z",
"type": "payment_received",
"from"
Установить Agent Payment Protocol Skill в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Agent Payment Protocol Skill?
Enable this flow in your agent ecosystem:
Как установить скилл Agent Payment Protocol Skill?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Agent Payment Protocol Skill запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic