Sub topic 7
llms-full.txt and Markdown Versions of Pages
Assume you understand basic HTTP, Markdown, and the purpose of llms.txt. The main decision in this chapter is whether to publish only a curated index, or also provide documentation in a format that an AI system can read with less page cleanup.
What `llms-full.txt` is
llms.txt is normally a short guide. It links to the most useful pages and explains what the site contains. llms-full.txt is a proposed companion file that places the full text of those pages into one Markdown document.
The format is not a universally enforced web standard. It is a convention used by some documentation publishers and AI tools. A typical arrangement looks like this:
/llms.txt
/llms-full.txt
/docs/quickstart
/docs/api
/docs/quickstart.md
/docs/api.mdThe short file helps a consumer choose pages. The full file reduces the number of requests needed to read the documentation.
How the files relate
A useful workflow is:
Keep llms.txt selective. It should identify canonical, maintained material. Use llms-full.txt only when combining the selected pages produces a useful document.
A combined file should preserve:
- The page title and heading hierarchy.
- Short descriptions of each section.
- Links back to the original page.
- Code examples and their language labels.
- Important warnings, version numbers, and prerequisites.
- A clear separator between source pages.
For example:
# Example API Documentation
> Combined reference for the Example API.
## Quickstart
Source: [Quickstart](https://example.com/docs/quickstart.md)
Install the client and send your first request.
## API reference
Source: [API reference](https://example.com/docs/api.md)
The API accepts JSON requests and returns JSON responses.Markdown versions of HTML pages
A Markdown page is a text representation of an HTML page. It usually removes navigation, cookie banners, visual layout, and other elements that are useful to people but distracting to text-processing systems.
You can publish Markdown as a separate URL, such as /docs/quickstart.md, or generate it from the same source used to build the HTML page. The second approach is safer because both versions can be updated together.
Avoid maintaining two independent copies. A stale Markdown page can give an AI consumer an older API name, example, or security instruction.
Use stable URLs and connect the versions clearly. The HTML page can link to its Markdown equivalent, and the Markdown page can link back to the HTML page. Keep the same title, headings, examples, and version information in both.
Trade-offs and failure modes
| Choice | Benefit | Risk |
|---|---|---|
| `llms.txt` only | Small and easy to maintain | Consumers still fetch and clean each page |
| `llms-full.txt` | One convenient text source | Large, stale, duplicated, or expensive to process |
| Separate Markdown pages | Smaller focused requests | Requires consistent generation and linking |
A full file can become too large for a consumer's context window. It can also repeat content that changes frequently. Do not treat it as a replacement for access control, authentication, or accurate HTML documentation.
Exercise
Your API documentation has 200 pages, but only 12 are current and commonly used. What should you put in llms.txt and llms-full.txt?
Show answer
Put links to the 12 maintained, relevant pages in llms.txt. Put those pages, and only those pages, into llms-full.txt if the combined document remains useful and can be generated automatically.