What Markdown for agents is
An HTTP request says which formats it prefers in its Accept header. An AI tool can send Accept: text/markdown. A site that supports it answers with a Markdown version of the page and Content-Type: text/markdown, while browsers, which ask for HTML, still get the normal page. One URL serves both.
Why agents need it
Markdown carries the text and links of a page without scripts, styles and layout markup. An agent spends less of its context on markup and reads the content more reliably.
A correct example
Our homepage does this. Ask for Markdown and you get Markdown:
$ curl -sS -H 'Accept: text/markdown' https://agentfrendly.com/
# Can an agent use your product?
Agent Frendly runs the free Agent Readiness Test. We check whether AI assistants and AI search can find your site, ...The response has Content-Type: text/markdown; charset=utf-8 and Vary: Accept. The Vary header tells caches to keep the HTML and Markdown versions apart.
How to add it
- Cloudflare: Markdown for Agents converts your HTML to Markdown when a request asks for it. It launched in February 2026 and has been generally available since 9 November 2026, on Pro, Business and Enterprise plans and for SSL for SaaS customers. Turn it on in the dashboard under Agent Readiness, Markdown for Agents, Serve Markdown to AI agents. It answers with
Content-Type: text/markdown; charset=utf-8, addsAccepttoVary, and converts pages of up to 6 MiB of HTML. - Vercel and Next.js: Vercel documents a pattern for this: a route handler that returns Markdown with
Content-Type: text/markdown; charset=utf-8andVary: Accept, and a rewrite that sends requests whoseAcceptheader containstext/markdownto it. - Netlify: there is no built-in setting. An Edge Function can check the
Acceptheader and return the Markdown version. - Any server: when
text/markdownis preferred inAccept, serve a Markdown file withContent-Type: text/markdownandVary: Accept.
Also link to the Markdown version from the page head, so agents that never send the header can still find it:
<link rel="alternate" type="text/markdown" href="/index.md">What this check does
We request your homepage with Accept: text/markdown. It passes when the answer is successful, has Content-Type: text/markdown, and is not HTML. It does not depend on any other header, such as the x-markdown-tokens header Cloudflare stopped sending on 9 October 2026. If your homepage sends HTML but links to a Markdown version, the result is "Needs work". We test only the homepage, because the scan reads your main domain.