# llms.txt and llms-full.txt

> For the complete documentation index, see [llms.txt](https://preview.writedocs.io/llms.txt).

The always-on, zero-config site index and full-content export AI tools look for.

Every writedocs site automatically serves two extra routes — no `writedocs.json` field needed to turn them on, and nothing to configure for the common case.

## `/llms.txt`

A lightweight, one-line-per-page index: a title, a link, and (when the page's frontmatter sets one) its `description`, truncated to the first line and 300 characters, under headings that follow your navigation — tabs, versions, languages, products, groups. Follows the [llms.txt](https://llmstxt.org) convention several AI tools already look for by default.

```md
# Site Name

> The site's own writedocs.json description.

## Guides

- [Getting started](https://docs.example.com/getting-started/): Setup steps.

## API Reference

- [Overview](https://docs.example.com/api/): Endpoint list and usage.
```

A file an AI tool loads whole should stay small, so each file holds at most 100,000 characters. A bigger site's `llms.txt` becomes a directory: its largest sections move into their own files under `/llms/` (for example `/llms/api-reference.md`), linked from where they were, and a section still too big is split the same way. Every page stays listed.

Each link's shape depends on two other fields you may already have set:

- **`domain`** — if set, every link is absolute (`https://docs.example.com/...`); otherwise links are relative, same as `sitemap.xml`'s own dependency on `domain` (see [SEO and sitemap](https://preview.writedocs.io/docs/configuration/seo-and-sitemap/)).
- **`contextMenu`** — unless it's `false`, every link points at that page's Markdown copy (`/page.md`, see [Contextual menu](https://preview.writedocs.io/docs/configuration/context-menu/)) so an AI tool can fetch it directly; with `false`, links point at the normal HTML page.

A page with frontmatter `seo.noindex: true` is left out of `llms.txt`, for the same reason it's left out of `sitemap.xml` — both exist to help external tools *discover* pages, which is exactly what `noindex` opts out of.

## `/llms-full.txt`

The entire site's content, concatenated into one file — every page's title, URL and Markdown body, in navigation order. The body is what the page shows: imported snippets are included and `variables` are filled in, while code examples stay exactly as written. Meant as a single blob of context for an AI tool that wants everything at once, rather than fetching page by page.

API reference pages - generated from a spec, or a page with `openapi` in its frontmatter - are included with their endpoint written out from the spec: method and path, description, parameters, body fields, responses and examples.

## How an AI agent finds them

An agent that opens one page of your site has no way to know there's an index of all of them. So every page says so, with nothing to set up:

- **In each page's HTML**, the first thing in the page is a short note with a link to `/llms.txt`, which also says that every page has a Markdown version at its address plus `.md`. People don't see it - it's hidden from sight and from screen readers - but an agent reading the page's HTML does, before the navigation.
- **In each page's [Markdown copy](https://preview.writedocs.io/docs/configuration/context-menu/)**, right under the title:

  ```md
  # Quickstart

  > For the complete documentation index, see [llms.txt](https://docs.example.com/llms.txt).
  ```

The link is a full URL when [`domain`](https://preview.writedocs.io/docs/configuration/seo-and-sitemap/#domain) is set. The **Copy page** menu copies the page's Markdown with this line in it.

A page's Markdown copy is written to be read away from your site: after the title and that line comes the page's `description`, then its content, with links and images from the site's root (`/docs/setup/`) written as full URLs when `domain` is set. `llms-full.txt` and the [MCP server](https://preview.writedocs.io/docs/configuration/mcp/) get the same full URLs.

### Components, as Markdown

In a page's Markdown copy, in `llms-full.txt` and in the MCP server, components are written as the Markdown that says what they show, so an AI tool reads the page and not its tags:

| On the page | In the Markdown |
| --- | --- |
| A `Parameter`: name, type and labels | **`amount`** `integer` required, then its description |
| An `Accordion`, a `Tab`, an `Expandable` | Its title in bold, then its content |
| `Steps` | Each step's number and title in bold, then its content |
| A callout (`Callout`, `Note`, `Warning`...) | A blockquote, starting with its title or its kind |
| A `Card` or `Tile` | Its title as a link, then its text |
| An `Image`, a `Frame` | The image, and its caption in italics |
| `Badge`, `Tooltip` | Their text, in the sentence |

Groups - `CardGroup`, `AccordionGroup`, `Tabs`, `Columns`, `CodeGroup` - disappear, leaving what's inside them. Code examples are never changed. A component of your own, from a snippet, stays as you wrote it.

Comments in a page's source - `{/* ... */}` - are left out, as they are from the page itself.

With `"contextMenu": false`, pages have no Markdown copy, and the note in the HTML only names `/llms.txt`.

## Custom overrides

Drop a hand-written `llms.txt` or `llms-full.txt` file at your project root (next to `writedocs.json`) to replace the auto-generated version outright — useful if you want editorial control over ordering, descriptions, or extra sections the generator doesn't produce. Delete the file to fall back to the auto-generated version again.