Skip to content
For developers6 min read

llms.txt explained, with examples (2026)

What llms.txt is, the exact format from the v2 proposal, how it differs from robots.txt and sitemaps, and real examples you can copy for a docs site or product.

By TeaserTrack Team

Published

A quiet library with bookshelves and a reading area, like the curated index an llms.txt file gives an AI agent
On this page

    llms.txt is a Markdown file at the root of a website, at /llms.txt, that gives AI agents a short, curated map of the site: what it is, and links to the pages worth reading, ideally in clean Markdown. Jeremy Howard proposed it in September 2024, and the proposal reached version 2 in August 2026. The facts below come from the proposal at llmstxt.org and from real files, checked on 8 November 2026.

    Why it exists

    Agents read websites all the time now: a coding agent fetches a library's docs to get an API call right, and a chat assistant reads product pages to answer a question. But web pages are built for people, with navigation, scripts and ads around the content, and context windows are still too small for most whole sites. llms.txt gives an agent a short entry point and lets it fetch only the detail it needs.

    The v2 proposal says thousands of sites now publish one, documentation platforms generate it automatically, and Chrome's Lighthouse checks sites for one as part of its agentic browsing audits. OpenAI, Anthropic and Google publish llms.txt files for their own developer docs.

    The format

    The file is Markdown, but in a fixed order so a program can parse it as well as a model can read it:

    1. An H1 with the name of the project or site. This is the only required part.
    2. A blockquote with a short summary that holds the key facts needed to read the rest.
    3. Optional paragraphs or lists, with no headings, that explain how to use the links.
    4. Zero or more H2 sections, each a list of links in the form [name](url): notes.
    5. By convention, a section called ## Optional for links an agent can skip when it needs a shorter context.
    Diagram of the five parts of an llms.txt file in order: an H1 name, a blockquote summary, plain notes, H2 sections of links, and an Optional section.
    Only the H1 is required. The rest is optional but makes the file far more useful.

    A minimal example

    To build your own from a form, or to check a file you already have, use the free llms.txt generator. It runs in your browser.

    # Acme API
    
    > Acme is a REST API for sending invoices. All requests use an API key in the Authorization header.
    
    Prices are in US dollars. The sandbox at sandbox.acme.dev never charges a card.
    
    ## Docs
    
    - [Quick start](https://acme.dev/docs/quick-start.md): create a key and send a first invoice
    - [Invoices API](https://acme.dev/docs/invoices.md): every endpoint, with examples
    - [Errors](https://acme.dev/docs/errors.md): error codes and what to do
    
    ## Optional
    
    - [Changelog](https://acme.dev/changelog.md)
    

    Markdown copies of your pages

    The proposal pairs llms.txt with a second idea: offer a clean Markdown version of each page at the same URL with .md added, for example page.html.md, or with the extension replaced, as in page.md. Links in llms.txt should point to those Markdown files, so the agent gets the content without the page around it. The v2 proposal also suggests standard link relations: rel="alternate" type="text/markdown" for the Markdown copy, and rel="describedby" for the llms.txt file that covers the page.

    A file can also sit below the root, such as /docs/llms.txt, and then it covers only the pages under /docs/. When more than one file applies, agents should use the most specific one.

    Close view of a full bookshelf with books on many subjects.
    Think of llms.txt as the shelf labels, and the Markdown pages as the books.

    A real example: Fly.io

    Fly.io publishes a file at fly.io/llms.txt. It follows the format: an H1 with the name, a blockquote that says what Fly.io is in two sentences, short notes on the main products with links, then H2 sections for Product, Documentation, SDKs and client libraries, Security and compliance, Payments and Pages, holding more than 30 links when we checked on 12 November 2026. Its notes also say every page on the site has a Markdown version, which is the second half of the proposal in practice.

    llms.txt, robots.txt and sitemaps

    They do different jobs and work together. robots.txt tells crawlers what they may fetch. A sitemap lists every page for search engines. llms.txt is a short, hand picked overview for agents at the moment they need an answer, and the proposal says it can complement robots.txt by giving context for the content you allow. It does not block or allow anything.

    How to write a good one

    • Lead with the facts an agent gets wrong. Pricing units, auth, limits, the current version.
    • Link to Markdown, not to HTML. If your docs tool can export .md pages, use them.
    • Keep it small. The detail lives behind the links. Move secondary links to ## Optional.
    • Keep it current. Generate it from your docs in the build, so it never drifts.

    If you build for coding agents, read what AGENTS.md is and how to write one, the file that gives agents instructions inside a repository. For the models those agents run on, see the LLM API pricing pages.