# Markdown for AI agents. Analytics for everyone.

Coding agents like Claude Code, Cursor and Codex read your site to write code against it. Most of what they download is layout, scripts and styles. returnmd hands them a clean markdown version of each page instead, and shows you who is reading: people, agents, AI crawlers, search engines and bots.

## How it works

1. A small middleware classifies every request with [@mintlify/agent-traffic](https://github.com/mintlify/agent-traffic).
2. Agents (and anyone requesting `/page.md`) get markdown. Everyone else gets your normal HTML, with a `Link: rel="alternate"` header pointing at the markdown.
3. After each deploy, returnmd scrapes the pages in your sitemap and stores their markdown.
4. Every page load is recorded, cookieless and without storing full IP addresses.

## What you see

- Pageviews and unique visitors, by day
- Top pages, referrers, UTM campaigns and countries
- Which agents and crawlers read your site, and how often they got markdown

## Works with

Anything that speaks `Request` and `Response`: Next.js, Hono, Astro, TanStack Start, Bun, Cloudflare Workers. See the [docs](https://returnmd.vercel.app/docs).