diff --git a/agent/prompt/builder.py b/agent/prompt/builder.py index 697bb8a..2df1a14 100644 --- a/agent/prompt/builder.py +++ b/agent/prompt/builder.py @@ -233,13 +233,15 @@ def _build_skills_section(skill_manager: Any, tools: Optional[List[Any]], langua lines = [ "## 技能系统(mandatory)", "", - "在回复之前:扫描下方 中的 条目。", + "在回复之前:扫描下方 中每个技能的 。", "", - f"- 如果恰好有一个技能(Skill)明确适用:使用 `{read_tool_name}` 读取其 处的 SKILL.md,然后严格遵循它", - "- 如果多个技能都适用则选择最匹配的一个,如果没有明确适用的则不要读取任何 SKILL.md", - "- 读取 SKILL.md 后直接按其指令执行,无需多余的预检查", + f"- 如果有技能的描述与用户需求匹配:使用 `{read_tool_name}` 工具读取其 路径的 SKILL.md 文件,然后严格遵循文件中的指令。" + "当有匹配的技能时,应优先使用技能", + "- 如果多个技能都适用则选择最匹配的一个,然后读取并遵循。", + "- 如果没有技能明确适用:不要读取任何 SKILL.md,直接使用通用工具。", "", - "**注意**: 永远不要一次性读取多个技能,只在选择后再读取。技能和工具不同,必须先读取其SKILL.md并按照文件内容运行。", + f"**重要**: 技能不是工具,不能直接调用。使用技能的唯一方式是用 `{read_tool_name}` 读取 SKILL.md 文件,然后按文件内容操作。" + "永远不要一次性读取多个技能,只在选择后再读取。", "", "以下是可用技能:" ] diff --git a/agent/tools/web_search/web_search.py b/agent/tools/web_search/web_search.py index 2132a07..47d4d90 100644 --- a/agent/tools/web_search/web_search.py +++ b/agent/tools/web_search/web_search.py @@ -24,11 +24,7 @@ class WebSearch(BaseTool): """Tool for searching the web using Bocha or LinkAI search API""" name: str = "web_search" - description: str = ( - "Search the web for current information, news, research topics, or any real-time data. " - "Returns web page titles, URLs, snippets, and optional summaries. " - "Use this when the user asks about recent events, needs fact-checking, or wants up-to-date information." - ) + description: str = "Search the web for real-time information. Returns titles, URLs, and snippets." params: dict = { "type": "object",