llms.txt examples: advanced setups
Complex llms.txt setups explained: several languages, versions, monorepo packages and services, the full-text file, a CI build, and real files from well-known sites
| Scenario | How many files | Main idea |
|---|---|---|
| Several languages | one per language | a language file sits in the language subpath |
| Several versions | one per version | the root file leads to the current one |
| Monorepo | root and packages | the root is a table of contents, details live in packages |
| Microservices | root and services | one entry, then by service |
| Index and full text | two | the index is required, the full text is not |
| Build in CI | as many as needed | the file is rebuilt on every change |
Several languages
Section titled “Several languages”- When to use
- The site has several language versions in subpaths: /ru/, /es/.
- Trap
- Putting all languages into one root file. An agent gets a mix and cannot tell which version it needs.
- Seen in the wild
- The proposal does not define the language of the root file on a multilingual site: it is an open question (issue 147 in the repository).
- llms.txt the English version, covers the whole site
Directoryru/
- llms.txt the Russian version, covers /ru/
Directoryes/
- llms.txt the Spanish version, covers /es/
# Documentation Hub
> Comprehensive guides and API reference for developers.
## Getting Started
- [Quick Start](https://docs.example.com/en/quickstart.md): 5-minute setup guide- [Installation](https://docs.example.com/en/install.md): System requirements
## API Reference
- [REST API](https://docs.example.com/en/api/rest.md): HTTP endpoints# Документация
> Подробные руководства и справочник API для разработчиков.
## Начало работы
- [Быстрый старт](https://docs.example.com/ru/quickstart.md): настройка за 5 минут- [Установка](https://docs.example.com/ru/install.md): системные требования
## Справочник API
- [REST API](https://docs.example.com/ru/api/rest.md): HTTP-методыSeveral versions
Section titled “Several versions”- When to use
- The documentation keeps several product versions: /docs/v3/, /docs/v2/.
- Trap
- Leaving links to an old version in the root file. An agent will write code for an outdated API.
A question without a version
- Root file
/llms.txt - Current version
/docs/v3/
A question about an old version
- Version file
/docs/v2/llms.txt - Pages of that version
/docs/v2/
# MyLibrary v3.0
> Modern JavaScript utility library (current stable).
## Documentation
- [Migration from v2](https://mylib.dev/docs/v3/migration.md): Breaking changes- [API Reference](https://mylib.dev/docs/v3/api.md): Complete API docs
## Optional
- [v2 llms.txt](https://mylib.dev/docs/v2/llms.txt): Previous stable version- [v1 llms.txt](https://mylib.dev/docs/v1/llms.txt): DeprecatedMonorepo
Section titled “Monorepo”- When to use
- One site documents several packages, each with its own section.
- Trap
- Listing every page of every package in the root. The file stops fitting into the context.
- Seen in the wild
- OpenAI: a root file and nested indexes for /api, /codex and /commerce.
- llms.txt table of contents: one line per package
Directorycore/
- llms.txt everything about the core
Directorycli/
- llms.txt everything about the command line
Directoryplugins/
- llms.txt everything about plugins
# Acme Platform
> Monorepo containing all Acme packages and services.
## Packages
- [Core](https://acme.dev/core/llms.txt): Core library and shared utilities- [CLI](https://acme.dev/cli/llms.txt): Command-line interface- [Plugins](https://acme.dev/plugins/llms.txt): Plugin system
## Guides
- [Getting Started](https://acme.dev/guides/quickstart.md): First steps- [Architecture](https://acme.dev/guides/architecture.md): How the packages fit togetherMicroservices
Section titled “Microservices”- When to use
- The documentation describes a set of services with different APIs.
- Trap
- Mixing public and internal services. Only what is open to everyone goes into the file: llms.txt does not restrict access.
- Agentlooks for how to accept a payment
- Root file
/llms.txtthe list of services - Service file
/billing/llms.txtbilling pages - The page
/billing/payments.md
# Platform API Documentation
> Microservices platform for e-commerce operations.
## Services
- [Auth](https://docs.platform.io/auth/llms.txt): Authentication and authorization- [Users](https://docs.platform.io/users/llms.txt): User management- [Orders](https://docs.platform.io/orders/llms.txt): Order processing- [Billing](https://docs.platform.io/billing/llms.txt): Payments and invoices
## Optional
- [Status Page](https://status.platform.io): Service healthIndex and full text
Section titled “Index and full text”- When to use
- An agent sometimes needs the whole documentation text in one request.
- Trap
- Treating llms-full.txt as part of the proposal. It is a practice of documentation platforms, and the file is not required.
- Seen in the wild
- Stripe does without the full file. At Cloudflare it takes 67 MB.
llms.txt
links
sectionlinklink
- Read first
- Kilobytes
llms-full.txt
the page text itself
pagepagepage
- Read when the whole corpus is needed
- From hundreds of kilobytes to tens of megabytes
# Framework Documentation
> Full-stack web framework for building modern applications.
## Core
- [Getting Started](https://framework.dev/docs/start.md): Installation and first app- [Routing](https://framework.dev/docs/routing.md): File-based routing- [Middleware](https://framework.dev/docs/middleware.md): Request and response middleware
## Optional
- [Full text](https://framework.dev/llms-full.txt): All pages in one file# Framework Documentation
> Full-stack web framework for building modern applications.
## Getting Started
Install the framework:
npm install framework
Create the first application...
## Routing
Routes are created from files in the pages directory...
## Middleware
Middleware functions have access to the request and the response...Build in CI
Section titled “Build in CI”- When to use
- The documentation changes often, and the file cannot be kept by hand.
- Trap
- Rebuilding the file once a quarter. Links die sooner: three examples in the previous version of this page already answered 404.
- Change
docs/**a page edit - pushBuildthe generator reads the sitemap
- Checkevery link answers 200
- Publish
public/llms.txt
name: Update llms.txt
on: push: paths: - 'docs/**' schedule: - cron: '0 0 * * 0'
jobs: update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Generate llms.txt run: | npx llmstxt gen https://docs.example.com/sitemap.xml \ -ep "**/blog/**" -t "My Docs" > public/llms.txt
- name: Commit and push run: | git config user.name "GitHub Action" git config user.email "action@github.com" git add public/llms.txt git diff --staged --quiet || git commit -m "Update llms.txt" git pushThe generator commands are described on the llmstxt CLI page.
Real files
Section titled “Real files”Every address opened on the day of the check. For each one we say what the file shows and what it does not prove.
- llms-full.txt
- yes
- Markdown pages
- via the Accept header
What it shows. A root index plus nested files for /api, /codex, /commerce
What it does not prove. That ChatGPT reads other sites’ llms.txt
Anthropic
platform.claude.com/llms.txt- llms-full.txt
- yes
- Markdown pages
- yes, with rel=alternate
What it shows. A docs index and the full text in one file
What it does not prove. That Claude reads other sites’ llms.txt
Cloudflare
developers.cloudflare.com/llms.txt- llms-full.txt
- yes
- Markdown pages
- yes
What it shows. A very large index: the full text takes 67 MB
What it does not prove. That a file this big is usable by an agent as a whole
Stripe
docs.stripe.com/llms.txt- llms-full.txt
- no
- Markdown pages
- via the Accept header
What it shows. llms-full.txt is not required: an index and Markdown pages are enough
What it does not prove. That skipping the full file is a general rule
Cursor
cursor.com/llms.txt- llms-full.txt
- not checked
- Markdown pages
- via the Accept header
What it shows. The only measured site with rel=describedby from the second edition
What it does not prove. That the second edition is widely adopted
GitHub Docs
docs.github.com/llms.txt- llms-full.txt
- no
- Markdown pages
- yes
What it shows. An index without a full file on large docs
What it does not prove. That Copilot relies on this file
Mintlify
www.mintlify.com/docs/llms.txt- llms-full.txt
- yes
- Markdown pages
- yes
What it shows. The platform generates the files automatically for every site it hosts
What it does not prove. The quality of each generated file
Yandex Cloud
yandex.cloud/llms.txt- llms-full.txt
- not checked
- Markdown pages
- not checked
What it shows. An example on a Russian site
What it does not prove. That Yandex Search uses such files
What next
Section titled “What next”- Basic examples - where a small site starts.
- File format - the rules of the second edition.
- Best practices - a checklist.