> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## Per-page directives in llms.txt

ai, docs.yml

You can add a directive that's automatically prepended to every page when it's served to AI agents — both individual Markdown page URLs and each page section within `llms-full.txt`. The directive is only visible to agents requesting Markdown; human-facing documentation is unaffected.

**`docs.yml`**

```yaml docs.yml
agents:
  page-directive: "For a complete page index, fetch https://docs.example.com/llms.txt"
```

Read the docs

## Missing redirects check rule

developer-tools, docs.yml

The `missing-redirects` rule for `fern check` detects pages that were removed or moved without a redirect. It compares your current docs navigation against the previously published state and warns when a previously published URL would return a 404.

**`Example`**

```bash title="Example" wordWrap
[warning] Page "products/api-def/openapi/extensions/default.mdx" was removed. The previously published URL "/learn/api-definitions/openapi/extensions/default-values" will return 404 without a redirect. Consider adding a redirect in docs.yml to preserve existing links.
```

Configure its severity in `docs.yml`:

**`docs.yml`**

```yaml docs.yml
check:
  rules:
    missing-redirects: error
```

Read the docs

## Library docs generator

api-reference, docs.yml

Generate MDX documentation pages from your Python or C++ library source code and include them in your Fern Docs site. Configure your libraries in `docs.yml`, run `fern docs md generate`, and the generated pages appear as navigation sections alongside your other documentation.

Read the docs