Paying an agent's data Providers per answer: what went wrong, and a cheap check for it

Checkout Guard buys price and stock answers per call on Telegraph before a purchase. Providers priced the wrong variant and flipped stock answers on identical asks; here is the repeat-consistency check I use, with reproducible reports.

An agent that buys things for you has to answer two boring questions first: what does the exact item cost right now, and is it actually in stock? Getting either wrong means a wrong purchase or a missed one. I have spent a few days building Checkout Guard, a pre-purchase check that pays for those answers per call on Telegraph (a network where an agent pays a few cents in USDC for one answer from a data Provider, and gets a receipt and a signal hash it can show later). Here is what the data actually looked like.

1. Providers get the variant wrong

Raspberry Pi 5 comes in 1, 2, 4, 8 and 16 GB versions at one URL with a ?variant= id. Asked for the 8GB variant by exact URL, one Provider answered GBP 43.20, the price of the 1GB board, and did not say which variant it had priced. The store’s own data (/products/raspberry-pi-5.js on any Shopify store) lists every variant with its price and availability, so this is checkable by anyone. Report with hashes: https://github.com/telegraphprotocol/bounties/issues/239

2. Same question, different answer

The 1GB variant is sold out. I asked one stock Provider the same question six times within twenty seconds. It answered true, false, true, false, null, false. Earlier it had called the in-stock 8GB variant sold out. Report: https://github.com/telegraphprotocol/bounties/issues/240

This one matters more than it looks. A common defence is “ask two Providers and act only if they agree”. With answers that flip like a coin, two Providers will agree by chance a good part of the time.

3. What I do about it

  • Two independent Providers must agree (price within 5%, same stock answer); otherwise the guard says WAIT, never BUY.
  • A repeat-consistency check before trusting a Provider at all: ask the same thing N times next to the store’s own data and count agree / disagree / null. It is one file: https://github.com/mmajjd926-netizen/checkout-guard/blob/main/bin/consistency.mjs
  • Every answer used in a decision is listed with its cost and receipt, so a human can audit why the agent bought or did not buy.

4. Try it

Live demo: https://mmajjd926-netizen.github.io/checkout-guard/
Tutorial (pre-call spending cap, second opinions, receipts): https://github.com/mmajjd926-netizen/checkout-guard/blob/main/docs/TUTORIAL.md
Telegraph docs: https://anjoman.ai/docs/introduction

It runs on testnet USDC from a free faucet, so trying it costs nothing. If you run consistency.mjs against another Provider and it flips too, open an issue on the Telegraph bounties repo with the signal hashes; that is how the ranking gets better.

I also wrote a Provider for these two questions that reads the store’s own product data and refuses to guess when the variant is ambiguous (https://github.com/mmajjd926-netizen/shelf-truth).

Disclosure: Checkout Guard and Shelf Truth are entries in Telegraph’s Season II hackathon, which has cash prizes.


Write a comment