Article

Detect AI agent traffic on your storefront

Tell AI crawlers, user fetchers and shopping agents apart, verify their source, tag them in your logs and build dashboards and alerts.

Published Updated 11 min read

AI assistants now visit your storefront in several ways. Some crawl pages for model training or for search. Some fetch a page because a user asked a question. Some act for a user, in a hosted browser or through a commerce protocol, and try to check out. This guide shows how to tell these apart, how to check that a request really comes from the vendor it names, how to log and tag the traffic, and which dashboards and alerts to build. It is for platform leads and SREs who run a storefront behind a CDN. The examples use Datadog Log Management. The protocol details match UCP version 2026-08-25 and MCP revision 2026-07-28, the current versions on 1 December 2026.

Know the four kinds of AI traffic

Each kind of AI traffic has a different effect on your platform. Training and search crawlers affect how your content appears in AI answers. User-triggered fetchers and agents are closer to real customers, because a person waits for the result.

Kind What it does Documented identifiers
Training crawler Collects pages that can be used to train models GPTBot, ClaudeBot
Search crawler Indexes pages for AI search answers OAI-SearchBot, Claude-SearchBot, PerplexityBot
User-triggered fetcher Fetches a page when a user asks for it ChatGPT-User, Claude-User, Perplexity-User
Agent that acts for a user Browses your site or calls your APIs to complete a task, such as a purchase Claude-Agent token, Google-Agent, Web Bot Auth signatures, commerce protocol requests

Some details change how you read your logs:

  • Google-Extended is not a separate user agent. It is a robots.txt token that controls the use of your content for Gemini training and grounding. Google crawls with its existing user agents, so you cannot count Google-Extended in your logs.
  • robots.txt does not control all of this traffic. Anthropic says its three bots follow robots.txt. OpenAI says robots.txt rules may not apply to ChatGPT-User. Perplexity says Perplexity-User generally ignores robots.txt, and Google says the same about its user-triggered fetchers.
  • Anthropic’s hosted browser sends a normal browser user agent with the extra token Claude-Agent. Google-Agent also uses a browser user agent string. Match on the token, not on the full string, because the rest of the string changes.

robots.txt is a control, not a measurement. You need logs to see what actually reaches your storefront.

Verify the source, not only the user agent

Anyone can send any user agent. Google, Anthropic and Perplexity all tell you to check more than the header. Use three checks, from cheap to strong:

  1. Match the documented token in the User-Agent header.
  2. Check the client IP against the vendor’s published list. For Google, you can also use DNS.
  3. Verify the HTTP message signature where the vendor signs its requests.
Vendor Published IP lists
OpenAI https://openai.com/gptbot.json, https://openai.com/searchbot.json, https://openai.com/chatgpt-user.json
Anthropic https://claude.com/crawling/bots.json for the three bots, https://claude.com/.well-known/sail for Claude-Agent
Perplexity https://www.perplexity.ai/perplexitybot.json, https://www.perplexity.ai/perplexity-user.json
Google common-crawlers.json, user-triggered-fetchers.json, user-triggered-fetchers-google.json, user-triggered-agents.json

For Google, the DNS check has three steps. Do a reverse DNS lookup on the IP. Check that the domain is googlebot.com, google.com or googleusercontent.com. Then do a forward DNS lookup on that host name and check that it returns the same IP.

The lists change. Do not copy them into a config file by hand. Anthropic recommends that you update your rules from its Claude-Agent file automatically, and the same approach works for every list.

Signed requests with Web Bot Auth

Web Bot Auth uses HTTP Message Signatures (RFC 9421). A signed request carries three headers: Signature, Signature-Input and Signature-Agent. The Signature-Input value contains tag="web-bot-auth". The verifier gets the public keys from /.well-known/http-message-signatures-directory on the agent’s domain. The protocol is an IETF draft, so expect changes.

Two vendors document it for agent traffic:

  • OpenAI signs requests from the ChatGPT cloud browser, with Signature-Agent set to "https://chatgpt.com". OpenAI says Akamai, Cloudflare, HUMAN and Vercel verify these signatures automatically. If a proxy sits in front of your verifier, it must keep all three headers.
  • Google signs some Google-Agent requests with the identity https://agent.bot.goog. Google calls this experimental and does not sign every request, so keep the IP check as a fallback.

