Skip to content
Select theme

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
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/
llms.txt
# 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
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.
What an agent reads

A question without a version

  1. Root file/llms.txt
  2. Current version/docs/v3/

A question about an old version

  1. Version file/docs/v2/llms.txt
  2. Pages of that version/docs/v2/
llms.txt
# 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): Deprecated
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
llms.txt
# 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 together
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.
One entry, then by service
  1. Agentlooks for how to accept a payment
  2. Root file/llms.txtthe list of services
  3. Service file/billing/llms.txtbilling pages
  4. The page/billing/payments.md
llms.txt
# 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 health
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.
What each file holds

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
llms.txt
# 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
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.
The file is built together with the site
  1. Changedocs/**a page edit
  2. pushBuildthe generator reads the sitemap
  3. Checkevery link answers 200
  4. Publishpublic/llms.txt
.github/workflows/llms.yml
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 push

The generator commands are described on the llmstxt CLI page.

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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