Build with UPSKILL
Everything you need to integrate skills into your AI agents or list your own skills on the marketplace.
📖What is UPSKILL?
UPSKILL is the trust layer for the AI agent economy. Before your agent pays for a skill, it should know: can this skill actually deliver? That's the problem $UPSKILL solves.
$UPSKILL is infrastructure for trust-gated execution:
- x402tells you HOW to pay (payment protocol)
- $UPSKILLtells you IF you should (reputation layer)
🛡️Trust-Gated Calls
The core innovation: query reputation before payment. Set your own thresholds. Only pay for skills that meet your standards.
Quality Tiers
Query trust score before calling
// Check skill reputation before payment
const trust = await upskill.getTrustScore(skillAddress);
// trust.tier: 'bronze' | 'silver' | 'gold' | 'diamond'
// trust.successRate: 0.0 - 1.0
// trust.totalCalls: number
// trust.stakedAmount: bigintSet your threshold
// Only call skills that meet your standards
const MIN_TIER = 'silver';
const MIN_SUCCESS_RATE = 0.99;
if (trust.tier >= MIN_TIER && trust.successRate >= MIN_SUCCESS_RATE) {
// Proceed with x402 payment
const result = await paymentFetch(skillEndpoint);
} else {
// Skip this skill, find a better one
console.log('Skill does not meet trust requirements');
}Middleware integration (optional)
import { wrapFetchWithTrust } from '@upskill/middleware';
// Wrap your fetch with trust-gating built in
const trustedFetch = wrapFetchWithTrust(paymentFetch, {
minTier: 'silver',
minSuccessRate: 0.99,
onReject: (skill, trust) => {
console.log(`Rejected ${skill}: tier=${trust.tier}`);
}
});
// Now all calls are automatically trust-gated
const result = await trustedFetch(skillEndpoint);🔌How to Integrate a Skill
Install the x402 client
npm install x402-fetch viemSet up your wallet
import { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const wallet = createWalletClient({
account,
chain: base,
transport: http(),
});Make a paid API call
import { wrapFetch } from 'x402-fetch';
const paymentFetch = wrapFetch(fetch, wallet);
const response = await paymentFetch(
'https://market-analysis.up.railway.app/api/price?symbol=ETH'
);
const data = await response.json();
console.log(data.price);📝How to List Your Skill
- 1
Build your API
Create an HTTP endpoint that returns 402 Payment Required with x402 payment details
- 2
Use the x402 SDK
Install
@coinbase/x402to handle payment verification - 3
Deploy
Host on Railway, Vercel, or any platform
- 4
Submit to marketplace
Contact us to list your skill (coming soon: self-service listing)
- 5
Stake $UPSKILL
Back your skill with $UPSKILL to signal quality and build trust
💰x402 Payment Flow
Client calls skill endpoint without payment header
Server returns 402 with payment requirements (amount, recipient, network)
Client signs EIP-712 payment authorization
Client retries with X-Payment header containing signature
Server verifies payment via facilitator, returns data
Facilitator settles payment to skill provider's wallet