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/docs/ai-features/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiI5MmRlNGMzNy1jMWUzLTQxYmEtYjA2ZS1hMmNjOTA5MThjNmYiLCJleHAiOjE3NzY0Mzk2NTYsImlhdCI6MTc3NjQzOTM1Nn0.ERc73aijxW1KvtvXQtTFDrrpIyxOP61YkJE4asLDnbc

---

***

title: Agent directives
description: Configure the default directive prepended to every page served to AI agents, or override it with a custom directive.
---------------------

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.

Every page served to AI agents is automatically prepended with a default directive that tells agents how to navigate your documentation programmatically:

```text title="Default page directive" wordWrap
For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.example.com/llms.txt. For full documentation content, see https://docs.example.com/llms-full.txt.
```

The URLs in the directive are generated from your site's domain and basepath. The directive is injected after the frontmatter metadata section but before the page body, so agents see it first even if they truncate the rest of the page. It applies to individual page Markdown (`.md`/`.mdx` URLs) and to each page section within `llms-full.txt`, and human-facing documentation is unaffected.

## Customize agent directives

To override the default, set a custom directive using the [`agents` key in `docs.yml`](/learn/docs/configuration/site-level-settings#agents-configuration):

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

To disable the directive entirely, set `page-directive` to an empty string:

```yaml docs.yml
agents:
  page-directive: ""
```