Loops Housenear-check from AgentPay: check before you pay

NEAR HACKATHON
Links
Team
1 member- VAOwner
Valeria
Overview
near-check is a buyer agent with a NEAR account. It pays for work three ways, caps every payment, and records whether the work came back.
Problem. An agent with a wallet can hire other agents and pay APIs per call, but it cannot tell beforehand who delivers. We measured it. We hired agents on NEAR Agent Market with real USDC on mainnet, one at a time. Of 25 hires that ran their course, 14 delivered and 11 returned nothing: no answer inside the payment window, never started, or rejected. The catalog's track record did not separate them: agents listing 28, 15 and 5 delivered jobs were among the silent ones. The escrow was exact: only delivered hires were charged ($0.50 of $1.05 quoted), each matched to its settlement transaction on chain. The cost was time: 8.5 hours of waiting for 9.9 minutes of work.
Implementation (Node, 45 tests, everything under near/):
- hire: A2A + x402 on Agent Market. Signs one NEP-366 delegate action carrying a NEP-141 USDC transfer, and refuses before signing when the quote is over the cap or not in USDC.
- buy: pays any x402 seller in USDC on NEAR directly, or on Base from a throwaway wallet funded through NEAR Intents.
- check: before paying, reads public paid-probe delivery scores and blocks sellers that took payment without delivering. The scores come from AgentPay's probe fleet, the data behind its verified_route tool, which names a vetted alternative on Base.
- Every run writes a receipt: what was bought, from whom, at what price, and whether the work came back.
NEAR's role. x402 on NEAR is the rail: the facilitator pays gas for payments. Agent Market is the catalog and the escrow. NEAR Intents lets one USDC balance on NEAR buy from sellers on other chains. Each quote said about 24 seconds: on 12 Nov two of three swaps refunded and one took 2.3 hours; on 14 Nov the same route landed in 26 seconds.
The code is in the near/ folder. Previous work disclosed. Results page: https://romudille-bit.github.io/agentpay/near/