← GUIDES

GUIDE / SETUP NOTE

llms.txt: Write One Agents Can Use, Then Test It

Write an llms.txt under the v2 spec, check it with the reference parser, and test it with a small agent before a person publishes it.

23 Nov 2026Checked 2026-10-30
llms.txt checked with the reference parser: four of seven public files failed, a wrong heading level silently dropped a section, and a small agent got 3 of 4 right until a person rewrote one link note, then 4 of 4, though the delete answer gave a wrong reason

llms.txt proposal v2 (August 2026) and the llms-txt 0.0.7 Python package, run on 2026-10-30 against seven public llms.txt files and our own test file, with a local Ollama model (qwen2.5:3b). No key, no account.

An llms.txt file is a short markdown index that tells agents what your site is and where its clean, agent-readable pages are. The proposal reached v2 in August 2026. We checked seven public files with the reference parser: four failed to parse. Then we wrote our own and tested it with a small local model. One weak link description sent the agent to the wrong page until a person rewrote it.

The agent drafts or reads the file. A person reviews the parser result and the agent test, then publishes.

What llms.txt is (checked on 2026-10-30)

The llms.txt proposal suggests a /llms.txt markdown file at a site's root, or at any path such as /docs/llms.txt, covering the pages under that path. It holds brief background and links to markdown versions of your pages. Agents are expected to read or search the file and then follow only the links they need.

The spec, in order:

  • An H1 with the site or project name. This is the only required part.
  • A blockquote with a short summary.
  • Optional paragraphs or lists, with no headings.
  • Optional H2 sections, each a list of [name](url) links, optionally followed by : and a note.

The v2 changes add standard link relations so agents can find the files: rel="alternate" type="text/markdown" for a page's markdown copy and rel="describedby" for the llms.txt that covers it, as HTML <link> tags or an HTTP Link: header. Markdown copies can be page.html.md or page.md. The ## Optional section is now only a convention for secondary links.

Chrome's Lighthouse has an llms.txt audit. It flags a server error when fetching the file and marks a missing file (404) as not applicable.

Based on llms.txt, by Jeremy Howard and contributors. The repository is Apache-2.0.

The setup at a glance

  • Trigger: you publish or update docs that agents should be able to use.
  • Permissions: the agent may draft the file and run checks. It may not publish to your site.
  • Output: an llms.txt, a parser result, and a short agent test with the questions, the page each answer came from, and the answer.
  • Human approval: a person reads the file, the parser output and the agent test, fixes weak link notes, and only then publishes.

Step 1: Write the file

Keep it small. Here is the file we first tested, for a made-up notes app. The parser checks below ran on this version:

markdown
# Example Notes

> Example Notes is a small notes app with a REST API. Notes are plain text, stored per user, and deleted notes cannot be recovered.

Important notes:

- Every API call needs a personal access token in the Authorization header.
- Deleting a note is permanent. There is no trash folder.

## Docs

- [Quick start](YOUR-SITE/docs/quickstart.html.md): Create a token and your first note
- [API reference](YOUR-SITE/docs/api.html.md): Every endpoint, with request and response examples
- [Limits](YOUR-SITE/docs/limits.html.md): Rate limits and maximum note size

## Optional

- [Changelog](YOUR-SITE/docs/changelog.html.md): Release history

We revised one line after the agent test. With the note above, the agent sent a question about deleted notes to the Limits page, because nothing in the list said where deletes were covered. A person rewrote the API reference note to:

markdown
- [API reference](YOUR-SITE/docs/api.html.md): Every endpoint (list, create, delete), with examples. Deletes are permanent

The results for both versions are in the test table below.

Replace YOUR-SITE with your full address, such as https:// and your domain; our test file used full URLs. Point links at markdown copies of your pages, not the HTML. Our test server also sent a Link: header on each HTML page pointing to its .md copy and to /docs/llms.txt.

Step 2: Check it with the reference parser

bash
pip install llms-txt
python -c "from llms_txt import parse_llms_file; print(parse_llms_file(open('llms.txt').read()))"

The llms-txt package (0.0.7, Python 3.10 or later) parses the file into title, summary, info and sections. It also installs llms_txt2ctx, which fetches every link into one context file and skips ## Optional by default. v2 no longer treats that tool as part of the proposal, but it still works.

Step 3: Test it with an agent

The spec's own advice: ask an agent questions about your content, giving it only your llms.txt as a starting point. We gave a local model the file and asked it to pick one link, then answer from that page only. A person reads every pick and answer.

The qwen2.5:3b weights are under the "Qwen RESEARCH LICENSE AGREEMENT", for non-commercial use only; check the model card before any commercial use.

What our test showed

CheckResult
Public files through the parserFastHTML, OpenAI and Cloudflare parsed. Gemini, Anthropic, Stripe and Svelte raised an AttributeError
Why they failedGemini: 2 list items with no link title, e.g. - (https://...). Anthropic and Stripe: H3 headings and plain-text list items. Svelte: a ## Notes section of plain-text items
File sizeAnthropic 93,771 bytes and Stripe 97,295 bytes; FastHTML 4,796 bytes
Our fileParsed: 2 sections, 4 links, all to .md pages
One list item without a linkParser failed with an AttributeError that does not say which line
### Optional instead of ## OptionalNo error. The Optional section silently disappeared
llms_txt2ctx1,088 bytes of context; the changelog was left out unless --optional True
Agent test, first version3 of 4 right. Asked "If I delete a note by mistake, can I get it back?", it opened the Limits page and answered that the page did not say. Same on both seeds
Agent test, after a person rewrote one link note4 of 4 right on both seeds. The delete answer was correct ("No") but gave a wrong reason, that a 204 response means it cannot be recovered

Things to know

  • The reference parser is strict and its errors are vague. Big, real files often break it, and agents may still read them fine. Treat a parse failure as a prompt to check, not proof the file is useless.
  • A heading at the wrong level can drop a whole section with no warning. Read the parser's section list, not just "no error".
  • Link notes do the real work. The agent picked pages from the notes, so a vague note sent it to the wrong page.
  • Keep the file small. The spec says it should fit in context, with detail behind the links.
  • Read the agent's answers, not only its picks. A right answer can come with a wrong reason.
  • llms.txt is a proposal, not a standard body's spec, and Lighthouse marks a missing file as not applicable rather than failing it.

Takeaway

Write a small llms.txt that links to markdown pages, run the reference parser and read what it found, then ask an agent real questions using only the file. Have a person fix weak link notes and approve the file before it goes live.

Next step: write four questions your users actually ask, run them against your llms.txt with any agent, and have a person check which page each answer came from.

How we check the tools we list is on our verification page.

Good setups, worth keeping. Request email updates on the home page, then confirm by email. No subscription starts until you confirm. Or find an agent for the job.

Your privacy choices

Choose optional tools. Rejecting them keeps the setup library available. Advertising consent stays off.

Choices stay in this browser for 90 days. You can change them using Privacy settings. Privacy and cookie details