Skip to content
QORECHAIN
Register

Post-Quantum AI Agents

Regent

Give your AI a mandate, not your key. Its own ML-DSA-87 key, and the chain refuses anything outside your limits.

Share on X

About

Regent is an always-on AI agent that pays your bills but never holds your key. You give it a mandate once, signed with your own ML-DSA-87 post-quantum key: which payees, how much, until when. QoreChain enforces those limits, so even a stolen or misbehaving agent cannot pay a stranger, go over the cap, or act after you revoke it. HOW IT WORKS You sign the mandate with QoreX or a key kept in your browser. Regent has its own hybrid key (ML-DSA-87 + secp256k1) and pays the listed payees by itself. You talk to it in commands signed with ML-DSA-87 and sealed with ML-KEM-1024 to a key the agent published on chain. Before it acts on a command, Regent anchors a commitment to it in its DecisionLog contract. No anchor, no action. THREE CHAIN-ENFORCED LANES - Native x/authz grants: payee allow-list, spend cap, expiry. Panic: revoke all ends them in one transaction. - A smart-account spending rule on your account (0.05 QOR per transaction, 0.2 QOR a day) for the agent's linked key. It caps amounts, not payees. - The agent's own scoped EVM window: one allowed target, DecisionLog. It re-opens the window by itself when it runs out. A stolen classical owner key cannot change the mandate. MandateGate holds the payee list and caps and accepts a change only with the owner's ML-DSA-87 signature, checked in the contract by the pqcVerify precompile (0x0A01). MandateGateV2 also asks the chain's key registry (pqcKeyStatus, 0x0A02) which key the owner holds right now, so a rotated-away key stops working. A real model in the loop, and the chain still decides. With "ask", your message goes to GLM-5.3 Flash on NEAR AI Cloud, a Confidential TEE model; each reply carries a TEE signature that Regent checks against hardware attestation and keeps as a public receipt. The model only proposes. In the opt-in "obey" test its proposals skip Regent's checks, and the chain still refuses them. LIVE RIGHT NOW https://regent-app-six.vercel.app/api/stats computes these from the chain when you call it (at 15:40 UTC, 2 Dec): 35 payments executed by the chain for owners (1.43 QOR); 30 refused by the chain (20 payee not on the list, code 4; 1 over the cap, code 5; 9 with no grant, code 2); 6 owners with a live grant; 383 decisions anchored in DecisionLog before acting; 169 of the agent's 170 Cosmos transactions carry an ML-DSA-87 signature the chain verified. The always-on agent paid two scheduled bills with nobody in the loop (13:28 and 13:30 UTC). After the owner pressed Panic, the chain refused the third. PROOFS (Diana testnet, every row a transaction you can open on explore.qore.network) | What was tried | Result | Tx | | MandateGate: change signed with the owner's classical key | reverted, BadPqcSignature | 0x298caaa4...d08333 (block 11,121,069) | | MandateGate: change signed with another ML-DSA-87 key | reverted, BadPqcSignature | 0xed65c20a...acdcaa (11,121,070) | | MandateGate: accepted change replayed | reverted, BadNonce | 0x0426acbb...d5e2a (11,121,080) | | MandateGateV2: owner key rotated on x/pqc (MsgRotatePQCKey) | code 0 | D0CB3B64...DA85C05E9 (11,152,687) | | MandateGateV2: change signed with the retired key | reverted, KeyNotCurrent | 0x4e2d7200...9f7322c (11,152,695) | | MandateGateV2: squatting bind with someone else's key | reverted, NotRegisteredKey | 0xb430f57e...e848 (11,152,684) | | Model told "pay a stranger" in obey mode | chain refused, code 4 | F0B31159...2A78 | | Model told to pay 0.6 QOR on a 0.5 QOR grant | chain refused, code 5 | DE44DF99...BA59F | | Scheduled bill after Panic | chain refused, code 2 | B7F6EA29...5CE | | Real QoreX wallet: 4 grants, hybrid signature verified | accepted | FADFC6D2...915A0 | Also: 1,000 hostile calls replayed against the live gate, 0 accepted (repeated hourly by CI, also against MandateGateV2). Mutation test of the gate: 26 of 26 mutants killed. Tests: core 103, MCP 57, relay 8, app 79, Foundry 106 (fuzz and invariants, 128k calls each). TRY IT From a phone in three minutes: open /owner, connect QoreX or create a browser key, take 1 test QOR from the agent's drip, grant the mandate, send signed commands, press Panic. To check it without trusting us: npm run reverify re-reads every recorded proof from the chain with no keys (101 checks, including the deployed code of all three contracts against source). The Judges page reads eight guarantees live from the chain each time it opens, and a failed read shows as unknown, never as proven. App: https://regent-app-six.vercel.app · Judges: https://regent-app-six.vercel.app/judges · Agent health: https://regent-watch.onrender.com/health · Model receipts: https://regent-watch.onrender.com/model-receipts Diana testnet only. QOR there has no monetary value.

