Loops HouseAgentGuard

NEAR HACKATHON
Team
1 member- KAOwner
Kaelvor
Overview
AgentGuard is a wallet for AI agents with bank-style controls. The agent can request payments; only an on-chain policy can move the money.
AI agents that pay for things usually hold a key that can move all their funds, so one prompt injection or fake invoice can drain them. AgentGuard separates deciding to pay from being able to pay:
- The agent holds a NEAR function-call key that can only call request_payment on the vault. The protocol itself blocks it from transferring NEAR.
- The vault, a Rust smart contract, enforces per-payment and daily limits, a payee allowlist, an approval threshold and a kill switch.
- A separate guardian scores every request (red-flag rules plus private inference on NEAR AI Cloud; the higher score wins) and posts the score on-chain. The agent cannot score itself.
- The owner approves held payments from a local console with a full-access key, enforced by a 1 yoctoNEAR deposit.
In the demo, a deliberately naive agent falls for a prompt injection and asks for 50 NEAR; the vault rejects it on-chain. A fake "verify your wallet" invoice scores 95 and is rejected. Routine invoices pay automatically, a large one waits for approval, and a direct transfer with the agent's key fails with "Access key requires full access".
Live on NEAR testnet at vault.kaelvor.testnet. Built with near-sdk-rs, function-call access keys, NEAR AI Cloud, sub-accounts, NEP-297 events and near-api-js. The README has step-by-step "do X, see Y" instructions.