ExplainedShare

What is llms.txt? How the file guides AI agents through a website's content

Proposed in 2024, llms.txt is a markdown file that introduces a website and uses links to point AI agents to the content they should read first.

By MOBAEO Newsroom··3 min read

Follow
Close-up of hands holding an open book showing its table of contents.
Photo: aboodi vesakaran/Pexels

llms.txt is a markdown file that a website publishes to help language models and AI agents find what they need. It lives at the root of the domain (/llms.txt) or at any path within it, such as /docs/llms.txt. The file contains a summary of the site, guidance and links to more detailed content.

The idea emerged in 2024 and is now in its second version, described on the official llms.txt website. It starts from a simple observation: agents use websites all the time. A coding assistant reads a library's documentation, and a chat assistant with search reads pages to answer questions about a product. HTML pages, however, are built for people, with navigation, ads and JavaScript wrapped around the information, and turning all of that back into clean text is hard and imprecise.

Then there is the question of space. Model context windows have grown, but they are still too small for most entire websites, and every wasted token costs time and money. llms.txt gathers the concise information an agent needs in a single place.

How the file is organized

The specification sets out an order. The only required section is an H1 heading with the name of the project or site. It can be followed by a blockquote with a short summary, paragraphs or lists with more detail, and H2 sections that group lists of links, each with a name and, if the author wishes, a note about the content.

By convention, a section called "Optional" holds secondary links, which an agent can skip when it needs to save context. The file can be read by both people and models, and the format is precise enough to be processed by standard tools such as parsers and regular expressions.

The original proposal, published by Answer.AI on September 3, 2024, explains the reasoning: the people who write a website know better than anyone which content a model should use. Assembling the context is left to each tool, and the author simply signals what matters most.

Markdown versions and adoption

The proposal also suggests that important pages offer a clean markdown version at the same URL, with .md appended. To help agents find these files, it recommends using the alternate link relation, which points to the markdown version, and describedby, which points to the llms.txt file that covers the page.

According to the current version, thousands of websites already publish the file, documentation platforms generate it automatically, and Chrome's Lighthouse checks for it as part of its agent browsing audits. OpenAI, Anthropic and Gemini publish llms.txt files for their developer documentation.

Why it matters for a brand

Today the heaviest use is in software documentation, but the same structure works for a company presenting its organization and policies, or for an online store organizing its product categories and policies. The file was designed to coexist with existing standards: the sitemap lists every page for search engines, while llms.txt offers a curated view for models. It can complement robots.txt and point to the site's structured data.

For anyone working in brand, AEO or GEO, llms.txt is a way to tell agents, in the company's own words, which pages explain who it is and what it offers, in a format they read with ease.

Key questions

Does llms.txt replace the sitemap or robots.txt?

No. It was designed to coexist with those standards: the sitemap lists every page for search engines, while llms.txt offers a curated view for models and can complement robots.txt.

What does the file need to include at a minimum?

Just an H1 heading with the name of the project or site. The summary, details and lists of links are optional.

Where should the file live?

At the root of the site, at /llms.txt, or at any path, such as /docs/llms.txt, covering the pages beneath it.

Sources: Site oficial do llms.txt, Answer.AI, GitHub.