agentpay-provider — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited agentpay-provider (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use this skill when you need to create a paid service that other AI agents can discover and pay for using the AgentPay protocol.
Creates an HTTP server that:
import { ServiceProvider } from '@agentpay-dev/sdk';
// 1. Define your service
const provider = new ServiceProvider({
fiberRpcUrl: 'http://127.0.0.1:8227',
services: [{
name: 'translate',
description: 'Translate text to any language',
pricing: { model: 'per-call', amount: '100000000', asset: 'USDI' }, // $0.01 USDI
input_schema: { text: 'string', target: 'string' },
output_schema: { translated: 'string' },
}],
});
// 2. Register handler
provider.onTask('translate', async (input: any) => {
// Your AI logic here
const translated = await myTranslationModel(input.text, input.target);
return { translated };
});
// 3. Start server
provider.listen(3000);
// �?[AgentPay Provider] Listening on 0.0.0.0:3000
// �?[AgentPay Provider] Services: translate (100000000 USDI)const provider = new ServiceProvider({
services: [
{
name: 'translate',
description: 'Translate text',
pricing: { model: 'per-call', amount: '100000000', asset: 'USDI' },
input_schema: { text: 'string', target: 'string' },
output_schema: { translated: 'string' },
},
{
name: 'summarize',
description: 'Summarize long text',
pricing: { model: 'per-call', amount: '500000000', asset: 'USDI' },
input_schema: { text: 'string', maxLength: 'number' },
output_schema: { summary: 'string' },
},
],
});
provider.onTask('translate', async (input: any) => {
return { translated: `[translated] ${input.text}` };
});
provider.onTask('summarize', async (input: any) => {
return { summary: `[summary of ${input.text.length} chars]` };
});
provider.listen(3000);| Model | Description | Example |
|---|---|---|
per-call | Fixed price per request | $0.01 per translation |
per-token | Price per token processed | $0.001 per 1K tokens |
per-second | Price per second of compute | $0.01 per second |
Your provider automatically exposes:
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Service status + pricing |
/agentpay/request | POST | Receive SERVICE_REQUEST, return Hold Invoice |
/agentpay/execute | POST | Receive TASK_INPUT after payment, execute + settle |
For simpler HTTP services, use the x402 middleware:
import { createX402Middleware } from '@agentpay-dev/x402-facilitator';
import { createServer } from 'http';
const paywall = createX402Middleware({
price: '100000000', // 1 CKB per request
asset: 'USDI',
});
createServer((req, res) => {
paywall(req, res, () => {
// Only reaches here after payment
res.end(JSON.stringify({ data: 'premium content' }));
});
}).listen(3000);// Register your service for discovery
const response = await fetch('http://registry.agentpay.dev/api/agents', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'My Translation Agent',
services: provider.services,
endpoints: ['http://my-agent:3000'],
}),
});~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.