Skip to content
Agenttresor

Agenttresor

Give AI agents spending power, not custody.

Created on 31st October 2026

•

Agenttresor

Agenttresor

Give AI agents spending power, not custody.

The problem Agenttresor solves

AgentTresor: non-custodial spend control for AI agents on BSV

Problem. AI agents can already pay for APIs, but companies can’t give them money safely: an agent wallet can be drained by one prompt injection, and a platform holding the funds means giving up custody.

What we built. A company locks an agent’s budget in a vault on BSV: a Bitcoin Script smart contract spendable by the agent and our policy together, or by the company alone. The policy co-signs only within the company’s rules: allowed merchants, max per payment, daily budget, in sats or in euros converted at payment time. Large payments need on-chain approval: the company funds that one payment from BSV Desktop. Our v2 vault adds an OP_PUSH_TX covenant, so every BSV node enforces the maximum per payment, change back to the vault and a fee cap. Every decision goes into a hash-chained audit log, anchored on-chain inside each payment and by a small notary.

How agents use it. Any MCP client (Claude, ChatGPT, Cursor) or plain HTTP. The agent’s key never leaves its machine; one command connects an agent with a one-time code. Merchants are paid with BRC-121 (HTTP 402) and verify with SPV.

BSV stack. @bsv/sdk 3.2.1, @bsv/wallet-toolbox 2.14.9, @bsv/402-pay (BRC-121), BRC-100 wallets (BSV Desktop), BRC-42/43 and BRC-29 key derivation, Arcade for broadcasting and headers, WhatsOnChain links. Experimental BSV-21 credits prototype with overlay validation.

Value to BSV. Agent payments of a few hundred sats with fees of 36 sats, and every agent decision notarized for about 26 sats: practical only on BSV. AgentTresor brings companies’ AI spending on-chain without giving up control.

Live on mainnet. Real agent payments from v1 and v2 (covenant) vaults, a company reclaim, a payment under euro rules and audit anchors: see docs/mainnet-transactions.md in the repo.

Challenges we ran into

1. Letting an agent pay without holding the money. A hot wallet for the agent was a non-starter (one prompt injection drains it), and a platform wallet means custody. We moved the budget into a Bitcoin Script vault: agent AND policy sign together, or the company reclaims alone from BSV Desktop. BRC-100 wallets only sign with derived keys, so every key in the script is derived (BRC-42/43), and we sign custom inputs with createSignature (BIP-143, SIGHASH_ALL|FORKID).

2. A covenant that the network enforces. We built an OP_PUSH_TX covenant by hand, so the script itself checks how the vault is spent: a capped payment, the change back to the same vault, and a capped fee. Getting the signature trick right in raw Bitcoin Script took many iterations. The company's reclaim path stays a plain signature, so a covenant bug can never lock the funds.

3. Approval that is not just a button. A server-side "approve" would make our server the real owner. Instead, a big payment waits until the company funds exactly that payment from its own wallet: the approval is a signature, on-chain.

4. Agents that keep disconnecting. Claude's MCP connection sometimes dropped between two chat turns. We moved the agent into a local service (127.0.0.1) with several profiles, one-command setup (npm run setup "<link>"), a doctor check and a local panel, so reconnecting never needs a config change.

5. Stable budgets on a volatile coin. Companies think in euros. Rules can now be set in EUR: the price is converted at payment time from a cached rate, and payments are refused (fail-closed) if the rate is older than 5 minutes.

6. Proving it is real. Everything ran on BSV mainnet with real sats. An audit log nobody can rewrite needed an anchor: the log's head hash goes into every payment, plus a small notary wallet for idle periods.

Tracks Applied (1)

DeFi Rails for Agentic Payments

AgentTresor explores three DeFi layers: separated control through independent keys, programmable spending constraints th...Read More

BSV Association

Technologies used

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion

Builders also viewed

See more projects on Devfolio