Loops HouseAli

NEAR HACKATHON
Links
Team
1 member- ILOwner
Illia Ladyha
Overview
AI agents are starting to pay for the APIs they use, a cent or two per call. NEAR has no standard way for an API to charge a machine per request, and handing an agent a normal wallet key is dangerous: a prompt injection, a hijack or a runaway loop can drain it.
Ali fixes both. Near6 is an x402-compatible payment scheme for NEAR: one middleware turns any API into a paid one. It answers HTTP 402 with a price and a one-time nonce (x402 v1 and v2), the agent pays with a NEP-141 transfer carrying the nonce, and the API verifies the token contract's own transfer event on chain. Every payment first passes an Agent Firewall, a set of Rust contracts that enforce the owner's rules: a per-call cap, a daily budget, an allowlist of payees and a pause switch.
NEAR is what makes this safe. The agent's only key is a native function-call access key that can call pay() and nothing else, so even a fully jailbroken agent can only spend within the rules. Named accounts keep budgets and payees readable, and async receipts with callbacks refund the budget if a transfer fails. A Firewall Hub on testnet gives any NEAR account its own budget: sign once, get 5 test USDC, add a pay-only key for the agent.