> 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/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiJkNDUxYzcwMy1hY2M4LTQ5N2MtOGRjZS1iZDFjZWVhN2ZiZGMiLCJleHAiOjE3NzgyNTk1NjcsImlhdCI6MTc3ODI1OTI2N30.374SKvo0HjnbC_UCP-BuploLAjVDKN0wWZpQ_YPOkpE
>
> 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.

# Agent 指令

> 配置提供给 AI agents 的每个页面默认预置指令，或使用自定义指令覆盖它。

提供给 AI agents 的每个页面都会自动预置一个默认指令，告诉 agents 如何以编程方式导航您的文档：

```text title="默认页面指令" 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.
```

指令中的 URL 是根据您网站的域名和基础路径生成的。指令在前言元数据部分之后但页面正文之前注入，因此即使 agents 截断页面的其余部分，它们也会首先看到指令。它适用于单个页面 Markdown（`.md`/`.mdx` URLs）和 `llms-full.txt` 中的每个页面部分，面向人类的文档不受影响。

## 自定义 agent 指令

要覆盖默认指令，请使用 [`docs.yml` 中的 `agents` 键](/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"
```

要完全禁用指令，请将 `page-directive` 设置为空字符串：

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