llms.txt sections and structure
How llms.txt sections work under v2 of the proposal - link lists under H2 headings, Optional as a convention, ordering, files for site sections and languages, typical mistakes
What a section is
Section titled “What a section is”A section is an H2 heading with a list of links under it. The proposal calls such a list a “file list”: URLs where further detail is available.
## Docs
- [Quick start](https://example.com/quickstart.md): first steps- [API reference](https://example.com/api.md): methods and parametersThe proposal names only one section, Optional. Every other name is the author’s choice.
Common names
Section titled “Common names”This is an observation from published files, not a requirement.
| Section | What it holds |
|---|---|
## Docs | main documentation |
## API | API reference |
## Guides | guides and tutorials |
## Examples | code examples |
## Reference | reference material |
## Optional | secondary links |
The Optional section
Section titled “The Optional section”## Optional
- [Changelog](https://example.com/changelog.md): versions- [Roadmap](https://example.com/roadmap.md): what comes next- [Contributing](https://example.com/contributing.md)In the v2 text, Optional is used “by convention” for secondary information: links an agent can skip when a shorter context is needed.
- The H1 - the project name.
- A blockquote with a short summary.
- Details without headings.
- Sections with the main links.
Optionallast.
The proposal fixes the order of the first three parts. The order of sections among themselves is up to the author; the most important ones go first.
Example
Section titled “Example”# FastHTML
> FastHTML is a python library which brings together Starlette, Uvicorn, HTMX, and fastcore's `FT` "FastTags" into a library for creating server-rendered hypermedia applications.
Important notes:
- Although parts of its API are inspired by FastAPI, it is *not* compatible with FastAPI syntax and is not targeted at creating API services- FastHTML is compatible with JS-native web components and any vanilla JS library, but not with React, Vue, or Svelte.
## Docs
- [FastHTML quick start](https://fastht.ml/docs/tutorials/quickstart_for_web_devs.html.md): A brief overview of many FastHTML features- [HTMX reference](https://github.com/bigskysoftware/htmx/blob/master/www/content/reference.md): Brief description of all HTMX attributes, CSS classes, headers, events, extensions, js lib methods, and config options
## Examples
- [Todo list application](https://github.com/AnswerDotAI/fasthtml/blob/main/examples/adv_app.py): Detailed walk-thru of a complete CRUD app in FastHTML showing idiomatic use of FastHTML and HTMX patterns.
## Optional
- [Starlette full documentation](https://gist.githubusercontent.com/jph00/809e4a4808d4510be0e3dc9565e9cbd3/raw/9b717589ca44cedc8aaf00b2b8cacef922964c0f/starlette-sml.md): A subset of the Starlette documentation useful for FastHTML development.The example comes from the proposal text.
Several files on one site
Section titled “Several files on one site”v2 defines what a file in a subpath means: it covers the URLs under its path, and where more than one file applies, agents should use the most specific one.
/llms.txt -> the whole site/docs/llms.txt -> documentation only/api/llms.txt -> API onlyThe page /docs/install/ is covered by both the root file and /docs/llms.txt; an agent should use the second.
Multilingual sites
Section titled “Multilingual sites”The same rule lets a file sit in a language section:
/llms.txt -> the whole site/ru/llms.txt -> the Russian section/en/llms.txt -> the English sectionThe proposal does not say which language the root file of a multilingual site should use. The question is open in the proposal repository.
Grouping links
Section titled “Grouping links”By content type:
## Tutorials
- [Beginner tutorial](https://example.com/tutorial/basic.md): first steps, 30 minutes- [Advanced tutorial](https://example.com/tutorial/advanced.md): two hours
## API Reference
- [REST API](https://example.com/api/rest.md): HTTP methods- [SDK](https://example.com/api/sdk.md): client librariesBy platform:
## JavaScript
- [npm package](https://example.com/js/install.md): installation and usage
## Python
- [PyPI package](https://example.com/python/install.md): installation with pipWhat to avoid
Section titled “What to avoid”Too many sections. Ten sections with one link each read worse than three sections with clear notes.
Sections without links. A heading with no list gives an agent nothing.
A file with no links at all. In an analysis of the Common Crawl corpus, 23% of published llms.txt files contain not a single link. Such a file does not do its job: the agent has nowhere to go.
The same link in several sections. One link, one section.
Links to pages that are hard for a model to read. If a page has a Markdown version, link to that.
More in Best Practices.
How others do it
Section titled “How others do it”Documentation files change, so section names are not quoted here: opening the files is more reliable. All URLs were checked on October 3, 2026.
- developers.openai.com/llms.txt - a root file with nested indexes for
/api,/codex,/commerce - docs.stripe.com/llms.txt - a large index with no
llms-full.txt - developers.cloudflare.com/llms.txt - an index by product
- fastht.ml/docs/llms.txt - a file in a subpath, the example from the proposal itself