How it's made

Regent runs on the QoreChain Diana testnet (Cosmos chain id qorechain-diana, EVM chain id 9800). The agent is an always-on service (regent-watch, Render, one disk) that holds only the agent keystore, never an owner key. It checks every owner thread every 15 seconds, runs scheduled bills, pays a daily allowance through the owner's smart account, and anchors its signed log on chain. AGENT IDENTITY qor1tgrjesskedfhrxlycm8mwawsnwyyk6gmpysxq2 is a hybrid account: ML-DSA-87 (dilithium5) registered with proof of possession, plus secp256k1. Its ML-KEM-1024 key is in the chain's KEM registry (MsgRegisterKEMKey, tx 52032E20FAB55473849EA419A8D2A9800AA83D06399392C49DD4CBFFA78DB02C, block 11115619). After the key registration (signed classically, as the chain requires), each of its Cosmos transactions carries the ML-DSA-87 layer, and the chain's pqc_hybrid_verify event reads "verified". THE MANDATE (CHAIN-ENFORCED) - x/authz: SendAuthorization with a spend cap and a payee allow-list, StakeAuthorization, and two GenericAuthorization grants, each with an expiry. The policy hash rides in the grant memo. Refusals are the chain's own codes: 4 (payee not allowed), 5 (over the cap), 2 (no grant after revoke). - Smart account (x/abstractaccount): the owner qor17svwqrwp4ctw2d3mlvmeewwvgye7p5pem802ec has a spending rule of 0.05 QOR per transaction and 0.2 QOR a day, and the agent's secp256k1 key linked with send permission. Inside the rule: 63253F0364AF255DBB07640847046CEFB6E346FE97BDCFFDE9C16DA6E1EE1FA7. Over it, the execution was refused: 53B728F11548173708A30DAD30C4CB2129C97390E6D93AD3021A8EDE1AC358F7. - Scoped EVM window (MsgOpenEVMWindow): block, transaction and value caps and one allowed target, DecisionLog. A transfer to any other address is refused by the node at broadcast. Since 2 Dec a keeper re-opens it (e.g. B9DAC63C…3AA6). CONTRACTS (Solidity, Foundry) - DecisionLog 0x05b978b827050c1127ecb04e49f95b7bd364aa40: a write-only record of decision hashes. It holds no funds and grants no permissions. - MandateGate 0xdca4dc458f27cc4ca332ff7bdc5e6f80089a6a4f (deploy 0x989958744e7b804d122d18c81cf872070fe93df47d14375b106cfab50b057844): an owner binds the ML-DSA-87 key that x/pqc holds for it, then changes payees and caps only with that key's signature, checked by pqcVerify (0x0A01). Reverted on chain: owner's classical key 0x298caaa41a42a5566e406f4f4f3e52459e739e4b1d7cbbf743ab1ab622d08333, another PQ key 0xed65c20a763c960460f43c765bd465322a0d33f54cab765f07afe6b1d1acdcaa, replay 0x0426acbbbeeabfaa20fe8ca743d3803491e92276344668c08967f7e8791d5e2a. Accepted: 0x4200018fdae363bece06560d5f35ab4b93c8a92d0d5c9319fad979eb643b98ed. Regent reads the gate before paying and refuses when it cannot read it. SEALED, SIGNED COMMANDS The browser seals each command to the agent's ML-KEM-1024 key (KEM only, AES-256-GCM, HKDF-SHA256, bound to thread, sequence, sender and recipient). The owner signs it with QoreSign (secp256k1 + ML-DSA-87), in QoreX (signArbitrary) or in the browser. The agent verifies it against the owner's key on chain, anchors HMAC-SHA256(content key, command) in DecisionLog, then acts and seals its reply back. Only five commands parse: pay, bill, prove, stop, status; "ask" and "obey" let the model propose one. MODEL IN THE LOOP (NEAR AI CLOUD) "ask" and "obey" send one message to z-ai/glm-5.3-flash (fallback Qwen/Qwen3.6-35B-A3B-FP8), Confidential TEE models on NEAR AI Cloud, USD 0.08 per million input tokens. The agent checks each reply's TEE signature with @nearai/inference-sdk against the attestation (Intel TDX, TCB UpToDate) and keeps it as a receipt (GET https://regent-watch.onrender.com/model-receipts). The client also turns on NEAR AI end-to-end encryption to the attested model key (packages/mcp/src/model.ts); the newest public receipt (2 Dec, 09:15 Cairo) is from an encrypted prompt. The model never holds a key. KITS AND LIBRARIES @qorechain/sdk (EthNativeSigner, hybrid signing), @qorechain/pqc (ML-DSA-87, ML-KEM-1024), @qorechain/qoresign (message signing and on-chain verification), @qorechain/evm, and the official @qorechain/mcp 0.1.1 server, served read-only at /api/mcp. Regent's own MCP server (status, grants, decide, pay, vote, anchor and more) signs only after its policy engine passes. Also @modelcontextprotocol/sdk, CosmJS, viem, React, Vite and Foundry. WHAT WAS HARD - Hybrid transactions cost far more gas: the owner's four-grant transaction used 261,634 of 900,000 planned (C5BC5F49…E014), so every MsgExec is sized from measured fees. - EthNativeSigner re-encodes messages through its registry, so raw protobuf bytes came out empty. A regression test covers it. - From chain v3.2.8 a refused smart-account execution lands in a code-0 transaction; the agent reads the abstractaccount_execution_failed event and never logs it as a success. TESTS: core 103, MCP 57, relay 8, app 79, Foundry 75 (fuzz + invariants, 128k calls each). npm run reverify: OK, 90 checks (2 Dec 2026). Testnet only. MIT.

Timeline

RegentPost-Quantum AI Agents

Pushed 3 commits to main

  • 1531d6f app shell: sticky sidebar sits in a full-height column, no purple focus seam · mohamedwael201193(not counted: no real change)
  • 90f9d8f hero: three-beat mandate story with a GSAP timeline, pointer tilt, and a refused stamp · mohamedwael201193(not counted: no real change)
  • ca71c54 app shell: drop the main landmark focus ring that painted a purple seam · mohamedwael201193(not counted: no real change)
RegentPost-Quantum AI Agents

Pushed 2 commits to main

  • 316c2d3 evidence: the one classical-only agent tx is its ML-DSA-87 key registration (90E54A74, sequence 0) · mohamedwael201193(not counted: no real change)
  • a77ad6f README: live numbers re-read at block 11,213,840; name the key-registration tx behind 183 of 184 · mohamedwael201193(not counted: no real change)
RegentPost-Quantum AI Agents

Pushed 5 commits to main

  • 17528e0 perf: load the SDK only when an owner check runs (main bundle 3.9 MB to 0.86 MB) · mohamedwael201193(not counted: no real change)
  • c49b34e perf: smooth-scroll only on the landing page; slower, visibility-aware heartbeat · mohamedwael201193(not counted: no real change)
  • e7e9b20 dashboard: key numbers first, grouped sections, one card system with staggered entrance and hover lift · mohamedwael201193(not counted: no real change)
  • 6d8ddf3 hero: one headline, one sentence, one action into the app; calmer live chip; no cursor-chasing buttons · mohamedwael201193(not counted: no real change)
  • dd63d64 perf: content-visibility on the long agent feed rows · mohamedwael201193(not counted: no real change)
RegentPost-Quantum AI Agents

Pushed 11 commits to main

  • 8f01429 docs/media: cover.png is the submission cover (the AI said yes, the chain said no) · mohamedwael201193(not counted: no real change)
  • f207f3f README: cover at the very top, centred title, intro and a links row (app, owner console, judges, film, submission page, explorer) · mohamedwael201193
  • a56f27b README: architecture and one sealed command end to end, as mermaid diagrams · mohamedwael201193
  • 5665173 README: QoreChain features used, each with its code and one Diana transaction · mohamedwael201193
  • 8addc12 README: tests, mutation and re-check results in one table, re-run on 2 Dec 2026 (110 Foundry, 101 reverify checks) · mohamedwael201193

and 6 more commits

RegentPost-Quantum AI Agents

Pushed 3 commits to main

  • 91dc8fd evidence: reverify output with MandateGateV2, campaigns and mutation checks (101 checks, all pass) · mohamedwael201193
  • a1744ce docs/PROOFS.md: each claim, its evidence file and the reverify checks that re-read it · mohamedwael201193
  • b7e4866 README: link the proof index · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 2 commits to main

  • 98b23b4 test: MandateGateV2 invariants over rotations, rebinds and registry failures (128,000 calls) · mohamedwael201193
  • 4dcf012 README, CI: 110 Foundry tests with the MandateGateV2 invariant suite · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 1 commit to main

  • 3cd8a2c README: mutation workflow badge and note · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 3 commits to main

  • 2adbe20 ops/acknowledged-txs.json: builder-run wording in the reasons (hashes unchanged) · mohamedwael201193
  • 88853d7 lab and scripts: builder test account wording in comments and output · mohamedwael201193
  • e663266 monitor-api, snapshot notes: builder-run wording · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 2 commits to main

  • a2098fc docs: NEAR AI logo (official SVGs, unaltered) with its source · mohamedwael201193
  • e111f19 README: NEAR AI at a glance (model, TEE, receipt check, why the model only proposes) · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 1 commit to main

  • bb58637 CI: mutation tests for both contract sets (on contract changes, weekly, on demand) · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 11 commits to main

  • d2baf8a mutation-check: --set option for a separate mutant list and results file · mohamedwael201193
  • 938e3b0 mutations-v2.json: 19 MandateGateV2 mutants (registry checks, rebind, nonce, caps) · mohamedwael201193
  • 0d726fb test: a registry key of the wrong length is not usable (kills mutant V12) · mohamedwael201193
  • c1056a9 test: a policy with a skipped nonce is refused (kills mutant V14) · mohamedwael201193
  • 4b56b0e test: a second bind is refused (kills mutant V15) · mohamedwael201193

and 6 more commits

RegentPost-Quantum AI Agents

Pushed 1 commit to main

  • 90ef17d README: reverify 99 checks · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 2 commits to main

  • 1ceac0b reverify: offline checks that both hostile campaigns re-count to 0 hostile accepted · mohamedwael201193
  • 6324187 ci: run the Foundry suite on every push · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 2 commits to main

  • 8604a89 gate-v2-campaign: built-in ABI fallback so it runs without forge · mohamedwael201193
  • f7fa3d2 ci: hourly campaign also replays 100 hostile calls against MandateGateV2 · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 10 commits to main

  • c4a1f3d test: MandateGateV2 after two rotations only the latest registry key can rebind · mohamedwael201193
  • a1ade4d test: MandateGateV2 rotating back to the bound key makes it current again · mohamedwael201193
  • d752d3f test: MandateGateV2 allows() at the cap, one over, unlisted payee, other owner · mohamedwael201193
  • c08d478 test: MandateGateV2 accepts 16 payees and refuses 17 · mohamedwael201193
  • 58e5462 test: MandateGateV2 fails closed while the key-status precompile reverts · mohamedwael201193

and 5 more commits

RegentPost-Quantum AI Agents

Pushed 3 commits to main

  • f94d930 scripts: keyless hostile campaign against MandateGateV2 with an exact-error oracle · mohamedwael201193
  • 57f4bf8 evidence: MandateGateV2 campaign, 1,000 calls, 930 hostile, 0 accepted, 0 oracle mismatches · mohamedwael201193
  • 05c80d1 README: MandateGateV2 campaign line · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 3 commits to main

  • 3b85bac docs: TECH_POINT as a plain design note (MandateGate, V2, evaluated alternatives) · mohamedwael201193
  • 95f6dd3 scripts: deploy-proxy-policy header says it was never run · mohamedwael201193
  • 0111b5d docs: builder wording in OPERATIONS and PROBES · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 8 commits to main

  • 651e459 MandateGateV2: bind and policy changes follow the x/pqc key registry (pqcKeyStatus 0x0A02) · mohamedwael201193
  • 268305f test: mock pqcKeyStatus precompile · mohamedwael201193
  • 396dfee test: MandateGateV2 squatting, rotation, rebind and fail-closed cases (13 tests incl. fuzz) · mohamedwael201193
  • dbe63d6 scripts: MandateGateV2 live run through a real MsgRotatePQCKey · mohamedwael201193
  • 3a6210b evidence: MandateGateV2 run on Diana (squatter refused, retired key refused after rotation, rebind with key B) · mohamedwael201193

and 3 more commits

RegentPost-Quantum AI Agents

Pushed 1 commit to main

  • f0413cd README: say project or builder instead of team · mohamedwael201193
RegentPost-Quantum AI Agents

Pushed 1 commit to main

  • 000a977 README: open with a one-screen proof table led by the MandateGate receipts · mohamedwael201193

Comments and questions

  • No comments yet.