Skip to content
Agent-ready web7 min read

How to write an llms.txt that AI assistants actually use

Most llms.txt files are sitemaps in disguise. How to write one an AI assistant can answer from: summary, facts, links, Markdown pages, testing and upkeep.

ASDK TeamPublished 7 min read

On this page

TL;DR

  • An llms.txt file is only useful if an agent can answer real questions from it and the pages it links to. Most files fail that test because they are sitemaps with a heading on top.
  • Write it like a briefing note: a summary that answers the top questions by itself, a short list of facts agents get wrong, and 10 to 30 links with notes that say what each page answers.
  • Test it the way the proposal suggests, by giving an agent only the file and asking it questions. Then keep it in sync with your pages, or it becomes a liability.

What "actually used" means

Before writing anything, it helps to know how agents meet the file. The llms.txt proposal, revised as version 2 in August 2026, describes the intended pattern: agents "view or search llms.txt to find the information they need, then follow the relevant links." The file "stays small enough to fit in context," and "the detail lives behind the links, and is fetched only when needed." The proposal says the files are used "on demand, when an agent needs information about a topic while assisting a user," mostly for inference rather than training.

In practice, that happens in a few situations as of October 2026:

  • Coding agents and documentation tools. The proposal says files are "used most heavily for software documentation," and the AI labs publish them for their own developer docs: see Anthropic's and OpenAI's.
  • An assistant told to look. When a user gives an assistant your domain and asks a question, an agent that knows the convention may fetch /llms.txt first.
  • Audits. Chrome Lighthouse's experimental agentic browsing category requests the file and flags server errors (Lighthouse).

And one place it is not used: Google Search. Google's guide says you don't need "machine readable files, AI text files, markup, or Markdown" to appear in Search, including its AI features, and that creating them "will neither harm nor help your site's visibility or rankings in Google Search" (Google Search Central). If you want the background on who reads the file and where sources disagree, start with llms.txt explained. This article is about writing one that earns its place.

The three jobs of a good llms.txt

Every part of the file should do one of three jobs:

  1. Answer the obvious questions without a click. Who you are, what you sell, to whom, how it is priced, where you operate.
  2. Prevent the predictable mistakes. Facts an agent tends to get wrong or invent: which plan includes what, which regions you serve, what you do not offer.
  3. Route everything else. Point to the one page that answers each kind of question, with a note that tells the agent which page that is.

If a line does none of these, cut it.

Part 1: the summary that answers on its own

The format requires only an H1 with the site or project name. The blockquote after it is optional in the proposal, but it is the part an agent is most likely to read in full, so treat it as required.

A weak summary:

Markdown
# Acme Logistics

> Acme Logistics is a leading provider of innovative, end-to-end supply chain solutions.

A useful one:

Markdown
# Acme Logistics

> Acme Logistics is a freight forwarder for mid-sized manufacturers shipping between the EU and North America.
> We handle full-container and less-than-container ocean freight, customs clearance and last-mile delivery.
> Quotes are free and returned within one business day; we do not handle air freight or parcels.

The second version answers four questions an assistant will be asked: what the company does, for whom, on which routes and what it does not do. It uses the words a buyer would use. The proposal's own writing guidance is short and worth following literally: "Use concise, clear language," and "Avoid ambiguous terms or unexplained jargon."

Part 2: a facts block

After the summary, the proposal allows any Markdown except headings. Use that space for a short list of plain facts. These are the details that otherwise lead to wrong answers, because the agent has to piece them together from several pages or guess.

Markdown
Key facts:

- Ports served: Rotterdam, Hamburg, Antwerp, New York/New Jersey, Savannah, Houston.
- Minimum shipment: one pallet. No maximum.
- Customs brokerage is included for EU imports and exports; US customs is handled by a partner broker.
- Pricing: quoted per shipment. There is no subscription and no fee for the quote.
- Contact for quotes: the quote form on the website; sales replies within one business day (CET).

Rules for this block:

  • Numbers and names, not adjectives. "Six ports" beats "extensive coverage."
  • Include the "no" answers. What you do not do is exactly what agents guess at.
  • Say it the way your pages say it. If your pricing page says "per shipment," do not write "per load" here. A file that contradicts the site makes the agent less sure of both.
  • Keep it under ten lines. Everything longer belongs on a page you link to.

