Skip to content
QORECHAIN
Register

Post-Quantum AI Agents

Kavach

An AI agent's treasury with public keys. Anyone can try to rob it, and the chain refuses every attempt.

Share on X

About

Kavach is a treasury for an AI agent that anyone can try to rob. We published both of the agent's keys on purpose. Open the Arena, pick an attack and press the button. Each attempt is a real transaction on QoreChain testnet. The page shows which layer refused it, the code it returned and the transaction you can open. The idea is simple. Assume the model gets fooled. Assume the keys get stolen. Then put every limit where neither of them can reach it. The treasury only pays people the owner approved, within caps the owner set. Those limits come from a mandate signed with the owner's ML-DSA-87 key, and the contract checks that signature on chain with pqcVerify. The agent's second key can only call the treasury's pay function. Its first key only works inside a scoped EVM window that points at the treasury. The agent account's own post quantum key was never published, so a stolen classical key moves nothing, even on Q Day. We also fooled a real model on purpose. With no rules in its prompt it agreed to an over the cap payment 8 times out of 10, and the treasury refused every one. With our prompt it was fooled 0 times out of 10. How it covers the track Post quantum identity and signing: the owner, agent and relayer keys are registered with proof of possession, and every decision the agent makes goes into a receipt chain signed with ML-DSA-87. Spending limits and smart account rules: the agent's linked key has a spending rule that allows one function and 1 uqor per call. The treasury adds approved payees, a per payment cap, a daily cap and a budget. Scoped EVM window: the agent's window has one target, the treasury, with a transaction count, a value cap and an expiry. Authenticated messaging: mandates are signed with QoreSign and sealed to the agent's ML-KEM-1024 key with QoreSeal. Check it yourself The Proof page re-reads all 26 proof transactions from the chain with one button and verifies the receipt chain in your browser. In the repo, pnpm evidence does the same with no keys. A separate Go tool built on the QoreChain custody kit checks the hybrid signatures offline. JUDGES.md has a five minute route. Honest limits Honest payments in the Arena are dry runs so nobody can drain the demo treasury. Everything else is on chain. LIMITS.md lists what is simulated and what we do not claim.

How it's made

Contract KavachTreasury.sol is written in Solidity with Foundry. It has no owner address. Every owner action needs an ML-DSA-87 signature over the chain id, the contract, the action, a nonce and a deadline, and the pqcVerify precompile checks it. 49 tests cover every line and branch, and mutation testing catches all 35 bugs we planted in it. Chain We use the QoreChain SDK for hybrid transactions, key registration with proof of possession, scoped EVM windows and smart account linked keys with spending rules. The owner gets fUSD from the AMM and converts it with MsgConvertCoin before funding the treasury. Agent Real models on Groq plan payments through strict tool calls. A small clamp checks each plan off chain, but the chain is the real boundary. Every run writes a hash linked receipt signed with ML-DSA-87. App Next.js on Vercel with Neon Postgres. The Arena runs attacks through a relayer that pays the fees, with a rate limit per visitor and a daily budget. A read only MCP server at /api/mcp lets any agent check the treasury and the receipts. Ops GitHub Actions run CI, a sentinel, a treasurer that pays real invoices under the mandate and a job that renews the agent's window. Alerts go to Telegram. What was hard A refusal from a smart account comes back as a transaction with code 0, so we read the real revert from the transaction data. A window refusal never becomes a transaction at all, so we show the node's own words instead. Faucet fUSD arrives as a bank coin and has to be converted before a contract can spend it. CHAIN_NOTES.md lists everything we measured.

Timeline

KavachPost-Quantum AI Agents

Pushed 8 commits to main

  • 59b9518 Docs: new project page for Kavach; never edit the Kavach Vault drill entry · Abhishek222983101
  • 8d820cd P0 done: tick build plan, current state, session log · Abhishek222983101
  • 7b2cd5e CI: web tests pass with none yet · Abhishek222983101
  • 1faf99d CI: root typescript + vitest · Abhishek222983101
  • b680cc1 P0: monorepo, UI shell (NiryatIQ), Foundry, CI, Neon project, env template, MIT licence · Abhishek222983101

and 3 more commits

KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 05c8b73 Pipeline animation: packets travel below the text · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 59df23e README: animated banner and pipeline SVGs, three more GIFs, video thumbnail · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • caa0632 README: video hero, GIFs, one-minute summary, track map, evidence, llms.txt · Abhishek222983101
KavachPost-Quantum AI Agents

Newly verified on chain: AMM pools, EVM window (incl. scoped), Hybrid ML-DSA-87 transactions, PQC key registration with proof of possession, QoreSeal and the encryption key registry, Smart accounts and spending rules

KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • d9f7206 Submission form copy · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 8d6915f New bright cover and share image · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 7b6bb5d Video plan: brief, feature inventory, script v2, storyboard (with board), production plan · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 24dbb96 Demo video: captioned walkthrough of the live site (tools/demo-video.mjs, assets/demo.mp4) · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • da7dfc4 Vercel Cron as a backup heartbeat (sentinel, treasurer) because GitHub schedules have not fired yet · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 21dab65 Contract: 100% coverage, mutation testing (35/35), edge-case tests; JUDGES.md and QUANTUM_READINESS.md · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • ef5914c renew-window: scope umask to a subshell · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 8b1812c Docs: window renewal trade-off (T21) · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 5eb2b08 Automate the agent window renewal (every 6 h, renews under 9,000 blocks) · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 45b5717 renew-window script: the agent's EVM window lasts at most 28 h and must be renewed while judging is open · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 68615ac Proof: tighter measure · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 1215d02 Docs: plan, decisions, open questions, limits, state; SECURITY.md; cover in the new palette · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • d199311 CHAIN_NOTES: item 9 states only what we measured · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 501341f Verification depth: Go custody-kit verifier (21/21), 5,000-run fuzz properties, 984 randomized live attacks, Slither review, Telegram alerts, 60 s function limit, CHAIN_NOTES, design-audit fixes · Abhishek222983101
KavachPost-Quantum AI Agents

Pushed 1 commit to main

  • 502f68f Open Graph image and metadata · Abhishek222983101

Comments and questions

  • No comments yet.