llms.txt Format — Spec Reference
The complete reference for the llms.txt file format: required and optional elements, Markdown rules, link syntax, the llms-full.txt variant, and a checklist to validate your file.
Last updated:
Format overview
llms.txt is a plain-text file using standard CommonMark Markdown. It lives at the root of your domain (https://example.com/llms.txt) and serves as a curated index for AI language models — analogous to robots.txt for
crawlers, but focused on what to read, not what to avoid.
AI coding assistants, RAG pipelines, and research agents use the file to quickly understand what
a site offers and which URLs contain authoritative documentation. Because context windows are
limited, a well-structured llms.txt
is far more useful than leaving a model to crawl arbitrary pages.
Required elements
The spec defines only two mandatory elements:
- H1 heading — the first line must be an H1 (
# Name) containing the project or site name. - Blockquote summary — immediately after the H1, a
> one-sentence descriptionthat summarises what the project does.
Everything else is optional but strongly recommended.
# Your Project Name
> One sentence describing what your project does and who it's for.
## Documentation
- [Getting Started](https://example.com/docs/start): Install and first steps.
- [API Reference](https://example.com/api): Full endpoint catalog.
## Optional
- [Changelog](https://example.com/changelog): Release history.
Optional sections
Sections are H2 headings (##) followed by unordered lists of Markdown links. Common
section names include:
- Documentation — primary docs, guides, references.
- Product — marketing pages, pricing, status.
- Examples — code samples, tutorials, demos.
- Optional — changelog, blog, GitHub — lower priority for AI.
- API — dedicated API reference section.
- SDKs — language-specific client libraries.
The section named Optional has special meaning in the spec: AI systems may skip links under it when context is constrained.
# Acme SaaS
> Acme SaaS helps teams automate their billing workflows with a no-code dashboard
> and a REST API supporting 40+ payment providers.
## Product
- [Overview](https://acme.com/product): Core capabilities and use cases.
- [Pricing](https://acme.com/pricing): Plans, limits, and enterprise options.
- [Status](https://status.acme.com/): Uptime and incident history.
## Documentation
- [Quickstart](https://acme.com/docs/quickstart): Set up in under 5 minutes.
- [API Reference](https://acme.com/docs/api): REST endpoints, auth, rate limits.
- [SDKs](https://acme.com/docs/sdks): Node, Python, Ruby, Go clients.
- [Webhooks](https://acme.com/docs/webhooks): Event payloads and retry policy.
## Examples
- [Node.js integration](https://acme.com/examples/node): End-to-end payment flow.
- [Python integration](https://acme.com/examples/python): Subscription management.
## Optional
- [Changelog](https://acme.com/changelog): Version history.
- [Blog](https://acme.com/blog): Product updates and tutorials.
- [GitHub](https://github.com/acme/acme-oss): Open-source components.
Link syntax
Each link follows the Markdown syntax - [Title](URL): short description.
- Use absolute URLs including the scheme (
https://). - The description after the colon is plain text — keep it under ~120 characters and make it informative for an AI, not keyword-stuffed.
- One link per list item — do not nest bullets.
- Prefer canonical URLs (with trailing slash if that's your convention).
llms-full.txt variant
The spec defines an optional companion file at /llms-full.txt. While llms.txt is an index of links, llms-full.txt contains the full text of those linked pages concatenated together
— formatted in Markdown.
AI systems that need complete context in a single request (e.g., systems building a knowledge
base offline) fetch llms-full.txt instead. The trade-off: it can be many megabytes and
is impractical for interactive use.
Read the dedicated llms-full.txt guide for generation strategies.
Checklist
- File served at
/llms.txt(root path, not a subdirectory) Content-Type: text/plain; charset=utf-8- Starts with exactly one H1 heading
- Blockquote summary on the line immediately after the H1
- All links are absolute (
https://) - Each link has a concise description after the colon
- File is under 20 KB
- No HTML tags, no nested lists
- Validated with the llms.txt validator
Common mistakes
- Relative URLs —
- [Docs](/docs)will not resolve correctly when the file is fetched by an AI crawler. Always use absolute URLs. - Missing blockquote — skipping the
> summarymakes the file harder for models to parse and is non-compliant with the spec. - Wrong Content-Type — serving with
text/htmlor no content-type causes some parsers to reject the file. - Keyword stuffing descriptions — AI models read these literally. Stuffing keywords degrades the quality signal.
- Listing every page — curate your most important 10–30 links. An exhaustive sitemap
belongs in
llms-full.txt, not the index.
Related guides
- How to create llms.txt — step-by-step for any stack.
- llms-full.txt guide — full-content companion file.
- Validator — check your file for spec compliance.
- Generator — create a file from a form.
- Best practices — what to include and what to skip.
- Which AI crawlers read llms.txt — adoption status.