What the file is for
An llms.txt is a plain text index of your site, written for a reader that cannot execute JavaScript and has no interest in your layout. It sits at the root, at /llms.txt, and it is served as text/plain.
A sitemap tells a crawler which URLs exist. An llms.txt tells an assistant which of them matter and what each one is. That difference is the whole point: the assistant is choosing what to read, not what to index.
The shape that works
Start with an H1 naming the company. Follow it with a single blockquote paragraph saying what you do and who for. That paragraph is the part an assistant quotes when someone asks about you, so it is worth more attention than the rest of the file combined.
Then group your links under H2 headings by section: documentation, pricing, product, support. Each link gets the URL and a short note on what is there. Keep it under a few hundred lines. It is an index, not a mirror.
The common mistakes
Serving HTML at /llms.txt is the most frequent one. A single page app that answers every unknown path with its shell will return 200 and a page of markup, and every checker will read that as a missing file.
The second is writing marketing copy in the summary paragraph. An assistant summarising your product will reuse your words. Vague words in, vague words out.