> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Customize LLM output > Exclude pages with noindex, filter content with llms-only and llms-ignore tags, filter endpoint output with query parameters, or serve your own custom files. Customize what LLMs receive from your site by filtering content within a page using `` and `` tags, filtering endpoint output with query parameters, excluding pages with `noindex`, or serving your own custom files. ## Filter within a page Use `` and `` tags to serve different content to AI agents and human readers from the same page: | Surface | `` | `` | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ----------------------------------------------------------- | | Rendered page, [Copy page](/learn/docs/configuration/site-level-settings#page-actions-configuration), search widget, and [Ask Fern](/learn/docs/ai-features/ask-fern/overview) | Hidden | Served, and indexed by Ask Fern like any other page content | | [`/llms.txt` and each page's `.md`/`.mdx` source](/learn/docs/ai-features/markdown) | Served | Stripped | UI-only elements belong to human readers, and their programmatic equivalents belong to AI agents: * Wrap clickable cards and UI walkthroughs in ``, and pair each with an `` block giving the CLI or API equivalent. * `` suits verbose technical context that would clutter the human UI, such as implementation details, architecture notes, or cross-references that help AI understand relationships between pages. * `` suits marketing CTAs, navigation hints, and comments meant to stay in source files. #### Add llms-only and llms-ignore tags to my docs Read this page: [https://buildwithfern.com/learn/docs/ai-features/customize-llm-output.md](https://buildwithfern.com/learn/docs/ai-features/customize-llm-output.md) Then analyze my documentation repo and identify where `` and `` tags would improve agent readability, following the guiding principle that UI-only elements belong to human readers and their programmatic (CLI/API) equivalents belong to AI agents. 1. Report your analysis first: list the pages and specific sections where you would add each tag, and explain why. 2. Wait for my confirmation, then implement the changes. 3. Add rules on when to use `` and `` to my `AGENTS.md` file (create the file if it doesn't exist). ### Example Fern's own [docs quickstart](https://github.com/fern-api/docs/blob/main/fern/products/docs/pages/getting-started/quickstart.mdx) pairs GitHub UI click-through steps with their CLI equivalent: **`quickstart.mdx`** ````jsx quickstart.mdx wordWrap Use the `fern-api/docs-starter` repository as a template for your site: 1. Navigate to [fern-api/docs-starter](https://github.com/fern-api/docs-starter) and click on the **Use this template** button (found at the top right of this page). You must be logged into GitHub. 2. Choose the option to **create a new repository**. Name it `fern-docs`. 3. Clone your newly created repository and open it in your favorite code editor (e.g., Cursor, VS Code). Use the GitHub CLI to create a new repository from the template and clone it locally: ```bash gh repo create my-org/fern-docs --template fern-api/docs-starter --private --clone cd fern-docs ``` Replace `my-org/fern-docs` with your desired owner and repository name. Use `--public` instead of `--private` if you want a public repository. ```` Use the `fern-api/docs-starter` repository as a template for your site: Use the GitHub CLI to create a new repository from the template and clone it locally: ```bash gh repo create my-org/fern-docs --template fern-api/docs-starter --private --clone cd fern-docs ``` Replace `my-org/fern-docs` with your desired owner and repository name. Use `--public` instead of `--private` if you want a public repository. Human readers see only the numbered UI steps; LLMs reading this page's Markdown see only the `gh repo create` command they can actually run. To debug what AI sees for any page, append `.md` or `.mdx` to the page URL to [view its Markdown source](/learn/docs/ai-features/markdown). ## Filter endpoint output Filter `llms.txt` output with the `lang`, `excludeSpec`, and `excludeChangelog` query parameters to reduce token usage. Parameters can also be combined. The `lang` parameter also applies to per-page `.md` and `.mdx` URLs. **`Example`** ```txt Example /llms.txt?lang=python /llms.txt?excludeSpec=true /llms.txt?excludeChangelog=true /llms.txt?lang=python&excludeSpec=true&excludeChangelog=true ``` **`lang`** `'node' | 'python' | 'java' | 'ruby' | 'go' | 'csharp' | 'swift' | 'php'` Filter SDK code examples to a specific language. Common aliases are also accepted: `javascript`, `typescript`, `js`, `ts`, `py`, and `golang`. Case-insensitive. --- **`excludeSpec`** `boolean` Exclude OpenAPI and AsyncAPI specification sections. --- **`excludeChangelog`** `boolean` Exclude changelog sections, including the nested changelog `llms.txt` index. Useful for sites with long release histories, where changelog entries can dominate the index. --- ## Exclude whole pages You can exclude whole pages from LLM endpoints (`llms.txt`) by [adding `noindex: true`](/learn/docs/seo/setting-seo-metadata#noindex) to the page's frontmatter. Pages marked `noindex` aren't indexed by search engines but remain visible in your sidebar navigation and can still be accessed directly by URL. To also hide a page from navigation, see [Hiding content](/learn/docs/customization/hiding-content). **`docs/pages/internal-notes.mdx`** ```mdx docs/pages/internal-notes.mdx --- title: Internal notes noindex: true --- ``` ## Serve custom files > **Note** > > The `llms-full-txt` key in `docs.yml` is deprecated. Use `llms.txt` combined with per-page [Markdown access](/learn/docs/ai-features/markdown) instead. To serve your own `llms.txt` instead of the auto-generated version, point to your file under the [`agents` key in `docs.yml`](/learn/docs/configuration/site-level-settings#agents-configuration): **`docs.yml`** ```yaml docs.yml agents: llms-txt: ./path/to/llms.txt ``` The path is relative to the `docs.yml` file. The CLI validates that the file exists and uploads it as part of your docs deployment. Your custom file is served at the root-level `/llms.txt` endpoint. Nested paths (e.g., `/api-reference/llms.txt`) continue to use the auto-generated output. To control *which* crawlers reach your site rather than *what* they receive, serve a [custom `robots.txt`](/learn/docs/seo/robots-txt) instead. > Exclude pages with noindex, filter content with llms-only and llms-ignore tags, filter endpoint output with query parameters, or serve your own custom files.