What Is Markdown for Agents?

Ilias Ism
by Ilias Ism
2 minutes read
What Is Markdown for Agents?

Markdown for agents is the practice of returning Markdown (not HTML) when a client requests your page with Accept: text/markdown. Same URL, HTTP content negotiation: browsers get HTML, many coding agents and some crawlers get a leaner body.

It pairs with generative engine optimization and answer engine optimization as plumbing. It does not replace good content or authority.

Why it matters

Agents waste tokens on nav, scripts, and wrappers. Markdown keeps structure (headings, lists, code) without most HTML chrome. Cloudflare reported ~80% fewer tokens on one of their own posts (HTML vs Markdown); your mileage will vary.

How to implement

Pick one path (details and copy-paste configs on AcceptMarkdown.com recipes and guides):

  • Nginx, Caddy, Apache - map Accept to .md files or an upstream that returns Markdown.
  • App (Next.js, Rails, Laravel, Express, …) - middleware: if Accept includes text/markdown, return Markdown; else normal HTML.
  • Edge worker - Cloudflare Workers, Fastly, Lambda@Edge: fetch or convert, return text/markdown.
  • Cloudflare only - enable Markdown for Agents (HTML→Markdown at the edge for enabled zones; see announcement).

Test and verify

curl -sI -H "Accept: text/markdown" 'https://yoursite.com/page'

AI SEO

Markdown for agents lowers fetch friction; it does not guarantee citations. Still optimize for AI citations and answer engine optimization. AI SEO Tracker shows where you appear in AI answers so you can tie infra changes to visibility.

Ilias Ism

SEO strategist and former CTO who builds scalable content systems. Founded LinkDR, MagicSpace SEO, AISEOTracker, and GenPPT.

  • Built and sold Officient ($500k+ MRR)
  • Founded LinkDR, AI SEO Tracker, GenPPT
  • Scaled 20+ products generating $10M+ revenue
  • 10+ years in SEO and AI-powered content strategy

Track Your Brand’s Visibility in AI Answers

Get your AI Visibility Score and see how often top models mention your brand — and why.

Get 100% free analysis