
Preflight-Agents
Before your AI agent pays a stranger's API, Preflight checks it's alive, honest, and pays out.
Demo
About
AI agents are starting to pay other agents for things, using a payment system called x402 - no login, no API key, just money. But an agent has no way to check first: is this API even online? Is its price real? Will it actually deliver what it promised, or just take the money and vanish? We scanned every single agent registered on Ethereum's ERC-8004 identity registry - all 10,249 of them to find out how many are actually ready to be paid safely. The answer is 5. Five in ten thousand. And even those 5 don't all speak the same version of the payment protocol, so many of them can't pay each other. Preflight is the check an agent runs before it pays. It asks: is the endpoint alive? Is its price quote valid? Does it deliver what it promised? Then it gives a plain answer - SAFE, CAUTION, UNSAFE, DEAD, or UNKNOWN ,never a made-up trust score. And the check itself is sold the same way, over x402, on Hedera, for a fraction of a cent. We even built a small buyer agent that finds Preflight on the blockchain by itself, pays for a check in HBAR, and uses the answer to decide whether to pay the real target. Every risky test we could have run only ever runs against our own practice server, never against a stranger's real API. That's not just a policy, it's written into the code so it can't be switched off by mistake.
How it's made
Preflight is a Node.js and TypeScript project split into a few pieces that talk to each other. The scanner reads Ethereum Sepolia directly through an RPC node, using ERC-8004's registry contract to pull every registered agent, resolve its metadata (including files stored on IPFS), and find any payment API it declares. The checker is a small set of pure functions - is it alive, is the price quote valid, does it actually deliver each one unit tested so a published number can always be re-checked from the raw data. The paid API is an Express server on Hedera testnet, using the x402 payment protocol through the Blocky402 facilitator. Pricing is metered: you pay per endpoint and per depth of check, not one flat fee, and a payment signed for one endpoint can't be reused for ten we tested that attack on real testnet and it's refused. Every paid check writes a receipt to Hedera Consensus Service, after the payment settles, so nobody can fake one after the fact. Preflight is also registered as its own ERC-8004 agent on Hedera, so another agent can discover it purely onchain no hardcoded URL. We built a buyer agent that does exactly that: reads the registry, pays in HBAR, and decides. For Bazantic, we turned Preflight into an agent tool and paired it with a Hedera mirror node gateway, in one recipe. On its own, Preflight can say a payment quote is well-formed. It can't say whether the account behind it actually exists. The mirror node can answer that but only once Preflight has pulled the account out of the quote. Neither service can answer alone, the recipe needs both. We caught a real bug while testing it, the same account ID exists on both Hedera testnet and mainnet as two different accounts, and the AI model once looked up the wrong one. We fixed it by only ever connecting the recipe to the testnet mirror node, so that mistake can't happen again. The one hacky bit is this project also contributes a fix to the Hedera Harness's own documentation, which had the payment header name wrong for the newer version of x402 - a bug that would silently break any agent built by following it.