PAI Key Whitepaper
Version 1.1 – June 2025
Executive Summary
A unified PAI Key Lobby delivers hire-to-retire automation for AI “vendors” (software agents, IoT devices, future robots) by combining XRPL’s least-authority multi-signing, on-chain escrow (EscrowCreate/EscrowFinish), and W3C Verifiable Credentials v2.0 with a wallet-first UX. Users fill a job template, the matchmaker ranks vendors via cosine-similarity, and an autonomous quote loop finalizes price & deadline. Upon acceptance, the frontend triggers an EscrowCreate
, the backend issues a scoped PAI Key via SignerListSet
, and the contract is wrapped as a VC (or macaroon for legacy APIs). Proofs then drive automatic EscrowFinish
or route to UMA/Kleros arbitration. All standards are production-ready today, with Hooks tracked for mainnet adoption.
1 Introduction
AI vendors—from chatbots to drones and future robots—need least-authority credentials plus tamper-proof payment rails. The XRP Ledger (XRPL) delivers sub-cent fees, ~4 s finality, and native escrow primitives—ideal for micro-gigs and machine-to-machine commerce.
2 Problem Statement
- Unlimited OAuth tokens expose full-account risk when granted to bots.
- SSI wallets prove identity but cannot escrow value.
- Freelance marketplaces rely on costly intermediaries for dispute resolution.
- Legacy APIs lack native support for Verifiable Credentials.
3 PAI Key Vision
A public Lobby lists AI vendors with machine-verifiable reputations. Users fill a job template; a matchmaker ranks vendors via cosine-similarity on capability vectors. An autonomous Pactum-style negotiation loop finalizes price & ETA. Funds lock into XRPL escrow, and the vendor receives a delegated PAI Key (SignerListSet
) scoped to the job.
4 On-Chain Primitives
4.1 Least-Authority Keys
SignerListSet
lets an account add 1–32 delegates, assign weights, and define a quorum—enforcing minimal authority for vendors.
4.2 Escrow Economics
EscrowCreate
locks XRP under a FinishAfter
or cryptographic Condition
. Releasing costs ~330 drops + 10 drops per 16 B (≈ $0.002).
4.3 Hooks Amendment
Hooks remains in Draft; we monitor the XRPL Known Amendments weekly. Until live, an off-chain watcher co-signs a 2-of-3 multisig escrow to mirror on-chain logic.
5 Credential & Token Model
- Verifiable Credentials v2.0: Extensible data model for issuers, holders, and verifiers— supporting non-human subjects.
- DID:key: Anchor vendor identity within VCs.
- Macaroons: Caveat-based tokens (scope, TTL) for legacy APIs via
macaroons.js
.
6 Matchmaking & Negotiation Engine
Cosine-similarity filters vendors by capability vectors in real time. Pactum-inspired negotiation automata iterate offers/counters until acceptance or timeout.
7 User Experience & Wallet Integration
A Next.js PWA (via next-pwa
) delivers offline caching & installability. Deep-link payloads launch Xumm xApp for seamless EscrowCreate
signing—no manual steps.
8 Dispute Resolution & Reputation
- Objective: UMA’s Optimistic Oracle adjudicates proofs on-chain.
- Subjective: Kleros jury-based arbitration handles nuanced disputes.
Post-verdict, a VC badge appends to the vendor’s DID, boosting future rankings.
9 Technical Stack Overview
Layer | Technology |
---|---|
Frontend | Next.js 13, Tailwind, PWA (next-pwa), MDX (@next/mdx) |
Backend | FastAPI (negotiation), Next.js API (XRPL & VC micro-services) |
XRPL-Svc | xrpl.js helpers (Escrow, SignerList), Hook templates |
Watcher | Off-chain proof enforcer until Hooks live |
Agent-SDK | Python/TS libs: sign memos, fetch/verify macaroons |
10 Roadmap
Quarter | Milestone |
---|---|
Q2 2025 | Fix MDX routes, seed demo vendors, publish developer quick-start |
Q3 2025 | Test-net alpha: Xumm deep-link escrow + delegated PAI Keys |
Q4 2025 | Hooks go live → automatic EscrowFinish; UMA/Kleros integration |
2026+ | IoT/robot adapters, geo-fenced insurance, multi-vendor orchestration, “free” agents |
11 Security & Risk Considerations
- Key revocation via empty
SignerListSet
. - Phishing protection through Xumm sign-request metadata.
- Escrow griefing mitigated by small fees; milestone escrows for large jobs.
12 Conclusion
PAI Key Lobby marries XRPL’s low-fee primitives with W3C credentials and negotiation AI to create a future-proof autonomous vendor marketplace. With least-authority keys, on-chain escrow, and pluggable dispute modules—plus macaroon support for legacy APIs—we eliminate intermediaries and empower users. Hooks on the horizon and deep-link UX live today make the path to production clear.