llms.txt is a map, not the territory
llms.txt is a convention: a Markdown file at the root of a site that tells a language model where the important pages are and what they contain. Stripe publishes one at docs.stripe.com/llms.txt. So do Finix and a growing number of platforms. I built a sample documentation set around one, and I have come to a narrower view of what it does than the enthusiasm suggests.
What it does
It routes. An agent that reads llms.txt learns which page covers webhooks, which covers refunds, and where the reference lives. That is useful, because the alternative is the agent guessing from the sitemap or crawling. A well-made llms.txt is a table of contents written for a reader that cannot see your navigation.
What it does not do
It does not tell the agent what the platform does. It points at pages that do. If those pages are wrong, llms.txt delivers the agent to the wrong page faster. In the agent test I found a guide that documents three requests the spec does not have. An llms.txt entry that says "Bulk payouts: see this guide" does not fix that. It amplifies it, because now the guide is the sanctioned source.
So the file has a dependency that is easy to forget: every page it routes to has to be checked against the spec, and the reference entry in it should point at the spec, or at a Markdown rendering generated from the spec, rather than at a hand-written page about the reference.
What a good one looks like
The sample set I published, with a README explaining the choices, follows four rules:
- One canonical example per concept. If the guide shows how to create a session, it shows it once, correctly, and the reference entry links to the operation in the spec. Agents sample; two examples that differ in a detail become two behaviors.
- Retrieval-first page structure. The first paragraph of each page states what the page is for and what it covers, in terms a retrieval step would match. Headings name the request, not the feeling ("Create a session" rather than "Getting started").
- The reference entry points at the generated artifact.
llms.txtlists the OpenAPI spec itself, or the Markdown the platform generates from it, so the agent reads the same source the reference does. - The map is checked the way the pages are. The same docs drift script that checks guides against the spec checks that every URL in
llms.txtresolves and that every operation in the spec is reachable from something the file lists.
The order of operations
If a team asks me where to start on "docs for agents," the answer is not llms.txt. It is:
- Make the spec the source of truth and generate the reference from it.
- Run a check that finds guide text disagreeing with the spec, and fix those.
- Then write the
llms.txt, because now it points at pages worth pointing at.
Done in that order, the file is the last ten percent of the work and makes the other ninety usable. Done first, it is a map of a territory that has not been surveyed.