Loops Houseagent-pay

NEAR HACKATHON
Links
Team
1 member- CHOwner
chamdom
Overview
Problem: an AI agent that can spend crypto usually gets a private key, and a key has no limits. It can overspend in one payment or over a day, pay an unknown account, pay twice on a retry, or move a large amount no human has seen.
agent-pay is a policy-guarded payment layer for AI agents. The agent never holds the NEAR key. It submits a payment intent (payee, amount, currency, purpose) to a local HTTP API. A pure policy engine checks a per-transaction max, a daily max, a payee allowlist, the currency and an approval threshold, and returns approved, rejected or needs_approval. Payments above the threshold wait for a human to approve over HTTP or in a React web UI; limits are re-checked at approval. Every intent, decision, payment and receipt is written to a JSON ledger in a fixed order, and replaying an intent returns the stored result instead of paying twice.
NEAR's role: with RAIL=near, approved intents become native NEAR transfers signed by the API process through a zero-dependency JSON-RPC client (ed25519 signing, send_tx waiting for FINAL), with status refresh and no refund. The NEAR seed policy is denominated in NEAR (1 NEAR per tx, 2 per day). Verified on testnet from agentpay-chamdom.testnet to agentpay-chamdom-recv.testnet: 0.1 NEAR (tx 8w9rjDoG27TYWX2XHoGDeT3qjaERXGbFnhUvBGJBLUFG), approved by a human first, and 0.001 NEAR in the integration test (tx 66LS3Q6XY1ej3zZCnW34MtC6ME992qdymFqb6ksq3BqA), both FINAL.
Built in TypeScript on Node 24, no runtime deps in core/API/agent. Disclosure: the same project is also entered in the PayPal AI Hackathon with its PayPal Payouts sandbox rail.