How agent-traffic-gate works
AI agents now shop for people. ChatGPT’s agent opens product pages and fills in checkout forms. Google-Agent acts for Google users. Visa and Mastercard are building payment flows for agents.
Most store firewalls were built to block anything automated. That turns away paying customers, while bots that fake a browser’s user agent get through anyway.
There is a better signal than user agents and IP addresses: a cryptographic signature. Under the IETF’s Web Bot Auth draft, an agent signs each request and says where its public key lives. A store can then check, for certain, that a request claiming to be ChatGPT agent really is.
agent-traffic-gate runs that check in your own code. It sorts every request into one of six groups:
- signed agent;
- verified crawler;
- spoofed;
- claimed bot;
- automation;
- probably a person.
Then it applies a store policy:
- agents and crawlers can browse;
- signed agents can check out;
- fakes are refused everywhere;
- unproven automation is rate-limited on product pages and asked to sign at checkout.
Try it
With Node.js, in a Next.js, Express or Cloudflare Workers project:
npm install agent-traffic-gate
Start in monitor mode. The gate logs what it would do without blocking anything. After a week of logs, switch it on.
To check a signed request from your logs:
npx agent-traffic-gate verify request.txt
How I checked it
The verifier follows the October 2026 Web Bot Auth draft. It passes:
- every test vector in the draft;
- the test vectors from Cloudflare’s reference implementation.
It checks a signed request in about a third of a millisecond. Key fetching follows the draft’s safety rules: no redirects, private addresses refused, and bounded sizes and retries. That stops attackers from using your store to probe other servers.