> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiJiNjdlZGM2My1mNjIwLTQ5NzEtODIyNC0wZDY0Y2JjZjcwZmQiLCJleHAiOjE3ODExNzQ1MzMsImlhdCI6MTc4MTE3NDIzM30.ua2h8YmtqlBporXCQvvcgTyoftV0oLSXNoXFy74ma6k
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# `llms.txt` and `llms-full.txt`

> Fern automatically generates llms.txt and llms-full.txt Markdown files so AI tools can discover and index your documentation.

[`llms.txt`](https://llmstxt.org/) is a standard for exposing website content to AI developer tools. Fern implements this standard, automatically generating and maintaining `llms.txt` and `llms-full.txt` Markdown files so AI tools can discover and index your documentation. For single pages, agents can also fetch [Markdown directly](/learn/docs/ai-features/markdown).

`llms.txt` and `llms-full.txt` are root-level files Fern serves to non-human consumers, alongside [`robots.txt`](/learn/docs/seo/robots-txt). `robots.txt` decides which crawlers reach your site and what AI training signals you broadcast; `llms.txt` and `llms-full.txt` shape what AI agents receive once they do.

<img src="https://files.buildwithfern.com/fern.docs.buildwithfern.com/learn/1c185b18406eca1fab6e4bb38b78cccf02f4eb6de5fbb5f179230f1ccd600730/products/docs/pages/ai/llms-txt/llms-txt.png" alt="Example of using llms.txt" />

## Generated files

Fern generates two files for LLMs:

* **`llms.txt`** contains a lightweight summary of your documentation site with each page distilled into a one-sentence description and URL. For sites with API endpoints, it also links to your [OpenAPI specification](/learn/docs/developer-tools/openapi-spec) as a standalone, machine-readable file so AI tools can parse your full API schema directly. For sites with WebSocket channels, it also links to your [AsyncAPI specification](/learn/docs/developer-tools/asyncapi-spec).

* **`llms-full.txt`** contains complete documentation content including the full text of all pages. For API documentation, this includes your complete API Reference with resolved OpenAPI specifications and SDK code examples for enabled languages.

Both files are available at any level of your documentation hierarchy (`/llms.txt`, `/llms-full.txt`, `/docs/llms.txt`, `/docs/ai-features/llms-full.txt`, etc.).

Examples: [Eleven Labs llms.txt](https://elevenlabs.io/docs/llms.txt), [Cash App llms-full.txt](https://developers.cash.app/llms-full.txt).

## Page descriptions

Both files include page descriptions pulled from [frontmatter](/learn/docs/configuration/page-level-settings). Fern uses the `description` field if present, otherwise falls back to `subtitle`.

```mdx title="Frontmatter"
---
title: Fern Docs
subtitle: Build beautiful documentation websites with Fern.
---
```

The output format depends on whether you're requesting an individual page or a section:

Both `llms.txt` and `llms-full.txt` return the same format:

```txt title=".../page/llms.txt and .../page/llms-full.txt"
# Fern Docs

> Build beautiful documentation websites with Fern.
```

The two files differ:

```txt title=".../section/llms.txt"
- [Fern Docs](https://example.com/docs): Build beautiful documentation websites with Fern.
```

```txt title=".../section/llms-full.txt"
# Fern Docs

> Build beautiful documentation websites with Fern.
```

## Learn more

Exclude pages, filter content with tags, or serve your own custom files.

Configure the default directive prepended to every page served to AI agents.

Track LLM traffic and surface `llms.txt` endpoints to readers.