Two rules from the draft matter for logging. A Signature-Agent value that you did not verify is only a claim, so do not attach policy to it. Also, the signature does not cover the request body.

Recognise commerce and agent protocols

Agents that buy do not always load your pages. They can call a protocol endpoint instead. These requests leave clear marks in paths and headers, so you can classify most of them without parsing the body.

Protocol Requests to watch Headers to log
UCP (Universal Commerce Protocol) GET /.well-known/ucp, then POST /checkout-sessions, GET and PUT /checkout-sessions/{id}, POST /checkout-sessions/{id}/complete and /cancel UCP-Agent, Idempotency-Key, Request-Id, optional Signature and Signature-Input
ACP (Agentic Commerce Protocol) POST /checkout_sessions, GET and POST /checkout_sessions/{id}, POST /checkout_sessions/{id}/complete and /cancel API-Version, Idempotency-Key, Request-Id, Signature, Timestamp
MCP (Streamable HTTP) POST to the MCP endpoint that you publish MCP-Protocol-Version, Mcp-Method, Mcp-Name
A2A (Agent2Agent) GET /.well-known/agent-card.json, then the endpoint in the Agent Card A2A-Version

Some notes on these protocols:

  • The UCP REST paths are relative to the endpoint that your business profile at /.well-known/ucp declares. UCP can also run over MCP. Then the same operations are tool names: create_checkout, get_checkout, update_checkout, complete_checkout and cancel_checkout.
  • ACP uses underscores in its paths (checkout_sessions) and UCP uses hyphens (checkout-sessions). Count both if you want to see all agent checkouts.
  • In MCP revision 2026-07-28, the client sends every message as its own POST. The Mcp-Method header copies the JSON-RPC method, and Mcp-Name copies the tool name for tools/call. The spec adds these headers so that gateways and observability tools can inspect requests without parsing the body. So your CDN log can show a complete_checkout call.
  • The same revision removed protocol-level sessions. Clients on older revisions can still send Mcp-Session-Id, but current clients do not, so do not rely on it.
  • llms.txt is a proposal for a markdown file at the site root that helps agents use a website. Count fetches of /llms.txt as a discovery signal.

If you do not support a protocol yet, requests to its paths are still useful. They show which agents look for it. Count the 404 responses on these paths.

Log at the edge

Log AI traffic at the CDN, not only at the origin. A cached response never reaches your origin, so origin logs undercount crawlers. RUM only sees clients that run your JavaScript. Protocol clients never load it, and you cannot assume that crawlers do. Hosted browser agents run a real browser, so their sessions can also appear in your RUM data.

Add these fields to your CDN log format. Use your own attribute names for the protocol headers, so your queries do not depend on one vendor’s header format:

{
  "network": { "client": { "ip": "<client ip>" } },
  "http": {
    "method": "<method>",
    "status_code": "<status>",
    "useragent": "<User-Agent header>",
    "url_details": { "path": "<path>" }
  },
  "cache": { "status": "<hit or miss>" },
  "agent": {
    "signature_agent": "<Signature-Agent header>",
    "signature_input": "<Signature-Input header>",
    "ucp_agent": "<UCP-Agent header>",
    "acp_api_version": "<API-Version header>",
    "mcp_method": "<Mcp-Method header>",
    "mcp_name": "<Mcp-Name header>",
    "a2a_version": "<A2A-Version header>"
  }
}

Do not log the Signature value or the request body. They add volume, and checkout bodies contain customer data. If your CDN or bot management tool verifies signatures, add its result as one more field.

Tag the traffic in your log pipeline

In Datadog, a category processor adds an attribute to a log when the log matches a search query. The processor checks the queries in order and stops at the first match, so put the most specific query first. Category names must be unique, and is_enabled defaults to false.

