Docs sites
When a coding agent fetches a docs page, it sends one plain HTTP GET, runs no JavaScript, converts whatever HTML comes back into Markdown or text, and usually truncates or summarises it. In practice, three things decide whether that fetch gives the agent anything useful: whether the server returns the page at all (CDN bot rules can block or challenge it), whether the content is in the initial HTML rather than rendered client-side, and whether the server can hand over a clean Markdown version when asked. The llms.txt file gets the most attention of any of these, but the evidence shows it’s fetched rarely, and mostly by coding agents and SEO tools.
What agents send to a docs site
Section titled “What agents send to a docs site”The headers below come from our Dec 2026 lab run, where each agent fetched a fresh canary page on a Netlify endpoint that logged every request measured in our lab. For agents we didn’t run, I’ve filled in Checkly’s February 2026 capture.
| Agent and path | Who connects | User-Agent | Accept | Source |
|---|---|---|---|---|
Claude Code 2.1.328 WebFetch | Developer’s IP | Claude-User (claude-code/2.1.328; +https://support.anthropic.com/) | text/markdown, text/html, */* | measured in our lab |
OpenCode 1.19.6 webfetch | Developer’s IP | Chrome 143 on Windows (spoofed browser string) | text/plain;q=1.0, text/markdown;q=0.9, text/html;q=0.8, */*;q=0.1 (the model chose format: text; the default markdown format puts text/markdown;q=1.0 first) | measured in our lab |
Gemini CLI 0.46.0 web_fetch | Google IPs (two hits, 21 s apart) | GoogleAgent-URLContext | */* | measured in our lab |
Codex 0.172.0 via curl | Developer’s IP | curl/8.7.1 | */* | measured in our lab |
| Pi 1.4.0 via Python one-liner | Developer’s IP | Python-urllib/3.14 | none | measured in our lab |
Cursor WebFetch | Cursor infrastructure | Chrome UA | text/markdown first, q-ranked | Checkly documented |
Copilot fetch_webpage | Developer’s machine | VS Code Electron UA | HTML | Checkly documented |
Windsurf read_url_content | Unclear | colly | */* | Checkly documented |
The short version is that Claude Code, OpenCode and Cursor ask for Markdown, while Codex, Gemini CLI, Copilot, Windsurf and every shell fallback don’t. No agent in our run requested robots.txt before fetching, but I’d read that carefully: our static robots file was served from the CDN without logging, so the result is a limitation of the setup rather than proof measured in our lab. The full per-agent fingerprints are on log signatures.
llms.txt: what the evidence shows
Section titled “llms.txt: what the evidence shows”llms.txt is a proposed Markdown index of a site’s key pages, served at /llms.txt, with llms-full.txt as a companion that inlines the full text (a convention Mintlify developed with Anthropic). The best usage evidence I’ve found is Ahrefs’ study of server logs from 137,210 domains (Ahrefs, June 2026) documented:
- About 28% of the sampled domains host the file, which is an upper bound because the sample skews towards SEO-aware sites, and 97% of those files received zero requests in May 2026.
- Of roughly 22,000 requests, 96% came from bots. SEO audit tools made 21.7% and all AI categories together made 19.5%; GPTBot made 4.51%, ClaudeBot 0.8% and OAI-SearchBot 0.74%.
- Claude Code was the third-largest AI fetcher of llms.txt files, ahead of every AI search or assistant bot. Ahrefs notes that a fetch does not show the file was used.
Other studies point the same way. An SE Ranking analysis of about 300,000 domains found no correlation between having llms.txt and being cited in AI answers (Search Engine Journal). Mintlify, which sells llms.txt hosting, measured a median of 79 visits to llms-full.txt and 14 to llms.txt over seven days across 25 customer sites (Mintlify). Google’s John Mueller and Gary Illyes have said that Google doesn’t use it and has no plans to (Optimizely summary).
Markdown delivery: Accept negotiation and .md URLs
Section titled “Markdown delivery: Accept negotiation and .md URLs”Serving Markdown cuts the noise an agent has to wade through and removes the HTML-to-Markdown conversion step, which some agents do badly. OpenCode v1 is a good example, since it uses Turndown and strips only script, style, meta and link, so navigation and footers end up in the model’s context (webfetch.ts) verified in code.
There are two ways to offer Markdown, and they reach different agents:
- Content negotiation. Return
text/markdownwhen the request’sAcceptheader prefers it, and sendVary: Acceptso caches keep both versions. Cloudflare’s Markdown for Agents does this at the edge for origins up to 2 MB and addsx-markdown-tokensand a defaultContent-Signalheader (Cloudflare docs). Vercel does the same, and also serves Markdown to agents it detects by UA orSignature-Agent(Vercel KB) documented. The catch is that this reaches Claude Code, OpenCode and Cursor only. .mdURLs. Publish each page at a parallel URL such as/guide/install.mdand link to it from the HTML with<link rel="alternate" type="text/markdown">and fromllms.txt. Mintlify, OpenAI and Firecrawl docs already do this. A.mdURL works for every agent, including the ones that send*/*, because the model asks for it by name.
Google hasn’t said whether serving different bodies by Accept header counts as cloaking (Search Engine Journal), so keeping the Markdown and HTML versions equivalent in content is the safe position. By the way, some SEO plugins claim Markdown support while ignoring the Accept header (Roots), so test with curl -H 'Accept: text/markdown' rather than trusting the setting.
Same docs page, two agents, two outcomes
- Claude Code→CDN / bot rules
GET /installAccept: text/markdown, ...
- CDN / bot rules→Docs origin
forward, Vary: Accept - Docs origin→CDN / bot rules
200 text/markdown - CDN / bot rules→Claude Code
200 clean Markdown - Gemini URLContext→CDN / bot rules
GET /installAccept: */*, Google IP
- CDN / bot rules→Gemini URLContext
403, or 200 challenge pageif AI bot blocking is on
- Gemini URLContext
model reads challenge as docs
No-JS HTML
Section titled “No-JS HTML”None of the fetch tools we read execute JavaScript. Gemini CLI’s local fallback, Crush’s fetch and agentic_fetch, and OpenCode’s webfetch all do a single GET and parse the returned HTML (Crush fetch.go) verified in code. Server-side fetchers such as Gemini’s urlContext may differ, but none of them documents a rendering step inferred. That means a single-page app that ships an empty <div id="root"> gives these agents nothing, and a docs site whose code samples load from a client-side component gives them prose without code.
Truncation makes this worse. Crush’s fetch reads at most 100 KB of raw HTML before conversion, so on a page with heavy inline CSS and navigation the main content can fall past the cut, and Crush’s agentic_fetch removes nav, header, footer and aside elements entirely verified in code. My recommendation is to put the content that answers the question early in the DOM, in plain elements, and to test by comparing curl output against the rendered page.
Bot walls and silent failures
Section titled “Bot walls and silent failures”The most common reason an agent can’t read a docs site is usually a CDN rule rather than anything in the content. Since 2025-07-01, Cloudflare blocks known AI crawlers by default on new zones, and pay-per-crawl answers some of them with 402 Payment Required (Cloudflare) documented. That leads to three failure patterns:
- Blocked index crawlers.
OAI-SearchBot,PerplexityBotorClaude-SearchBotreceive 403 or 402, so the site drops out of the indexes that agents search without anyone deciding to block them. See search backends. - Challenged user fetchers. Agents that fetch from vendor infrastructure, such as Gemini’s
GoogleAgent-URLContext, look like bots from datacentre IPs and get challenged. OpenCode’s code anticipates this: on a 403 withcf-mitigated: challengeit retries once with the UAopencode, and a comment calls this the “honest UA” (webfetch.ts) verified in code. - 200-status challenge bodies. Some bot walls return HTTP 200 with a “checking your browser” page. Most fetch tools only check for a 2xx status, so the model gets the challenge text as if it were your documentation and may answer from it or report that the page is empty inferred. Crush’s search tool is the one place we found explicit detection of a bot page (for DuckDuckGo) verified in code.
Checklist
Section titled “Checklist”- Server-render all docs content, including code samples, into the initial HTML.
- Serve Markdown on
Accept: text/markdownwithVary: Accept, and publish.mdtwins linked from the HTML head. - Publish
llms.txtlinking to the.mdURLs; generate it from the build so it never goes stale. - Audit CDN and WAF rules for AI crawler and fetcher UAs; allow the index crawlers you want to appear in.
- Make sure blocked requests return a 4xx status, never a 200 challenge page.
- Keep pages short enough that the answer sits in the first 50-100 KB of HTML.
Open questions
Section titled “Open questions”- Whether any server-side fetcher (Gemini
urlContext, Cursor, Codexopen_page) renders JavaScript; a canary page whose phrase is injected client-side would settle it. - How often agents use
llms.txtcontents after fetching it, as opposed to fetching and discarding it. - Whether Google treats
Accept-negotiated Markdown as cloaking.
Further reading
Section titled “Further reading”- Ahrefs: llms.txt log study of 137K sites
- Checkly: state of AI agent content negotiation
- Cloudflare: Markdown for Agents
- Vercel: serving documentation for agents
- llmstxt.org specification
Last reviewed 2026-12-02 against Claude Code 2.1.328, OpenCode 1.19.6, Gemini CLI 0.46.0, Codex 0.172.0. This site is re-reviewed monthly; see maintenance.