AI provider quickstart¶
Experimental test-network service
The wallet manages local model downloads and startup (wallet 0.9.0 for chain 20778); public model gateways and pool directories are available. Paid requests have been exercised by one operator; the AI market contracts are deployed on chain 20778, but no independent provider is registered there yet. Independent provider/hardware acceptance remains open. Signed usage is a claim, not proof of computation; no AI activity mints block rewards.
For the normal desktop setup, follow AI Sharing. The operator-oriented policy and generic ServiceEscrow integration below describe a separate profile. The wallet's current paid route is AIJobMarket, not the generic escrow ABI.
Boundaries¶
flowchart LR
U[Application / wallet] -- OpenAI-compatible HTTP on loopback --> M[GhostLLM runtime<br/>separate process]
M -- signed usage record --> P[Provider agent]
P -- propose usage --> E[(ServiceEscrow<br/>on chain)]
U -- fund / accept / dispute --> E
N[PQWERAI node<br/>consensus + EVM] --- E
M -. never inside .- N
- AI never runs inside consensus. A stopped or compromised GhostLLM runtime cannot stop nodes from validating blocks.
- Prompts and responses never go on chain; only quote hashes, receipt commitments and amounts do.
- Inference only: paid training, training grants and training rewards are out of scope for this testnet.
1. Run the GhostLLM runtime locally¶
The project pins the GhostLLM runtime (0.78.x) and a GGUF model by SHA-256; the supervisor verifies publisher/product/
native-file hashes before starting it with --local-model-only, isolates its data directory and disables analytics,
default plugins and prompt disk caching. That manual operator profile requires installing pinned files yourself. The wallet managed flow downloads verified approved bundles through public IPFS HTTPS gateways.
Wallets and clients reach the runtime only on literal loopback: http://127.0.0.1:<port>/v1 (OpenAI-compatible).
2. Opt in with a provider policy¶
The Windows Wallet's AI Sharing page (Advanced mode) writes the same policy the runtime client uses:
| Setting | Meaning |
|---|---|
| Inference / hosting consent | Nothing is served until you opt in |
| GPU, CPU, power, temperature, bandwidth limits | Admission checks before each job (not physical limits) |
| Hours (UTC) | When the node accepts work |
| Minimum price | Lowest pricePerToken you will quote |
| Payout address | Settlement address (separate from mining and validator keys) |
| Give AI sharing priority over mining | On by default (wallet with CR-0053). While AI sharing serves, or the PC works in a model pool, and the built-in node mines, the node and its GhostRider helper run at the lowest Windows CPU priority, so mining only uses CPU time AI sharing leaves free. Normal priority returns when AI sharing stops. Current Windows wallets use the native node, without WSL |
"Ask the model" sends a local test request and shows an unverified, not payable usage observation.
3. Usage records and settlement¶
- The provider signs a quote (job id, payer, provider, model id, max tokens, price per token, expiry, service window) bound to chain ID 20778 and the escrow address.
- The payer funds the job in
ServiceEscrowwith exactlymaxTokens × pricePerToken. - After serving, the provider proposes usage with a receipt commitment (hash of its signed usage record).
- The payer accepts or disputes; a trusted arbiter resolves disputes; unaccepted jobs refund after the window.
- Funds are paid by pull withdrawal. Revenue policy v3: the provider receives the remainder after deployment-configured payees; the testnet default has no payees, so the provider receives 100 %.
The full flow is executable in Build an AI payment application.
Limits you must design for¶
- Finality: an escrow allocation in a non-finalized block can be reorganised away. Deliver irreversible goods only after the settlement block is BFT-finalized.
- Arbiter and payer acceptance are trust assumptions; signed usage authenticates the provider's report, not its truth.
- Multi-operator routing, accountable hardware measurement and model-poisoning evaluation remain open work (known gaps).
Sources at 83ff5b69f0 (project repository, not public yet): ai/README.md · testnet/release/network/GUIDES.md · apps/pqwerai-wallet-windows/README.md
Found a problem? Report a documentation issue · Build testnet-20778+83ff5b69f0