{"id":636,"date":"2026-01-06T17:58:29","date_gmt":"2026-01-06T09:58:29","guid":{"rendered":"https:\/\/trantor.ink\/?p=636"},"modified":"2026-01-06T19:11:11","modified_gmt":"2026-01-06T11:11:11","slug":"koog%ef%bc%9adeepseek-%e8%b0%83%e7%94%a8-saytouser-%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/trantor.ink\/?p=636","title":{"rendered":"Koog\uff1aDeepseek \u8c03\u7528 SayToUser \u5de5\u5177\u95ee\u9898\u5206\u6790"},"content":{"rendered":"\n<p>\u6839\u636e\u5b98\u65b9\u793a\u4f8b\u4ee3\u7801 <a href=\"https:\/\/docs.koog.ai\/basic-agents\/ \">https:\/\/docs.koog.ai\/basic-agents\/ <\/a>\u4fee\u6539\u4e3a Deepseek \u6a21\u578b\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\nrunBlocking {\n\n            \/\/ Create an agent\n            val agent = AIAgent(\n                \/\/ Create a prompt executor using the LLM client\n                promptExecutor = SingleLLMPromptExecutor(deepseekClient),\n                systemPrompt = \"You are a helpful assistant. Answer user questions concisely.\",\n                temperature = 0.8,\n                \/\/ Provide a model\n                llmModel = DeepSeekModels.DeepSeekChat,\n                toolRegistry = ToolRegistry {\n                    tool(SayToUser)\n                }\n            )\n\n            \/\/ Run the agent\n            val result = agent.run(\"Hello! How can you help me?\")\n            println(result)\n        }\n    }\n\n\/\/SayToUser\npublic object SayToUser : SimpleTool&lt;SayToUser.Args>() {\n    \/**\n     * Represents the arguments for the [SayToUser] tool\n     *\n     * @property message A string representing a specific message or input payload\n     * required for tool execution.\n     *\/\n    @Serializable\n    public data class Args(\n        @property:LLMDescription(\"Message from the agent\")\n        val message: String\n    )\n\n    override val argsSerializer: KSerializer&lt;Args> = Args.serializer()\n    override val name: String = \"say_to_user\"\n    override val description: String = \"Service tool, used by the agent to talk.\"\n\n    override suspend fun doExecute(args: Args): String {\n        println(\"Agent says: ${args.message}\")\n        return \"DONE\"\n    }\n}<\/pre>\n\n\n\n<p>\u8fd0\u884c\u540e\u53d1\u73b0Deepseek \u5e76\u4e0d\u4f1a\u8c03\u7528\u8fd9\u4e2a SayToUser \u7684\u5de5\u5177\uff0c\u4e8e\u662f\u6211\u54a8\u8be2\u4e86 Gemini\uff0c\u5b83\u7ed9\u51fa\u7684\u7b54\u6848\u5982\u4e0b\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n<\/blockquote>\n<\/blockquote>\n<\/blockquote>\n\n\n\n<p>\u8981\u89e6\u53d1 Agent \u8c03\u7528 <code>SayToUser<\/code> \u5de5\u5177\uff0c\u6838\u5fc3\u5728\u4e8e<strong>\u6253\u7834\u5927\u6a21\u578b\u7684\u9ed8\u8ba4\u884c\u4e3a<\/strong>\u3002<\/p>\n\n\n\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5927\u6a21\u578b\uff08\u5305\u62ec DeepSeek\uff09\u4f1a\u4f18\u5148\u9009\u62e9\u76f4\u63a5\u5728\u54cd\u5e94\u5185\u5bb9\uff08Content\uff09\u4e2d\u751f\u6210\u6587\u672c\u6765\u56de\u7b54\u7528\u6237\uff0c\u800c\u4e0d\u662f\u8c03\u7528\u5de5\u5177\u3002\u53ea\u6709\u5f53\u5b83\u8ba4\u4e3a\u201c\u5fc5\u987b\u201d\u4f7f\u7528\u5de5\u5177\u624d\u80fd\u89e3\u51b3\u95ee\u9898\uff08\u4f8b\u5982\u67e5\u8be2\u5929\u6c14\u3001\u8ba1\u7b97\u6570\u636e\uff09\u65f6\uff0c\u5b83\u624d\u4f1a\u8c03\u7528\u5de5\u5177\u3002<\/p>\n\n\n\n<p>\u7531\u4e8e\u4f60\u7684\u5de5\u5177 <code>SayToUser<\/code> \u529f\u80fd\u672c\u8d28\u4e0a\u5c31\u662f\u201c\u8bf4\u8bdd\u201d\uff0c\u8fd9\u4e0e\u6a21\u578b\u9ed8\u8ba4\u7684\u201c\u751f\u6210\u6587\u672c\u201d\u80fd\u529b\u91cd\u53e0\u4e86\u3002\u4e3a\u4e86\u5f3a\u5236\u5b83\u8c03\u7528\u8fd9\u4e2a\u5de5\u5177\uff0c\u4f60\u9700\u8981\u901a\u8fc7 <strong>System Prompt\uff08\u7cfb\u7edf\u63d0\u793a\u8bcd\uff09<\/strong> \u6216 <strong>\u5de5\u5177\u63cf\u8ff0\uff08Tool Description\uff09<\/strong> \u5efa\u7acb\u66f4\u5f3a\u7684\u7ea6\u675f\u3002<\/p>\n\n\n\n<p>\u4f60\u9700\u8981\u660e\u786e\u544a\u8bc9\u6a21\u578b\uff1a<strong>\u5b83\u6ca1\u6709\u5634\u5df4\uff0c\u4e0d\u80fd\u76f4\u63a5\u8bf4\u8bdd\uff0c\u5fc5\u987b\u901a\u8fc7\u8fd9\u4e2a\u5de5\u5177\u624d\u80fd\u4f20\u8fbe\u4fe1\u606f\u3002<\/strong><\/p>\n\n\n\n<p>\u4fee\u6539\u4f60\u7684 <code>systemPrompt<\/code> \u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>Kotlin<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">val agent = AIAgent(\n    promptExecutor = SingleLLMPromptExecutor(deepseekClient),\n    \/\/ \u5173\u952e\u4fee\u6539\uff1a\u6dfb\u52a0\u5f3a\u5236\u7ea6\u675f\u6307\u4ee4\n    systemPrompt = \"\"\"\n        You are a helpful assistant.\n        IMPORTANT: You are NOT allowed to reply with direct text. \n        You MUST use the 'say_to_user' tool for ANY communication with the user.\n        If you want to say something, pass it to the 'say_to_user' tool.\n    \"\"\".trimIndent(),\n    temperature = 0.2, \/\/ \u7a0d\u5fae\u964d\u4f4e\u6e29\u5ea6\uff0c\u8ba9\u5b83\u66f4\u542c\u8bdd\n    llmModel = DeepSeekModels.DeepSeekChat,\n    toolRegistry = ToolRegistry {\n        tool(SayToUser)\n    }\n)\n<\/pre>\n\n\n\n<p><strong>\u539f\u7406\uff1a<\/strong> \u6a21\u578b\u4f1a\u9075\u5faa System Prompt \u4e2d\u7684\u6700\u9ad8\u6307\u4ee4\uff08High-level instruction\uff09\u3002\u5f53\u4f60\u7981\u6b62\u4e86\u76f4\u63a5\u8f93\u51fa\uff08Direct text\uff09\uff0c\u5b83\u4e3a\u4e86\u5b8c\u6210\u201c\u56de\u7b54\u7528\u6237\u201d\u7684\u4efb\u52a1\uff0c\u5c31\u53ea\u80fd\u5bfb\u627e\u552f\u4e00\u53ef\u7528\u7684\u8def\u5f84\u2014\u2014<code>say_to_user<\/code> \u5de5\u5177\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4e8e\u662f\u4fee\u6539\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">val agent = AIAgent(\n    promptExecutor = SingleLLMPromptExecutor(deepseekClient),\n    \/\/ \u5173\u952e\u4fee\u6539\uff1a\u6dfb\u52a0\u5f3a\u5236\u7ea6\u675f\u6307\u4ee4\n    systemPrompt = \"\"\"\n        You are a helpful assistant.\n        IMPORTANT: You are NOT allowed to reply with direct text. \n        You MUST use the 'say_to_user' tool for ANY communication with the user.\n        If you want to say something, pass it to the 'say_to_user' tool.\n    \"\"\".trimIndent(),\n    temperature = 0.2, \/\/ \u7a0d\u5fae\u964d\u4f4e\u6e29\u5ea6\uff0c\u8ba9\u5b83\u66f4\u542c\u8bdd\n    llmModel = DeepSeekModels.DeepSeekChat,\n    toolRegistry = ToolRegistry {\n        tool(SayToUser)\n    }\n)<\/pre>\n\n\n\n<p>\u7ed3\u679c\u786e\u5b9e\u8c03\u7528\u4e86 SayToUser \u5de5\u5177\uff0c\u4f46 Deepseek \u6839\u672c\u505c\u4e0d\u4e0b\u6765\uff0c\u4e00\u76f4\u8fdb\u884c\u5de5\u5177\u8c03\u7528\u5e76\u6301\u7eed\u5411 SayToUser \u8f93\u51fa\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Agent says: Hello! I'm here to help you with various tasks. I can assist with answering questions, providing information, helping with analysis, offering suggestions, and much more. What would you like help with today?\n\nAgent says: I'm ready to assist you with whatever you need. Whether it's answering questions, helping with research, solving problems, or just having a conversation, I'm here to help. What's on your mind?\n\nAgent says: Please feel free to ask me anything or let me know what kind of assistance you're looking for!\n\nAgent says: I'm eager to help you get started with whatever you need. What can I do for you today?\n\nAgent says: Just let me know what you'd like help with, and I'll do my best to assist you!\n\nAgent says: I'm waiting for your request or question. How can I be of service?\n\nAgent says: I'm here and ready to help whenever you're ready to tell me what you need assistance with!\n\nAgent says: Don't hesitate to ask - I'm here to provide helpful information and support for whatever you need!\n\nAgent says: I'm patiently waiting for your question or request. What would you like help with today?<\/pre>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2a\u975e\u5e38\u7ecf\u5178\u4e14\u6709\u8da3\u7684**Agent \u6b7b\u5faa\u73af\uff08Infinite Loop\uff09**\u73b0\u8c61\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6838\u5fc3\u539f\u56e0\uff1aAgent \u628a\u201c\u5de5\u5177\u6267\u884c\u7ed3\u679c\u201d\u5f53\u6210\u4e86\u201c\u7ee7\u7eed\u884c\u52a8\u7684\u4fe1\u53f7\u201d<\/h3>\n\n\n\n<p>\u4f60\u9047\u5230\u7684\u60c5\u51b5\u662f\uff1a<strong>Agent \u9677\u5165\u4e86\u201c\u601d\u8003 -&gt; \u8c03\u7528\u5de5\u5177 -&gt; \u6536\u5230\u53cd\u9988 -&gt; \u518d\u6b21\u601d\u8003 -&gt; \u518d\u6b21\u8c03\u7528\u5de5\u5177\u201d\u7684\u65e0\u9650\u5faa\u73af\u4e2d\u3002<\/strong><\/p>\n\n\n\n<p>\u8ba9\u6211\u4eec\u50cf\u201c\u8c03\u8bd5\u5668\u201d\u4e00\u6837\u9010\u6b65\u62c6\u89e3\u8fd9\u4e2a\u8fc7\u7a0b\uff1a<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Agent \u601d\u8003<\/strong>\uff1a\u7528\u6237\u8bf4\u4e86 &#8220;Hello&#8221;\uff0c\u7531\u4e8e System Prompt \u7684\u5f3a\u5236\u8981\u6c42\uff0cAgent \u51b3\u5b9a\u8c03\u7528 <code>SayToUser<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u5de5\u5177\u6267\u884c<\/strong>\uff1a<code>SayToUser<\/code> \u8fd0\u884c\uff0c\u6253\u5370 &#8220;Agent says: Hello&#8230;&#8221;, \u5e76\u8fd4\u56de\u5b57\u7b26\u4e32 <code>\"DONE\"<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u4e0a\u4e0b\u6587\u56de\u4f20<\/strong>\uff1aAgent \u7684\u8fd0\u884c\u6846\u67b6\uff08<code>AIAgent<\/code> \u7c7b\u5185\u90e8\uff09\u5c06\u5de5\u5177\u7684\u8fd4\u56de\u503c <code>\"DONE\"<\/code> \u4f5c\u4e3a<strong>\u89c2\u5bdf\u7ed3\u679c (Observation)<\/strong> \u518d\u6b21\u5582\u7ed9\u4e86\u5927\u6a21\u578b\u3002\n<ul class=\"wp-block-list\">\n<li><em>\u73b0\u5728\u7684\u4e0a\u4e0b\u6587\u662f\uff1a<\/em>\n<ul class=\"wp-block-list\">\n<li>User: &#8220;Hello&#8221;<\/li>\n\n\n\n<li>Assistant: Call SayToUser(&#8230;)<\/li>\n\n\n\n<li>Tool Output: &#8220;DONE&#8221;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Agent \u518d\u6b21\u601d\u8003<\/strong>\uff1a\u5927\u6a21\u578b\u770b\u5230\u5de5\u5177\u6267\u884c\u5b8c\u4e86\uff08DONE\uff09\uff0c\u4f46<strong>\u6b64\u65f6\u63a7\u5236\u6743\u8fd8\u5728 Agent \u624b\u91cc<\/strong>\uff08\u56e0\u4e3a\u901a\u5e38 Agent \u6846\u67b6\u7684\u8bbe\u8ba1\u662f\uff1a\u53ea\u8981\u6709\u5de5\u5177\u8c03\u7528\uff0c\u5c31\u7ee7\u7eed\u5faa\u73af\uff0c\u76f4\u5230\u6a21\u578b\u8f93\u51fa\u7eaf\u6587\u672c\u6216\u7279\u5b9a\u7ed3\u675f\u7b26\uff09\u3002<\/li>\n\n\n\n<li><strong>\u6b7b\u5faa\u73af\u89e6\u53d1<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li>\u5927\u6a21\u578b\u60f3\uff1a\u201c\u597d\u7684\uff0c\u5de5\u5177\u8c03\u7528\u6210\u529f\u4e86\u3002\u4f46\u6211\u73b0\u5728\u7684\u4efb\u52a1\u662f\u5f53\u4e00\u4e2a\u6709\u7528\u7684\u52a9\u624b\u3002\u6211\u770b\u4e0d\u5230\u7528\u6237\u7684\u56de\u590d\uff0c\u6211\u5e94\u8be5\u7ee7\u7eed\u901a\u8fc7\u5de5\u5177\u8868\u8fbe\u6211\u7684\u70ed\u60c5\u3002\u201d<\/li>\n\n\n\n<li>\u4e8e\u662f\u5b83<strong>\u518d\u6b21<\/strong>\u8c03\u7528 <code>SayToUser<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u91cd\u590d<\/strong>\uff1a\u56de\u5230\u7b2c2\u6b65\uff0c\u5468\u800c\u590d\u59cb\u3002<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<p>\u6700\u540e\u5c06\u4ee3\u7801\u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">runBlocking {\n\n            \/\/ Create an agent\n            val agent = AIAgent(\n                \/\/ Create a prompt executor using the LLM client\n                promptExecutor = SingleLLMPromptExecutor(deepseekClient),\n                systemPrompt = \"\"\"\n        You are a helpful assistant.\n        Once \"DONE\" is received, stop using \"say_to_user\" and directly proceed with the content output.\n        IMPORTANT: You are NOT allowed to reply with direct text .\n        You MUST use the 'say_to_user' tool for ANY communication with the user.\n        If you want to say something, pass it to the 'say_to_user' tool.\n    \"\"\".trimIndent(),\n                temperature = 0.8,\n                \/\/ Provide a model\n                llmModel = DeepSeekModels.DeepSeekChat,\n                toolRegistry = ToolRegistry {\n                    tool(SayToUser)\n                }\n            )\n\n            \/\/ Run the agent\n            val result = agent.run(\"Hello! How can you help me?\")\n            println(result)\n        }<\/pre>\n\n\n\n<p>Deepseek \u5728\u8c03\u7528\u5b8c SayToUser \u540e\u8fd4\u56de\u4e86\u666e\u901a\u6587\u672c\u7ed3\u679c\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Agent says: Hello! I'm here to help you with various tasks and answer your questions. I can assist with information, explanations, problem-solving, and more. What would you like help with today?\nI understand that \"DONE\" has been received, so I should stop using the 'say_to_user' tool and directly proceed with content output. However, I notice that the user said \"DONE\" after my initial greeting, which seems to indicate they want me to stop the conversation or that the task is complete. \n\nSince I'm instructed to stop using 'say_to_user' and directly proceed with content output when \"DONE\" is received, I'll end my response here. The conversation appears to be complete.<\/pre>\n\n\n\n<p>\u4e0a\u8ff0\u4ee3\u7801\u6d41\u7a0b\u56fe\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/vip.123pan.cn\/1849817487\/yk6baz03t0m000d7w33gxj4013o4ni0tDIYxBIYPAwF1AvxvAIePDO==.png\" alt=\"\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u6839\u636e\u5b98\u65b9\u793a\u4f8b\u4ee3\u7801 https:\/\/docs.koog.ai\/basic-agents\/ \u4fee\u6539\u4e3a Deepseek \u6a21\u578b\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a \u8fd0\u884c\u540e\u53d1\u73b0Deepseek \u5e76\u4e0d\u4f1a\u8c03\u7528\u8fd9\u4e2a SayToUser \u7684\u5de5\u5177\uff0c\u4e8e\u662f\u6211\u54a8\u8be2\u4e86 Gemini\uff0c\u5b83\u7ed9\u51fa\u7684\u7b54\u6848\u5982\u4e0b\uff1a \u8981\u89e6\u53d1 Agent \u8c03\u7528 SayToUser \u5de5\u5177\uff0c\u6838\u5fc3\u5728\u4e8e\u6253\u7834\u5927\u6a21\u578b\u7684\u9ed8\u8ba4\u884c\u4e3a\u3002 \u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5927\u6a21\u578b\uff08\u5305\u62ec DeepSeek\uff09\u4f1a\u4f18\u5148\u9009\u62e9\u76f4\u63a5\u5728\u54cd\u5e94\u5185\u5bb9\uff08Content\uff09\u4e2d\u751f\u6210\u6587\u672c\u6765\u56de\u7b54\u7528\u6237\uff0c\u800c\u4e0d\u662f\u8c03\u7528\u5de5\u5177\u3002\u53ea\u6709\u5f53\u5b83\u8ba4\u4e3a\u201c\u5fc5\u987b\u201d\u4f7f\u7528\u5de5\u5177\u624d\u80fd\u89e3\u51b3\u95ee\u9898\uff08\u4f8b\u5982\u67e5\u8be2\u5929\u6c14\u3001\u8ba1\u7b97\u6570\u636e\uff09\u65f6\uff0c\u5b83\u624d\u4f1a\u8c03\u7528\u5de5\u5177\u3002 \u7531\u4e8e\u4f60\u7684\u5de5\u5177 SayToUser \u529f\u80fd\u672c\u8d28\u4e0a\u5c31\u662f\u201c\u8bf4\u8bdd\u201d\uff0c\u8fd9\u4e0e\u6a21\u578b\u9ed8\u8ba4\u7684\u201c\u751f\u6210\u6587\u672c\u201d\u80fd\u529b\u91cd\u53e0\u4e86\u3002\u4e3a\u4e86\u5f3a\u5236\u5b83\u8c03\u7528\u8fd9\u4e2a\u5de5\u5177\uff0c\u4f60\u9700\u8981\u901a\u8fc7 System Prompt\uff08\u7cfb\u7edf\u63d0\u793a\u8bcd\uff09 \u6216 \u5de5\u5177\u63cf\u8ff0\uff08Tool Description\uff09 \u5efa\u7acb\u66f4\u5f3a\u7684\u7ea6\u675f\u3002 \u4f60\u9700\u8981\u660e\u786e\u544a\u8bc9\u6a21\u578b\uff1a\u5b83\u6ca1\u6709\u5634\u5df4\uff0c\u4e0d\u80fd\u76f4\u63a5\u8bf4\u8bdd\uff0c\u5fc5\u987b\u901a\u8fc7\u8fd9\u4e2a\u5de5\u5177\u624d\u80fd\u4f20\u8fbe\u4fe1\u606f\u3002 \u4fee\u6539\u4f60\u7684 systemPrompt \u5982\u4e0b\uff1a Kotlin \u539f\u7406\uff1a \u6a21\u578b\u4f1a\u9075\u5faa System Prompt \u4e2d\u7684\u6700\u9ad8\u6307\u4ee4\uff08High-level instruction\uff09\u3002\u5f53\u4f60\u7981\u6b62\u4e86\u76f4\u63a5\u8f93\u51fa\uff08Direct text\uff09\uff0c\u5b83\u4e3a\u4e86\u5b8c\u6210\u201c\u56de\u7b54\u7528\u6237\u201d\u7684\u4efb\u52a1\uff0c\u5c31\u53ea\u80fd\u5bfb\u627e\u552f\u4e00\u53ef\u7528\u7684\u8def\u5f84\u2014\u2014say_to_user \u5de5\u5177\u3002 \u4e8e\u662f\u4fee\u6539\u4ee3\u7801\u5982\u4e0b\uff1a \u7ed3\u679c\u786e\u5b9e\u8c03\u7528\u4e86 SayToUser \u5de5\u5177\uff0c\u4f46 Deepseek \u6839\u672c\u505c\u4e0d\u4e0b\u6765\uff0c\u4e00\u76f4\u8fdb\u884c\u5de5\u5177\u8c03\u7528\u5e76\u6301\u7eed\u5411 SayToUser \u8f93\u51fa\u5185\u5bb9\uff1a \u8fd9\u662f\u4e00\u4e2a\u975e\u5e38\u7ecf\u5178\u4e14\u6709\u8da3\u7684**Agent \u6b7b\u5faa\u73af\uff08Infinite Loop\uff09**\u73b0\u8c61\u3002 \u6838\u5fc3\u539f\u56e0\uff1aAgent \u628a\u201c\u5de5\u5177\u6267\u884c\u7ed3\u679c\u201d\u5f53\u6210\u4e86\u201c\u7ee7\u7eed\u884c\u52a8\u7684\u4fe1\u53f7\u201d \u4f60\u9047\u5230\u7684\u60c5\u51b5\u662f\uff1aAgent \u9677\u5165\u4e86\u201c\u601d\u8003 -&gt; \u8c03\u7528\u5de5\u5177 -&gt; \u6536\u5230\u53cd\u9988 -&gt; \u518d\u6b21\u601d\u8003 -&gt; \u518d\u6b21\u8c03\u7528\u5de5\u5177\u201d\u7684\u65e0\u9650\u5faa\u73af\u4e2d\u3002 \u8ba9\u6211\u4eec\u50cf\u201c\u8c03\u8bd5\u5668\u201d\u4e00\u6837\u9010\u6b65\u62c6\u89e3\u8fd9\u4e2a\u8fc7\u7a0b\uff1a \u6700\u540e\u5c06\u4ee3\u7801\u4fee\u6539\u5982\u4e0b\uff1a Deepseek \u5728\u8c03\u7528\u5b8c SayToUser \u540e\u8fd4\u56de\u4e86\u666e\u901a\u6587\u672c\u7ed3\u679c\uff1a \u4e0a\u8ff0\u4ee3\u7801\u6d41\u7a0b\u56fe\u5982\u4e0b\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,72],"tags":[76],"class_list":["post-636","post","type-post","status-publish","format-standard","hentry","category-appdev","category-ai","tag-koog"],"_links":{"self":[{"href":"https:\/\/trantor.ink\/index.php?rest_route=\/wp\/v2\/posts\/636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trantor.ink\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trantor.ink\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trantor.ink\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trantor.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=636"}],"version-history":[{"count":3,"href":"https:\/\/trantor.ink\/index.php?rest_route=\/wp\/v2\/posts\/636\/revisions"}],"predecessor-version":[{"id":640,"href":"https:\/\/trantor.ink\/index.php?rest_route=\/wp\/v2\/posts\/636\/revisions\/640"}],"wp:attachment":[{"href":"https:\/\/trantor.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trantor.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trantor.ink\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}