Leash.
Post-Quantum AI Agents · Build Before Q-Day

Leash

A spending leash for AI agents. A classical key can only stop things. Starting or loosening anything needs a post-quantum signature, checked on chain.

2:56 demo with voiceover and captions. Open the video.

One rule, three keys

An AI agent that pays or trades holds a key, and today that key is classical. A limit means nothing if the same key can raise it.

The agent

Spends and acts only inside a mandate the owner signed: caps, an allowlist, an expiry, and routes with rate floors.

The owner's classical key

Can only freeze. If it leaks, or a quantum computer breaks it, an attacker can pause the agent, never grant it power.

The owner's ML-DSA-87 key

Signs every mandate. QoreChain's pqcVerify precompile checks the signature on chain against the key the owner registered.

What it does

Version 1 lets an agent pay. Version 2 lets it act. The rule never changes.

Pay inside a mandate

Per-payment and daily caps, a recipient allowlist and an expiry, enforced by the guard contract, not by the agent's good behaviour.

Act, with the chain measuring

Swap, wrap and use ERC-4626 vaults along owner-signed routes. The guard measures what it received and enforces the owner's rate floor.

Describe flows in English

"swap FUSD for FETH on 0x... at no worse than 0.0004 FETH per FUSD". A deterministic compiler, not a model, turns it into a mandate and lists the gaps.

Use it from any agent

An MCP server with 15 tools and a skill for Hermes Agent, Claude Code and Cursor. There is no tool that loosens a mandate.

Watch and freeze

A monitor flags bursts and unexplained outflows and can freeze the guard with a classical key that can only stop things.

Attack itself

The Q-Day drill plays a leaked agent key and a leaked owner key against the guard, on the real testnet and on a local node.

Proof, not promises

Real transactions on the QoreChain testnet (qorechain-diana): a real ML-DSA-87 signature accepted by pqcVerify, five adapter actions, and a swap made by an MCP client.

15/15
Q-Day drill on the real testnet
20/20
on-chain checks in pnpm verify
46 + 30
contract and TypeScript tests
6/6
deliberate breakages caught by the tests

Verify it yourself

One read-only command checks the live deployment: both guards, their deployed bytecode against this source, the real transactions, and the drill reports. No keys, nothing is sent.

$ git clone https://github.com/David-glitc/leash && cd leash
$ pnpm install
$ pnpm verify
PASS v2 guard: deployed code equals this source 10662 bytes, identical (immutables masked)
PASS v2: swap through the guard succeeded and emitted Executed
20 passed, 0 failed.

Honest limits

What this is not.

Read the full threat model · FAQ · What mainnet needs