*** title: llms.txt and llms-full.txt description: >- Fern automatically creates llms.txt files for AI developer tools. Filter by language, control visibility, and track analytics for LLM traffic. ------------------------------------------------------------------ [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 for your documentation site. When an LLM bot accesses your docs, Fern serves these Markdown files instead of HTML, reducing token consumption by 90%+. 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. * **`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/creative-platform/voices/llms.txt), [Cash App llms-full.txt](https://developers.cash.app/llms-full.txt). 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. ``` Filter `llms.txt` and `llms-full.txt` output with the `lang` and `excludeSpec` query parameters to reduce token usage. Parameters can also be combined. ```txt Example /llms.txt?lang=python /llms-full.txt?excludeSpec=true /llms-full.txt?lang=python&excludeSpec=true ``` Filter SDK code examples to a specific language. Common aliases are also accepted: `javascript`, `typescript`, `js`, `ts`, `py`, and `golang`. Case-insensitive. Exclude OpenAPI and AsyncAPI specification sections. ## Control visibility You can exclude whole pages from LLM endpoints (`llms.txt` and `llms-full.txt`) by [adding `noindex: true`](/learn/docs/seo/setting-seo-metadata#noindex) to the page's frontmatter. Pages marked `noindex` are hidden from your documentation site's navigation and not indexed by search engines but can still be accessed directly by URL. ```mdx docs/pages/internal-notes.mdx --- title: Internal notes noindex: true --- ``` Within pages, use `` and `` tags to control what content is exposed to AI versus human readers on your documentation site. These tags affect all Markdown output intended for AI consumption: LLM endpoints, [Copy page, and View as Markdown](/learn/docs/configuration/site-level-settings#page-actions-configuration). Use the `` tag to show content to AI but hide it from human readers on your documentation site. This is useful for: * Technical context that's verbose but helpful for AI, like implementation details or architecture notes * Code-related metadata that would clutter the human UI * Cross-references that help AI understand relationships between pages ```jsx docs/getting-started.mdx This technical context is only visible to AI, not on your documentation site. ``` Use the `` tag to show content to human readers on your documentation site while hiding it from AI. This is useful for: * Marketing CTAs or promotional content * Navigation hints meant only for human readers * Internal comments that should remain only in source files ```markdown docs/getting-started.mdx {/* TODO: Update this section after v2 launch */} ## Authentication To authenticate your requests, include your API key in the header. Need an API key? [Sign up for free](https://example.com/signup) to get started. ``` ## 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 Markdown and `llms.txt` files This visibility helps you understand LLM traffic patterns and optimize your documentation for AI consumption. ## Integrate llms.txt into your docs Add buttons or navigation links to surface your llms.txt endpoints. Add a button to your SDK docs that links to the `llms-full.txt` for your API Reference. Use `lang` to filter code examples to one language, and `excludeSpec=true` to exclude the raw OpenAPI specification. ```jsx Markdown ``` This gives users a clean, language-specific output they can feed to AI tools when writing code. Add a dropdown in your navbar that links to different filtered versions of `llms-full.txt`, making it easy for users to access LLM-optimized documentation for their preferred language. ```yaml docs.yml navbar-links: - type: dropdown text: LLMs icon: fa-solid fa-robot links: - text: Full docs href: /llms-full.txt - text: Python SDK href: /api-reference/llms-full.txt?lang=python&excludeSpec=true - text: TypeScript SDK href: /api-reference/llms-full.txt?lang=typescript&excludeSpec=true - text: Go SDK href: /api-reference/llms-full.txt?lang=go&excludeSpec=true ```