← Back
Cloudflare
Cloudflare launches Markdown for Agents, auto-converts HTML via content negotiation
Cloudflare · featureapiplatform · developers.cloudflare.com ↗

Markdown for Agents Now Available

Cloudflare has introduced Markdown for Agents, a new platform feature that leverages HTTP content negotiation to serve web content in Markdown format to AI systems and agents. When an AI system makes a request with the Accept: text/markdown header, Cloudflare's network automatically converts HTML to Markdown on the fly at the source.

How It Works

The implementation uses standard HTTP content negotiation:

  • AI systems include Accept: text/markdown in their request headers
  • Cloudflare's network detects this preference for enabled zones
  • HTML content is converted to Markdown automatically and efficiently
  • The response includes appropriate headers like content-type: text/markdown and metadata such as x-markdown-tokens for token counting

Key Benefits

  • Efficiency: Markdown's explicit structure reduces token waste compared to raw HTML
  • Performance: Conversion happens at the network edge, not on client systems
  • Compatibility: Uses standard HTTP negotiation, requiring no custom protocols
  • Transparent: Works with any website on Cloudflare that enables the feature

Getting Started

To use this feature, AI systems can make requests like:

curl https://example.com/page \
  -H "Accept: text/markdown"

Website operators can enable this feature for their zones and refer to the Markdown for Agents documentation for configuration details.