Industry Playbooks · · 6 min read · By Mobilize Cloud

If there's one kind of site llms.txt was made for, it's documentation. Developers already paste docs into AI coding assistants and ask chatbots how an API works, and the answers are only as good as what the tool can find and read. A good llms.txt for your documentation gives those tools a clean map of your docs, and Markdown versions of each page give them the content without the menus, scripts and cookie banners.

This guide covers why llms.txt documentation is the strongest use case, what to put in the file for a SaaS product or developer docs site, how to link .md versions of pages, and how to handle versioned docs. As with any llms.txt, AI companies haven't said exactly how their tools use these files, so treat it as a clear, low-cost improvement rather than a guarantee.

Why docs are the strongest use case

The llms.txt proposal, published by Jeremy Howard of Answer.AI in September 2024, came out of software documentation. The proposal notes that the nbdev tool used for Answer.AI and fast.ai projects generates Markdown versions of docs pages automatically, and several documentation platforms have since built llms.txt in.

Docs fit the format well for a few reasons:

  • The reader is often an AI tool already. A developer asking an assistant to write code against your API wants it to use your current docs, not a guess from old training data.
  • Docs are large and deeply nested. A curated index helps a tool find the right page among hundreds.
  • Docs pages are heavy. Navigation, version pickers, search boxes and code tabs add a lot of noise around the actual content. Markdown strips that away.

What to include

Start with the standard structure: a # title with your product name, a one-line > summary, then ## sections of links with a short note on each. For a docs site, these sections cover most needs:

  • Getting started: quickstart, installation, authentication. These are the pages people ask about most.
  • Core concepts: the handful of pages that explain how your product works (objects, permissions, limits, billing model).
  • Guides: task-based how-tos, grouped by what people are trying to do.
  • API reference and SDKs: the reference index, each SDK's main page, and rate limits and error codes.
  • Changes: changelog, migration guides and deprecation notices. These help a tool avoid recommending something you removed.
  • Optional: blog posts, tutorials for older versions, community resources. The proposal's ## Optional section is for links a tool can skip when space is short.

Use the notes after each link to say what the page answers, not just repeat its title. "Webhooks: event types, retry schedule and how to verify signatures" is more useful than "Webhooks".

An example llms.txt for documentation

Here's an example for a made-up invoicing API. The links point to .md versions of each page, which we cover next.

# Ledgerly API

> REST API for creating invoices, collecting payments and syncing customers. These docs cover API version 3 (current). Version 2 is deprecated.

Authentication uses API keys sent as a bearer token. All amounts are in the smallest currency unit (cents).

## Getting started
- [Quickstart](https://docs.example.com/quickstart.md): Create an API key and send your first invoice
- [Authentication](https://docs.example.com/authentication.md): API keys, test and live modes, key rotation
- [SDKs](https://docs.example.com/sdks.md): Official libraries for Python, Node.js and PHP

## Core concepts
- [Invoices](https://docs.example.com/concepts/invoices.md): Invoice lifecycle, statuses and finalization
- [Customers](https://docs.example.com/concepts/customers.md): Creating and syncing customer records
- [Rate limits](https://docs.example.com/rate-limits.md): Request limits and how to handle 429 responses

## API reference
- [API reference](https://docs.example.com/api.md): Every endpoint with parameters and example responses
- [Errors](https://docs.example.com/errors.md): Error codes and what to do about each
- [Webhooks](https://docs.example.com/webhooks.md): Event types, retries and signature verification

## Changes
- [Changelog](https://docs.example.com/changelog.md): Dated list of API changes
- [Migrating from v2](https://docs.example.com/migrate-v2-to-v3.md): Breaking changes and replacements

## Optional
- [Version 2 docs](https://docs.example.com/v2/llms.txt): Deprecated version, for existing integrations only
- [Engineering blog](https://www.example.com/blog): Background articles and case studies

Notice the free text under the summary. The proposal allows short paragraphs there, and for docs it's a good place for facts a tool should know before reading anything else: the current version, how authentication works, units and conventions.

Linking .md versions of your pages

The proposal suggests that pages with useful information also offer a clean Markdown version at the same address with .md added (so page.html has page.html.md), or with the extension swapped for .md. Addresses without a file name get index.html.md added. In practice, most docs platforms use the simpler form: docs.example.com/quickstart becomes docs.example.com/quickstart.md.

The good news is that you may not need to build this yourself:

  • Mintlify says it hosts llms.txt and llms-full.txt automatically, links pages with .md so tools can fetch the Markdown version, and lets you replace the generated file with your own.
  • GitBook says it publishes AI-friendly formats automatically: append .md to any published page, plus generated llms.txt and llms-full.txt files.
  • Docusaurus and other static site generators rely on community plugins or a build step. Check the plugin's documentation and test the output, since quality varies.

Whatever generates them, test a few .md links by hand. The most common failure is that the .md address returns the normal HTML page, or the site's "not found" page, because a catch-all route answered first. Our post on llms.txt serving a web page instead of a file covers the same problem for the main file. If your platform doesn't produce Markdown, link the normal HTML pages; a working HTML link beats a broken .md one.

Versioned docs

The proposal doesn't say anything specific about versions, so this is our practical advice rather than a rule.

  • Point the main file at your current stable version. Say which version that is in the summary or the text under it. If an AI tool only reads one file, it should be the one people should use today.
  • Don't mix versions in the main sections. Two "Authentication" links for v2 and v3 side by side invite the tool to blend them.
  • Put older versions in Optional, or give each version its own file (for example /v2/llms.txt) and link it from Optional with a clear "deprecated" note.
  • Link migration guides prominently. They tell a tool exactly what changed and what replaced what.
  • Keep the file stable across releases. If you publish docs under version-specific addresses, make sure the main file's links move to the new version when you release, not months later.

Separate files for the docs and the marketing site

Many SaaS companies run their marketing site on example.com and their docs on docs.example.com. Each host has its own /llms.txt. The marketing file should describe the product, pricing, use cases and support, and link to the docs file. The docs file should focus on building with the product. Linking between them helps a tool that lands on one find the other.

What about llms-full.txt?

Docs sites are where llms-full.txt (one file with the full text of your docs) makes the most sense, because developers sometimes want to load the whole thing into an AI tool at once. Keep llms.txt itself short: our validator warns when it goes over 1 MB. Our post on llms-full.txt covers when it's worth it.

Keep it current

Docs change more often than almost any other part of a website. Pages get renamed, reference sections are regenerated, versions are retired. Ideally your llms.txt is generated or checked as part of your docs build, so it can't drift from the docs it describes.

Either way, check the result. Run the file through our validator for formatting and link problems, and list it on LLMs Ledger to have it monitored. Nightly and Agency plans email you a line-by-line view of what changed and open every link each night, which catches a release that broke your .md pages. If you want to pull results into your own tooling, our developer docs describe the API.

Bottom line: documentation is where llms.txt is most useful. List your current version's key pages with helpful notes, link clean .md versions where your platform supports them, keep older versions out of the main sections, and check the file every time you ship.

Is your llms.txt working?

Check any site for free and get plain-English fixes in seconds.

Keep reading