# How We Made Our Website Readable by AI Agents Source: https://customlabs.io/insights/website-readable-by-ai-agents/ Updated: 2026-11-16 Insights November 16, 2026 · 6 min read · By CustomLabs Engineering agents [production](https://customlabs.io/topics/shipping-to-production/) Key takeaways - On 2026-11-16 our 160 HTML pages held 12,331,322 bytes. The 160 Markdown twins held 1,321,649 bytes, about one ninth - Four parts make the layer: a build step, llms.txt files, Accept-header negotiation and discovery hints - Two scripts gate it. One checks that each page has a twin. One checks the edge headers - A single source for page descriptions stops llms.txt from drifting away from the pages - We have no fetch data. We claim no traffic, ranking or citation gain. Byte counts are not token counts Our HTML pages are about nine times larger than their Markdown twins. We built the twins so an AI agent can read the text without the page around it. We measured everything on 2026-11-16, on commit `9aaa052`. ## What does an AI agent get when it reads a normal web page? It gets everything the browser gets: navigation, CSS, scripts and inline SVG. The words a reader wants sit inside that markup. We built the site and counted. It has 160 pages. The HTML for all 160 pages totals 12,331,322 bytes. The Markdown twins total 1,321,649 bytes. The HTML is 9.3 times larger. Page HTML bytes Markdown bytes `/` 109,035 13,320 `/cost/` 162,762 37,449 `/about/` 55,196 2,721 The gap is largest on pages with little text and much design. `/about/` is the clearest case. It sends 55 KB of HTML to carry 2.7 KB of text. ## What did we build? The layer has four parts. The first part is a build step that writes a twin for each page. A hook in `astro.config.mjs` runs after the build. It calls `src/lib/markdown-export.mjs`. That file converts the `
` element of each built page to Markdown. No list of pages exists, so a new page gets a twin with no extra work. The README section “Markdown twins” describes it. The second part is two index files. `/llms.txt` is a short map of the site. `/llms-full.txt` holds the long form. Today they are 41,968 bytes and 293,234 bytes. `src/pages/llms.txt.ts`, `src/pages/llms-full.txt.ts` and `src/lib/llms.ts` build them. The proposal behind the format is at [llmstxt.org](https://llmstxt.org/). The third part is content negotiation at the edge. A client can ask for Markdown at the normal URL. Two CloudFront functions handle it: `terraform/website/functions/url-rewrite.js` and `markdown-headers.js`. [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110) defines the `Accept` and `Vary` headers they use. The fourth part is discovery hints. Each HTML response carries a `Link` header that points to its twin. Each page has an alternate link element of type `text/markdown` in its head. `robots.txt` names `llms.txt`. A client that finds none of these can still add `.md` to a path. This is what the two requests return today: ``` curl -sI -H 'Accept: text/markdown' https://customlabs.io/about/ # content-type: text/markdown; charset=utf-8 # vary: accept curl -sI https://customlabs.io/about/ # content-type: text/html # link: ; rel="alternate"; type="text/markdown" ``` ## How do we keep it from rotting? A layer that nobody checks falls out of step with the site. We use three guards. `scripts/verify-md.mjs` runs in `npm test`. It checks that each built page has a twin. It checks that the twin has the same title, no leftover markup and only absolute links. It also checks that `dist/llms.txt` has no em dash. `scripts/verify-edge.mjs` checks the edge behaviour. It covers the headers above and the rewrite from a clean URL to its twin. The third guard is one source for descriptions. We once typed each description again by hand for `llms.txt`, and the copies drifted. Now `llms.txt` prints the meta description of each page. ## What does this not tell you? We have no data on how often an assistant fetches a twin or `llms.txt`. We did not look at access logs for this article. So we make no claim about traffic, search ranking or citations. `llms.txt` is a proposal. Not every crawler reads it. Some may ignore it. Byte counts are not token counts. Markdown and HTML tokenize in different ways. The ratio of tokens may differ from the ratio of bytes. The figures cover one site on one day. The page count and sizes change with each build. Measure your own site before you use our ratio. ## Does this apply to your site or docs? It applies if agents read your docs or product pages. One example is a coding agent that looks up your API. Another is an assistant that answers a buyer’s question about you. The build step is small. The gates keep it correct. It applies less if your content sits behind a login, or if few outside readers use it. Start with the build step and the `.md` path. Add negotiation later. The reasoning matches [Tool Design](https://customlabs.io/tool-design/) and [Context Engineering](https://customlabs.io/context-engineering/). Both say an agent should get the content it needs and little else. [CodeHerder](https://codeherder.com) runs the agent fleet that built and keeps this layer on our site. We can help you add the same layer to your docs. Questions ## FAQ Answers to the questions this piece raises. 01 What is a Markdown twin? It is a plain-text copy of a web page, written in Markdown. Each page on this site has one. Add .md to the path to read it. The twin of /about/ is /about.md. 02 What is llms.txt? It is a proposed file at the root of a site. It lists the pages that matter, with a short note for each. The proposal is at llmstxt.org. It is not a standard that every crawler reads. 03 How does a site return Markdown for the same URL? The client sends an Accept header that asks for text/markdown. The server then returns the Markdown copy and sets a Vary: Accept header. RFC 9110 defines both headers. 04 Do AI assistants read these files? We do not know. We have no data on how often assistants fetch our twins or llms.txt. We built the layer because it is cheap to build and cheap to keep correct. Related services [Custom Development](https://customlabs.io/services/custom-development/) Send agents the words they need. Tool Design covers how agents read and call what you expose. [Context Engineering](https://customlabs.io/glossary/context-engineering/) covers what an agent should load into its window, and when. [Read Tool Design →](https://customlabs.io/tool-design/) [Read Context Engineering →](https://customlabs.io/context-engineering/) Written by [CustomLabs Engineering](https://customlabs.io) Agentic AI engineering team CustomLabs is a small, senior-only studio that embeds with client teams. It ships eval-tested, model-agnostic AI systems into production in weeks. Every insight reflects work and lessons from the studio's own engagements — the people who write the code write the words. Our products [CodeHerder](https://codeherder.com) [CostMon](https://costmon.com) [FreeTier](https://freetier.co) [GreatAPIs](https://greatapis.com) [Beemy](https://beemy.co) [CustomHosted](https://customhosted.com) Read next November 28, 2026 · 9 min read ### [One Change, Five Stages: How Our Agent Fleet Shipped a Page](https://customlabs.io/insights/one-change-five-stages/) One site change, followed from brief to production. Review rejected the first build for two defects that CI passed. agents production Read → November 13, 2026 · 8 min read ### [What Our Agent Fleet Wrote Down in Four Months of Shared Memory](https://customlabs.io/insights/what-our-agents-wrote-down/) We counted 174 pages in our agent fleet's shared wiki. Closed-defect pages saved work. Repeated lessons and stale paths cost us time. agents production Read → September 30, 2026 · 9 min read ### [What Our Coding Agents Did to Get Past the Build Checks](https://customlabs.io/insights/coding-agents-game-the-check/) A coding agent optimises for the check and skips the goal. Incidents from our own delivery record show how a green check hid a wrong page. agents evals ci production Read →