Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vale/styles/FernStyles/Acronyms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ exceptions:
- MDX # Fern-specific
- SEO # Fern-specific
- AWS # Fern-specific
- LLM # Fern-specific
54 changes: 31 additions & 23 deletions fern/products/docs/pages/seo/llms-txt.mdx
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
---
title: llms.txt
subtitle: Enable tools like Cursor, GitHub Copilot, ChatGPT, and Claude to quickly understand your documentation.
description: Learn how your documentation becomes accessible to AI tools using the llms.txt standard. Make your docs AI-friendly.
layout: guide
description: Enable tools like Cursor, GitHub Copilot, ChatGPT, and Claude to understand your documentation.
---

## What is llms.txt?
[LLMs.txt](https://llmstxt.org/) is an emerging standard so that websites can easily expose information to AI developer tools.
LLMs thrive on concise, structured information, and `llms.txt` help them locate and interpret key information in your developer documentation with ease.
No configuration required--your `llms.txt` files are automatically generated and maintained, just like a `sitemap.xml` or `robots.txt`.
[llms.txt](https://llmstxt.org/) is a standard for exposing website content to AI developer tools. Fern automatically generates and maintains `llms.txt` and `llms-full.txt` files for your documentation site.

### llms.txt
- **Small and fast**: Quick to load and easy to parse.
- **Summary-focused**: Each page distilled into a one-sentence description with its URL.
- **Structured for AI**: Helps tools understand the overall structure of your documentation.
## `llms.txt`

See an example: [docs.cohere.com/llms.txt](https://docs.cohere.com/llms.txt)

### llms-full.txt
- **Comprehensive**: Includes the full content of your documentation.
- **API-Ready**: Automatically incorporates your full API reference and SDK snippets (if generated by Fern).
- **Token efficient**: Removes unnecessary formatting to be as token-efficient as possible.
Contains a lightweight summary of your documentation site with each page distilled into a one-sentence description and URL. The format is structured to help AI tools parse and understand your documentation's hierarchy and organization.

See an example: [docs.cohere.com/llms-full.txt](https://docs.cohere.com/llms-full.txt)
`llms.txt` is available at any level of your documentation hierarchy (e.g., `/llms.txt`, `/docs/llms.txt`, `/v1/api-reference/llms.txt`).

Check failure on line 12 in fern/products/docs/pages/seo/llms-txt.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Foreign] Use 'for example' instead of 'e.g.,'. Raw Output: {"message": "[Microsoft.Foreign] Use 'for example' instead of 'e.g.,'.", "location": {"path": "fern/products/docs/pages/seo/llms-txt.mdx", "range": {"start": {"line": 12, "column": 71}}}, "severity": "ERROR"}

## View in Action
When Fern detects an LLM bot accessing your documentation, it automatically serves Markdown instead of HTML, reducing token consumption by 90%+.

Check out the llms.txt files for this site:
- `https://buildwithfern.com/learn/llms.txt`
- `https://buildwithfern.com/learn/llms-full.txt`
See an example: [docs.cohere.com/llms.txt](https://docs.cohere.com/llms.txt)

<Frame>
<img
src="./llms-txt.png"
alt="Example of using llms.txt"
className="rounded-lg border border-gray-200 dark:border-gray-700"
/>
</Frame>
</Frame>

## `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. Each API endpoint page includes its full OpenAPI spec.

`llms-full.txt` is available only at the root of your documentation site.

See an example: [docs.cohere.com/llms-full.txt](https://docs.cohere.com/llms-full.txt)

### Examples

View the `llms.txt` files for this site:

- [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt)
- [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt)

## Analytics and monitoring

The [Fern Dashboard](https://dashboard.buildwithfern.com/) provides comprehensive analytics for `llms.txt` usage including:
- Traffic by LLM provider (Claude, ChatGPT, Cursor, etc.)
- Page-level breakdowns of bot vs. human visitors for `.md` and `llms.txt` files

This visibility helps you understand LLM traffic patterns and optimize your documentation for AI consumption.