# machineview

> See your site the way AI agents do. See every AI agent that reads your site, control what they get, and serve it as clean markdown — and turn any URL into agent-ready markdown along the way.

Google Analytics told you about humans. machineview tells you about the machines. The HTML→markdown engine is the substrate; the product is the OBSERVE + CONTROL + SERVE layer a site owner installs to measure and govern agent traffic.

## What it does

- **Observe** — server-side analytics for AI-agent traffic (GPTBot vs OAI-SearchBot vs ChatGPT-User, etc.). Agents don't run JS, so detection is server-side only; there is no browser beacon.
- **Control** — include/exclude paths, per-agent allow/block, pinned facts and agent instructions that thread into what every crawler receives.
- **Serve** — the same URL returns an interactive view to browsers and clean, token-efficient markdown to agents.

## Try the converter

```
https://machineview.vercel.app/{any-url}
```

- `GET https://machineview.vercel.app/https://example.com` — non-browser clients receive raw markdown (`text/markdown`)
- `GET https://machineview.vercel.app/example.com` — schemes are optional
- Browsers hitting the same path get the interactive machine view

## API

- [Convert (JSON)](https://machineview.vercel.app/api/convert?url=https://example.com): `GET ?url=` → `{ ok, markdown, meta, stats }`. `&format=md` for raw markdown; `&frontmatter=0`; `&fresh=1`.
- [Convert (POST)](https://machineview.vercel.app/api/convert): `POST { html, url }` → convert already-fetched bytes (SDK `self` mode / Worker), no second fetch.
- [Agent-Readiness report](https://machineview.vercel.app/api/report?url=https://example.com): `GET ?url=` → 0–100 score + robots/llms/structured/JS-render probes.
- [Generate llms.txt](https://machineview.vercel.app/api/generate/llms.txt?url=https://example.com): `GET ?url=&max=` → a spec-correct llms.txt crawled from the site's sitemap.
- [Generate agents.md](https://machineview.vercel.app/api/generate/agents.md?url=https://example.com): `GET ?url=` → the agent onboarding prompt for a site.
- [Hosted proxy](https://machineview.vercel.app/m/): `GET /m/{any-url}?key=` → authed machine view that logs the agent hit (the real `served` analytics path).

## Conversion guarantees

- Scripts, styles, SVGs, hidden and screen-reader-only nodes are stripped
- Boilerplate removed: cookie banners, modals, skip-links, UI-chrome buttons
- Every link and image resolved to an absolute URL; lazy images promoted; tracking pixels dropped
- GFM tables, fenced code blocks, tight lists — token-efficient output
- SSRF-guarded: private networks, localhost and cloud metadata are unreachable

## Links

- [Human view](https://machineview.vercel.app/)
- [Agent-readiness leaderboard](https://machineview.vercel.app/leaderboard) — top VC firms and top AI companies, ranked by how well their sites read to a machine
- [Rulebook](https://machineview.vercel.app/rulebook) — the five scoring pillars, what each measures, and how points are earned
