
Leash Protocol
A spending firewall for AI agents: pay freely within policy, escalate anything over the line.
Demo
About
Leash Protocol is a spending firewall for autonomous AI agents. When an AI agent holds its own crypto wallet to pay for APIs, data, or compute, a bad prompt or a runaway loop can drain that wallet with no human involved. Leash solves this with an on-chain policy contract that enforces a daily spending cap, a per-transaction cap, and a vendor allowlist. Payments inside policy settle automatically over the x402 payment protocol. Payments that break policy are held, not rejected, and require a human to review and release them before funds move. Every payment is logged on-chain, building a reputation trail for both agents and vendors over time.
How it's made
Leash Protocol's core is a Solidity contract, PolicyVault, deployed live on Hedera Testnet. It enforces spending policy on-chain and emits events for every approved, escalated, rejected, or released payment. In-policy payments settle through the x402 payment protocol via the Blocky402 facilitator on Hedera, producing real, verifiable transactions. Over-policy payments are held in an Escalated state; a human releases them through the dashboard, with the flow designed around Ledger's Device Management Kit as the intended hardware signing layer. USD-denominated caps are converted using an AggregatorV3Interface price feed — currently a MockV3Aggregator, since Hedera testnet has no live HBAR/USD Chainlink Data Feed. A subgraph is written to index agent and vendor reputation from PolicyVault's events via The Graph, and the agent layer is built on the Hedera Agent Kit. The most notable technical decision: policy enforcement, payment settlement, and human escalation all live on-chain in one contract, rather than being faked in a frontend.