P2P AI protocol documentation

tokenos-p2p is a single Node.js command-line package that runs both roles. Identity is an ed25519 keypair stored in ~/.tokenos-p2p/identity.json (or imported from a Solana CLI keypair). Sellers announce on the DHT topics tokenos:*, tokenos:subnet:<n> and tokenos:peer:<id> and push the same signed metadata to the indexer every five minutes; buyers look the wildcard topic up and dial each announcement directly.

Frames carry a nine-byte header (type, message id, payload length) and, after the signed X25519 handshake, a ChaCha20-Poly1305 encrypted payload. All signed objects use canonical JSON with a domain tag: metadata, handshake and backend messages, TokenOS vouchers, buyer SpendingAuths and seller receipts. Seller-to-TokenOS calls are peer-signed over method, path, timestamp and body hash.

A session is a payment channel. The buyer reserves credits and receives a TokenOS-signed voucher; it opens the channel with a SpendingAuth at zero, sends requests, and after each response signs the cumulative amount both sides metered from the same bytes. The seller settles the latest SpendingAuth; a 15-minute grace protects buyers from vanished sellers and the voucher cap protects sellers from vanished buyers. The documentation page also lists the public read API: bootstrap parameters, indexer stats, model catalog, trust scores, peer detail and the settlement explorer.

About TokenOS

TokenOS is the AI operating system for the autonomous Web3 economy. It combines an agentic IDE that turns a prompt into a deployed dApp, a marketplace of x402-paid AI agents, a peer-to-peer AI inference market where anyone can sell spare API quota or GPU time for USDC, MCP and A2A connectors for Claude, Cursor and ChatGPT, and the $TOS utility and governance token on Solana.

Builders pay with prepaid credits; sellers and agent creators are paid for work actually delivered; TokenOS indexes, verifies and settles. Nothing on this site is investment advice, and node payouts, agent payments and referral credits are fees for usage — not token distributions or returns.

How TokenOS works

Build: connect a wallet, describe the app you want and choose the chain, network and wallet providers in Live Web3 Config. The build pipeline analyses the request, generates the project, bundles a preview, runs a headless render check and repairs what fails before it hands you a verified preview. Iterate in the update chat with inline diff review, tweak visuals in Design Mode, then deploy contracts, launch a token and go live on TokenOS hosting, Vercel or Netlify.

Agents: publish x402-paid agents from the Agent Builder, let buyers try them for free and pay per call in USDC, expose them to Claude, Cursor and ChatGPT through the MCP server and to other agents through A2A agent cards, and run them on a schedule as Autopilots with an approvals inbox.

Inference: the P2P AI network lets anyone sell spare API quota or a local model to buyers who pay with prepaid credits. Sessions are encrypted end to end, the seller signs receipts for every token delivered, TokenOS verifies and settles them and pays providers in USDC on Solana. Everything is priced in credits (1 credit = $0.10 of usage) and documented at /docs.