Each H2 section is a list of Markdown links, and each link can carry a note after a colon. The note is where most files waste their chance. Compare:

Markdown
## Services

- [Ocean freight](https://www.example.com/services/ocean-freight)
- [Customs](https://www.example.com/services/customs)
Markdown
## Services

- [Ocean freight](https://www.example.com/services/ocean-freight.md): FCL and LCL routes, transit times by lane, container types
- [Customs clearance](https://www.example.com/services/customs.md): What we file in the EU, what our US partner files, required documents

The second list tells the agent which page answers which question, so it fetches one page instead of five. Some practical rules:

  • Name sections after questions buyers ask: Services, Pricing, Coverage, Integrations, Security, Company, Contact. Avoid internal names such as "Solutions hub."
  • Pick 10 to 30 pages. The proposal describes a curated reading list, not a complete index. Your sitemap already lists everything.
  • Prefer the page with the answer over the page with the story. A plain pricing page beats a pricing blog post.
  • Use an ## Optional section for useful extras such as a changelog or case-study index. Version 2 of the proposal keeps it as a convention for "links an agent can skip when a shorter context is needed."

Part 4: make the linked pages readable

A perfect llms.txt that links to pages an agent cannot read is a dead end. Three things decide whether the links pay off.

Offer Markdown versions where you can. Version 2 of the proposal asks that pages agents may need offer clean Markdown at the same URL with .md appended or replacing the extension, for example /pricing.md. If your CMS cannot do this, link to HTML pages whose main content is in the HTML itself, not loaded later by JavaScript.

Advertise both with link relations. Version 2 adds two relations, either as HTML link elements or as an HTTP Link header (the header syntax is defined in RFC 8288). rel="alternate" type="text/markdown" points to a page's Markdown copy; rel="describedby" points to the llms.txt that covers it. An agent that lands on any page can then find the map:

Text
Link: </pricing.md>; rel="alternate"; type="text/markdown", </llms.txt>; rel="describedby"

Make sure agents get the same page as people. Login walls, consent screens and bot challenges on linked pages break the chain. Use the free agent readiness checker to see what an agent receives from a given URL.

A complete example

Putting the parts together for the fictional freight forwarder:

Markdown
# Acme Logistics

> Acme Logistics is a freight forwarder for mid-sized manufacturers shipping between the EU and North America.
> We handle full-container and less-than-container ocean freight, customs clearance and last-mile delivery.
> Quotes are free and returned within one business day; we do not handle air freight or parcels.

Key facts:

- Ports served: Rotterdam, Hamburg, Antwerp, New York/New Jersey, Savannah, Houston.
- Minimum shipment: one pallet. No maximum.
- Pricing: quoted per shipment. No subscription, no fee for the quote.

## Services

- [Ocean freight](https://www.example.com/services/ocean-freight.md): FCL and LCL routes, transit times by lane, container types
- [Customs clearance](https://www.example.com/services/customs.md): What we file in the EU, what our US partner files, required documents
- [Last-mile delivery](https://www.example.com/services/last-mile.md): Delivery areas, appointment booking, liftgate options

## Pricing and quotes

- [How pricing works](https://www.example.com/pricing.md): What a quote includes, surcharges, payment terms
- [Request a quote](https://www.example.com/quote.md): Fields we need and what happens after you submit

## Company

- [About](https://www.example.com/about.md): Offices, licenses and memberships
- [Security and compliance](https://www.example.com/security.md): Insurance cover, data handling, certifications

## Optional

- [Shipping guides](https://www.example.com/guides.md): Incoterms, packing rules, document checklists

It fits on one screen, answers the top questions without a click and routes every other question to one page.

Test it the way an assistant would use it

The proposal's last writing tip is the one most people skip: "Test your file by asking an agent questions about your content, giving it only your llms.txt as a starting point."

Collect ten real questions

Take them from sales emails, chat logs and support tickets: "Do you ship to Houston?", "Is customs included?", "How fast do I get a quote?" Include two your business says no to.

Give an agent only the file

Paste the llms.txt into an assistant, or give it the URL if it can browse, and ask it to answer using only that file and the pages it links to.

Grade every answer

Correct and specific, correct but vague, or wrong. Note which link it followed. Vague answers usually mean a missing fact in the facts block; wrong answers usually mean an outdated or contradictory page.

Fix the source, not the symptom

Change the page or the file, then ask again. Repeat until nine of ten answers are correct and specific.

Check the plumbing

Request the file with curl -sI and confirm a 200 status, a text/plain or text/markdown content type and no redirect to a login or consent page. Run Lighthouse's agentic browsing category; it flags server errors on the file.

You can also check your server or CDN logs for requests to /llms.txt and note which user agents ask for it. That tells you who reads it on your site, which is better evidence than any general claim.

Keep it true

An llms.txt file is a set of claims about your business. When it drifts from your pages, an agent can quote the outdated version back to a buyer.

  • Generate it from the same source as your pages when you can: a CMS template, a build step or a tool that reads your sitemap. Our free llms.txt generator prefills a draft from your sitemap and checks it as you type.
  • Add it to the release checklist for pricing, plan and policy changes.
  • Review it quarterly even when nothing seems to have changed. Links rot quietly.
  • Never put in the file what your pages do not say. If a fact matters, publish it on a page first, then summarize it here. The guide to writing content AI assistants quote accurately covers the page side.

Mistakes that make agents ignore the file

  • A sitemap dump. Hundreds of links without notes give an agent nothing to choose with and push the useful part out of its context window.
  • Slogans in the summary. "Leading provider of innovative solutions" answers no question.
  • Notes that repeat the link text. "Pricing: our pricing page" wastes the one place you can say what the page contains.
  • Links to blocked pages. If robots.txt disallows a page, do not list it.
  • One giant file for a large site. Version 2 supports subpath files: /docs/llms.txt covers the pages under /docs/, and agents "should use the most specific one." Split by section instead of growing the root file.
ASDK agentEarly access

Try the Agent-Ready agent in early access

Makes your site readable and usable for ChatGPT, Gemini, Claude and other AI agents.

A good llms.txt reads like the note you would hand a new sales hire on their first day: what we do, the facts people get wrong, and where to find everything else. Write it that way, test it with an agent, and keep it in step with your site. That is what makes the difference between a file that exists and a file that gets used.

Frequently asked questions

What makes an llms.txt file useful to an AI assistant?

A summary that answers the obvious questions on its own, plain facts an agent would otherwise get wrong, and a short list of links with notes that say what each page answers. Links should point to clean pages, ideally Markdown versions.

How many links should an llms.txt file have?

For most business sites, 10 to 30. The proposal keeps the file small enough to fit in an agent's context and puts detail behind links. Large documentation sites can add separate files per section, such as one for the docs folder.

How do I test an llms.txt file?

The proposal suggests it: give an AI agent only your llms.txt as a starting point and ask it questions about your business. Fix the file or the linked pages wherever the answers are wrong, vague or out of date.

Will llms.txt improve my Google rankings?

No. Google says Google Search ignores llms.txt and similar files, and that creating them neither helps nor harms rankings or visibility in its AI features. The file is for agents and tools that choose to read it.

How often should I update llms.txt?

Whenever a fact in it changes: pricing, plans, regions, integrations or key pages. The safest approach is to generate it from the same source as your pages, so the file can never contradict the site.

Sources

Pages we read for this article, with the date we checked each one.

  1. The /llms.txt file, v2 — llmstxt.org — accessed October 21, 2026
  2. llms.txt changes (v2, August 2026) — llmstxt.org — accessed October 21, 2026
  3. llms.txt audit — Lighthouse documentation — accessed October 21, 2026
  4. Optimizing your website for generative AI features on Google Search — Google Search Central (updated July 2026) — accessed October 21, 2026
  5. Claude Platform documentation llms.txt — Anthropic — accessed October 21, 2026
  6. OpenAI developer documentation llms.txt — OpenAI — accessed October 21, 2026
  7. RFC 8288: Web Linking — IETF — accessed October 21, 2026

Glossary terms in this article