Loops HouseIntentGuard

NEAR HACKATHON
Links
Team
1 member- LUOwner
LUO TONG
Overview
IntentGuard is a policy gate that sits between an AI agent and its money. Agents now hold keys, and the expensive failure is not a dumb agent — it is a diligent one that retries a payment six times at 3am, or is talked into a new recipient by an injected instruction.
Every payment intent (natural language, zh/en) is parsed into a typed intent, priced with a real NEAR Intents 1Click dry quote, then evaluated against hard limits: per-transaction cap, 24h cap, velocity, dust floor, slippage, price deviation from an independent reference, and a recipient allowlist. Each evaluation returns ALLOW / REQUIRE_APPROVAL / DENY with machine-readable reasons, and appends a SHA-256 hash-chained audit record, so history can be verified rather than trusted.
The engine is pure functions with no model calls — every decision is replayable and unit-tested (17 tests, zero dependencies). Quotes are labelled live vs snapshot; the system never pretends a stale price is real.
NEAR integration: POST /v0/quote for executable routes (dry run, no funds moved — verified live: 0.1 ETH to 226.29 USDC, ~20s, ed25519-signed), /v0/tokens as the asset registry with decimals-safe BigInt conversion, and the returned deposit address as the handoff to the Intents deposit flow. Signing is deliberately out of scope: keeping keys away from the prototype is the point of the layer.
Run: node server.js (zero dependencies).