> ## Documentation Index
> Fetch the complete documentation index at: https://www.mintlify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# llms.txt

> Automatically generate llms.txt and llms-full.txt files so AI tools like ChatGPT and Claude can index and understand your documentation.

export const PreviewButton = ({children, href}) => {
  return <a href={href} className="text-sm font-medium text-white dark:!text-zinc-950 bg-zinc-900 hover:bg-zinc-700 dark:bg-zinc-100 hover:dark:bg-zinc-300 rounded-full px-3.5 py-1.5 not-prose">
        {children}
      </a>;
};

The [llms.txt file](https://llmstxt.org) is an industry standard that helps large language models (LLMs) index content more efficiently, similar to how a sitemap helps search engines. AI tools can use this file to understand your documentation structure and find content relevant to user queries.

Mintlify automatically hosts an `llms.txt` file at the root of your project that lists all available pages in your documentation. This file is always up to date and requires zero maintenance. You can optionally add a custom `llms.txt` file to the root of your project.

<Note>
  Authentication affects `llms.txt` and `llms-full.txt` differently depending on your site configuration:

  * **Fully authenticated sites**: Both files require authentication. AI tools that cannot authenticate cannot access them.
  * **Partially authenticated sites**: Both files are publicly accessible, but only list public pages and exclude pages restricted to user groups.

  For more information on how authentication affects AI features, see [Feature availability](/docs/deploy/authentication-setup#feature-availability).
</Note>

View your `llms.txt` by appending `/llms.txt` to your documentation site's URL. Mintlify also hosts the file at `/.well-known/llms.txt` for compatibility with tools that follow the `.well-known` convention.

<PreviewButton href="https://mintlify.com/docs/llms.txt">Open the llms.txt for this site.</PreviewButton>

Mintlify adds HTTP headers to every page response so AI tools can discover your `llms.txt` files and other agent resources without prior knowledge of their location:

* `Link`: Follows the standard HTTP `Link` header format for resource discovery. Advertises `llms.txt`, `llms-full.txt`, your API catalog, [MCP server card](/docs/ai/model-context-protocol#discovery-endpoint), [agent card](/docs/ai/skillmd#agent-card), and [agent skills index](/docs/ai/skillmd#skills-discovery-endpoints).
* `X-Llms-Txt`: A convenience header for tools that check for `llms.txt` support.

```http Response headers theme={null}
Link: </llms.txt>; rel="llms-txt", </llms-full.txt>; rel="llms-full-txt", </.well-known/api-catalog>; rel="api-catalog", </.well-known/mcp/server-card.json>; rel="mcp-server-card", </.well-known/agent-card.json>; rel="agent-card", </.well-known/agent-skills/index.json>; rel="agent-skills"
X-Llms-Txt: /llms.txt
```

Sites that use authentication also advertise their OAuth protected resource metadata with `rel="oauth-protected-resource"`. If you serve your documentation under a base path, every advertised path includes that prefix.

## Structure of the llms.txt file

An `llms.txt` file is a plain Markdown file that contains:

* **Site title** as an H1 heading.
* **Site description** as a blockquote summary below the title, sourced from the `description` field in your `docs.json` configuration.
* **Custom agent instructions** as an `Agent Instructions` block after the description, if you set [`markdown.instructions`](/docs/ai/markdown-export#custom-agent-instructions) in your `docs.json`.
* **Structured content sections** with links and a description of each page in your documentation.
* **API specification links** to your OpenAPI and AsyncAPI specs, if your documentation includes them.
* **External links** in an `Optional` section, for any absolute URLs in your navigation.

The `llms.txt` file lists your pages in the order they appear in your `docs.json` navigation. Pages that aren't in your navigation but that `seo.indexing: "all"` includes appear last, in alphabetical order. Page links in the `llms.txt` file include a `.md` extension so AI tools can fetch the Markdown version of each page directly.

Each page's description comes from the `description` field in its frontmatter. Mintlify uses the first paragraph of the description and truncates it at 300 characters. Pages without a `description` field appear in the `llms.txt` file without a description.

Both `llms.txt` and `llms-full.txt` list pages from your default language and default version. They exclude [hidden pages](/docs/organize/hidden-pages) and pages with `noindex: true` in their frontmatter unless you set `seo.indexing: "all"` in your `docs.json`.

This structured approach allows LLMs to efficiently process your documentation at a high level and locate relevant content for user queries, improving the accuracy and speed of AI-assisted documentation searches.

<Note>
  Automatically generated `llms.txt` index files cannot exceed 100,000 characters. For large documentation sites, Mintlify splits the index into linked files under `/_llms/` so agents can discover every page without loading one oversized file. This limit does not apply to `llms-full.txt`.
</Note>

If you use a reverse proxy or maintain a path allowlist, forward `/_llms/*` in addition to `/llms.txt` so agents can follow the generated index links. For documentation hosted at a base path, forward `<base-path>/_llms/*` instead. Mintlify-managed custom domains do not require additional configuration. See [Reverse proxy](/docs/deploy/reverse-proxy#routing-configuration) for routing guidance.

```mdx Example llms.txt theme={null}
# Site title

> A brief description of the documentation site.

## Docs

- [API](https://example.com/docs/api.md): Endpoint list and usage
- [Install](https://example.com/docs/install.md): Setup steps
- [Getting started](https://example.com/docs/start.md): Intro guide

## OpenAPI Specs

- [openapi](https://example.com/docs/openapi.json)

## AsyncAPI Specs

- [asyncapi](https://example.com/docs/asyncapi.yaml)

## Optional

- [Community](https://example.com/community)
```

## llms-full.txt

The `llms-full.txt` file combines your entire documentation site into a single file as context for AI tools and LLM indexing. Each page appears as its title, source URL, description, and full Markdown content.

Mintlify automatically hosts an `llms-full.txt` file at the root of your project. View your `llms-full.txt` by appending `/llms-full.txt` to your documentation site's URL. Mintlify also hosts the file at `/.well-known/llms-full.txt` for compatibility with tools that follow the `.well-known` convention.

<PreviewButton href="https://mintlify.com/docs/llms-full.txt">Open the llms-full.txt for this site.</PreviewButton>

## Custom files

To add a custom `llms.txt` or `llms-full.txt` file, create an `llms.txt` or `llms-full.txt` file at the root of your project. Adding a custom file overrides the automatically generated file of the same name. If you delete a custom file, Mintlify restores the automatically generated file.

Your custom `llms.txt` or `llms-full.txt` file must have a site title as an H1 heading. Other content is optional. See [Format](https://llmstxt.org/#format) in the `llms.txt` specification for more information on optional sections and best practices.


## Related topics

- [GEO guide: Optimize docs for AI search and answer engines](/docs/guides/geo.md)
- [Glossary](/docs/reference/glossary.md)
- [Mintlify CLI command reference](/docs/cli/commands.md)
