Skip to content
QORECHAIN
Register

Post-Quantum AI Agents

ENSURE

Give your AI a card, not your wallet: quantum-safe spending cards for AI agents.

Share on X

About

AI agents increasingly pay for data, search and compute. Today you either hand an agent your wallet key, where one prompt injection empties it, or approve every payment yourself, so it is no longer autonomous. Ensure gives the agent its own spending card instead. Each card has a total budget, a cap per merchant, a list of allowed merchants and an expiry, and its owner can freeze it at any moment. The limits live in a contract on QoreChain, so no prompt can move them. The agent pays per request like a card network: it authorises each request with an ML-DSA-87 voucher signed off chain (free and instant), and the merchant settles the newest voucher on chain whenever it likes, verified by the pqcVerify precompile. Anyone can use it on the diana testnet: visitors run the public demo card, and anyone with QoreX can issue their own card, deposit their own test QOR and freeze it from their wallet. Live runs and five attacks (prompt injection, forged voucher, replay, overspend, stolen card) are refused by the live contract, with explorer links.

How it's made

Contract: EnsureCards.sol, one shared contract for all owners (27 Foundry tests, including a fuzz test that a card never pays more than its limit). Cards, per-merchant tabs and running-total vouchers. settle() checks every voucher with the pqcVerify precompile (0x...0a01) against the agent's key read from pqcKeyStatus (0x...0a02), which must be registered and possession-proven. Owner actions are authorised either by a detached ML-DSA-87 signature (relayed by anyone) or by the owner's own call inside their post-quantum EVM window, which is how QoreX users issue cards. Agent and node (TypeScript, @qorechain/sdk, @qorechain/evm, @qorechain/qoresign): every account registers its ML-DSA-87 key with proof of possession. The agent and the merchant gateway run inside scoped EVM windows that can only reach EnsureCards, and the node reopens them when they expire. The agent refuels its gas from the owner's account through a linked ed25519 authenticator with spending rules (at most 1 QOR per payment, 3 QOR per day). The owner's task is a QoreSign hybrid message the agent verifies on chain before acting; its run report is signed back. The agent plans with an LLM (Groq, openai/gpt-oss-120b) that treats fetched web pages as untrusted and flags injected payment instructions, but the contract, not the model, is the security boundary. Web: landing page and 3D app (three.js), QoreX via window.ethereum, live event stream from the node. Hosted on Render. What was hard: QoreX refuses arbitrary signing in the browser, so the contract also accepts the owner's own PQ-windowed call. We also found on the live chain that every EVM sender, including the merchants' gateway, needs a registered post-quantum key and an open window. AI use is documented in AI_USAGE.md.

Timeline

ENSUREPost-Quantum AI Agents

Pushed 9 commits to main

  • a280673 End-to-end wallet test for personal cards; show fractional card limits · Rampop01
  • dc323d5 README: link the live app · Rampop01
  • 0f48fef Node refuses to start when the agent or gateway key does not match the deployment · Rampop01
  • 166d306 Tolerate quoted or padded key values from the host environment · Rampop01
  • b1a149d Node reads the AI key from agent.env locally; planner asks for realistic request counts · Rampop01

and 4 more commits

ENSUREPost-Quantum AI Agents

Newly verified on chain: AMM pools, QoreSeal and the encryption key registry

ENSUREPost-Quantum AI Agents

Pushed 1 commit to main

ENSUREPost-Quantum AI Agents

Pushed 1 commit to main

ENSUREPost-Quantum AI Agents

Earned a Ship Weeks badge.

ENSUREPost-Quantum AI Agents

Earned a Ship Weeks badge.

ENSUREPost-Quantum AI Agents

Earned a Ship Weeks badge.

ENSUREPost-Quantum AI Agents

Earned a Ship Weeks badge.

ENSUREPost-Quantum AI Agents

Earned a Ship Weeks badge.

ENSUREPost-Quantum AI Agents

Pushed 1 commit to main

  • edfe42d Withdraw button: owners take unlocked funds back to their QoreX wallet · Rampop01
ENSUREPost-Quantum AI Agents

Pushed 1 commit to main

  • 54735e7 Node keeps the public demo card usable: refills its limit as its owner · Rampop01
ENSUREPost-Quantum AI Agents

New project.

Comments and questions

  • No comments yet.