Measure agent-traffic for any site news update
Mintlify open-sourced agent-traffic, a zero-dependency npm classifier that separates AI coding agents, crawlers, and human browsers at the HTTP layer.
By Dillip Chowdary • Nov 11, 2026 • Source: github.com
In this post
Mintlify, which hosts documentation for thousands of companies and serves hundreds of millions of requests a month, has open-sourced agent-traffic — a classifier and curated dataset that tells AI coding agents, AI crawlers, search bots, and human browsers apart at the HTTP layer. The library ships as an npm package with zero dependencies and runs on Node, Bun, Deno, Cloudflare Workers, and Vercel Edge.
This article covers what agent-traffic does, how its classification pipeline works, how to integrate it into a Cloudflare Worker or query existing logs, what the data model looks like, and where the library's current limits lie. It is aimed at developers who operate documentation sites, APIs, or any web service that needs to know whether an incoming request is a person, a coding agent like Claude Code, an AI crawler collecting training data, or an impersonator spoofing a known bot.
01Growing agent share on documentation infrastructure
For years, Mintlify's documentation sites saw traffic that was almost entirely developers reading pages in a browser. That picture has changed: Claude Code now pulls pages into coding sessions, ChatGPT answers questions using hosted docs, and Cursor checks API references before generating code. As that agent share grew, Mintlify found existing open-source bot lists insufficient — they matched user-agent substrings, lumped all automated traffic into one bucket, and took every request at face value.
Mintlify studied its own traffic, tested existing lists against it, and tracked which signals reliably separated categories. The result, agent-traffic, is an MIT-licensed package that combines a tested dataset of user agents, headers, and official verification sources with a small classifier that applies them.
02IP verification catches GPTBot impersonators

The classifier runs checks in a fixed order and stops at the first match: known agent or crawler (verified by IP when possible), prefers markdown, generic HTTP client or headless browser, browser (unless headers contradict it), otherwise a bot. The IP-verification step downloads published IP-range files from OpenAI, Anthropic, Google, Perplexity, Apple, Microsoft, Common Crawl, and DuckDuckGo via loadIpRanges().
A request claiming to be GPTBot from IP 73.12.4.9 — outside OpenAI's published ranges — returns category: 'bot', kind: 'impersonator', verified: false, and a reasons array stating exactly why. The verified field can be true (IP is in the operator's published ranges), false (provably not who it claims), or null (not checked or impossible to check — coding agents like Claude Code run on the user's own machine and are never IP-verified).
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Markdown Accept header surfaces disguised agents
Agents that borrow a standard browser user agent still betray themselves through the Accept header. When a request arrives with a Chrome user-agent string but Accept: text/markdown, text/html;q=0.9, the classifier returns category: 'agent', kind: 'unidentified', confidence: 'medium', with a reason noting that browsers never prefer markdown over HTML. The helper prefersMarkdown(accept) exposes this check as a standalone boolean for simpler pipelines.
Enabling the headersComplete option activates fake-browser detection, which is safe when browser headers reach the server untouched over HTTPS. Developers should leave it off if plain HTTP or a proxy in front can strip headers. The maxRangeAgeDays option (default 180) governs how stale an operator's IP-range file can be before it stops being used to flag impersonators.
04Five categories, twelve kinds, and a Cloudflare Worker pattern
The library defines five top-level categories: agent (an AI product fetching a page right now for a person, with kinds assistant, coding, browser, and unidentified), ai-crawler (an AI company collecting pages ahead of time, with kinds training, ai-search, and ingest), crawler (a search engine), bot (any other automation, covering seo, preview, ads, monitor, scanner, archiver, feed, http-client, headless, fake-browser, impersonator, and unidentified), and human. A sixth result, unknown, means nothing could be classified.
In a Cloudflare Worker, loadIpRanges() is called once and its promise cached so concurrent requests do not each trigger a download. The Worker can then branch on result.category === 'agent' to serve a markdown response instead of HTML. The underlying dataset — agents.json, http-clients.json, and headers.json — is importable as plain JSON from @mintlify/agent-traffic/data/*.json for use from other languages or SQL queries against ClickHouse, DuckDB, or Postgres, all of which are listed as verified targets.
05Identity sharing and invisible agentic browsers
The library documents two classes of limitation. Some products share an HTTP identity: Codex has been reported to fetch as ChatGPT-User, and Cursor through Exa as ExaUser, so results name only what can be proved from the request itself. Logs that store only the user agent can still identify known agents, crawlers, and HTTP clients, but agents borrowing a browser user agent will appear human unless the Accept header is also logged.
A second category of agents is invisible at the HTTP layer entirely. Agentic browsers that run inside a person's own Chrome — Atlas, Comet, and Claude in Chrome are named explicitly — look exactly like that person's normal browser traffic. The project accepts pull requests against data/agents.json with real example user agents and a source, following CONTRIBUTING.md, to keep the dataset current as agents change their fetchers.
Measure agent-traffic for any site news update FAQ
What is Mintlify's agent-traffic library?
Agent-traffic is a zero-dependency npm package from Mintlify that classifies incoming HTTP requests as AI agents, AI crawlers, search bots, or human browsers using a curated dataset of user agents, headers, and IP-range verification.
How does agent-traffic detect bot impersonators?
It downloads published IP-range files from operators including OpenAI, Anthropic, Google, and Perplexity, then checks whether the real client IP falls within those ranges. A request claiming to be GPTBot from an IP outside OpenAI's ranges is flagged as an impersonator with a reason string explaining the mismatch.
Does agent-traffic work on Cloudflare Workers?
Yes. The library runs anywhere fetch does, including Cloudflare Workers and Vercel Edge. IP ranges are loaded on the first request and cached as a promise to avoid redundant downloads on concurrent requests.
Can agent-traffic identify agents that use a browser user-agent string?
Partially. It detects them when their Accept header prefers text/markdown over text/html, returning an unidentified agent result. Agentic browsers running inside a user's own Chrome, such as Atlas or Comet, are invisible at the HTTP level and cannot be distinguished from human traffic.
How is the agent-traffic dataset installed with an AI coding agent?
Running npx skills add mintlify/agent-traffic installs a skill in Claude Code, Cursor, Codex, or any agent the skills CLI supports, teaching it how classification works and how to query logs in ClickHouse, DuckDB, or Postgres.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement