Loops HousePurser

NEAR HACKATHON
Links
Team
1 member- AROwner
Arjuna Marcelino
Overview
Give AI agents money without giving them the keys.
Teams now let AI agents buy data, compute and APIs. But spending limits usually live inside the agent, so a bug, jailbreak or compromised tool can ignore them. Real deployments run a crew on one shared budget: when agents spend concurrently, naive balance checks double-spend. And when a payment times out, most systems release the hold while the payment may still land.
Purser is a NEAR smart contract that holds one capped budget for a crew of agents. Agents can only propose payments; the contract decides. It reserves budget atomically before paying, so racing agents can't exceed the cap. It builds the exact payment itself and never blind-signs a hash. It enforces a per-task recipient allowlist, makes retries idempotent so a request is never authorized twice, and lets the owner revoke an agent so its next request is blocked. Revocation can't recall sent money. A hold is released only on proof of outcome, never on silence.
One invariant: completed + outstanding <= budget, across races, retries, timeouts and revocation. It is a property of the contract, not the model. Live on NEAR testnet, three scripted agents raced for the last 40 units in one block: one admitted, two refused. Unlisted-vendor, tampered and revoked requests were refused too, each with a tx reference. The timeout case is a labeled sandbox replay. On our local sandbox harness: 0 overruns in 50 races, 0 duplicates across 150 requests, and the invariant held over 12,004 generated sequences. make prove reproduces it.
How NEAR fits: each agent holds a function-call key limited to propose_payment, so a leaked key can only ask. Budget and policy sit in contract state agents cannot bypass, and NEAR's atomic contract execution makes reserve-before-pay safe under concurrency. Chain Signatures extend the same budget to EVM: a real Sepolia payment was signed by NEAR's MPC network, and a stuck one was recovered with a nonce-burn cancel and owner release.