Markdown for Agents — content that isn't wasted on them
Agents parsing HTML burn tokens on nav, scripts, and chrome. Markdown is the right wire format for LLMs (Large Language Models). Toggle the Accept header below to see Cloudflare's edge conversion in action.
curl https://yourdomain.com/docs \
-H "Accept: text/markdown"
Enable with one toggle on Cloudflare —
Markdown for Agents.
Edge converts HTML → Markdown via Accept: text/markdown on the fly. No new .md files required.
Markdown for Agents performs edge-side HTML→Markdown conversion on the fly — no new .md files required. Cloudflare's own docs reported up to ~80% token reduction — see Agent Readiness · content accessibility. The response also adds x-markdown-tokens, vary: accept, and a content-signal declaration.
In practice only a handful of coding agents — Claude Code, OpenCode, Cursor — are known to send Accept: text/markdown by default, but emitting it costs you nothing.
For everyone else, add a URL fallback: make pages available at /index.md relative to the canonical URL. Cloudflare documents this pattern by combining a URL Rewrite Rule that strips /index.md back to the base path with a Request Header Transform Rule that matches on raw.http.request.uri.path and injects accept: text/markdown. That gives agents a deterministic Markdown URL even when they never negotiate on headers.
Flip side: if you're building the agent, Cloudflare's Browser Run Markdown endpoint gives you a one-call API to pull clean Markdown from any URL (or raw HTML) — useful for ingesting sites that don't yet serve it natively.