Introducing Markdown for Agents: Enabling AI‑Friendly Content Delivery
28 February 2026
by
Suraj Barman
# Context & History of Markdown for Agents
The web has traditionally been built for human readers, with HTML markup designed to display visual elements. As AI assistants become a major entry point for discovering information, the need for machine‑readable formats grew. Early attempts to feed raw HTML to language models proved inefficient, consuming many tokens without adding value. Over time, developers recognized markdown as a concise, structured alternative that aligns well with the token‑based processing of modern AI systems. Cloudflare responded by offering a real‑time conversion service that delivers markdown directly to agents that request it.
## Implementation & Best Practices
Deploying Markdown for Agents involves three main steps: enabling the feature on a Cloudflare zone, configuring content negotiation, and monitoring the response headers for token metrics. The roadmap below outlines the sequence you should follow before diving into detailed configurations.
1. Enable the feature in the Cloudflare dashboard for the desired zone.
2. Set up Accept header handling in your client or worker scripts to request `text/markdown`.
3. Validate the conversion by inspecting `content-type` and `x-markdown-tokens` headers.
4. Apply content‑signal policies to control how the markdown can be reused.
Following this order ensures a smooth rollout and reduces unexpected behavior.
### Enabling Markdown for Agents on Cloudflare
To turn on the service, navigate to the Edge Services section of the Cloudflare dashboard, locate the Markdown for Agents toggle, and activate it. Once enabled, any request that includes an `Accept: text/markdown` header will trigger on‑the‑fly conversion.
### Requesting Markdown via HTTP
Clients indicate their preference by adding the appropriate header. A simple `curl` command looks like this:
```
curl https://example.com/page \
-H "Accept: text/markdown"
```
In a Cloudflare Worker, the fetch call can be written as:
```ts
const response = await fetch("https://example.com/page", {
headers: { "Accept": "text/markdown" }
})
const markdown = await response.text()
```
The response will include `content-type: text/markdown` and an `x-markdown-tokens` header that reports the estimated token count.
### Managing Content Signals
Cloudflare adds a `Content‑Signal` header to indicate permissible uses such as AI training, search indexing, and direct AI input. Future updates will let you customize these signals to match your policy.
### Monitoring and Performance
Track the `x-markdown-tokens` metric to gauge the size of the delivered markdown. Use this information to adjust chunking strategies in downstream AI pipelines, ensuring that each request stays within model limits.
Key Takeaway: Enabling Markdown for Agents turns HTML pages into lightweight, token‑efficient markdown without altering the original site, making it easier for AI systems to ingest content.
For a deeper dive into the technical background of markdown, see the Markdown Wikipedia page. Details on HTTP content negotiation are covered by the MDN documentation.
Additional reading on related industry trends can be found in our internal analysis of AI adoption at major events (Google I/O 2026 overview) and the impact of AI‑friendly content on mobile platforms (Samsung Galaxy S26 market shift).