Trust infrastructure for autonomous agents. Solana, Base, Monad, Hyperliquid.
Agents transact with stake-backed identities. Disputes go to multi-oracle consensus with private voting. ZK proofs for reputation thresholds.
- Agent Identity - PDA-based identities with stake collateral
- Escrow Agreements - Time-locked payments between agents and providers
- Dispute Resolution - Multi-oracle consensus with private voting
- Reputation Tracking - On-chain trust scores
- SPL Token Support - SOL, USDC, USDT
Agent Provider
│ │
│ 1. Create Agreement │
├──────────────────────────────►│
│ (funds locked) │
│ │
│ 2. Service Delivered │
│◄──────────────────────────────┤
│ │
├─── 3a. Release ──────────────►│ Happy path
│ │
└─── 3b. Dispute ───┐ │ Unhappy path
▼
┌──────────────┐
│ Oracles │
│ commit/reveal│
└──────┬───────┘
│
┌──────▼───────┐
│ Settlement │
│ 0-100% │
└──────────────┘
Oracles vote on service quality using commit-reveal:
- Commit - Oracle submits
Poseidon2(score, blinding, escrow_id, oracle_pk) - Delay - 5 minute window prevents vote copying
- Reveal - Oracle reveals score, ZK proof verified on-chain via Noir verifier
- Settle - Funds split based on median score
| Quality Score | Agent Refund | Provider Payment |
|---|---|---|
| 80-100% | 0% | 100% |
| 65-79% | 35% | 65% |
| 50-64% | 75% | 25% |
| 0-49% | 100% | 0% |
npm install https://gitpkg.vercel.app/kamiyo-ai/kamiyo-protocol/packages/kamiyo-sdk?mainimport { KamiyoClient, AgentType } from '@kamiyo/sdk';
import { Connection, Keypair } from '@solana/web3.js';
import BN from 'bn.js';
const connection = new Connection('https://api.mainnet-beta.solana.com');
const wallet = Keypair.generate();
const client = new KamiyoClient({
connection,
wallet: {
publicKey: wallet.publicKey,
signTransaction: async (tx) => { tx.sign(wallet); return tx; },
signAllTransactions: async (txs) => { txs.forEach(tx => tx.sign(wallet)); return txs; },
}
});
// Create agent with 0.5 SOL stake
const tx = await client.createAgent({
name: 'TradingBot',
agentType: AgentType.Trading,
stakeAmount: new BN(500_000_000)
});
// Create payment agreement
await client.createAgreement({
provider: providerPubkey,
amount: 100_000_000,
timeLockSeconds: 86400,
transactionId: 'order-123'
});
// Release on success, or dispute for arbitration
await client.releaseFunds('order-123', providerPubkey);
// or: await client.markDisputed('order-123');┌─────────────────────────────────────────────────────────┐
│ KAMIYO Program │
├─────────────────┬─────────────────┬────────────────────┤
│ Agent Identity │ Escrow │ Oracle Registry │
│ - PDA │ - Create │ - Register │
│ - Stake │ - Release │ - Commit/Reveal │
│ - Reputation │ - Dispute │ - Verify (ZK) │
└─────────────────┴─────────────────┴────────────────────┘
| Package | Description |
|---|---|
@kamiyo/sdk |
TypeScript SDK for identity, escrow, privacy proofs, shield credentials, voting |
@kamiyo/actions |
Plug-and-play actions for payments and disputes |
@kamiyo/middleware |
Express middleware for HTTP 402 |
| Package | Description |
|---|---|
@kamiyo/eliza |
ElizaOS plugin for autonomous agent payments |
@kamiyo/agent-client |
Daydreams agent integration with MCP tools |
@kamiyo/langchain |
LangChain tools for escrow and disputes |
@kamiyo/mcp-server |
MCP server for Claude and LLM agents |
| Package | Description |
|---|---|
@kamiyo/x402-client |
x402 client with PaymentWidget, Jupiter swaps, escrow |
| Package | Description |
|---|---|
@kamiyo/helius-adapter |
Helius RPC adapter with webhooks |
@kamiyo/monad |
Monad parallel execution and PDA emulation |
@kamiyo/hyperliquid |
Hyperliquid copy trading integration |
@kamiyo/blindfold |
Blindfold Finance card issuance with ZK reputation gates |
| Package | Description |
|---|---|
@kamiyo/surfpool |
Surfpool simulation and pre-flight validation |
@kamiyo/switchboard-function |
Switchboard oracle for quality scoring |
| Package | Description |
|---|---|
@kamiyo/dark-forest |
ZK reputation proofs - Groth16/BN254, Poseidon commitments |
noir/ |
Noir circuits + Solana verifier (4 circuits, UltraPlonk) |
contracts/zk-reputation/ |
ZKReputation on Base mainnet - on-chain Groth16 verifier |
| Contract | Description |
|---|---|
contracts/monad/ |
Swarm simulator, reputation mirror, agent proxy |
contracts/hyperliquid/ |
Agent registry, vault, copy trading integration |
KAMIYO provides the trust layer for x402 payments:
import { X402KamiyoClient } from '@kamiyo/x402-client';
const client = new X402KamiyoClient({
connection,
wallet,
programId: KAMIYO_PROGRAM_ID,
qualityThreshold: 70, // Auto-dispute below this
maxPricePerRequest: 0.1,
});
// Request with automatic payment + escrow protection
const response = await client.request('https://api.provider.com/data', {
useEscrow: true,
sla: { maxLatencyMs: 5000 },
});
// SLA violation triggers automatic dispute
if (!response.slaResult?.passed) {
// Funds held in escrow, oracle consensus determines settlement
}x402 handles payments. KAMIYO ensures they were earned.
// PDA derivation
getAgentPDA(owner: PublicKey): [PublicKey, number]
getAgreementPDA(agent: PublicKey, txId: string): [PublicKey, number]
// Account fetching
getAgent(pda: PublicKey): Promise<AgentIdentity | null>
getAgreement(pda: PublicKey): Promise<Agreement | null>
// Operations
createAgent(params: CreateAgentParams): Promise<string>
createAgreement(params: CreateAgreementParams): Promise<string>
releaseFunds(txId: string, provider: PublicKey): Promise<string>
markDisputed(txId: string): Promise<string>npm install
anchor build
anchor test
npm run build --workspaces| Network | Program ID |
|---|---|
| Mainnet | 8sUnNU6WBD2SYapCE12S7LwH1b8zWoniytze7ifWwXCM |
| Devnet | 8sUnNU6WBD2SYapCE12S7LwH1b8zWoniytze7ifWwXCM |
| Account | Address |
|---|---|
| Protocol Config | E6VhYjktLpT91VJy7bt5VL7DhTurZZKZUEFEgxLdZHna |
| Treasury | 8xi4TJcPmLqxmhsbCtNoBcu7b8Lfnubr3GY1bkhjuNJF |
| Oracle Registry | 2sUcFA5kaxq5akJFw7UzAUizfvZsr72FVpeKWmYc5yuf |
| Contract | Address |
|---|---|
| ZKReputation | 0x0e0Eb714c0860B5e4AC29a4f54951FF7fBF04dA5 |
| Groth16Verifier | 0xE467c6d2586CBC34feB4D9c6Cb7dB07E1b57341a |
| Contract | Address |
|---|---|
| AgentProxy | 0x87f9ac00d727a1ee8d1c246b67e2d0eb1a2206b2 |
| ReputationMirror | 0x7f4c878e7b2b083878f0ba3d2de2c6db995b1a11 |
| SwarmSimulator | 0xcaa2e2d77e09c4ec48830ada7abc711607350ea5 |
| Contract | Address |
|---|---|
| AgentRegistry | 0x25b96811e0441b20f89e11f9f430ef3319820bf0 |
| KamiyoVault | 0x0feb48737d7f47af432a094e69e716c9e8fa8a22 |
Fees:
- Escrow creation: 0.1% (min 5,000 lamports)
- Protocol fee on disputes: 1%
- Oracle reward pool: 1%
See SECURITY.md.
- 2-of-3 multi-sig for pause/unpause/treasury
- Oracle slashing: 10% per violation
- Agent slashing: 5% for frivolous disputes
- Auto-removal after 3 violations
- 7-day grace period on escrows
- Rent exemption checks on all SOL transfers
- Ed25519 signature verification with instruction iteration
- Token mint validation for SPL escrows
- Protocol fees for both SOL and SPL token disputes
MIT. See LICENSE.
