Definition
Markdown for Agents is a Cloudflare feature that converts a site's HTML pages to Markdown at the edge when a client asks for Markdown with the Accept: text/markdown request header. Cloudflare launched it in beta on February 12, 2026, at no extra cost for zones on Pro, Business and Enterprise plans and for SSL for SaaS customers.
The name is also used more loosely for the practice of serving agents Markdown through standard HTTP content negotiation, as opposed to publishing a separate index file such as llms.txt or a full-text dump such as llms-full.txt. With content negotiation there is one URL and one source of content, and the client chooses the format.
How it works
When a request reaches Cloudflare with text/markdown in its Accept header, Cloudflare fetches the normal HTML from the origin, strips headers, footers, navigation, scripts and styles, and returns Markdown with Content-Type: text/markdown and Vary: Accept, so caches keep the HTML and Markdown versions apart. The output starts with YAML frontmatter built from the page's title, description and image meta tags, and ends with any JSON-LD from the page in a fenced code block. Conversion covers HTML only, up to 6 MiB per page. Site owners enable it for a whole zone in the AI Crawl Control section of the dashboard, or for specific hostnames and paths with Configuration Rules.
The converted response also carries a Content Signals header. If the origin does not send one, Cloudflare adds Content-Signal: ai-train=yes, search=yes, ai-input=yes, which tells AI systems the content may be used for training, search and AI input. A site that does not want to grant training permission should set its own content-signal header at the origin, which Cloudflare preserves.
Cloudflare's launch post shows why agents prefer Markdown: the post itself took 16,180 tokens as HTML and 3,150 as Markdown, about 80% fewer. Cloudflare said coding agents such as Claude Code and OpenCode already send the Accept header.
Does it help AI search visibility?
There is little evidence that it does. Google's guide to AI features in Search says site owners do not need to create new machine-readable files, AI text files or markup to appear in AI Overviews or AI Mode. Google's John Mueller has said the only crawlers requesting Markdown on his test sites were SEO tools, and Google and Bing representatives have advised against building separate Markdown pages for LLMs, citing duplicate content, cloaking concerns and machine-only pages that break without anyone noticing. Promptwatch's citation data found that Markdown files made up 0.05% of citations across ChatGPT, Claude, Perplexity and Google AI Overviews over a seven-day window.
The stronger case for Markdown for Agents is agent experience rather than citations. Developer documentation, API references and help centers are read on demand by coding agents and assistants, and a smaller, cleaner document leaves more of the agent's context window for the actual task. Because the Markdown is generated from the same HTML users see, there is no second copy of the content to maintain.
Before turning it on, log the Accept header at the origin or CDN to see which clients actually ask for Markdown, since many server setups do not record it by default. Decide on a Content-Signal policy deliberately instead of accepting the default. Scope the feature to the sections agents use, such as /docs, and check that important information is in the page body rather than in navigation or scripts that the conversion strips. Cloudflare's documentation lists the exact output format and limits.
Examples of Markdown for Agents
- A developer documentation site on a Cloudflare Business plan enables Markdown for Agents only for docs.example.com with a Configuration Rule, so coding agents get compact Markdown while marketing pages are served as HTML only.
- A news publisher turns the feature on, notices the default header grants ai-train=yes, and sets its own content-signal header at the origin to search=yes, ai-input=yes, ai-train=no, which Cloudflare then passes through.
- An SEO team adds the Accept header to its log format and finds that over a month only a few SEO tool crawlers requested text/markdown, so it shelves plans to build separate Markdown pages.
- A SaaS help center checks the converted output and confirms its FAQPage JSON-LD appears in a fenced block at the end, so agents reading the Markdown still get the structured answers.
