Agent directives

View as Markdown

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

Default page directive
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:

docs.yml
1agents:
2 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:

docs.yml
1agents:
2 page-directive: ""