Loops HouseSaku: an AI agent's budget, enforced on NEAR

NEAR HACKATHON
Links
Team
1 member- MUOwner
Muhammad Farid Zaki
Overview
Saku gives an AI agent a budget instead of a key. A NEAR contract owns the agent's wallet on Base through Chain Signatures and signs a USDC payment (EIP-3009, x402) only within the owner's rules: listed sellers, a per-payment limit and a daily budget. Anything unusual (over a limit, or to a seller added in the last day) waits for the owner's approval; anything else is refused before a signature exists. The agent's own key can only ask, so a stolen agent key is worth one day's budget at most, and the owner cuts it off in one transaction. The agent refuels itself through NEAR Intents and pays any x402 API, with no change on the seller's side.
Proven on mainnet: it paid Exa for a web search, had a $0.018 payment held and approved by the owner, and refused a prompt-injected $5 payment (Base and NEAR receipts in the README). saku.glianalabs.com reads the live contract and publishes a real test agent key to steal with.
Since the first submission: an agent can ask its user for a budget. The GlianaAI MCP server's saku_setup tool (gliana-ai-mcp 0.11) makes the agent's key on its own machine and sends a link with only the public half; the user sets the limits and approves one transaction, and the agent pays within them from then on. Anyone can also set up an allowance from the browser (testnet): a factory contract derives the Base address on-chain from the MPC and creates the allowance with no key of its own, so its code can never change, and its code hash matches the file in the repo. We also reviewed the contracts with NEAR's near-contract-audit skill and Trail of Bits' entry-point analyzer, fixed one high-severity issue, and published the findings in the README.