Agent Spend Guard

An AI agent's budget, enforced by a NEAR contract

NEAR testnet read-only · holds no keys connecting…
Watching

Policy set by the owner, enforced on chain

Agent key what the agent can sign

Pending approvals above the approval threshold: funds reserved, nothing paid until the owner decides

Recent decisions on-chain audit events

Inspect a transaction including refusals

Recorded demo take:

    How it works

    Spend flow The agent calls spend with a function-call key. The guard contract checks pause, allowlist, per-transaction cap and daily cap. Small amounts are sent without approval (the transfer runs at once and a callback records whether it succeeded), larger ones wait for owner approval, anything else is refused and no funds move. AI agent untrusted: LLM, script, bot function-call key methods = [spend] spend() Guard contract holds the NEAR · checks in order 1 not paused 2 receiver on allowlist 3 amount ≤ per-tx cap 4 within daily cap accepted spends → events + audit ring ≤ threshold → sent, no approval transfer starts at once; a callback records it above threshold → owner decides funds reserved · owner approves or rejects any check fails → refused failed transaction, E_… code, no funds move
    1. The owner keeps the keys. They register the agent with caps, an allowlist and an approval threshold, and fund the guard.
    2. The agent gets one narrow key. It can call spend on the guard and nothing else, with a finite gas allowance.
    3. The contract decides. A mistaken or prompt-injected agent can only ask; every limit is checked on chain, and this page shows the result.