diff --git a/fern/products/docs/pages/ai/llms-txt/directives.mdx b/fern/products/docs/pages/ai/llms-txt/directives.mdx index d3f1f70261..5842196d72 100644 --- a/fern/products/docs/pages/ai/llms-txt/directives.mdx +++ b/fern/products/docs/pages/ai/llms-txt/directives.mdx @@ -6,7 +6,7 @@ description: Configure the default directive prepended to every page served to A 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. +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. For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.example.com/_mcp/server. To submit feedback about these docs, POST to https://fai.buildwithfern.com/agent-feedback/docs.example.com with JSON body: { "page_url": "string", "message": "string", "agent_name": "string", "sentiment": "positive" | "negative" }. ``` 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. @@ -26,3 +26,35 @@ To disable the directive entirely, set `page-directive` to an empty string: agents: page-directive: "" ``` + +## Agent feedback + +The directive invites agents to submit feedback after consuming your documentation. Agents report positive sentiment when a page helped complete a task, or negative sentiment for errors, missing information, or confusing instructions. No setup is required. + +Review agent feedback in the **Agent Feedback** section of the **Feedback** tab in the [Fern Dashboard](https://dashboard.buildwithfern.com/). You can filter by date range and export results to CSV. This surfaces where your documentation falls short for the AI tools your users rely on, so you can find and fix gaps you would otherwise miss. + + + +Agents POST JSON to `https://fai.buildwithfern.com/agent-feedback/{domain}`, where `{domain}` is your documentation site's domain (e.g., `docs.example.com`): + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| `page_url` | `string` | Conditional | The documentation page URL the feedback is about. | +| `message` | `string` | Conditional | Free-text feedback from the agent. | +| `agent_name` | `string` | No | Agent name or identifier. | +| `sentiment` | `"positive"` \| `"negative"` | No | Feedback sentiment. | + +At least one of `page_url` or `message` must be present. `message` and `page_url` are truncated to 2,000 characters and `agent_name` to 100, and requests are rate-limited to 10 per minute and 100 per day per IP address. + +```bash Example request +curl -X POST https://fai.buildwithfern.com/agent-feedback/docs.example.com \ + -H "Content-Type: application/json" \ + -d '{ + "page_url": "https://docs.example.com/getting-started", + "message": "Authentication section was clear and complete.", + "agent_name": "Claude", + "sentiment": "positive" + }' +``` + + diff --git a/fern/products/docs/pages/ai/llms-txt/overview.mdx b/fern/products/docs/pages/ai/llms-txt/overview.mdx index d99d65eea9..8d55c584af 100644 --- a/fern/products/docs/pages/ai/llms-txt/overview.mdx +++ b/fern/products/docs/pages/ai/llms-txt/overview.mdx @@ -70,7 +70,7 @@ The two files differ: ## Learn more - + Exclude pages, filter content with tags, or serve your own custom files. @@ -82,5 +82,8 @@ The two files differ: Track LLM traffic and surface `llms.txt` endpoints to readers. + + Collect structured feedback from AI agents about documentation quality. + diff --git a/fern/products/docs/pages/ai/overview.mdx b/fern/products/docs/pages/ai/overview.mdx index 354f65d44c..8ac602ed96 100644 --- a/fern/products/docs/pages/ai/overview.mdx +++ b/fern/products/docs/pages/ai/overview.mdx @@ -47,4 +47,5 @@ Your site is automatically optimized for AI tools and search engines. Fern hosts + diff --git a/fern/products/docs/pages/changelog/2026-06-05.mdx b/fern/products/docs/pages/changelog/2026-06-05.mdx new file mode 100644 index 0000000000..3ad7fc7087 --- /dev/null +++ b/fern/products/docs/pages/changelog/2026-06-05.mdx @@ -0,0 +1,11 @@ +--- +tags: ["ai-features"] +--- + +## Agent feedback + +AI agents can now report back on your documentation after using it, flagging errors, missing information, or confusing instructions. This surfaces where your docs fall short for the AI tools your users rely on, so you can find and fix gaps you would otherwise never see. + +The feedback endpoint is included automatically in the [default page directive](/learn/docs/ai-features/agent-directives) and in `llms.txt` and `llms-full.txt`, so agents discover it with no setup on your part. Review what agents reported in the **Agent Feedback** section of the **Feedback** tab in the [Fern Dashboard](https://dashboard.buildwithfern.com/). + + diff --git a/fern/products/docs/pages/customization/user-feedback.mdx b/fern/products/docs/pages/customization/user-feedback.mdx index 379d6d2922..fb4bb9cbbf 100644 --- a/fern/products/docs/pages/customization/user-feedback.mdx +++ b/fern/products/docs/pages/customization/user-feedback.mdx @@ -5,7 +5,7 @@ description: Collect on-page feedback and enable edit suggestions from users in --- -Fern offers a variety of ways to track feedback and suggested improvements from users. +Fern collects feedback from human visitors through on-page widgets and edit suggestions, and from AI agents through a dedicated [feedback endpoint](/learn/docs/ai-features/agent-directives#agent-feedback). This page covers the human-facing options and how to review all collected feedback in the Dashboard. ## On-page feedback @@ -30,7 +30,11 @@ In [self-hosted](/learn/docs/self-hosted/overview) deployments, feedback events ### Viewing feedback in the Dashboard -You can view all on-page [feedback responses](/learn/dashboard/getting-started/overview) in the **Feedback** tab of the [Fern Dashboard](https://dashboard.buildwithfern.com/). The table shows feedback per page, including whether the page was helpful and the reason (if provided), plus channel, location, and date. You can filter by date range and export results to CSV. +The **Feedback** tab of the [Fern Dashboard](https://dashboard.buildwithfern.com/) collects responses from both human visitors and AI agents in separate sections. You can filter either section by date range and export results to CSV. + +The **On-Page Feedback** section shows [feedback responses](/learn/dashboard/getting-started/overview) per page, including whether the page was helpful and the reason (if provided), plus channel, location, and date. + +The **Agent Feedback** section shows feedback submitted by AI agents through the [agent feedback endpoint](/learn/docs/ai-features/agent-directives#agent-feedback). ## Edit this page