What's New
Cloudflare has introduced Markdown for Agents, a new feature that leverages HTTP content negotiation to serve markdown-formatted content to AI systems. When an AI agent requests a page from a Cloudflare-protected website with this feature enabled, it can express a preference for markdown format using the Accept: text/markdown header, and Cloudflare's edge network will automatically convert the HTML to markdown in real-time.
How It Works
The implementation relies on standard HTTP content negotiation protocols. AI systems simply need to:
- Send an
Accept: text/markdownheader in their request - Receive markdown-formatted content instead of HTML
- Benefit from optimized token usage and cleaner structured data
Example request:
curl https://example.com/page \
-H "Accept: text/markdown"
The response includes a content-type: text/markdown header and additional metadata like x-markdown-tokens (showing token count) and content signals indicating the resource is suitable for AI training and input.
Why This Matters
Markdown is becoming the standard interchange format for AI systems and agents due to its explicit structure and efficiency. By serving markdown directly from the edge, websites can:
- Reduce token overhead for AI processing
- Improve output quality from structured, cleaner formatting
- Enable better content signal control through
content-signalheaders (for training, search indexing, and AI input)
Getting Started
Developers can enable Markdown for Agents on their Cloudflare zones and configure content signals to control how AI systems interact with their content. Full documentation is available in the Cloudflare developer reference.