Loops HouseSentinelIA

NEAR HACKATHON
Links
Team
1 member- RAOwner
Raúl Jesús Alfaro Alvarez
Overview
Sentinel lets you give an AI agent money without giving it the keys to everything. It is a two-layer defense for agents that move funds.
Layer 1, the Sentinel API (FastAPI + PostgreSQL). Each agent authenticates with its own API key and can only see its own policies and operations. A deterministic Policy Engine decides every operation: active policy, maximum amount, allowed tokens, recipients and operation types. Only approved operations go to a Gemini 2.5 Flash risk analysis, which is strictly advisory: it can never approve, reject or execute anything, and if Gemini is down the operation is still evaluated and stored with an "unknown" fallback. The AI Engine has input sanitization, prompt-injection detection and output guardrails, and every decision is persisted for audit. A React dashboard (ES/EN/PT) shows policies, operations, alerts and the AI status.
Layer 2, a Rust vault on NEAR testnet (sentinel-vault-ia.testnet). The agent never holds the funds. The contract re-checks a per-transaction limit, a 24-hour limit and a recipient allowlist on every request_transfer, and the owner can pause or revoke the agent. The limits hold even if the API approves by mistake.
Demo: 0.4 NEAR to an allowed recipient was executed on-chain; 1.5 NEAR was approved by the API (limit 5) but reverted by the vault (limit 1).
Honest scope: native NEAR on testnet only; a demo script connects both layers (the backend does not call the contract yet); agents are created by an admin script. Everything starts with docker compose up, and tests cover authentication, agent isolation and the policy engine.
Repo: github.com/YisusCode1/sentinel