llmstxt.org v2 spec · Updated 2026

The Complete llms.txt Format Guide

Everything you need to write a spec-perfect llms.txt file: the official format, every element explained, a valid end-to-end example, common mistakes, and answers to the questions developers ask most.

What Is the llms.txt Format?

llms.txt is a plain Markdown file, conventionally placed at the root of a website (https://your-domain.com/llms.txt), that gives AI engines — ChatGPT, Claude, Gemini, Perplexity, coding agents — a curated, human- and LLM-readable index of your content. The proposal was published in 2024 by AI researcher Jeremy Howard and the canonical specification lives at llmstxt.org (v2, August 2026). It's the LLM equivalent of robots.txt: instead of telling crawlers what not to visit, it tells agents exactly what is worth reading — in one small file that fits comfortably in a context window.

Why should developers and site owners care about the format itself? Because adoption is no longer hypothetical: Chrome's Lighthouse audits sites for an llms.txt file, documentation platforms such as Mintlify and GitBook generate one automatically, and OpenAI, Anthropic, and Google all publish llms.txt files for their own docs. An invalid or badly structured file fails the audit, confuses parsers, and costs you visibility in AI answers — so knowing the exact structure matters.

The llms.txt Specification, Element by Element

The format is deliberately minimal: it uses Markdown as the structure language, and it can be parsed with plain regex and a list parser. Per the llmstxt.org v2 specification, a valid file contains the following elements in this order:

  1. H1 heading (# Site Name) — the name of the project or site. This is the only required element in the whole file. An optional byte-order mark (BOM) may precede it.
  2. Blockquote summary (> ...) — an optional one- or two-line summary containing the key context needed to understand everything else in the file.
  3. Free-form notes — zero or more Markdown sections (paragraphs, lists, and so on) of any type except headings, giving agents more detail about the project and how to interpret the links below.
  4. H2 sections (## Section Name) — zero or more sections that each contain a "file list": a Markdown list of links where further detail lives. A section named ## Optional is used by convention for secondary links that agents can skip when context is short.
  5. Link list items — each entry is a Markdown hyperlink [text](url), optionally followed by a colon and a short note about the file: - [API reference](https://site.dev/api.md): Complete REST API docs.

Two additional rules keep files machine-readable:

One more scoping rule: an llms.txt file doesn't have to live at the site root. It can be placed at any path (e.g. /docs/llms.txt) and then covers all URLs under that path. Where multiple files apply, agents should use the most specific one.

llms.txt Structure: Element Reference Table

ElementRequired?Description
Byte-order mark (BOM)OptionalMay precede the file content; parsed and skipped by tools.
H1 heading (# Name)Yes — the only required elementName of the site or project.
Blockquote (> ...)OptionalShort summary with the key context for interpreting the file.
Free-form notesOptionalParagraphs and lists with more detail; any Markdown except headings.
H2 sections (## Name)OptionalDelimit "file lists" of links; ## Optional is reserved by convention for secondary links.
Link list items ([text](url))Inside H2 sectionsRequired Markdown hyperlink, optionally followed by : description.
Absolute URLsYesEvery link must be a full https://… address; no relative paths.

A Complete, Valid llms.txt Example

Here is a full example that follows the v2 specification exactly — H1, blockquote, notes, H2 file lists, absolute URLs, and a trailing ## Optional section:

# Acme Documentation

> Acme is a developer platform for building and deploying serverless applications in Python and TypeScript.

Important notes:
- All APIs below are stable; existing endpoints never break compatibility.
- Examples assume the latest CLI, installable with `pip install acme-cli`.

## Important links

- [Acme quick start](https://acme.dev/docs/quickstart.md): Set up your first app in 10 minutes
- [REST API reference](https://acme.dev/docs/api.md): Complete API reference with request/response examples
- [CLI reference](https://acme.dev/docs/cli.md): Every command and flag of the acme CLI

## Guides

- [Deploying to production](https://acme.dev/docs/guides/production.md): Scaling, monitoring, and rollbacks
- [Authentication](https://acme.dev/docs/guides/auth.md): API keys, OAuth, and JWT handling

## Optional

- [Changelog](https://acme.dev/changelog.md): Release notes for all past versions

Notice the structure: one H1 at the top, one blockquote, a short notes block (no headings), then only H2 sections containing link lists. The file stays small enough to fit in a context window — agents fetch the linked Markdown pages only when they need detail.

llms.txt vs llms-full.txt: What's the Difference?

The official specification defines only llms.txt. llms-full.txt is a widely adopted convention (pioneered by sites like OpenAI's and Anthropic's docs) for publishing the complete, expanded version of your documentation — every section in full, not just links to it.

llms.txtllms-full.txt
StatusDefined by the llmstxt.org proposalUnofficial, community convention
ContentCurated index: H1, summary, links to detailThe full content itself, expanded and complete
SizeSmall — fits in an LLM context windowLarge — fetched on demand for deep answers
UsageEntry point: agents read it firstReferenced from llms.txt; fetched when needed

In practice you add one link to llms-full.txt inside your llms.txt (for example under an ## Important links section), so agents that need the full picture know where to find it — without loading it into context by default.

Common llms.txt Format Mistakes (and How to Fix Them)

Here is a file that fails the specification in several ways at once:

Acme Documentation

## What is Acme?

- [Homepage](/)
- [API reference](/docs/api)

# this line was meant to be a comment

## Pricing info

Acme costs $20 per month for the Pro plan.

What's wrong, and how to fix it:

Not sure if your file is valid? Run it through the free llms.txt validator — it checks the structure against the spec and scores AI-readiness in seconds.

llms.txt Format FAQ

Is llms.txt an official standard?

Not yet. It's an open, community-driven proposal maintained on GitHub by AnswerDotAI (the llmstxt.org authors), not a W3C or IETF standard. That said, adoption is broad and growing — Chrome Lighthouse audits for it, and platforms like Mintlify, GitBook, Wix, and Yoast generate the file automatically.

Where should the llms.txt file be placed?

At the site root, next to robots.txt: https://your-domain.com/llms.txt. It can also live at any subpath (e.g. /docs/llms.txt) to cover only the pages under that path — agents use the most specific file that applies.

How often should I update my llms.txt file?

Whenever your content structure changes meaningfully: new sections, renamed pages, removed or updated documentation. A monthly review is plenty for most sites, and a full regeneration after any redesign. Stale links are the fastest way to lose an agent's trust in your file.

Ready to write a spec-perfect llms.txt?

Generate your file in under a minute, then validate it against the specification — free, no sign-up.

⚡ Generate your llms.txt Check my file