AI and store security JavaScript

agent-traffic-gateLet real AI shopping agents in and keep fake bots out, with Web Bot Auth

agent-traffic-gate verifies Web Bot Auth signatures (RFC 9421) from ChatGPT agent, Google-Agent and other AI agents, checks crawler IPs and applies a store policy, so signed agents can browse and buy while spoofed bots are refused.

npm npm install agent-traffic-gate

Free · MIT license · runs on your machine · no signup npm ↗GitHub ↗

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:

Then it applies a store policy:

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:

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.

Agent skill included

Let your AI coding agent run agent-traffic-gate for you

The agent-traffic-gate skill works with Claude Code, Codex, Cursor, Gemini CLI and other agents that read SKILL.md files. It runs the tool, explains each finding in plain words and helps you fix it.

npx skills add MuhammadAhmadZia/agent-traffic-gate --skill agent-traffic-gate

Using the Claude or ChatGPT apps instead? Download the skill ZIP from the GitHub releases page and upload it under Skills.

See all 30 agent skills →

Questions about agent-traffic-gate

What is Web Bot Auth?

An IETF draft, written by people at Cloudflare and Google, that lets bots and AI agents sign each HTTP request with HTTP Message Signatures (RFC 9421). The request names a URL where the agent publishes its public keys. A site fetches the keys and checks the signature, so it knows who sent the request without guessing from IP addresses or user agents.

Does ChatGPT agent sign its requests?

Yes. OpenAI says ChatGPT's cloud browser signs its requests with Web Bot Auth and sends Signature-Agent set to https://chatgpt.com, with keys at chatgpt.com/.well-known/http-message-signatures-directory. Google says some Google-Agent requests are signed as https://agent.bot.goog, and that sites should keep IP checks as a fallback.

Should my store block AI agents?

Not at the door. Agents that buy for people are customers. The useful line is between agents that prove who they are and bots that hide or fake it. agent-traffic-gate lets signed agents and verified crawlers browse, lets signed agents check out, and refuses spoofed bots everywhere and unproven automation at checkout and admin.

Does a valid signature mean the agent is safe?

It means you know who sent the request, not that they mean well. The draft says so itself. That is why the default policy still closes admin pages to every kind of automation, and why per-agent rules are in your hands.

What about Visa and Mastercard agent payments?

Visa's Trusted Agent Protocol and Mastercard Agent Pay both build on Web Bot Auth. agent-traffic-gate includes a Visa profile: the browse and pay tags, the required nonce and the 8-minute window. You plug in the key lookup from Visa's registry.

UN Sustainable Development Goals

How each tool maps to SDG targets →

Want this set up and tuned for your store?

The tools are free. If you would rather have the checks run, the findings fixed and the results measured for you, that is what I do for clients.