{
  "type": "category-processor",
  "name": "Classify AI agent traffic",
  "is_enabled": true,
  "categories": [
    { "filter": { "query": "@agent.ucp_agent:* OR @agent.acp_api_version:* OR @agent.mcp_name:*checkout*" }, "name": "commerce-protocol" },
    { "filter": { "query": "@agent.mcp_method:* OR @agent.a2a_version:*" }, "name": "agent-protocol" },
    { "filter": { "query": "@agent.signature_agent:*" }, "name": "signed-agent" },
    { "filter": { "query": "@http.useragent:*Claude\\-Agent* OR @http.useragent:*Google\\-Agent*" }, "name": "browser-agent" },
    { "filter": { "query": "@http.useragent:*ChatGPT\\-User* OR @http.useragent:*Claude\\-User* OR @http.useragent:*Perplexity\\-User*" }, "name": "user-fetcher" },
    { "filter": { "query": "@http.useragent:*OAI\\-SearchBot* OR @http.useragent:*Claude\\-SearchBot* OR @http.useragent:*PerplexityBot*" }, "name": "search-crawler" },
    { "filter": { "query": "@http.useragent:*GPTBot* OR @http.useragent:*ClaudeBot*" }, "name": "training-crawler" }
  ],
  "target": "ai_agent_type"
}

Datadog search treats - as a special character, so escape it with \. In JSON, that backslash must be doubled. Attribute searches are case sensitive, so keep the vendor’s spelling of each token.

Add a second category processor that checks the source IP. The CIDR() search function supports IPv4 and IPv6 and works in log configurations. This Node script builds the processor from the published lists, so you can run it on a schedule and update the pipeline through the Logs Pipelines API:

// build-ai-ip-categories.mjs: prints a category processor for the Logs Pipelines API
const sources = [
  { name: 'gptbot', ua: ['GPTBot'], url: 'https://openai.com/gptbot.json' },
  { name: 'oai-searchbot', ua: ['OAI\\-SearchBot'], url: 'https://openai.com/searchbot.json' },
  { name: 'chatgpt-user', ua: ['ChatGPT\\-User'], url: 'https://openai.com/chatgpt-user.json' },
  { name: 'anthropic-bots', ua: ['ClaudeBot', 'Claude\\-User', 'Claude\\-SearchBot'], url: 'https://claude.com/crawling/bots.json' },
  { name: 'perplexitybot', ua: ['PerplexityBot'], url: 'https://www.perplexity.ai/perplexitybot.json' },
  { name: 'perplexity-user', ua: ['Perplexity\\-User'], url: 'https://www.perplexity.ai/perplexity-user.json' },
];

const categories = [];
for (const { name, ua, url } of sources) {
  const res = await fetch(url);
  if (!res.ok) throw new Error(`${url}: HTTP ${res.status}`);
  const { prefixes } = await res.json();
  const cidrs = prefixes.map((p) => p.ipv4Prefix ?? p.ipv6Prefix).filter(Boolean);
  const uaQuery = ua.map((token) => `@http.useragent:*${token}*`).join(' OR ');
  categories.push({
    filter: { query: `(${uaQuery}) CIDR(@network.client.ip, ${cidrs.join(', ')})` },
    name,
  });
}
categories.push({ filter: { query: '@ai_agent_type:*' }, name: 'unverified' });

console.log(JSON.stringify({
  type: 'category-processor',
  name: 'Verify AI agent source IP',
  is_enabled: true,
  categories,
  target: 'ai_agent_verified_as',
}, null, 2));

Run this processor after the first one, because the last category uses ai_agent_type. A log that claims an AI user agent but comes from another IP gets the value unverified. Add the Google lists in the same way. The Claude-Agent file uses a different format, described in draft-kelley-webbotauth-sail-00, so it needs its own parser. Some lists are long and give queries of several thousand characters. If your pipeline does not accept such a query, do the IP check at the CDN and log the result as a field.

Build the dashboards

Log monitors evaluate only indexed logs. Log-based metrics count all ingested logs, also the logs that an exclusion filter keeps out of the index, and Datadog keeps them for 15 months. So create a count metric, for example ai_agent.requests, and group it by @ai_agent_type, @ai_agent_verified_as and @http.status_code. You must choose the group-by attributes when you create the metric. Keep paths out of the group-by. With this metric, you can exclude most crawler logs from your index and still keep the counts.

