Loops HouseAgentguard

NEAR HACKATHON
Links
Team
1 member- ROOwner
Roman
Overview
AI agents that pay for APIs, compute or other agents are one prompt injection away from paying an attacker. Wallet limits don't know which task the money is for, who the receiver is, or where the agent got the address.
AgentGuard is a policy firewall between an agent and its NEAR wallet. The agent only proposes payments. AgentGuard checks each one against a task mandate (budget, per-payment limit, allowed receivers, expiry), scores the receiver's risk, flags addresses that came from tool output (prompt injection), and signs only what passes. Every decision is stored with its full input and can be replayed to the same verdict and hash. Large payments wait for the owner; one switch freezes everything.
NEAR enforces it on chain: the agent holds a function-call key that can only call vault.request_payment, and the vault contract (near-sdk) pays only with AgentGuard's ed25519 signature over the exact terms, while enforcing the budget itself. Tested on NEAR testnet: an honest 0.2 NEAR payment went through, an injected 5 NEAR transfer was blocked, and a stolen agent key could not move funds. 12 attack scenarios, 52 TS tests and 14 contract tests run in CI.