Skip to content
QORECHAIN
Register

Post-Quantum AI Agents

nirvia

Escrow holds the pay. Code calls the play.

Share on X

About

Nirvia lets a buyer hand a shopping task to an AI agent without handing over the money. The buyer signs a spending mandate with ML-DSA-87. The merchant signs a cart with ML-DSA-87. The escrow contract opens an order only when both signatures verify on chain (QoreChain pqcVerify precompile) and the cart fits the mandate. Funds stay in escrow until the merchant posts a signed ship claim. If the merchant does not ship, or ships late, the buyer is refunded and the merchant is fined from its bond. What it deliberately does not do: no LLM sits on the money path, the agent never chooses who gets paid, and the system does not claim to prove delivery (see Limits).

How it's made

Nirvia is an escrow for AI-agent shopping. A buyer gives an agent a spending mandate, the merchant signs a cart, and the escrow contract releases money only to the merchant named in that signed cart. Architecture - Contracts (Solidity + Foundry): NirviaRegistry (merchant bonds and post-quantum keys), NirviaEscrow (orders and funds in fUSD), and NirviaCourt (deterministic dispute rulings). They are deployed on QoreChain testnet qorechain-diana (EVM chain ID 9800). - Post-quantum signatures: Buyer mandates and merchant carts are signed with ML-DSA-87 in the browser. The escrow verifies both signatures on chain through the pqcVerify precompile, and checks the cart against the mandate. - App (Next.js 16): A chat UI where the LLM only drafts the mandate and picks a product. Backend logic lives only in route handlers. The LLM is not on the money or dispute path. - Agent wallet: A buyer burner wallet is opened in the browser, registered with an ML-DSA key, and given a short EVM window (fUSD approve only). QoreChain features and kits used - pqcVerify and pqcKeyStatus precompiles - @qorechain/sdk for key registration and transactions - @qorechain/qoresign for browser signing - EVM window for narrow buyer access - x/abstractaccount allowlist, tested separately. The live relay uses a registered agent EOA, not x/abstractaccount. - Testnet fUSD (zero value) Verification - 106 Foundry contract tests and 185 Vitest unit tests pass. - Nine attacks were rejected on chain. Each transaction hash is in docs/evidence/attacks.md. - A real order was held in escrow through the web UI (order 10). What was hard - A tx with code 0 can still fail. We check the execution event and the EVM receipt status before counting success. - Precompiles return 0x instead of reverting when they are down, so every precompile call checks its return length. - fUSD exists both as a bank coin and as an ERC-20. We convert between them with MsgConvertCoin, which the SDK registry did not know, so we register it ourselves. - The EVM window expires after 300 blocks (about 7 minutes) and allows one transaction, which made the approve step fragile. We now show the window state live. - LLM latency: the free-tier model took over 60 seconds with reasoning on. Disabling reasoning brings it to about 6 seconds. Limits we state openly: A ship claim is the merchant's signed statement, backed by its bond. The contract does not prove that goods arrived. The first pilot merchant, Nusantara Motor, is custodial: the Nirvia team holds its keys, and QRIS is not connected

Timeline

nirviaPost-Quantum AI Agents

Pushed 97 commits to main

  • 52c0e8c docs(readme): link video demo · RAKASAMUD
  • d587b50 feat(buyer): satukan kotak spend dan langkah jadi satu sidebar hijau · RAKASAMUD
  • 2c5bc13 feat(buyer): pindahkan kotak spend ke atas langkah · RAKASAMUD
  • 70c0ce0 feat(buyer): sederhanakan alur wallet dan approve untuk pembeli · RAKASAMUD
  • d2f72c3 docs(readme): link live app dan halaman order 10 serta order 3 di vercel · RAKASAMUD

and 92 more commits

nirviaPost-Quantum AI Agents

New project.

Comments and questions

  • No comments yet.