From d54e4af4a12323bb28b152cfebe6b16b6c5faa30 Mon Sep 17 00:00:00 2001 From: Seb Slight <19554889+sebslight@users.noreply.github.com> Date: Tue, 17 Feb 2026 09:15:01 -0500 Subject: [PATCH] revert(agents): remove llms.txt discovery prompt (#19192) --- src/agents/system-prompt.ts | 18 ------------------ src/agents/tools/web-fetch.ts | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index dcfce11fe37..d176997c1e4 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -147,23 +147,6 @@ function buildVoiceSection(params: { isMinimal: boolean; ttsHint?: string }) { return ["## Voice (TTS)", hint, ""]; } -function buildLlmsTxtSection(params: { isMinimal: boolean; availableTools: Set }) { - if (params.isMinimal) { - return []; - } - if (!params.availableTools.has("web_fetch")) { - return []; - } - return [ - "## llms.txt Discovery", - "When exploring a new domain or website (via web_fetch or browser), check for an llms.txt file that describes how AI agents should interact with the site:", - "- Try `/llms.txt` or `/.well-known/llms.txt` at the domain root", - "- If found, follow its guidance for interacting with that site's content and APIs", - "- llms.txt is an emerging standard (like robots.txt for AI) — not all sites have one, so don't warn if missing", - "", - ]; -} - function buildDocsSection(params: { docsPath?: string; isMinimal: boolean; readToolName: string }) { const docsPath = params.docsPath?.trim(); if (!docsPath || params.isMinimal) { @@ -557,7 +540,6 @@ export function buildAgentSystemPrompt(params: { messageToolHints: params.messageToolHints, }), ...buildVoiceSection({ isMinimal, ttsHint: params.ttsHint }), - ...buildLlmsTxtSection({ isMinimal, availableTools }), ]; if (extraSystemPrompt) { diff --git a/src/agents/tools/web-fetch.ts b/src/agents/tools/web-fetch.ts index 2bb3837c669..06f4ac1d973 100644 --- a/src/agents/tools/web-fetch.ts +++ b/src/agents/tools/web-fetch.ts @@ -736,7 +736,7 @@ export function createWebFetchTool(options?: { label: "Web Fetch", name: "web_fetch", description: - "Fetch and extract readable content from a URL (HTML → markdown/text). Use for lightweight page access without browser automation. When exploring a new domain, also check for /llms.txt or /.well-known/llms.txt — these files describe how AI agents should interact with the site.", + "Fetch and extract readable content from a URL (HTML → markdown/text). Use for lightweight page access without browser automation.", parameters: WebFetchSchema, execute: async (_toolCallId, args) => { const params = args as Record;