Loops HouseCountersign

NEAR HACKATHON
Team
1 member- JOOwner
Jorge
Overview
Countersign is a NEAR guard contract for AI agents that pay. The agent never holds a full access key: it gets a function-call key that can only call guard.pay. The contract checks the owner's mandate (caps, expiry) and then asks who chose the payee.
The owner's client registers each payee the owner typed as an on-chain intent, signed with the owner's key. Off chain, every tool output the agent reads is logged as a segment, and each payment value is traced to where it first appeared. On chain, an owner citation must match a live intent; a payee that only appears in untrusted text (an invoice, an email) is held and becomes a proposal in the owner's Sputnik DAO; a forged citation is refused. Every verdict is a NEP-297 event. The same rules sign Sepolia payments through Chain Signatures (v1.signer-prod.testnet), with the contract building the transaction it allowed.
Proof we did not write: AgentDojo's banking suite (ETH Zurich), 16 tasks x 8 money-moving attacks plus clean runs, two models (deepseek-v4.1-flash on NEAR AI Cloud, qwen3:8b), every payment attempt sent to testnet under four guards: a full access key, an allowlist (Veto-style), unknown payee to a human (Black-box-style) and Countersign. 71 attacker payments settled with a full access key, 0 with any guard. On the owner's 16 legit payments: an allowlist refused 5, unknown-to-human asked 5 times, Countersign asked 3 times and refused 0. 856 testnet transactions in total. pnpm judges rebuilds the table from testnet transactions without keys.
A live page lets anyone write the bill the agent reads, with their own testnet account as the payee, and see the verdict on chain.
Limits, stated in the README: string provenance cannot tell an injected request to pay a payee the owner already paid; caps bound that case. Testnet only.