Panel Data Question it answers
Requests per agent type ai_agent.requests by ai_agent_type, stacked Which kinds of AI traffic grow?
Verified and unverified ai_agent.requests by ai_agent_verified_as How much traffic only claims to be an AI agent?
Top paths per type Top list of @http.url_details.path for @ai_agent_type:* Which pages and endpoints do agents use?
Agent checkout funnel Count of create calls and complete calls on checkout sessions Do agent checkouts finish?
MCP tools called Top list of @agent.mcp_name Which tools do agents call?
Errors per type Share of 4xx and 5xx responses per ai_agent_type Do you block or break agents?
Cache status per type @cache.status per ai_agent_type Which agents reach your origin?
Discovery probes 404 responses on /.well-known/ paths and /llms.txt Which protocols do agents look for?

Alert on what needs action

Most AI traffic needs a dashboard, not an alert. Alert only where someone must act.

Alert Monitor Route
5xx responses on agent checkout endpoints Metric monitor on the log-based metric, filtered on commerce-protocol Page the team that owns checkout, because a customer could not buy
Sharp rise in unverified traffic that claims an AI user agent Metric monitor on ai_agent_verified_as:unverified Ticket for the team that owns bot management
Unusual volume per agent type Anomaly monitor on ai_agent.requests Ticket
First requests to a new discovery path Log monitor on /.well-known/ paths that you do not serve yet Ticket for the product owner

Anomaly monitors learn from history, and Datadog warns that results can be poor for a new metric. If the traffic has a weekly pattern, use a seasonal algorithm such as agile or robust. Weekly seasonality needs at least three weeks of data, so start the anomaly monitor after that. For page routing and rollback steps, see SLOs, error budgets and rollback runbooks.

In practice

In June 2026, we researched how an international cosmetics retailer could see agentic traffic on its storefront. The output was a reference for a Datadog dashboard. It listed the signals that are visible on the wire: URL paths, HTTP methods, headers, user agents and JSON-RPC method names. The scope was inbound traffic: volume per protocol, top endpoints, authentication patterns and error rates per agent user agent. Traffic where the storefront acts as a client, and browser-side signals such as WebMCP, were out of scope.

We gave UCP the highest priority, because it is the protocol built for commerce. The proposed dashboard had eight panels, from volume per protocol and top user agents to a breakdown of JSON-RPC methods, an anomaly panel for unknown /.well-known/ paths and the llms.txt fetch rate. The open questions were whether request bodies are indexed, whether the CDN keeps the user agent from end to end, whether to split coding-agent traffic from crawler traffic, and whether payment protocol detection should wait until the retailer accepts checkout by agents.

We recommended two phases. Phase 1 uses only paths, headers and user agents, so it needs no body parsing. Phase 2 adds body parsing after the team confirms that bodies are indexed. This was research and design work, so we report no live results here. One lesson already applies. Our June list used the MCP session header as the strongest MCP signal, and revision 2026-07-28 removed protocol-level sessions. Check protocol versions again before you build. Read more about the engagement in the case study.

Checklist

  • Split AI traffic into training crawlers, search crawlers, user-triggered fetchers and agents.
  • Match on documented user agent tokens, not on full strings.
  • Verify the source IP against the vendor’s published lists, and update the lists automatically.
  • Treat an unverified Signature-Agent value as a claim.
  • Log at the CDN, including protocol and signature headers.
  • Tag traffic with ordered category processors.
  • Count with log-based metrics, so you can exclude crawler logs from your index.
  • Page on agent checkout errors, and send other AI traffic alerts to a ticket queue.
  • Check protocol versions again before you change detection rules.

For a review of how your storefront logs and monitors bot and agent traffic, see the frontend observability assessment.

Sources

Let's connect

Talk about your project

Tell us about your team and your problem. In 30 minutes we find out whether one of our offers fits, and if none does, we tell you.

Book a 30-minute call