Loops HouseNEAR Guardrail

NEAR HACKATHON
Links
Team
1 member- BIOwner
Big Sam
Overview
I built NEAR Guardrail a spending policy vault that lets an AI agent pay for things without being able to drain the wallet. The rules live in a NEAR smart contract (Rust), not in the agent's prompt, so even a compromised agent cannot exceed them.
The agent holds a function call access key limited to two methods on the vault. Every payment request is decided on-chain: paid if within policy, held as pending if above an approval threshold, or blocked with a logged reason if it breaks a rule (per-payment cap, daily cap, recipient allowlist, or kill switch). An off-chain scam and prompt injection check adds a first line of defense and writes its blocks into the same on-chain audit log.
i also added a Telegram bot that lets the owner approve or reject large payments with a tap and trigger a kill switch with /pause. The bot uses its own restricted key that can only call approve, reject, pause and resume.
This is Built with: near-sdk (Rust smart contract), NEAR function-call access keys, near-api-js, an LLM that only extracts payment fields from the task text, and Telegram. Deployed and tested on NEAR testnet.
Try it with no keys: clone the repo, run npm install and npm run log in the agent folder to read the live audit log, which shows paid, blocked and pending payments with reasons. Full setup and demo steps are in the README.