
Post-Quantum AI Agents
PQ Risk Sentinel
Every decision needs a post-quantum signature, so even a leaked classical key moves nothing.
About
AI agents that can move funds are only as strong as their classical keys. Steal the key — or break it with a future quantum computer — and you own the agent. PQ Risk Sentinel removes that single point of failure: the agent's classical private key is published in the repo (docs/BREAK_GLASS.md), and it is worthless. An off-chain AI model scores market-manipulation patterns (wash trading, one-way pumps, whale concentration) and issues hold / pause / exit decisions for a guardian vault on QoreChain's Diana testnet. A decision executes only as a hybrid-signed (secp256k1 + ML-DSA-87) transaction from the chain-scoped agent account, and the vault verifies the ML-DSA-87 signature in-contract through QoreChain's PQC precompiles (0x0a01 pqcVerify, 0x0a02 pqcKeyStatus) against the agent's registered post-quantum key — on every call. The contract, not the agent, enforces the guardrails: a confidence floor (60) below which verified decisions are ignored on the record, a cooldown shared by Pause and Exit, exits capped at 50% of the vault per action to a fixed safe address, single-use nonces, and signed decision expiry. Already executed live on testnet (vault 0x04fcffc3f069038018c8a9719b88902d3091f7da): the model paused the vault on a wash-trading pattern, exited 5 QOR (50%) to the safe address on a pump pattern, and stood down on benign flow. Then the break-glass test ran: four real attack transactions from an attacker holding the published classical key — all reverted — after which the legitimate agent executed again, unaffected. The system is left live and at rest for judging. Judges can re-check every claim in one command: npm run verify re-verifies all 23 checks read-only, including re-verifying every decision's ML-DSA-87 signature against the exact message the contract reconstructs today. The Foundry suite passes 19/19. This project was built with an AI coding agent; AI_USAGE.md in the repo documents how, honestly.
How it's made
Cosmos SDK v0.53 L1 with a triple-VM design; the EVM lane (chain ID 9800) is driven through the TypeScript @qorechain/sdk 0.14, because deployment requires a registered PQ key and an open EVM authorisation window. The vault is Solidity 0.8.30, tested with a Foundry suite (19 tests) that etches mock PQC precompiles. A Python model service (stdlib only) scores risk features and returns a decision with a confidence value; a TypeScript agent loop rebuilds the exact decision message the contract expects, signs it with ML-DSA-87 via the SDK, and relays it — anyone may relay, only the signature matters. Every transaction in the system is hybrid-signed.
Timeline
Comments and questions
- No comments yet.