What is llms.txt, and should your docs have one?
llms.txt is a plain Markdown index of your docs for AI tools. Here is what goes in it, how it differs from llms-full.txt, what it can't do, and how to ship one.
An AI assistant opens your docs site and gets a wall of navigation markup, scripts and cookie banners before it reaches a single useful sentence. llms.txt is a small file that tries to fix that: a Markdown index, served at a known path, that tells a model what your docs contain and where to read each page.
What llms.txt is and what goes in it
The llmstxt.org proposal describes a Markdown file at the root of your site. It has a title, a one-line summary, and sections of links. Each link points to a page, ideally to its Markdown version, followed by a short description of what the page covers.
That is the whole idea. It is a table of contents written for a reader that has a limited context window and no patience for HTML. Here is a trimmed example in the format DocsLit generates:
# Acme Docs
> Documentation for Acme, a payments API for marketplaces.
> Raw Markdown for each page: append `.md` to the page URL, or request the page with `Accept: text/markdown`. Every link below already points at the Markdown.
## Getting started
- [Quickstart](https://docs.acme.example/getting-started/quickstart.md): Send your first payment in five minutes.
- [Authentication](https://docs.acme.example/getting-started/authentication.md): Create and rotate API keys.
## Guides
- [Webhooks](https://docs.acme.example/guides/webhooks.md): Receive and verify event notifications.
The quality of the descriptions matters more than anything else in the file. A link labelled "Webhooks" with no description tells a model very little. A link with one honest sentence lets it decide whether to fetch the page at all.
llms.txt vs llms-full.txt
The two files solve different problems.
- llms.txt is the index. It is small, and an agent reads it to decide which pages it needs.
- llms-full.txt is the content. It holds the full text of every page in one file, so a tool can load everything in a single request.
The full file is convenient for small and medium sites and awkward for large ones, because it can outgrow a model's context window. For a big site, the index plus individual page fetches is usually the better path. In DocsLit's version of the full file, each page starts with a # Source: marker, so a reader can tell where one page ends and the next begins.
What llms.txt does and doesn't do
We'd rather be plain about this. llms.txt is a proposed convention, not a standard that every AI tool reads. Some agents and tools look for it. Others ignore it and crawl your HTML or search the web instead. We don't have adoption numbers, and we'd be suspicious of anyone who says they do.
It also isn't a ranking trick. It doesn't change how a search engine orders your pages, and it doesn't control what a model was trained on. It is a convenience for readers that choose to use it.
A docs site should ship one, because the cost is close to zero. If the file is generated from content you already have, there is nothing to maintain, and the downside of an unread file is that nobody reads it. The upside is that a tool which does look for it finds a clean map of your docs.
How DocsLit generates llms.txt, llms-full.txt and Markdown pages
Every docslit build writes these files next to your HTML. You don't configure anything.
llms.txt: an index of every page, grouped by sidebar group, with the title, description and Markdown URL.llms-full.txt: the full text of every page in one file.{slug}.md: the Markdown source of each page, with includes and compile-time variables already expanded.
The line after each link comes from the description in that page's frontmatter, so writing good descriptions is the one thing you do by hand. The missing-description lint rule flags pages that don't have one. On a site with versions, each version gets its own llms.txt and llms-full.txt, and the root llms.txt becomes an index of versions.
The build also writes .well-known/agent.json, which lists all of the above in one place, and each page carries a short directive pointing agents at llms.txt and at its own Markdown URL. If you want to check the result, npx afdocs check https://docs.example.com audits a deployed site.
Because the files come from the same build as your pages, they can't drift out of date. There is no separate file to forget to update after a rename.
Where to go next
For how agents actually fetch these files, including content negotiation and the MCP server, read How AI agents read your docs. The reference pages are How agents read your site and Search and SEO. To see the output on your own content, run npx docslit init my-docs and build it.