{"id":121957,"date":"2026-11-04T02:24:50","date_gmt":"2026-11-03T18:24:50","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/121957.html"},"modified":"2026-11-04T02:24:50","modified_gmt":"2026-11-03T18:24:50","slug":"%e3%80%8ahello-agents%e3%80%8b%e7%ac%ac%e5%9b%9b%e8%87%b3%e5%85%ad%e7%ab%a0-%e6%a0%b8%e5%bf%83%e7%9f%a5%e8%af%86-%e6%a2%b3%e7%90%86%e6%80%bb%e7%bb%93","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/121957.html","title":{"rendered":"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3"},"content":{"rendered":"<p>\u8303\u56f4&#xff1a;\u7b2c\u4e8c\u90e8\u5206\u300c\u667a\u80fd\u4f53\u6784\u5efa\u5b9e\u8df5\u300d&#xff5c;PDF p82\u2013205&#xff08;\u7b2c\u56db\u7ae0 p82\u2013114\u3001\u7b2c\u4e94\u7ae0 p115\u2013170\u3001\u7b2c\u516d\u7ae0 p171\u2013205&#xff09;<\/p>\n<hr \/>\n<h3>\u5168\u5c40\u77e5\u8bc6\u5730\u56fe&#xff1a;\u8fd9\u4e09\u7ae0\u5728\u8bb2\u4ec0\u4e48<\/h3>\n<table>\n<tr>\u7ae0\u56de\u7b54\u7684\u6838\u5fc3\u95ee\u9898\u4e0e\u524d\u540e\u7ae0\u8282\u7684\u5173\u7cfb<\/tr>\n<tbody>\n<tr>\n<td>\u7b2c\u56db\u7ae0<\/td>\n<td>\u4e09\u79cd\u7ecf\u5178\u8303\u5f0f\u600e\u4e48\u4ece\u96f6\u624b\u5199\u51fa\u6765<\/td>\n<td>\u76f4\u63a5\u843d\u5730\u7b2c 1 \u7ae0\u7684 Agent Loop \u4e0e T-A-O \u534f\u8bae&#xff1b;\u662f\u7b2c 7 \u7ae0\u81ea\u5efa\u6846\u67b6\u3001\u7b2c 10 \u7ae0\u591a\u667a\u80fd\u4f53\u7684\u8303\u5f0f\u6765\u6e90<\/td>\n<\/tr>\n<tr>\n<td>\u7b2c\u4e94\u7ae0<\/td>\n<td>\u4e0d\u5199\u4ee3\u7801\u80fd\u4e0d\u80fd\u66f4\u5feb\u642d\u51fa\u667a\u80fd\u4f53<\/td>\n<td>\u4e0e\u7b2c\u56db\u7ae0\u6784\u6210&#034;\u624b\u5199 vs \u5e73\u53f0&#034;\u7684\u4e92\u8865\u89c6\u89d2&#xff1b;\u7ed3\u8bba\u662f\u6df7\u5408\u5f00\u53d1<\/td>\n<\/tr>\n<tr>\n<td>\u7b2c\u516d\u7ae0<\/td>\n<td>\u7528\u6210\u719f\u6846\u67b6\u600e\u4e48\u89c4\u8303\u5730\u6784\u5efa<\/td>\n<td>\u4e0e\u7b2c\u56db\u7ae0\u6784\u6210&#034;\u624b\u5199 vs \u6846\u67b6&#034;\u7684\u5bf9\u7167&#xff1b;\u76f4\u63a5\u94fa\u57ab\u7b2c 7 \u7ae0\u300c\u6784\u5efa\u4f60\u7684\u667a\u80fd\u4f53\u6846\u67b6\u300d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e00\u53e5\u8bdd\u4e32\u8054&#xff1a;\u5148\u624b\u5199\u4e09\u79cd\u8303\u5f0f\u641e\u61c2\u539f\u7406&#xff08;\u7b2c\u56db\u7ae0&#xff09;\u2192 \u518d\u7528\u4f4e\u4ee3\u7801\u5e73\u53f0\u63d0\u901f&#xff08;\u7b2c\u4e94\u7ae0&#xff09;\u2192 \u518d\u56de\u5230\u4e13\u4e1a\u6846\u67b6\u89e3\u51b3\u591a\u667a\u80fd\u4f53\u4e0e\u590d\u6742\u6d41\u7a0b&#xff08;\u7b2c\u516d\u7ae0&#xff09;\u2192 \u6700\u7ec8\u81ea\u5df1\u9020\u4e00\u4e2a\u6846\u67b6&#xff08;\u7b2c\u4e03\u7ae0&#xff09;\u3002<\/p>\n<p>\u8d2f\u7a7f\u4e09\u7ae0\u7684\u4e00\u6761\u6697\u7ebf&#xff1a;\u7b2c\u56db\u7ae0\u66b4\u9732\u7684\u5de5\u7a0b\u75db\u70b9&#xff08;\u8f93\u51fa\u89e3\u6790\u3001\u5de5\u5177\u5931\u8d25\u91cd\u8bd5\u3001\u9632\u6b7b\u5faa\u73af\u3001\u72b6\u6001\u7ba1\u7406\u3001\u53ef\u89c2\u6d4b\u6027&#xff09;&#xff0c;\u6b63\u662f\u7b2c\u4e94\u7ae0\u5e73\u53f0\u4e0e\u7b2c\u516d\u7ae0\u6846\u67b6\u5b58\u5728\u7684\u7406\u7531\u3002<\/p>\n<hr \/>\n<h3>\u524d\u7f6e\u4e3b\u7ebf\u56de\u987e&#xff08;\u8854\u63a5\u7b2c 1\u20133 \u7ae0&#xff09;<\/h3>\n<p>\u7b2c\u56db\u7ae0\u662f\u524d\u4e09\u7ae0\u7684\u5b9e\u6218\u843d\u5730&#xff0c;\u8fdb\u5165\u524d\u9700\u8981\u5e26\u4e0a\u7684\u56db\u5757\u77e5\u8bc6&#xff1a;<\/p>\n<li>\u667a\u80fd\u4f53\u5b9a\u4e49\u4e0e\u5206\u7c7b&#xff1a;\u667a\u80fd\u4f53 &#061; \u901a\u8fc7\u4f20\u611f\u5668\u611f\u77e5\u73af\u5883\u3001\u901a\u8fc7\u6267\u884c\u5668\u81ea\u4e3b\u884c\u52a8\u7684\u5b9e\u4f53&#xff1b;&#034;\u667a\u80fd&#034;\u6765\u81ea\u81ea\u4e3b\u6027\u800c\u975e\u7b97\u529b\u3002\u5206\u7c7b\u4e09\u7ef4\u5ea6\u2014\u2014\u51b3\u7b56\u67b6\u6784&#xff08;\u53cd\u5c04 \/ \u57fa\u4e8e\u6a21\u578b \/ \u57fa\u4e8e\u76ee\u6807 \/ \u57fa\u4e8e\u6548\u7528 \/ \u5b66\u4e60\u578b&#xff09;\u3001\u65f6\u95f4\u4e0e\u53cd\u5e94\u6027&#xff08;\u53cd\u5e94\u5f0f \/ \u89c4\u5212\u5f0f \/ \u6df7\u5408\u5f0f&#xff09;\u3001\u77e5\u8bc6\u8868\u793a&#xff08;\u7b26\u53f7 \/ \u4e9a\u7b26\u53f7 \/ \u795e\u7ecf\u7b26\u53f7&#xff09;\u3002\u73b0\u4ee3 LLM \u667a\u80fd\u4f53\u662f\u6df7\u5408\u5f0f &#043; \u795e\u7ecf\u7b26\u53f7\u4e3b\u4e49\u7684\u5b9e\u8df5&#xff1a;\u795e\u7ecf\u7f51\u7edc\u63d0\u4f9b\u76f4\u89c9&#xff0c;\u7ed3\u6784\u5316\u7684 Thought\/Plan\/Tool Call \u63d0\u4f9b\u53ef\u8ffd\u6eaf\u7684\u7406\u6027\u3002<\/li>\n<li>\u6838\u5fc3\u7ec4\u4ef6\u4e0e\u8fd0\u884c\u5faa\u73af&#xff1a;Agent Loop &#061; \u611f\u77e5 \u2192 \u601d\u8003&#xff08;\u89c4\u5212 &#043; \u5de5\u5177\u9009\u62e9&#xff09;\u2192 \u884c\u52a8 \u2192 \u89c2\u5bdf \u2192 \u5faa\u73af&#xff1b;\u5bf9\u5916\u8868\u73b0\u4e3a Thought \/ Action \/ Observation \u4e09\u6bb5\u5f0f\u534f\u8bae\u3002<\/li>\n<li>LLM \u7684\u80fd\u529b\u8fb9\u754c\u4e0e\u5c40\u9650&#xff1a;\u672c\u8d28\u662f&#034;\u9884\u6d4b\u4e0b\u4e00\u4e2a\u8bcd&#034;\u7684\u81ea\u56de\u5f52\u6a21\u578b&#xff0c;\u65e0\u5185\u7f6e\u4e8b\u5b9e\u6838\u67e5\u6a21\u5757 \u2192 \u5e7b\u89c9&#xff1b;\u77e5\u8bc6\u6709\u65f6\u6548\u622a\u6b62&#xff1b;\u8fd8\u6709\u504f\u89c1\u3002\u8fd9\u51b3\u5b9a\u4e86\u5de5\u5177\u3001RAG\u3001Reflection \u4e09\u7c7b\u8865\u6551\u624b\u6bb5\u7684\u5fc5\u8981\u6027\u3002<\/li>\n<li>Prompt \u5de5\u7a0b\u5173\u952e\u539f\u5219&#xff08;\u4e09\u7ae0\u53cd\u590d\u5728\u7528&#xff09;&#xff1a;\u89d2\u8272\u8bbe\u5b9a \u2192 \u4efb\u52a1\u63cf\u8ff0 \u2192 \u683c\u5f0f\u89c4\u7ea6&#xff08;\u5f3a\u5236\u7ed3\u6784\u5316\u8f93\u51fa&#xff09;\u2192 \u52a8\u6001\u4e0a\u4e0b\u6587\u6ce8\u5165 \u2192 \u7ec8\u6b62\u6761\u4ef6&#xff1b;\u8c03\u8bd5\u65f6\u901a\u5e38\u628a temperature \u8bbe\u4e3a 0 \u4fdd\u8bc1\u786e\u5b9a\u6027&#xff1b;\u683c\u5f0f\u4e0d\u7a33\u5b9a\u65f6\u52a0 few-shot \u793a\u4f8b\u3002<\/li>\n<hr \/>\n<h2>\u7b2c\u56db\u7ae0 \u667a\u80fd\u4f53\u7ecf\u5178\u8303\u5f0f\u6784\u5efa&#xff08;\u91cd\u70b9&#xff09;<\/h2>\n<h3>4.1 \u73af\u5883\u51c6\u5907\u4e0e\u57fa\u7840\u5de5\u5177\u5b9a\u4e49<\/h3>\n<h4>4.1.1 \u73af\u5883\u4e0e\u5bc6\u94a5<\/h4>\n<ul>\n<li>\u4f9d\u8d56&#xff1a;openai&#xff08;LLM \u8c03\u7528&#xff09;&#043; python-dotenv&#xff08;\u5bc6\u94a5\u7ba1\u7406&#xff09;&#xff1b;Python 3.10&#043;\u3002<\/li>\n<li>\u5bc6\u94a5\u4e0e\u6a21\u578b\u4fe1\u606f\u7edf\u4e00\u653e .env&#xff0c;\u4ee3\u7801\u81ea\u52a8\u52a0\u8f7d&#xff1a;LLM_API_KEY \/ LLM_MODEL_ID \/ LLM_BASE_URL\u3002<\/li>\n<\/ul>\n<h4>4.1.2 \u5c01\u88c5 LLM \u5ba2\u6237\u7aef&#xff1a;HelloAgentsLLM<\/h4>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">HelloAgentsLLM<\/span><span class=\"token punctuation\">:<\/span>                       <span class=\"token comment\"># \u4f18\u5148\u7528\u6784\u9020\u53c2\u6570&#xff0c;\u7f3a\u5931\u5219\u56de\u843d\u5230\u73af\u5883\u53d8\u91cf<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">__init__<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> model<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">None<\/span><span class=\"token punctuation\">,<\/span> apiKey<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">None<\/span><span class=\"token punctuation\">,<\/span> baseUrl<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">None<\/span><span class=\"token punctuation\">,<\/span> timeout<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">None<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">think<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> messages<span class=\"token punctuation\">:<\/span> List<span class=\"token punctuation\">[<\/span>Dict<span class=\"token punctuation\">[<\/span><span class=\"token builtin\">str<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> temperature<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><\/p>\n<p>\u8bbe\u8ba1\u8981\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u7edf\u4e00\u5165\u53e3&#xff1a;\u6240\u6709\u8303\u5f0f\u53ea\u4f9d\u8d56 think(messages) -&gt; str \u4e00\u4e2a\u65b9\u6cd5&#xff0c;\u6362\u6a21\u578b\/\u6362\u670d\u52a1\u5546\u90fd\u4e0d\u6539\u4e0a\u5c42\u903b\u8f91&#xff08;\u4f9d\u8d56\u5012\u7f6e&#xff09;\u3002<\/li>\n<li>\u9ed8\u8ba4\u6d41\u5f0f&#xff1a;stream&#061;True \u9010 chunk \u6536\u96c6\u540e\u62fc\u63a5\u6210\u5b8c\u6574\u5b57\u7b26\u4e32&#xff1b;\u9519\u8bef\u65f6\u8fd4\u56de None \u800c\u975e\u629b\u5f02\u5e38&#xff0c;\u7531\u4e0a\u5c42\u51b3\u5b9a\u662f\u5426\u91cd\u8bd5\u6216\u964d\u7ea7\u3002<\/li>\n<li>\u5f3a\u6821\u9a8c&#xff1a;model \/ apiKey \/ baseUrl \u4e09\u8005\u7f3a\u4e00\u5373\u629b ValueError&#xff0c;\u4e0d\u8ba9\u7cfb\u7edf\u5e26\u75c5\u542f\u52a8\u3002<\/li>\n<li>\u9ed8\u8ba4 temperature&#061;0&#xff1a;\u4fdd\u8bc1\u8f93\u51fa\u786e\u5b9a\u6027&#xff08;\u5bf9\u5e94\u7b2c\u4e09\u7ae0\u91c7\u6837\u53c2\u6570\u4e09\u6863&#xff09;\u3002<\/li>\n<\/ul>\n<h4>4.1.3 \u5de5\u5177\u7684\u5b9a\u4e49\u4e0e\u7ba1\u7406<\/h4>\n<p>\u5de5\u5177\u7684\u4e09\u8981\u7d20&#xff08;\u2b50 \u8fd9\u662f\u7b2c\u56db\u7ae0\u6700\u503c\u5f97\u8bb0\u4f4f\u7684\u4e00\u6761&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u8981\u7d20\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>\u540d\u79f0&#xff08;Name&#xff09;<\/td>\n<td>\u7b80\u6d01\u552f\u4e00\u7684\u6807\u8bc6\u7b26&#xff0c;\u4f9b Action \u8c03\u7528&#xff0c;\u5982 Search<\/td>\n<\/tr>\n<tr>\n<td>\u63cf\u8ff0&#xff08;Description&#xff09;<\/td>\n<td>\u81ea\u7136\u8bed\u8a00\u8bf4\u660e\u7528\u9014 \u2014\u2014 \u6574\u4e2a\u673a\u5236\u4e2d\u6700\u5173\u952e\u7684\u90e8\u5206&#xff0c;LLM \u9760\u5b83\u5224\u65ad\u4f55\u65f6\u8be5\u7528\u54ea\u4e2a\u5de5\u5177<\/td>\n<\/tr>\n<tr>\n<td>\u6267\u884c\u903b\u8f91&#xff08;Execution Logic&#xff09;<\/td>\n<td>\u771f\u6b63\u5e72\u6d3b\u7684\u51fd\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5de5\u5177\u6267\u884c\u5668 ToolExecutor&#xff1a;\u7ef4\u62a4 {\u5de5\u5177\u540d: {description, func}} \u5b57\u5178&#xff0c;\u63d0\u4f9b registerTool&#xff08;\u6ce8\u518c&#xff0c;\u91cd\u540d\u8b66\u544a\u5e76\u8986\u76d6&#xff09;\u3001getTool&#xff08;\u6309\u540d\u53d6\u51fd\u6570&#xff09;\u3001getAvailableTools&#xff08;\u62fc\u6210\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u6ce8\u5165\u63d0\u793a\u8bcd&#xff09;\u3002<\/p>\n<p>\u672c\u7ae0\u7684\u5b9e\u6218\u5de5\u5177 search&#xff08;\u57fa\u4e8e SerpApi&#xff09; \u7684\u5de5\u7a0b\u7ec6\u8282&#xff0c;\u662f&#034;\u5de5\u5177\u8be5\u600e\u4e48\u5199&#034;\u7684\u8303\u672c&#xff1a;<\/p>\n<ul>\n<li>\u4f18\u5148\u89e3\u6790 answer_box \/ knowledge_graph \u7b49\u6700\u7cbe\u786e\u7684\u7ed3\u679c&#xff0c;\u6ca1\u6709\u624d\u9000\u56de\u524d 3 \u6761\u6709\u673a\u7ed3\u679c\u6458\u8981 \u2014\u2014 \u8fd9\u53eb\u667a\u80fd\u89e3\u6790&#xff0c;\u76f4\u63a5\u63d0\u9ad8\u5582\u7ed9 LLM \u7684\u4fe1\u606f\u8d28\u91cf\u3002<\/li>\n<li>\u5185\u90e8 try\/except \u515c\u4f4f\u5f02\u5e38&#xff0c;\u628a\u9519\u8bef\u8f6c\u6210\u5b57\u7b26\u4e32\u8fd4\u56de&#xff08;\u5982 &#034;\u641c\u7d22\u65f6\u53d1\u751f\u9519\u8bef: &#8230;&#034;&#xff09;&#xff0c;\u56e0\u4e3a\u8fd4\u56de\u7684\u6587\u672c\u4f1a\u4f5c\u4e3a Observation \u8fdb\u5165\u4e0b\u4e00\u8f6e&#xff0c;\u8ba9\u667a\u80fd\u4f53\u81ea\u6211\u7ea0\u6b63\u3002<\/li>\n<\/ul>\n<h3>4.2 ReAct&#xff08;Reasoning and Acting&#xff09;<\/h3>\n<p>ReAct&#xff08;Yao et al., ICLR 2023&#xff09;\u8303\u5f0f&#xff1a;\u662f\u6700\u7ecf\u5178\u7684\u4e00\u4e2a\u667a\u80fd\u4f53\u8303\u5f0f&#xff0c;\u628a**\u63a8\u7406&#xff08;Reasoning&#xff09;\u4e0e\u884c\u52a8&#xff08;Acting&#xff09;**\u663e\u5f0f\u7ed3\u5408&#xff0c;\u5f62\u6210&#034;\u601d\u8003\u2014\u884c\u52a8\u2014\u89c2\u5bdf&#034;\u5faa\u73af&#xff0c;\u8fb9\u60f3\u8fb9\u505a\u3001\u52a8\u6001\u8c03\u6574\u3002<\/p>\n<h4>4.2.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u5b83<\/h4>\n<ul>\n<li>\u7eaf\u601d\u8003\u578b&#xff08;\u5982\u601d\u7ef4\u94fe CoT&#xff09;&#xff1a;\u80fd\u63a8\u7406&#xff0c;\u4f46\u65e0\u6cd5\u4e0e\u5916\u90e8\u4e16\u754c\u4ea4\u4e92 \u2192 \u5bb9\u6613\u4ea7\u751f\u4e8b\u5b9e\u5e7b\u89c9\u3002<\/li>\n<li>\u7eaf\u884c\u52a8\u578b&#xff1a;\u76f4\u63a5\u8f93\u51fa\u52a8\u4f5c&#xff0c;\u4f46\u7f3a\u4e4f\u89c4\u5212\u4e0e\u7ea0\u9519\u80fd\u529b\u3002<\/li>\n<li>ReAct \u7684\u6d1e\u89c1&#xff1a;\u601d\u8003\u4e0e\u884c\u52a8\u76f8\u8f85\u76f8\u6210 \u2014\u2014 \u601d\u8003\u6307\u5bfc\u884c\u52a8&#xff0c;\u884c\u52a8\u7684\u7ed3\u679c\u53cd\u8fc7\u6765\u4fee\u6b63\u601d\u8003\u3002<\/li>\n<\/ul>\n<p>\u5f62\u5f0f\u5316\u8868\u8fbe&#xff08;\u53ea\u8bb0\u542b\u4e49&#xff0c;\u4e0d\u8bb0\u7b26\u53f7&#xff09;&#xff1a;\u5728\u7b2c <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">tt<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6151em\"><\/span><span class=\"mord mathnormal\">t<\/span><\/span><\/span><\/span><\/span> \u6b65&#xff0c;\u7b56\u7565 <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">\u03c0\\\\pi<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.4306em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">\u03c0<\/span><\/span><\/span><\/span><\/span>&#xff08;\u5373 LLM&#xff09;\u6839\u636e\u521d\u59cb\u95ee\u9898 <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">qq<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.625em;vertical-align: -0.1944em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">q<\/span><\/span><\/span><\/span><\/span> \u4e0e\u5386\u53f2\u6240\u6709&#xff08;\u884c\u52a8, \u89c2\u5bdf&#xff09;\u5bf9&#xff0c;\u751f\u6210\u672c\u8f6e\u7684\u601d\u8003\u548c\u884c\u52a8&#xff1b;\u5de5\u5177\u6267\u884c\u884c\u52a8\u540e\u8fd4\u56de\u65b0\u89c2\u5bdf&#xff1b;\u628a\u65b0\u7684&#xff08;\u884c\u52a8, \u89c2\u5bdf&#xff09;\u5bf9\u8ffd\u52a0\u8fdb\u5386\u53f2&#xff0c;\u76f4\u5230\u6a21\u578b\u5728\u601d\u8003\u4e2d\u5224\u65ad\u4efb\u52a1\u5b8c\u6210\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182444-6aea26ec6d576.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>ReAct\u7684\u5de7\u5999\u4e4b\u5904\u5728\u4e8e&#xff0c;\u5b83\u8ba4\u8bc6\u5230\u601d\u8003\u4e0e\u884c\u52a8\u662f\u76f8\u8f85\u76f8\u6210\u7684\u3002\u601d\u8003\u6307\u5bfc\u884c\u52a8&#xff0c;\u800c\u884c\u52a8\u7684\u7ed3\u679c\u53c8\u53cd\u8fc7\u6765\u4fee\u6b63\u601d\u8003\u3002\u4e3a\u6b64&#xff0c;ReAct\u8303\u5f0f\u901a\u8fc7\u4e00\u79cd\u7279\u6b8a\u7684\u63d0\u793a\u5de5\u7a0b\u6765\u5f15\u5bfc\u6a21\u578b&#xff0c;\u4f7f\u5176\u6bcf\u4e00\u6b65\u7684\u8f93\u51fa\u90fd\u9075\u5faa\u4e00\u4e2a\u56fa\u5b9a\u7684\u8f68\u8ff9&#xff1a;<\/p>\n<p>Thought (\u601d\u8003)&#xff1a; \u8fd9\u662f\u667a\u80fd\u4f53\u7684\u201c\u5185\u5fc3\u72ec\u767d\u201d\u3002\u5b83\u4f1a\u5206\u6790\u5f53\u524d\u60c5\u51b5\u3001\u5206\u89e3\u4efb\u52a1\u3001\u5236\u5b9a\u4e0b\u4e00\u6b65\u8ba1\u5212&#xff0c;\u6216\u8005\u53cd \u601d\u4e0a\u4e00\u6b65\u7684\u7ed3\u679c\u3002<\/p>\n<p>Action (\u884c\u52a8)&#xff1a; \u8fd9\u662f\u667a\u80fd\u4f53\u51b3\u5b9a\u91c7\u53d6\u7684\u5177\u4f53\u52a8\u4f5c&#xff0c;\u901a\u5e38\u662f\u8c03\u7528\u4e00\u4e2a\u5916\u90e8\u5de5\u5177&#xff0c;\u4f8b\u5982 Search[\u2018\u534e\u4e3a\u6700\u65b0\u6b3e \u624b\u673a\u2019] \u3002<\/p>\n<p>Observation (\u89c2\u5bdf)&#xff1a; \u8fd9\u662f\u6267\u884c Action \u540e\u4ece\u5916\u90e8\u5de5\u5177\u8fd4\u56de\u7684\u7ed3\u679c&#xff0c;\u4f8b\u5982\u641c\u7d22\u7ed3\u679c\u7684\u6458\u8981\u6216API\u7684\u8fd4\u56de \u503c\u3002<\/p>\n<p>\u667a\u80fd\u4f53\u5c06\u4e0d\u65ad\u91cd\u590d\u8fd9\u4e2a Thought -&gt; Action -&gt; Observation \u7684\u5faa\u73af&#xff0c;\u5c06\u65b0\u7684\u89c2\u5bdf\u7ed3\u679c\u8ffd\u52a0\u5230\u5386\u53f2\u8bb0\u5f55\u4e2d&#xff0c; \u5f62\u6210\u4e00\u4e2a\u4e0d\u65ad\u589e\u957f\u7684\u4e0a\u4e0b\u6587&#xff0c;\u76f4\u5230\u5b83\u5728 Thought \u4e2d\u8ba4\u4e3a\u5df2\u7ecf\u627e\u5230\u4e86\u6700\u7ec8\u7b54\u6848&#xff0c;\u7136\u540e\u8f93\u51fa\u7ed3\u679c\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u5f62\u6210 \u4e86\u4e00\u4e2a\u5f3a\u5927\u7684\u534f\u540c\u6548\u5e94&#xff1a;\u63a8\u7406\u4f7f\u5f97\u884c\u52a8\u66f4\u5177\u76ee\u7684\u6027&#xff0c;\u800c\u884c\u52a8\u5219\u4e3a\u63a8\u7406\u63d0\u4f9b\u4e86\u4e8b\u5b9e\u4f9d\u636e\u3002<\/p>\n<p>ReAct\u9002\u7528\u573a\u666f&#xff1a;\u9700\u8981\u5916\u90e8\u77e5\u8bc6\u7684\u4efb\u52a1&#xff08;\u5b9e\u65f6\u4fe1\u606f\u67e5\u8be2&#xff09;\u3001\u9700\u8981\u7cbe\u786e\u8ba1\u7b97\u7684\u4efb\u52a1&#xff08;\u4ea4\u7ed9\u8ba1\u7b97\u5668\u907f\u514d LLM \u7b97\u9519&#xff09;\u3001\u9700\u8981\u4e0e API\/\u6570\u636e\u5e93\u4ea4\u4e92\u7684\u4efb\u52a1\u3002<\/p>\n<h4>4.2.2 \u63d0\u793a\u8bcd\u6a21\u677f&#xff08;ReAct \u7684\u673a\u5236\u57fa\u77f3&#xff09;<\/h4>\n<p>\u8bf7\u6ce8\u610f&#xff0c;\u4f60\u662f\u4e00\u4e2a\u6709\u80fd\u529b\u8c03\u7528\u5916\u90e8\u5de5\u5177\u7684\u667a\u80fd\u52a9\u624b\u3002<br \/>\n\u53ef\u7528\u5de5\u5177\u5982\u4e0b<span class=\"token punctuation\">:<\/span><br \/>\n<span class=\"token punctuation\">{<\/span>tools<span class=\"token punctuation\">}<\/span><br \/>\n\u8bf7\u4e25\u683c\u6309\u7167\u4ee5\u4e0b\u683c\u5f0f\u8fdb\u884c\u56de\u5e94<span class=\"token punctuation\">:<\/span><br \/>\nThought<span class=\"token punctuation\">:<\/span> \u4f60\u7684\u601d\u8003\u8fc7\u7a0b&#xff0c;\u7528\u4e8e\u5206\u6790\u95ee\u9898\u3001\u62c6\u89e3\u4efb\u52a1\u548c\u89c4\u5212\u4e0b\u4e00\u6b65\u884c\u52a8\u3002<br \/>\nAction<span class=\"token punctuation\">:<\/span> \u4f60\u51b3\u5b9a\u91c7\u53d6\u7684\u884c\u52a8&#xff0c;\u5fc5\u987b\u662f\u4ee5\u4e0b\u683c\u5f0f\u4e4b\u4e00<span class=\"token punctuation\">:<\/span><br \/>\n<span class=\"token operator\">&#8211;<\/span> &#096;<span class=\"token punctuation\">{<\/span>tool_name<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">{<\/span>tool_input<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">]<\/span>&#096;&#xff1a;\u8c03\u7528\u4e00\u4e2a\u53ef\u7528\u5de5\u5177\u3002<br \/>\n<span class=\"token operator\">&#8211;<\/span> &#096;Finish<span class=\"token punctuation\">[<\/span>\u6700\u7ec8\u7b54\u6848<span class=\"token punctuation\">]<\/span>&#096;&#xff1a;\u5f53\u4f60\u8ba4\u4e3a\u5df2\u7ecf\u83b7\u5f97\u6700\u7ec8\u7b54\u6848\u65f6\u3002<br \/>\n\u73b0\u5728&#xff0c;\u8bf7\u5f00\u59cb\u89e3\u51b3\u4ee5\u4e0b\u95ee\u9898<span class=\"token punctuation\">:<\/span><br \/>\nQuestion<span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">{<\/span>question<span class=\"token punctuation\">}<\/span><br \/>\nHistory<span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">{<\/span>history<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u56db\u90e8\u5206\u5404\u81ea\u7684\u4f5c\u7528&#xff1a;<\/p>\n<table>\n<tr>\u90e8\u5206\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>\u89d2\u8272\u5b9a\u4e49<\/td>\n<td>\u201c\u6709\u80fd\u529b\u8c03\u7528\u5916\u90e8\u5de5\u5177\u7684\u667a\u80fd\u52a9\u624b\u201d&#xff0c;\u8bbe\u5b9a LLM \u7684\u89d2\u8272<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u5177\u6e05\u5355 {tools}<\/td>\n<td>\u544a\u8bc9 LLM \u5b83\u6709\u54ea\u4e9b&#034;\u624b\u811a&#034;<\/td>\n<\/tr>\n<tr>\n<td>\u683c\u5f0f\u89c4\u7ea6&#xff08;Thought\/Action&#xff09;<\/td>\n<td>\u2b50 \u6700\u91cd\u8981&#xff1a;\u5f3a\u5236\u8f93\u51fa\u7ed3\u6784\u5316&#xff0c;\u4ee3\u7801\u624d\u80fd\u7528\u6b63\u5219\u7cbe\u786e\u89e3\u6790\u610f\u56fe<\/td>\n<\/tr>\n<tr>\n<td>\u52a8\u6001\u4e0a\u4e0b\u6587 {question} \/ {history}<\/td>\n<td>\u6ce8\u5165\u539f\u59cb\u95ee\u9898\u4e0e\u4e0d\u65ad\u7d2f\u79ef\u7684\u4ea4\u4e92\u5386\u53f2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4.2.3 \u6838\u5fc3\u5faa\u73af\u4e0e\u4e94\u4e2a\u5de5\u7a0b\u7ec6\u8282 \u2b50<\/h4>\n<p>\u5faa\u73af\u4e3b\u5e72&#xff1a;\u683c\u5f0f\u5316\u63d0\u793a\u8bcd \u2192 \u8c03\u7528 LLM \u2192 \u89e3\u6790\u8f93\u51fa \u2192 \u6267\u884c\u5de5\u5177 \u2192 \u6574\u5408 Observation&#xff0c;\u76f4\u5230\u4efb\u52a1\u5b8c\u6210\u6216\u8fbe\u5230 max_steps\u3002<\/p>\n<table>\n<tr>\u7ec6\u8282\u505a\u6cd5\u4e3a\u4ec0\u4e48<\/tr>\n<tbody>\n<tr>\n<td>\u2460 \u6700\u5927\u5faa\u73af\u6b21\u6570<\/td>\n<td>while current_step &lt; self.max_steps&#xff08;\u9ed8\u8ba4 5&#xff09;<\/td>\n<td>\u2b50 \u9632\u6b7b\u5faa\u73af\u7684\u5b89\u5168\u9600&#xff0c;\u9632\u8d44\u6e90\u8017\u5c3d<\/td>\n<\/tr>\n<tr>\n<td>\u2461 \u6b63\u5219\u89e3\u6790<\/td>\n<td>Thought:\\\\s*(.*?)(?&#061;\\\\nAction:|$) \u4e0e Action:\\\\s*(.*?)$&#xff0c;Action \u518d\u7528 (\\\\w&#043;)\\\\[(.*)\\\\] \u62c6\u51fa\u5de5\u5177\u540d\u4e0e\u8f93\u5165<\/td>\n<td>\u4ece\u7eaf\u6587\u672c\u4e2d\u7cbe\u786e\u63d0\u53d6\u610f\u56fe<\/td>\n<\/tr>\n<tr>\n<td>\u2462 \u622a\u65ad\u4e0e\u515c\u5e95<\/td>\n<td>\u89e3\u6790\u4e0d\u51fa Action \u5c31\u6253\u5370\u8b66\u544a\u5e76\u7ec8\u6b62&#xff1b;\u5de5\u5177\u4e0d\u5b58\u5728\u8fd4\u56de &#034;\u9519\u8bef:\u672a\u627e\u5230\u540d\u4e3a X \u7684\u5de5\u5177\u3002&#034;<\/td>\n<td>\u628a\u5931\u8d25\u8f6c\u6210\u53ef\u88ab\u6a21\u578b\u7406\u89e3\u7684\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td>\u2463 \u5de5\u5177\u5206\u53d1<\/td>\n<td>tool_executor.getTool(name) \u53d6\u51fd\u6570\u540e\u6267\u884c<\/td>\n<td>\u5de5\u5177\u540d\u4e0e\u5b9e\u73b0\u89e3\u8026<\/td>\n<\/tr>\n<tr>\n<td>\u2464 \u7ec8\u6b62\u6761\u4ef6<\/td>\n<td>\u8bc6\u522b Finish[&#8230;] \u5e76 return \u6700\u7ec8\u7b54\u6848<\/td>\n<td>\u660e\u786e&#034;\u4ec0\u4e48\u65f6\u5019\u7b97\u505a\u5b8c&#034;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u95ed\u73af\u7684\u5173\u952e\u4e00\u6b65&#xff1a;\u628a\u672c\u8f6e\u7684 Action: &#8230; \u4e0e Observation: &#8230; \u8ffd\u52a0\u8fdb self.history&#xff0c;\u4e0b\u4e00\u8f6e\u751f\u6210\u63d0\u793a\u8bcd\u65f6\u6a21\u578b\u5c31\u80fd&#034;\u770b\u5230&#034;\u4e0a\u4e00\u6b65\u7684\u7ed3\u679c \u2014\u2014 \u8fd9\u5c31\u662f\u7b2c 1 \u7ae0\u7684 Agent Loop \u5728\u4ee3\u7801\u91cc\u7684\u6837\u5b50\u3002<\/p>\n<h4>4.2.4 ReAct \u7684\u7279\u70b9\u3001\u5c40\u9650\u4e0e\u8c03\u8bd5<\/h4>\n<p>\u4e09\u4e2a\u7279\u70b9&#xff1a;<\/p>\n<li>\u9ad8\u53ef\u89e3\u91ca\u6027&#xff1a;Thought \u94fe\u8ba9\u6bcf\u4e00\u6b65&#034;\u5fc3\u8def\u5386\u7a0b&#034;\u53ef\u89c1&#xff0c;\u4fbf\u4e8e\u7406\u89e3\u3001\u4fe1\u4efb\u4e0e\u8c03\u8bd5\u3002<\/li>\n<li>\u52a8\u6001\u89c4\u5212\u4e0e\u7ea0\u9519&#xff1a;\u8d70\u4e00\u6b65\u770b\u4e00\u6b65&#xff0c;\u641c\u7d22\u7ed3\u679c\u4e0d\u7406\u60f3\u5c31\u4e0b\u4e00\u6b65\u4fee\u6b63\u641c\u7d22\u8bcd\u3002<\/li>\n<li>\u5de5\u5177\u534f\u540c&#xff1a;LLM \u8fd0\u7b79\u5e37\u5e44&#xff08;\u89c4\u5212\u63a8\u7406&#xff09;&#xff0c;\u5de5\u5177\u89e3\u51b3\u5177\u4f53\u95ee\u9898&#xff08;\u641c\u7d22\u3001\u8ba1\u7b97&#xff09;&#xff0c;\u7a81\u7834\u5355\u4e00 LLM \u5728\u77e5\u8bc6\u65f6\u6548\u6027\u4e0e\u8ba1\u7b97\u51c6\u786e\u6027\u4e0a\u7684\u5c40\u9650\u3002<\/li>\n<p>\u56db\u4e2a\u56fa\u6709\u5c40\u9650&#xff08;\u9762\u8bd5\u5e38\u95ee&#xff09;&#xff1a;<\/p>\n<li>\u5f3a\u4f9d\u8d56 LLM \u81ea\u8eab\u80fd\u529b&#xff1a;\u63a8\u7406\u3001\u6307\u4ee4\u9075\u5faa\u6216\u683c\u5f0f\u5316\u8f93\u51fa\u80fd\u529b\u4e0d\u8db3\u65f6&#xff0c;\u5bb9\u6613\u5728 Thought \u73af\u8282\u89c4\u5212\u9519\u8bef\u3001\u5728 Action \u73af\u8282\u683c\u5f0f\u8dd1\u504f\u3002<\/li>\n<li>\u6267\u884c\u6548\u7387&#xff1a;\u6bcf\u6b65\u90fd\u8981\u8c03 LLM&#xff0c;\u4e32\u884c\u5faa\u73af\u5e26\u6765\u9ad8\u5ef6\u8fdf\u4e0e\u9ad8\u8d39\u7528\u3002<\/li>\n<li>\u63d0\u793a\u8bcd\u8106\u5f31\u6027&#xff1a;\u6a21\u677f\u5fae\u5c0f\u6539\u52a8\u751a\u81f3\u7528\u8bcd\u5dee\u5f02\u90fd\u53ef\u80fd\u5f71\u54cd\u884c\u4e3a&#xff1b;\u5e76\u975e\u6240\u6709\u6a21\u578b\u90fd\u80fd\u7a33\u5b9a\u9075\u5faa\u683c\u5f0f\u3002<\/li>\n<li>\u53ef\u80fd\u9677\u5165\u5c40\u90e8\u6700\u4f18 \/ \u539f\u5730\u6253\u8f6c&#xff1a;\u6b65\u8fdb\u5f0f\u51b3\u7b56\u7f3a\u4e4f\u5168\u5c40\u957f\u8fdc\u89c4\u5212\u3002<\/li>\n<p>\u4e94\u6761\u8c03\u8bd5\u6280\u5de7&#xff08;\u5b9e\u7528&#xff09;&#xff1a;<\/p>\n<li>\u8c03\u7528 LLM \u524d&#xff0c;\u6253\u5370\u5b8c\u6574\u63d0\u793a\u8bcd&#xff08;\u542b\u6240\u6709\u5386\u53f2&#xff09;\u2014\u2014\u8ffd\u6eaf\u51b3\u7b56\u6e90\u5934\u3002<\/li>\n<li>\u89e3\u6790\u5931\u8d25\u65f6&#xff0c;\u6253\u5370\u539f\u59cb\u672a\u5904\u7406\u6587\u672c\u2014\u2014\u533a\u5206\u662f\u6a21\u578b\u6ca1\u5b88\u683c\u5f0f\u8fd8\u662f\u6b63\u5219\u5199\u9519\u3002<\/li>\n<li>\u9a8c\u8bc1\u5de5\u5177\u7684\u8f93\u5165\u8f93\u51fa\u683c\u5f0f\u662f\u5426\u5339\u914d\u3002<\/li>\n<li>\u52a0 few-shot \u793a\u4f8b&#xff1a;\u5728\u63d0\u793a\u8bcd\u4e2d\u653e\u5165\u4e00\u4e24\u4e2a\u5b8c\u6574\u7684 T-A-O \u6210\u529f\u6848\u4f8b\u3002<\/li>\n<li>\u6362\u66f4\u5f3a\u6a21\u578b\u6216\u628a temperature \u8bbe\u4e3a 0\u3002<\/li>\n<h3>4.3 Plan-and-Solve&#xff08;\u5148\u89c4\u5212&#xff0c;\u540e\u6267\u884c&#xff09;<\/h3>\n<p>Plan-and-Solve&#xff08;Wang et al., 2023&#xff09;\u8303\u5f0f&#xff1a;\u4e3a**\u89e3\u51b3\u601d\u7ef4\u94fe\u5728\u591a\u6b65\u590d\u6742\u95ee\u9898\u4e0a\u5bb9\u6613&#034;\u504f\u79bb\u8f68\u9053&#034;**\u800c\u751f\u3002\u5b83\u5c06\u4efb\u52a1\u5904\u7406\u660e\u786e\u5730\u5206\u4e3a\u4e24\u4e2a\u9636\u6bb5&#xff1a;\u5148\u89c4\u5212 (Plan)&#xff0c;\u540e\u6267\u884c (Solve)\u3002<br \/>\n\u7c7b\u6bd4&#xff1a;ReAct \u50cf\u4fa6\u63a2&#xff0c;\u636e\u73b0\u573a\u7ebf\u7d22\u4e00\u6b65\u6b65\u63a8\u7406\u968f\u65f6\u8c03\u6574&#xff1b;Plan-and-Solve \u50cf\u5efa\u7b51\u5e08&#xff0c;\u5148\u7ed8\u84dd\u56fe\u518d\u4e25\u683c\u65bd\u5de5\u3002\u8bb8\u591a\u5927\u6a21\u578b\u7684 Agent \u6a21\u5f0f\u90fd\u878d\u5165\u4e86\u8fd9\u4e00\u8bbe\u8ba1\u3002<\/p>\n<h4>4.3.1 \u4e24\u9636\u6bb5\u5de5\u4f5c\u6d41<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182444-6aea26ecf3dc9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u9636\u6bb5\u505a\u4ec0\u4e48\u4ea7\u7269<\/tr>\n<tbody>\n<tr>\n<td>\u89c4\u5212\u9636\u6bb5&#xff08;Planning&#xff09;<\/td>\n<td>\u63a5\u6536\u5b8c\u6574\u95ee\u9898&#xff0c;\u5148\u5206\u89e3\u95ee\u9898\u5e76\u5236\u5b9a\u5206\u6b65\u9aa4\u884c\u52a8\u8ba1\u5212&#xff08;\u672c\u8eab\u4e5f\u662f\u4e00\u6b21 LLM \u8c03\u7528\u7684\u4ea7\u7269&#xff09;<\/td>\n<td>\u7ed3\u6784\u5316\u8ba1\u5212 <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">P&#061;(p1,p2,&#8230;,pn)P&#061;(p_1, p_2, &#8230;, p_n)<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6833em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">P<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mopen\">(<\/span><span class=\"mord\"><span class=\"mord mathnormal\">p<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3011em\"><span class=\"\" style=\"top: -2.55em;margin-left: 0em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\">1<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mpunct\">,<\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\">p<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3011em\"><span class=\"\" style=\"top: -2.55em;margin-left: 0em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\">2<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mpunct\">,<\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord\">&#8230;<\/span><span class=\"mpunct\">,<\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\">p<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.1514em\"><span class=\"\" style=\"top: -2.55em;margin-left: 0em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mathnormal mtight\">n<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span><\/td>\n<\/tr>\n<tr>\n<td>\u6267\u884c\u9636\u6bb5&#xff08;Solving&#xff09;<\/td>\n<td>\u4e25\u683c\u6309\u8ba1\u5212\u9010\u4e00\u6267\u884c&#xff0c;\u6bcf\u6b65\u53ef\u80fd\u662f\u4e00\u6b21\u72ec\u7acb LLM \u8c03\u7528<\/td>\n<td>\u7b2c <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">ii<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6595em\"><\/span><span class=\"mord mathnormal\">i<\/span><\/span><\/span><\/span><\/span> \u6b65\u7ed3\u679c <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">sis_i<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.5806em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\">s<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3117em\"><span class=\"\" style=\"top: -2.55em;margin-left: 0em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mathnormal mtight\">i<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>&#xff0c;\u4f9d\u8d56 (\u539f\u59cb\u95ee\u9898, \u5b8c\u6574\u8ba1\u5212, \u524d\u9762\u6240\u6709\u6b65\u9aa4\u7ed3\u679c)&#xff1b;\u6700\u540e\u4e00\u6b65\u5373\u6700\u7ec8\u7b54\u6848<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6838\u5fc3\u6536\u76ca&#xff1a;\u4fdd\u6301\u76ee\u6807\u4e00\u81f4\u6027&#xff0c;\u907f\u514d\u5728\u4e2d\u95f4\u6b65\u9aa4\u8ff7\u5931\u65b9\u5411\u3002<\/p>\n<p>\u9002\u7528&#xff1a;\u591a\u6b65\u6570\u5b66\u5e94\u7528\u9898\u3001\u9700\u6574\u5408\u591a\u4fe1\u606f\u6e90\u7684\u62a5\u544a\u64b0\u5199\u3001\u4ee3\u7801\u751f\u6210&#xff08;\u5148\u6784\u601d\u7ed3\u6784\u518d\u9010\u4e2a\u5b9e\u73b0&#xff09;\u2014\u2014 \u5373\u7ed3\u6784\u6027\u5f3a\u3001\u53ef\u6e05\u6670\u5206\u89e3\u7684\u4efb\u52a1\u3002<\/p>\n<h4>4.3.2 \u89c4\u5212\u5668 Planner<\/h4>\n<p>\u63d0\u793a\u8bcd\u7684\u5173\u952e\u8bbe\u8ba1&#xff08;\u4fdd\u8bc1\u8f93\u51fa\u53ef\u89e3\u6790&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u89d2\u8272\u8bbe\u5b9a&#xff1a;\u201c\u4f60\u662f\u4e00\u4e2a\u9876\u7ea7\u7684 AI \u89c4\u5212\u4e13\u5bb6\u201d\u3002<\/li>\n<li>\u4efb\u52a1\u63cf\u8ff0&#xff1a;\u628a\u590d\u6742\u95ee\u9898\u5206\u89e3\u6210\u7b80\u5355\u6b65\u9aa4\u3002<\/li>\n<li>\u683c\u5f0f\u7ea6\u675f&#xff1a;\u26a0\ufe0f \u5f3a\u5236\u8f93\u51fa\u88ab python\u5305\u88f9\u7684 Python \u5217\u8868\u5b57\u7b26\u4e32&#xff0c;\u5982 [&#034;\u6b65\u9aa41&#034;, &#034;\u6b65\u9aa42&#034;, &#034;\u6b65\u9aa43&#034;] \u2014\u2014 \u6bd4\u89e3\u6790\u81ea\u7136\u8bed\u8a00\u7a33\u5b9a\u53ef\u9760\u5f97\u591a\u3002<\/li>\n<\/ul>\n<p>\u89e3\u6790\u4fa7&#xff1a;\u5207\u51fa\u4ee3\u7801\u5757 \u2192 \u7528 ast.literal_eval \u5b89\u5168\u8f6c\u6210 Python \u5217\u8868&#xff08;\u26a0\ufe0f \u4e0d\u7528 eval&#xff09;\u2192 isinstance(plan, list) \u6821\u9a8c\u7c7b\u578b&#xff1b;ValueError \/ SyntaxError \/ IndexError \u5168\u90e8\u6355\u83b7\u5e76\u8fd4\u56de\u7a7a\u5217\u8868&#xff0c;\u540c\u65f6\u5728\u65e5\u5fd7\u91cc\u6253\u5370\u539f\u59cb\u54cd\u5e94\u3002<\/p>\n<h4>4.3.3 \u6267\u884c\u5668 Executor \u4e0e\u72b6\u6001\u7ba1\u7406<\/h4>\n<p>\u6267\u884c\u5668\u7684\u63d0\u793a\u8bcd\u5fc5\u987b\u5305\u542b\u56db\u9879\u4fe1\u606f&#xff1a;\u539f\u59cb\u95ee\u9898&#xff08;\u4e0d\u5fd8\u6700\u7ec8\u76ee\u6807&#xff09;\u3001\u5b8c\u6574\u8ba1\u5212&#xff08;\u77e5\u9053\u5f53\u524d\u6b65\u9aa4\u7684\u4f4d\u7f6e&#xff09;\u3001\u5386\u53f2\u6b65\u9aa4\u4e0e\u7ed3\u679c&#xff08;\u5f53\u524d\u6b65\u9aa4\u7684\u76f4\u63a5\u8f93\u5165&#xff09;\u3001\u5f53\u524d\u6b65\u9aa4&#xff08;\u660e\u786e\u73b0\u5728\u8981\u89e3\u51b3\u54ea\u4e00\u4e2a&#xff09;\u3002\u5e76\u8981\u6c42\u4ec5\u8f93\u51fa\u8be5\u6b65\u9aa4\u7684\u7b54\u6848&#xff0c;\u4e0d\u8f93\u51fa\u89e3\u91ca\u3002<\/p>\n<p><span class=\"token keyword\">for<\/span> i<span class=\"token punctuation\">,<\/span> step <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">enumerate<\/span><span class=\"token punctuation\">(<\/span>plan<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span>            <span class=\"token comment\"># \u4e25\u683c\u6309\u5e8f\u6267\u884c<\/span><br \/>\n    response_text <span class=\"token operator\">&#061;<\/span> llm<span class=\"token punctuation\">.<\/span>think<span class=\"token punctuation\">(<\/span>prompt<span class=\"token punctuation\">(<\/span>question<span class=\"token punctuation\">,<\/span> plan<span class=\"token punctuation\">,<\/span> history<span class=\"token punctuation\">,<\/span> step<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    history <span class=\"token operator\">&#043;&#061;<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u6b65\u9aa4 <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>i<span class=\"token operator\">&#043;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>step<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\\\\n\u7ed3\u679c: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>response_text<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\\\\n\\\\n&#034;<\/span><\/span>   <span class=\"token comment\"># \u2b50 \u72b6\u6001\u5c31\u662f\u8fd9\u6bb5\u5386\u53f2\u6587\u672c<\/span><br \/>\nfinal_answer <span class=\"token operator\">&#061;<\/span> response_text               <span class=\"token comment\"># \u6700\u540e\u4e00\u6b65\u7684\u7ed3\u679c\u5373\u6700\u7ec8\u7b54\u6848<\/span><\/p>\n<p>PlanAndSolveAgent \u7684\u8bbe\u8ba1&#xff1a;\u672c\u8eab\u4e0d\u542b\u590d\u6742\u903b\u8f91&#xff0c;\u53ea\u662f\u534f\u8c03\u8005&#xff08;Orchestrator&#xff09;&#xff0c;\u5185\u90e8\u6301\u6709 Planner \u4e0e Executor \u2014\u2014 \u8fd9\u662f&#034;\u7ec4\u5408\u4f18\u4e8e\u7ee7\u627f&#034;\u539f\u5219\u7684\u6559\u79d1\u4e66\u793a\u4f8b\u3002<\/p>\n<h4>4.3.4 \u5c40\u9650\u4e0e\u5ef6\u4f38<\/h4>\n<ul>\n<li>\u8ba1\u5212\u662f\u9759\u6001\u7684&#xff1a;\u4e00\u6b21\u6027\u751f\u6210\u3001\u4e0d\u53ef\u4fee\u6539\u3002\u82e5\u6267\u884c\u4e2d\u53d1\u73b0\u67d0\u6b65\u65e0\u6cd5\u5b8c\u6210\u6216\u7ed3\u679c\u4e0d\u7b26\u9884\u671f&#xff0c;\u9700\u8981&#034;\u52a8\u6001\u91cd\u89c4\u5212&#034;\u673a\u5236&#xff08;\u6559\u6750\u4e60\u9898 4 \u539f\u9898&#xff09;\u3002<\/li>\n<li>\u4e0e ReAct \u7684\u53d6\u820d&#xff1a;\u4efb\u52a1\u8def\u5f84\u53ef\u9884\u5224 \u2192 Plan-and-Solve&#xff1b;\u8def\u5f84\u4f9d\u8d56\u5916\u90e8\u5b9e\u65f6\u53cd\u9988 \u2192 ReAct\u3002<\/li>\n<li>\u5206\u5c42\u89c4\u5212&#xff08;\u4e60\u9898\u5ef6\u4f38&#xff09;&#xff1a;\u5148\u751f\u6210\u9ad8\u5c42\u62bd\u8c61\u8ba1\u5212&#xff0c;\u518d\u4e3a\u6bcf\u4e2a\u9ad8\u5c42\u6b65\u9aa4\u751f\u6210\u8be6\u7ec6\u5b50\u8ba1\u5212 \u2014\u2014 \u517c\u987e\u5168\u5c40\u4e0e\u53ef\u6267\u884c\u6027\u3002<\/li>\n<\/ul>\n<h3>4.4 Reflection&#xff08;\u81ea\u6211\u53cd\u601d\u4e0e\u8fed\u4ee3\u4f18\u5316&#xff09;<\/h3>\n<p>Reflection \u673a\u5236&#xff08;\u6e90\u81ea Reflexion&#xff0c;Shinn et al., NeurIPS 2023&#xff09;&#xff1a;\u4e3a\u667a\u80fd\u4f53\u5f15\u5165\u4e8b\u540e&#xff08;post-hoc&#xff09;\u81ea\u6211\u6821\u6b63\u5faa\u73af&#xff0c;\u8ba9\u5b83\u50cf\u4eba\u7c7b\u6821\u5bf9\u521d\u7a3f\u3001\u9a8c\u7b97\u6570\u5b66\u9898\u4e00\u6837\u5ba1\u89c6\u5e76\u4fee\u6b63\u81ea\u5df1\u7684\u8f93\u51fa\u3002<\/p>\n<h4>4.4.1 \u4e09\u6b65\u5faa\u73af \u2b50<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182445-6aea26ed8026b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u6b65\u9aa4\u8c01\u6765\u505a\u505a\u4ec0\u4e48<\/tr>\n<tbody>\n<tr>\n<td>\u2460 \u6267\u884c&#xff08;Execution&#xff09;<\/td>\n<td>\u7528 ReAct \u6216 Plan-and-Solve \u5b8c\u6210\u4efb\u52a1<\/td>\n<td>\u751f\u6210&#034;\u521d\u7a3f&#034;<\/td>\n<\/tr>\n<tr>\n<td>\u2461 \u53cd\u601d&#xff08;Reflection&#xff09;<\/td>\n<td>\u72ec\u7acb\u7684\u3001\u6216\u5e26\u7279\u6b8a\u63d0\u793a\u8bcd\u7684 LLM \u5b9e\u4f8b&#xff0c;\u626e\u6f14&#034;\u8bc4\u5ba1\u5458&#034;<\/td>\n<td>\u6309\u591a\u7ef4\u5ea6\u8bc4\u4f30\u5e76\u751f\u6210\u7ed3\u6784\u5316\u53cd\u9988<\/td>\n<\/tr>\n<tr>\n<td>\u2462 \u4f18\u5316&#xff08;Refinement&#xff09;<\/td>\n<td>LLM \u628a&#034;\u521d\u7a3f &#043; \u53cd\u9988&#034;\u4f5c\u4e3a\u65b0\u4e0a\u4e0b\u6587<\/td>\n<td>\u751f\u6210&#034;\u4fee\u8ba2\u7a3f&#034;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u53cd\u601d\u7684\u56db\u4e2a\u8bc4\u4f30\u7ef4\u5ea6&#xff1a;\u4e8b\u5b9e\u6027\u9519\u8bef\u3001\u903b\u8f91\u6f0f\u6d1e\u3001\u6548\u7387\u95ee\u9898\u3001\u9057\u6f0f\u4fe1\u606f\u3002<\/p>\n<p>\u5faa\u73af\u53ef\u91cd\u590d\u591a\u8f6e&#xff0c;\u76f4\u5230\u53cd\u601d\u8ba4\u4e3a\u65e0\u9700\u6539\u8fdb\u6216\u8fbe\u5230\u8fed\u4ee3\u6b21\u6570\u4e0a\u9650\u3002<\/p>\n<p>\u4e09\u70b9\u4ef7\u503c&#xff1a;<\/p>\n<li>\u63d0\u4f9b\u5185\u90e8\u7ea0\u9519\u56de\u8def \u2014\u2014 \u4e0d\u518d\u53ea\u4f9d\u8d56\u5916\u90e8\u5de5\u5177\u7684\u53cd\u9988&#xff08;ReAct \u7684 Observation&#xff09;&#xff0c;\u80fd\u4fee\u6b63\u66f4\u9ad8\u5c42\u7684\u903b\u8f91\u4e0e\u7b56\u7565\u9519\u8bef\u3002<\/li>\n<li>\u628a\u4e00\u6b21\u6027\u6267\u884c\u53d8\u6210\u6301\u7eed\u4f18\u5316\u8fc7\u7a0b&#xff0c;\u663e\u8457\u63d0\u5347\u590d\u6742\u4efb\u52a1\u6210\u529f\u7387\u4e0e\u7b54\u6848\u8d28\u91cf\u3002<\/li>\n<li>\u4e3a\u667a\u80fd\u4f53\u6784\u5efa\u4e34\u65f6\u7684\u77ed\u671f\u8bb0\u5fc6&#xff1a;&#034;\u6267\u884c\u2014\u53cd\u601d\u2014\u4f18\u5316&#034;\u7684\u5b8c\u6574\u8f68\u8ff9\u672c\u8eab\u5c31\u662f\u5b9d\u8d35\u7ecf\u9a8c&#xff1b;\u4e14\u8bb0\u5fc6\u53ef\u4ee5\u662f\u591a\u6a21\u6001\u7684&#xff08;\u4ee3\u7801\u3001\u56fe\u50cf\u7b49&#xff09;&#xff0c;\u4e3a\u591a\u6a21\u6001\u667a\u80fd\u4f53\u5960\u57fa\u3002<\/li>\n<h4>4.4.2 Memory \u6a21\u5757&#xff1a;\u8fed\u4ee3\u7684\u524d\u63d0<\/h4>\n<p>Reflection \u7684\u6838\u5fc3\u5728\u4e8e\u8fed\u4ee3&#xff0c;\u800c\u8fed\u4ee3\u7684\u524d\u63d0\u662f\u80fd\u591f\u8bb0\u4f4f\u4e4b\u524d\u7684\u5c1d\u8bd5\u4e0e\u83b7\u5f97\u7684\u53cd\u9988\u3002<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Memory<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">__init__<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span> self<span class=\"token punctuation\">.<\/span>records <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>                    <span class=\"token comment\"># \u6309\u5e8f\u5b58\u653e\u6240\u6709\u8bb0\u5f55<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">add_record<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> record_type<span class=\"token punctuation\">,<\/span> content<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span>          <span class=\"token comment\"># &#039;execution&#039; \u6216 &#039;reflection&#039;<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">get_trajectory<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span>                            <span class=\"token comment\"># \u2b50 \u6838\u5fc3&#xff1a;\u628a\u8f68\u8ff9\u5e8f\u5217\u5316\u6210\u53ef\u63d2\u5165\u63d0\u793a\u8bcd\u7684\u6587\u672c<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">get_last_execution<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span>                        <span class=\"token comment\"># \u53d6\u6700\u65b0&#034;\u521d\u7a3f&#034;\u4f9b\u53cd\u601d<\/span><\/p>\n<p>\u8bbe\u8ba1\u8981\u70b9&#xff1a;get_trajectory() \u662f\u6838\u5fc3 \u2014\u2014 \u5b83\u628a\u8bb0\u5fc6\u5e8f\u5217\u5316\u4e3a&#034;\u2014 \u4e0a\u4e00\u8f6e\u5c1d\u8bd5 (\u4ee3\u7801) \u2014\u201c\u4e0e\u201d\u2014 \u8bc4\u5ba1\u5458\u53cd\u9988 \u2014&#034;\u4ea4\u66ff\u7684\u8fde\u8d2f\u6587\u672c&#xff0c;\u76f4\u63a5\u5d4c\u5165\u540e\u7eed\u63d0\u793a\u8bcd\u3002\u8fd9\u4e5f\u662f\u7b2c 8 \u7ae0\u8bb0\u5fc6\u7cfb\u7edf\u7684\u6700\u5c0f\u96cf\u5f62\u3002<\/p>\n<h4>4.4.3 \u4e09\u5957\u63d0\u793a\u8bcdPrompt&#xff08;Reflection \u7684\u7075\u9b42&#xff09;<\/h4>\n<table>\n<tr>\u63d0\u793a\u8bcd\u89d2\u8272\u8bbe\u5b9a\u5173\u952e\u7ea6\u675f<\/tr>\n<tbody>\n<tr>\n<td>\u521d\u59cb\u6267\u884c<\/td>\n<td>\u201c\u8d44\u6df1 Python \u7a0b\u5e8f\u5458\u201d<\/td>\n<td>\u4ee3\u7801\u987b\u542b\u5b8c\u6574\u7b7e\u540d\u3001docstring\u3001\u9075\u5faa PEP 8&#xff1b;\u76f4\u63a5\u8f93\u51fa\u4ee3\u7801&#xff0c;\u4e0d\u8981\u89e3\u91ca<\/td>\n<\/tr>\n<tr>\n<td>\u53cd\u601d<\/td>\n<td>\u2b50 \u201c\u6781\u5176\u4e25\u683c\u7684\u4ee3\u7801\u8bc4\u5ba1\u4e13\u5bb6\u548c\u8d44\u6df1\u7b97\u6cd5\u5de5\u7a0b\u5e08&#xff0c;\u5bf9\u6027\u80fd\u6709\u6781\u81f4\u8981\u6c42\u201d<\/td>\n<td>\u4e13\u6ce8\u627e\u7b97\u6cd5\u6548\u7387\u74f6\u9888&#xff1b;\u5206\u6790\u65f6\u95f4\u590d\u6742\u5ea6&#xff1b;\u53ea\u6709\u7b97\u6cd5\u5c42\u9762\u5df2\u6700\u4f18\u65f6\u624d\u5141\u8bb8\u56de\u7b54&#034;\u65e0\u9700\u6539\u8fdb&#034;<\/td>\n<\/tr>\n<tr>\n<td>\u4f18\u5316<\/td>\n<td>\u201c\u8d44\u6df1 Python \u7a0b\u5e8f\u5458\u201d<\/td>\n<td>\u4e0a\u4e00\u8f6e\u4ee3\u7801 &#043; \u8bc4\u5ba1\u53cd\u9988 \u2192 \u751f\u6210\u4f18\u5316\u7248&#xff1b;\u540c\u6837\u8981\u6c42\u7b7e\u540d\/docstring\/PEP 8\u3001\u4e0d\u8f93\u51fa\u89e3\u91ca<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u2b50 \u89d2\u8272\u8bbe\u5b9a\u76f4\u63a5\u51b3\u5b9a\u4f18\u5316\u65b9\u5411&#xff1a;\u628a&#034;\u6781\u81f4\u8981\u6c42\u6548\u7387&#034;\u6362\u6210&#034;\u6ce8\u91cd\u53ef\u8bfb\u6027\u7684\u5f00\u6e90\u9879\u76ee\u7ef4\u62a4\u8005&#034;&#xff0c;\u4ea7\u51fa\u4f1a\u5b8c\u5168\u4e0d\u540c&#xff08;\u6559\u6750\u4e60\u9898 6 \u539f\u9898&#xff09;\u3002<\/p>\n<h4>4.4.4 \u7ec8\u6b62\u6761\u4ef6\u4e0e\u8fd0\u884c\u5b9e\u4f8b<\/h4>\n<ul>\n<li>\u7ec8\u6b62\u6761\u4ef6&#xff1a;\u53cd\u9988\u4e2d\u51fa\u73b0&#034;\u65e0\u9700\u6539\u8fdb&#034;&#xff0c;\u6216\u8fbe\u5230 max_iterations&#xff08;\u9ed8\u8ba4 3&#xff09;\u3002<\/li>\n<li>\u5b9e\u4f8b&#xff08;\u751f\u6210&#034;\u627e\u51fa 1 \u5230 n \u4e4b\u95f4\u6240\u6709\u7d20\u6570&#034;&#xff09;&#xff1a;\u521d\u7248\u8bd5\u9664\u6cd5 <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">O(nn)O(n\\\\sqrt{n})<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1.0503em;vertical-align: -0.25em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0278em\">O<\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\">n<\/span><span class=\"mord sqrt\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.8003em\"><span class=\"svg-align\" style=\"top: -3em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"mord\" style=\"padding-left: 0.833em\"><span class=\"mord mathnormal\">n<\/span><\/span><\/span><span class=\"\" style=\"top: -2.7603em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"hide-tail\" style=\"min-width: 0.853em;height: 1.08em\"><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.2397em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span> \u2192 \u53cd\u601d\u6307\u51fa\u74f6\u9888\u5e76\u5efa\u8bae\u57c3\u62c9\u6258\u65af\u7279\u5c3c\u7b5b\u6cd5 \u2192 \u4f18\u5316\u4e3a <span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">O(nlog\u2061log\u2061n)O(n \\\\log\\\\log n)<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0278em\">O<\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\">n<\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mop\">lo<span style=\"margin-right: 0.0139em\">g<\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mop\">lo<span style=\"margin-right: 0.0139em\">g<\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord mathnormal\">n<\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span> \u2192 \u7b2c\u4e8c\u8f6e\u53cd\u601d\u8ba4\u53ef\u6548\u7387\u5e76\u63d0\u53ca\u5206\u6bb5\u7b5b\u6cd5\u7b49\u8fdb\u9636\u65b9\u5411&#xff0c;\u4f46\u5224\u5b9a&#034;\u4e00\u822c\u60c5\u51b5\u4e0b\u65e0\u9700\u6539\u8fdb&#034; \u2192 \u6536\u655b\u7ec8\u6b62\u3002<\/li>\n<li>\u8fd9\u4e2a\u6848\u4f8b\u8bf4\u660e&#xff1a;Reflection \u7684\u4ef7\u503c\u4e0d\u4ec5\u662f\u4fee\u590d\u9519\u8bef&#xff0c;\u66f4\u662f\u9a71\u52a8\u65b9\u6848\u5728\u8d28\u91cf\u548c\u6548\u7387\u4e0a\u9636\u68af\u5f0f\u63d0\u5347\u3002<\/li>\n<\/ul>\n<h4>4.4.5 \u6210\u672c\u6536\u76ca\u5206\u6790&#xff08;\u5fc5\u8003&#xff09;<\/h4>\n<table>\n<tr>\u6210\u672c\u6536\u76ca<\/tr>\n<tbody>\n<tr>\n<td>\u6a21\u578b\u8c03\u7528\u5f00\u9500&#xff1a;\u6bcf\u8f6e\u81f3\u5c11\u989d\u5916 2 \u6b21 LLM \u8c03\u7528&#xff08;\u53cd\u601d &#043; \u4f18\u5316&#xff09;&#xff0c;\u591a\u8f6e\u6210\u500d\u589e\u52a0<\/td>\n<td>\u8d28\u91cf\u8dc3\u8fc1&#xff1a;\u628a&#034;\u5408\u683c&#034;\u7684\u521d\u7a3f\u8fed\u4ee3\u6210&#034;\u4f18\u79c0&#034;\u7684\u6700\u7ec8\u65b9\u6848<\/td>\n<\/tr>\n<tr>\n<td>\u4efb\u52a1\u5ef6\u8fdf\u663e\u8457\u63d0\u9ad8&#xff1a;\u4e32\u884c\u8fc7\u7a0b&#xff0c;\u5b9e\u65f6\u6027\u5dee<\/td>\n<td>\u9c81\u68d2\u6027\u589e\u5f3a&#xff1a;\u81ea\u6211\u7ea0\u9519\u5faa\u73af\u80fd\u53d1\u73b0\u5e76\u4fee\u590d\u903b\u8f91\u6f0f\u6d1e\u3001\u4e8b\u5b9e\u9519\u8bef\u3001\u8fb9\u754c\u60c5\u51b5<\/td>\n<\/tr>\n<tr>\n<td>\u63d0\u793a\u5de5\u7a0b\u590d\u6742\u5ea6\u4e0a\u5347&#xff1a;\u8981\u4e3a\u6267\u884c\/\u53cd\u601d\/\u4f18\u5316\u4e09\u9636\u6bb5\u5206\u522b\u8bbe\u8ba1\u8c03\u8bd5\u63d0\u793a\u8bcd<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7ed3\u8bba&#xff1a;Reflection \u662f\u5178\u578b\u7684&#034;\u4ee5\u6210\u672c\u6362\u8d28\u91cf&#034;\u7b56\u7565\u3002\u9002\u5408\u5bf9\u8d28\u91cf\/\u51c6\u786e\u6027\u8981\u6c42\u6781\u9ad8\u3001\u5bf9\u5b9e\u65f6\u6027\u8981\u6c42\u5bbd\u677e\u7684\u573a\u666f&#xff08;\u5173\u952e\u4e1a\u52a1\u4ee3\u7801\u3001\u6280\u672f\u62a5\u544a\u3001\u79d1\u7814\u63a8\u6f14\u3001\u51b3\u7b56\u652f\u6301&#xff09;&#xff1b;\u53cd\u4e4b\u5e94\u9009\u66f4\u8f7b\u91cf\u7684 ReAct \/ Plan-and-Solve\u3002<\/p>\n<h3>4.5 \u4e09\u79cd\u8303\u5f0f\u5bf9\u6bd4\u4e0e\u9009\u578b \u2b50<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182446-6aea26ee17bf6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182446-6aea26ee9a20c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u7ef4\u5ea6ReActPlan-and-SolveReflection<\/tr>\n<tbody>\n<tr>\n<td>\u7ec4\u7ec7\u65b9\u5f0f<\/td>\n<td>\u601d\u8003\u4e0e\u884c\u52a8\u878d\u5408\u5728\u6bcf\u4e00\u6b65&#xff0c;\u8fb9\u60f3\u8fb9\u505a<\/td>\n<td>\u601d\u8003\u4e0e\u884c\u52a8\u89e3\u8026\u4e3a\u4e24\u9636\u6bb5&#xff0c;\u5148\u8c0b\u540e\u52a8<\/td>\n<td>\u5728\u4efb\u610f\u8303\u5f0f\u4e4b\u4e0a\u53e0\u52a0\u6267\u884c\u2014\u53cd\u601d\u2014\u4f18\u5316\u8fed\u4ee3<\/td>\n<\/tr>\n<tr>\n<td>\u5916\u90e8\u4ea4\u4e92<\/td>\n<td>\u5f3a\u4f9d\u8d56&#xff08;\u6bcf\u6b65\u90fd\u8981 Observation&#xff09;<\/td>\n<td>\u672c\u7ae0\u5b9e\u73b0\u4e2d\u4e0d\u4f7f\u7528\u5de5\u5177&#xff0c;\u7eaf\u63d0\u793a\u8bcd\u9a71\u52a8\u63a8\u7406<\/td>\n<td>\u53ef\u9009&#xff1b;\u4f9d\u8d56\u521d\u7a3f\u6765\u6e90<\/td>\n<\/tr>\n<tr>\n<td>\u6838\u5fc3\u4f18\u52bf<\/td>\n<td>\u73af\u5883\u9002\u5e94\u6027\u3001\u52a8\u6001\u7ea0\u9519<\/td>\n<td>\u7ed3\u6784\u6027\u3001\u76ee\u6807\u4e00\u81f4\u6027&#xff08;\u4e0d\u8ff7\u8def&#xff09;<\/td>\n<td>\u8d28\u91cf\u4e0e\u9c81\u68d2\u6027\u8dc3\u8fc1<\/td>\n<\/tr>\n<tr>\n<td>\u4e3b\u8981\u4ee3\u4ef7<\/td>\n<td>\u4e32\u884c\u5faa\u73af \u2192 \u5ef6\u8fdf\u4e0e\u8d39\u7528\u9ad8<\/td>\n<td>\u8ba1\u5212\u9759\u6001&#xff0c;\u9047\u963b\u9700\u91cd\u89c4\u5212<\/td>\n<td>\u6bcf\u8f6e\u81f3\u5c11 &#043;2 \u6b21\u8c03\u7528&#xff0c;\u5ef6\u8fdf\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>\u5178\u578b\u4efb\u52a1<\/td>\n<td>\u5b9e\u65f6\u4fe1\u606f\u67e5\u8be2\u3001API\/\u6570\u636e\u5e93\u64cd\u4f5c\u3001\u9700\u7cbe\u786e\u8ba1\u7b97<\/td>\n<td>\u591a\u6b65\u6570\u5b66\u9898\u3001\u62a5\u544a\u64b0\u5199\u3001\u4ee3\u7801\u751f\u6210<\/td>\n<td>\u5173\u952e\u4ee3\u7801\/\u62a5\u544a\u3001\u79d1\u7814\u63a8\u6f14<\/td>\n<\/tr>\n<tr>\n<td>\u7ec8\u6b62\u6761\u4ef6<\/td>\n<td>\u8f93\u51fa Finish[&#8230;] \u6216\u8fbe max_steps<\/td>\n<td>\u8ba1\u5212\u6267\u884c\u5b8c\u6bd5<\/td>\n<td>\u53cd\u9988&#034;\u65e0\u9700\u6539\u8fdb&#034;\u6216\u8fbe max_iterations<\/td>\n<\/tr>\n<tr>\n<td>\u8bb0\u5fc6\u9700\u6c42<\/td>\n<td>\u5386\u53f2\u6587\u672c&#xff08;History&#xff09;<\/td>\n<td>\u5386\u53f2\u6b65\u9aa4\u4e0e\u7ed3\u679c<\/td>\n<td>\u2b50 \u5fc5\u987b\u6709 Memory \u5b58\u50a8\u5b8c\u6574\u8f68\u8ff9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9009\u578b\u53e3\u8bc0&#xff1a;\u63a2\u7d22\u6027\u3001\u4f9d\u8d56\u5916\u90e8\u53cd\u9988 \u2192 ReAct&#xff1b;\u6b65\u9aa4\u53ef\u9884\u5224\u3001\u9700\u7a33\u5b9a\u6267\u884c \u2192 Plan-and-Solve&#xff1b;\u8f93\u51fa\u8d28\u91cf\u8981\u6c42\u9ad8\u3001\u53ef\u8fed\u4ee3 \u2192 Reflection\u3002<\/p>\n<p>\u53ef\u4ee5\u7ec4\u5408&#xff08;\u4e60\u9898 1&#xff09;&#xff1a;\u4f8b\u5982 Planner \u7528 Plan-and-Solve \u51fa\u8ba1\u5212 \u2192 Reader \u7528 ReAct \u6309\u6b65\u6267\u884c\u4e0e\u5916\u90e8\u4ea4\u4e92 \u2192 Reviewer \u7528 Reflection \u5ba1\u67e5\u4ea7\u51fa\u3002\u8fd9\u6b63\u662f\u5b66\u4e60\u8ba1\u5212\u4e2d RepoGuard \u9879\u76ee Planner\u2013Reader\u2013Reviewer\u2013Reporter \u56db\u667a\u80fd\u4f53\u7684\u8303\u5f0f\u5206\u914d\u601d\u8def\u3002<\/p>\n<h4>\u7b2c\u56db\u7ae0\u5c0f\u7ed3<\/h4>\n<p>\u672c\u7ae0\u4ee5\u7b2c\u4e09\u7ae0\u7684 LLM \u77e5\u8bc6\u4e3a\u57fa&#xff0c;\u4eb2\u624b\u9020\u8f6e\u5b50\u5b9e\u73b0\u4e86\u4e09\u79cd\u7ecf\u5178\u8303\u5f0f\u3002<\/p>\n<p>ReAct \u7528&#034;\u601d\u8003\u2014\u884c\u52a8\u2014\u89c2\u5bdf&#034;\u7684\u52a8\u6001\u5faa\u73af\u8ba9\u667a\u80fd\u4f53\u80fd\u4e0e\u5916\u90e8\u4e16\u754c\u4ea4\u4e92&#xff0c;\u8d62\u5728\u73af\u5883\u9002\u5e94\u6027\u4e0e\u52a8\u6001\u7ea0\u9519&#xff0c;\u4ee3\u4ef7\u662f\u4e32\u884c\u4f4e\u6548\u4e0e\u53ef\u80fd\u9677\u5165\u5c40\u90e8\u6700\u4f18&#xff0c;\u5176\u5de5\u7a0b\u9aa8\u67b6\u662f\u63d0\u793a\u8bcd\u6a21\u677f &#043; \u6b63\u5219\u89e3\u6790 &#043; \u5de5\u5177\u5206\u53d1 &#043; max_steps \u5b89\u5168\u9600\u3002<\/p>\n<p>Plan-and-Solve \u628a\u6d41\u7a0b\u89e3\u8026\u4e3a\u5148\u89c4\u5212\u540e\u6267\u884c&#xff0c;\u9760&#034;\u8f93\u51fa Python \u5217\u8868 &#043; ast.literal_eval \u89e3\u6790&#034;\u6362\u53d6\u7ed3\u6784\u6027\u4e0e\u76ee\u6807\u4e00\u81f4\u6027&#xff0c;\u4ee3\u4ef7\u662f\u8ba1\u5212\u9759\u6001\u3001\u9700\u53e6\u914d\u52a8\u6001\u91cd\u89c4\u5212\u3002<\/p>\n<p>Reflection \u5728\u6b64\u4e4b\u4e0a\u53e0\u52a0&#034;\u6267\u884c\u2014\u53cd\u601d\u2014\u4f18\u5316&#034;\u5faa\u73af&#xff0c;\u7528Memory \u6a21\u5757\u8bb0\u4f4f\u5b8c\u6574\u8fed\u4ee3\u8f68\u8ff9\u3001\u7528\u4e09\u5957\u89d2\u8272\u5316\u63d0\u793a\u8bcd\u9a71\u52a8\u81ea\u6211\u6279\u5224&#xff0c;\u4ee5&#034;\u6bcf\u8f6e &#043;2 \u6b21\u8c03\u7528\u3001\u4e32\u884c\u5ef6\u8fdf&#034;\u6362\u53d6\u8d28\u91cf\u4e0e\u9c81\u68d2\u6027\u7684\u9636\u68af\u5f0f\u63d0\u5347\u3002<\/p>\n<p>\u4e09\u8005\u7684\u53d6\u820d\u53ef\u6982\u62ec\u4e3a&#xff1a;ReAct \u8d62\u5728\u7075\u6d3b&#xff0c;PS \u8d62\u5728\u7a33\u5b9a&#xff0c;Reflection \u8d62\u5728\u8d28\u91cf&#xff1b;\u5de5\u7a0b\u4e0a\u5b83\u4eec\u4e0d\u662f\u4e92\u65a5\u9009\u9879&#xff0c;\u800c\u662f\u53ef\u4ee5\u7ec4\u5408\u6210\u591a\u667a\u80fd\u4f53\u6d41\u6c34\u7ebf\u7684\u4e09\u79cd\u57fa\u672c\u8282\u62cd\u3002<\/p>\n<hr \/>\n<h2>\u7b2c\u4e94\u7ae0 \u57fa\u4e8e\u4f4e\u4ee3\u7801\u5e73\u53f0\u7684\u667a\u80fd\u4f53\u642d\u5efa<\/h2>\n<p>\u672c\u7ae0\u5b9a\u4f4d&#xff1a;\u4e0e\u7b2c\u56db\u7ae0\u6784\u6210&#034;\u624b\u5199 vs \u5e73\u53f0&#034;\u7684\u5bf9\u7167\u3002\u53ea\u9700\u8bb0\u4f4f\u4e3a\u4ec0\u4e48\u9700\u8981\u5e73\u53f0\u3001\u56db\u5e73\u53f0\u5404\u81ea\u5b9a\u4f4d\u3001\u4ee5\u53ca&#034;\u6df7\u5408\u5f00\u53d1&#034;\u8fd9\u4e2a\u7ed3\u8bba\u3002<\/p>\n<h3>5.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u4f4e\u4ee3\u7801\u5e73\u53f0<\/h3>\n<p>\u56db\u6761\u4ef7\u503c&#xff1a;\u964d\u4f4e\u6280\u672f\u95e8\u69db&#xff08;\u4e1a\u52a1\u4e13\u5bb6\u4e5f\u80fd\u53c2\u4e0e&#xff09;\u3001\u63d0\u5347\u5f00\u53d1\u6548\u7387&#xff08;\u6570\u5206\u949f\u9a8c\u8bc1\u539f\u578b&#xff09;\u3001\u66f4\u4f18\u7684\u53ef\u89c6\u5316\u4e0e\u53ef\u89c2\u6d4b\u6027&#xff08;\u8282\u70b9\u7ea7\u6570\u636e\u6d41\u4e0e\u8017\u65f6\u4e00\u76ee\u4e86\u7136&#xff09;\u3001\u6807\u51c6\u5316\u4e0e\u6700\u4f73\u5b9e\u8df5\u6c89\u6dc0&#xff08;\u9884\u8bbe ReAct \u6a21\u677f\u3001\u4f18\u5316\u8fc7\u7684\u68c0\u7d22\u5f15\u64ce&#xff09;\u3002<\/p>\n<p>\u6838\u5fc3\u89c2\u70b9&#xff1a;\u4f4e\u4ee3\u7801\u5e73\u53f0\u5e76\u975e\u8981\u53d6\u4ee3\u4ee3\u7801&#xff0c;\u800c\u662f\u63d0\u4f9b\u66f4\u9ad8\u5c42\u6b21\u7684\u62bd\u8c61&#xff0c;\u8ba9\u4eba\u805a\u7126&#034;\u601d\u8003\u4e0e\u884c\u52a8\u7684\u903b\u8f91&#034;\u672c\u8eab\u3002<\/p>\n<h3>5.2 \u56db\u4e2a\u5e73\u53f0\u7684\u5b9a\u4f4d\u5bf9\u6bd4 \u2b50<\/h3>\n<table>\n<tr>\u5e73\u53f0\u6838\u5fc3\u5b9a\u4f4d\u7279\u70b9\u9002\u7528\u4eba\u7fa4<\/tr>\n<tbody>\n<tr>\n<td>Coze&#xff08;\u5b57\u8282&#xff09;<\/td>\n<td>\u96f6\u4ee3\u7801 \/ \u4f4e\u4ee3\u7801 Agent \u6784\u5efa<\/td>\n<td>\u62d6\u62fd\u5f0f&#034;\u642d\u79ef\u6728&#034;&#xff1b;\u63d2\u4ef6\u5e93\u4e30\u5bcc&#xff1b;\u4e00\u952e\u53d1\u5e03\u5230\u6296\u97f3\/\u98de\u4e66\/\u5fae\u4fe1\u7b49\u5e73\u53f0<\/td>\n<td>AI \u5165\u95e8\u7528\u6237\u3001\u4ea7\u54c1\u7ecf\u7406\u3001\u8fd0\u8425<\/td>\n<\/tr>\n<tr>\n<td>Dify<\/td>\n<td>\u5f00\u6e90\u3001\u5168\u6808\u5f0f LLM \u5e94\u7528\u5f00\u53d1\u4e0e\u8fd0\u8425\u5e73\u53f0<\/td>\n<td>\u878d\u5408\u540e\u7aef\u670d\u52a1\u4e0e\u6a21\u578b\u8fd0\u8425\u7406\u5ff5&#xff1b;\u652f\u6301 Agent \u5de5\u4f5c\u6d41\u3001RAG Pipeline\u3001\u6570\u636e\u6807\u6ce8\u4e0e\u5fae\u8c03&#xff1b;\u63d2\u4ef6\u5e02\u573a 8000&#043;&#xff1b;\u53ef\u79c1\u6709\u5316\u90e8\u7f72<\/td>\n<td>\u6709\u6280\u672f\u80cc\u666f\u7684\u5f00\u53d1\u8005\u3001\u4f01\u4e1a\u7ea7\u56e2\u961f<\/td>\n<\/tr>\n<tr>\n<td>FastGPT<\/td>\n<td>\u5f00\u6e90\u77e5\u8bc6\u5e93\u95ee\u7b54\u5e73\u53f0 &#043; Agent \u6784\u5efa\u5de5\u5177<\/td>\n<td>\u2b50 \u5bf9 RAG \u77e5\u8bc6\u5e93\u573a\u666f\u6781\u81f4\u4f18\u5316&#xff08;\u6570\u636e\u5bfc\u5165\u2192\u5206\u5757\u2192\u5411\u91cf\u5316\u2192\u68c0\u7d22\u5168\u94fe\u8def&#xff09;&#xff1b;Flow \u53ef\u89c6\u5316\u7f16\u6392&#xff1b;\u6a21\u578b\u4e2d\u7acb&#xff1b;\u53ef\u5bf9\u63a5\u4f01\u5fae\/\u9489\u9489\/\u98de\u4e66<\/td>\n<td>\u9700\u79c1\u6709\u77e5\u8bc6\u5e93\u95ee\u7b54\u3001\u667a\u80fd\u5ba2\u670d\u7684\u56e2\u961f<\/td>\n<\/tr>\n<tr>\n<td>n8n<\/td>\n<td>\u5f00\u6e90\u5de5\u4f5c\u6d41\u81ea\u52a8\u5316\u5de5\u5177&#xff08;\u975e\u7eaf LLM \u5e73\u53f0&#xff09;<\/td>\n<td>\u2b50 \u5f3a\u5728&#034;\u8fde\u63a5&#034;&#xff1a;\u6570\u767e\u4e2a\u9884\u7f6e\u8282\u70b9\u4e32\u8054 SaaS\/\u6570\u636e\u5e93\/API&#xff0c;\u5728\u5176\u4e2d\u5d4c\u5165 LLM \u8282\u70b9&#xff1b;\u5b66\u4e60\u66f2\u7ebf\u8f83\u9661<\/td>\n<td>\u9700\u628a AI \u6df1\u5ea6\u5d4c\u5165\u73b0\u6709\u4e1a\u52a1\u6d41\u7a0b\u7684\u56e2\u961f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u672c\u7ae0\u56db\u4e2a\u914d\u5957\u6848\u4f8b&#xff08;\u77e5\u9053\u5373\u53ef&#xff09;&#xff1a;Coze \u2192 \u6bcf\u65e5 AI \u7b80\u62a5&#xff1b;Dify \u2192 \u8d85\u7ea7\u667a\u80fd\u4f53\u4e2a\u4eba\u52a9\u624b&#xff08;\u542b\u95ee\u9898\u5206\u7c7b\u5668\u505a\u591a\u667a\u80fd\u4f53\u8def\u7531\u3001MCP \u5de5\u5177\u96c6\u6210&#xff09;&#xff1b;FastGPT \u2192 \u667a\u80fd\u6295\u987e\u52a9\u624b&#xff1b;n8n \u2192 \u667a\u80fd\u90ae\u4ef6\u52a9\u624b\u3002<\/p>\n<h3>5.3 \u5404\u5e73\u53f0\u4e3b\u8981\u5c40\u9650<\/h3>\n<ul>\n<li>Coze&#xff1a;\u4e0d\u652f\u6301 MCP \u534f\u8bae&#xff0c;\u4e14\u65e0\u6cd5\u5bfc\u51fa\u6807\u51c6\u5316\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<li>Dify&#xff1a;\u5b66\u4e60\u66f2\u7ebf\u8f83\u9661&#xff0c;\u9ad8\u5e76\u53d1\u573a\u666f\u6709\u6027\u80fd\u6311\u6218\u3002<\/li>\n<li>FastGPT&#xff1a;\u6a21\u677f\u751f\u6001\u76f8\u5bf9\u8584\u5f31&#xff0c;\u514d\u8d39\u7248\u989d\u5ea6\u6709\u9650\u3002<\/li>\n<li>n8n&#xff1a;\u26a0\ufe0f \u5185\u7f6e\u5b58\u50a8\u975e\u6301\u4e45&#xff08;Simple Memory \/ Simple Vector Store \u90fd\u5728\u5185\u5b58&#xff0c;\u670d\u52a1\u91cd\u542f\u5373\u4e22&#xff0c;\u751f\u4ea7\u5fc5\u987b\u6362 Redis\/Pinecone \u7b49\u5916\u90e8\u5b58\u50a8&#xff09;&#xff1b;\u7248\u672c\u63a7\u5236\u4e0e\u591a\u4eba\u534f\u4f5c\u4e0d\u5982 git \u6210\u719f&#xff1b;\u8d85\u9ad8\u5e76\u53d1\u4e0b\u8282\u70b9\u8c03\u5ea6\u6709\u6027\u80fd\u5f00\u9500\u3002<\/li>\n<\/ul>\n<h3>5.4 \u9009\u578b\u5efa\u8bae\u4e0e\u6df7\u5408\u5f00\u53d1<\/h3>\n<ul>\n<li>\u5feb\u901f\u539f\u578b\u9a8c\u8bc1\u3001\u975e\u6280\u672f\u7528\u6237 \u2192 Coze<\/li>\n<li>\u4f01\u4e1a\u7ea7\u5e94\u7528\u3001\u590d\u6742\u4e1a\u52a1\u903b\u8f91\u3001\u591a\u6a21\u6001\u751f\u6210 \u2192 Dify<\/li>\n<li>\u57fa\u4e8e\u79c1\u6709\u77e5\u8bc6\u5e93\u7684\u95ee\u7b54\u7cfb\u7edf\u3001\u667a\u80fd\u5ba2\u670d \u2192 FastGPT<\/li>\n<li>\u6df1\u5ea6\u4e1a\u52a1\u96c6\u6210\u3001\u901a\u7528\u81ea\u52a8\u5316\u6d41\u7a0b \u2192 n8n<\/li>\n<\/ul>\n<p>\u2b50 \u7ed3\u8bba&#xff08;\u539f\u6587&#xff09;&#xff1a;\u4f4e\u4ee3\u7801\u5e73\u53f0\u4e0d\u53d6\u4ee3\u4ee3\u7801\u5f00\u53d1&#xff0c;\u800c\u662f\u4e92\u8865\u3002\u6df7\u5408\u5f00\u53d1\u624d\u662f\u667a\u80fd\u4f53\u5de5\u7a0b\u5316\u7684\u6700\u4f73\u5b9e\u8df5&#xff1a;\u7528\u4f4e\u4ee3\u7801\u5e73\u53f0\u5feb\u901f\u9a8c\u8bc1\u60f3\u6cd5&#xff0c;\u7528\u4ee3\u7801\u5b9e\u73b0\u7cbe\u7ec6\u5316\u63a7\u5236&#xff1b;\u7528\u5e73\u53f0\u5904\u7406\u6807\u51c6\u5316\u6d41\u7a0b&#xff0c;\u7528\u4ee3\u7801\u5904\u7406\u7279\u6b8a\u903b\u8f91\u3002<\/p>\n<h4>\u7b2c\u4e94\u7ae0\u5c0f\u7ed3<\/h4>\n<p>\u7b2c\u4e94\u7ae0\u628a\u89c6\u89d2\u4ece&#034;\u624b\u5199\u4ee3\u7801&#034;\u5207\u5230&#034;\u5e73\u53f0\u5316\u5f00\u53d1&#034;&#xff0c;\u7528 Coze \/ Dify \/ FastGPT \/ n8n \u56db\u4e2a\u5e73\u53f0\u6f14\u793a\u4e86\u540c\u4e00\u4ef6\u4e8b\u7684\u53e6\u4e00\u6761\u8def\u5f84&#xff1a;\u628a API \u8c03\u7528\u3001\u72b6\u6001\u7ba1\u7406\u3001\u5e76\u53d1\u63a7\u5236\u5c01\u88c5\u6210\u53ef\u62d6\u62fd\u7684\u8282\u70b9&#xff0c;\u6362\u53d6\u95e8\u69db\u964d\u4f4e\u3001\u6548\u7387\u63d0\u5347\u4e0e\u7aef\u5230\u7aef\u53ef\u89c6\u5316\u3002<\/p>\n<p>\u56db\u8005\u5206\u5de5\u6e05\u6670\u2014\u2014Coze \u8d62\u5728\u96f6\u4ee3\u7801\u4e0e\u5206\u53d1\u751f\u6001&#xff0c;Dify \u8d62\u5728\u4f01\u4e1a\u7ea7\u5168\u6808\u80fd\u529b&#xff0c;FastGPT \u8d62\u5728 RAG \u77e5\u8bc6\u5e93\u7ec6\u8282&#xff0c;n8n \u8d62\u5728\u901a\u7528\u4e1a\u52a1&#034;\u8fde\u63a5&#034;\u3002<\/p>\n<p>\u5b83\u4eec\u5171\u540c\u7684\u77ed\u677f\u662f\u6301\u4e45\u5316\u3001\u9ad8\u5e76\u53d1\u4e0e\u7248\u672c\u63a7\u5236&#xff0c;\u56e0\u6b64\u672c\u7ae0\u7684\u6700\u7ec8\u7ed3\u8bba\u4e0d\u662f&#034;\u9009\u5e73\u53f0\u8fd8\u662f\u9009\u4ee3\u7801&#034;&#xff0c;\u800c\u662f\u6df7\u5408\u5f00\u53d1&#xff1a;\u5e73\u53f0\u8d1f\u8d23\u6807\u51c6\u5316\u6d41\u7a0b\u4e0e\u539f\u578b\u9a8c\u8bc1&#xff0c;\u4ee3\u7801\u8d1f\u8d23\u7279\u6b8a\u903b\u8f91\u4e0e\u7cbe\u7ec6\u63a7\u5236\u3002<\/p>\n<hr \/>\n<h2>\u7b2c\u516d\u7ae0 \u6846\u67b6\u5f00\u53d1\u5b9e\u8df5&#xff08;\u91cd\u70b9&#xff09;<\/h2>\n<h3>6.1 \u4ece\u624b\u52a8\u5b9e\u73b0\u5230\u6846\u67b6\u5f00\u53d1<\/h3>\n<h4>6.1.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u6846\u67b6 \u2b50<\/h4>\n<p>\u7b2c\u56db\u7ae0\u7684\u4ee3\u7801\u4e3a\u6559\u5b66\u800c\u751f&#xff0c;\u80fd\u5b8c\u6210\u7279\u5b9a\u4efb\u52a1&#xff0c;\u4f46\u6784\u5efa\u591a\u4e2a\u590d\u6742\u667a\u80fd\u4f53\u65f6\u4f1a\u9047\u5230\u74f6\u9888\u3002\u6846\u67b6\u7684\u672c\u8d28\u662f\u63d0\u4f9b\u4e00\u5957\u7ecf\u8fc7\u9a8c\u8bc1\u7684&#034;\u89c4\u8303&#034;&#xff0c;\u628a\u6240\u6709\u667a\u80fd\u4f53\u5171\u6709\u7684\u91cd\u590d\u5de5\u4f5c\u62bd\u8c61\u5c01\u88c5&#xff1a;<\/p>\n<li>\u63d0\u5347\u4ee3\u7801\u590d\u7528\u4e0e\u5f00\u53d1\u6548\u7387&#xff1a;\u901a\u7528 Agent \u57fa\u7c7b\/\u6267\u884c\u5668\u5c01\u88c5 Agent Loop&#xff0c;\u65e0\u8bba ReAct \u8fd8\u662f Plan-and-Solve \u90fd\u80fd\u57fa\u4e8e\u6807\u51c6\u7ec4\u4ef6\u5feb\u901f\u642d\u5efa\u3002<\/li>\n<li>\u5b9e\u73b0\u6838\u5fc3\u7ec4\u4ef6\u7684\u89e3\u8026\u4e0e\u53ef\u6269\u5c55\u6027&#xff08;\u6846\u67b6\u4f1a\u5f3a\u5236\u5206\u79bb\u5173\u6ce8\u70b9&#xff09;&#xff1a;<\/li>\n<table>\n<tr>\u5c42\u804c\u8d23\u53ef\u66ff\u6362\u6027<\/tr>\n<tbody>\n<tr>\n<td>\u6a21\u578b\u5c42 Model Layer<\/td>\n<td>\u4e0e LLM \u4ea4\u4e92<\/td>\n<td>\u8f7b\u677e\u6362 OpenAI \/ Anthropic \/ \u672c\u5730\u6a21\u578b<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u5177\u5c42 Tool Layer<\/td>\n<td>\u6807\u51c6\u5316\u7684\u5de5\u5177\u5b9a\u4e49\u3001\u6ce8\u518c\u3001\u6267\u884c\u63a5\u53e3<\/td>\n<td>\u65b0\u589e\u5de5\u5177\u4e0d\u5f71\u54cd\u5176\u4ed6\u4ee3\u7801<\/td>\n<\/tr>\n<tr>\n<td>\u8bb0\u5fc6\u5c42 Memory Layer<\/td>\n<td>\u77ed\u671f\u4e0e\u957f\u671f\u8bb0\u5fc6<\/td>\n<td>\u53ef\u5207\u6362\u6ed1\u52a8\u7a97\u53e3 \/ \u6458\u8981\u8bb0\u5fc6\u7b49\u7b56\u7565<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<li>\u6807\u51c6\u5316\u590d\u6742\u7684\u72b6\u6001\u7ba1\u7406&#xff1a;\u5904\u7406\u4e0a\u4e0b\u6587\u7a97\u53e3\u9650\u5236\u3001\u5386\u53f2\u6301\u4e45\u5316\u3001\u591a\u8f6e\u5bf9\u8bdd\u72b6\u6001\u8ddf\u8e2a \u2014\u2014 \u7b2c\u56db\u7ae0\u7684 Memory \u53ea\u662f\u6700\u7b80\u5355\u7684\u5f00\u59cb\u3002<\/li>\n<li>\u7b80\u5316\u53ef\u89c2\u6d4b\u6027\u4e0e\u8c03\u8bd5&#xff1a;\u5185\u7f6e**\u4e8b\u4ef6\u56de\u8c03&#xff08;Callbacks&#xff09;**\u673a\u5236&#xff0c;\u5728 on_llm_start\u3001on_tool_end\u3001on_agent_finish \u7b49\u5173\u952e\u8282\u70b9\u81ea\u52a8\u8bb0\u5f55\u65e5\u5fd7\/\u4e0a\u62a5&#xff0c;\u8fdc\u4f18\u4e8e\u624b\u52a8 print\u3002<\/li>\n<h4>6.1.2 \u56db\u6846\u67b6\u603b\u89c8 \u2b50<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182446-6aea26eebedd5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u6846\u67b6\u6838\u5fc3\u9690\u55bb\u534f\u4f5c\u673a\u5236\u63a7\u5236\u65b9\u5f0f<\/tr>\n<tbody>\n<tr>\n<td>AutoGen<\/td>\n<td>\u7fa4\u804a \/ \u5706\u684c\u4f1a\u8bae<\/td>\n<td>\u591a\u89d2\u8272&#034;\u53ef\u5bf9\u8bdd&#034;\u667a\u80fd\u4f53\u901a\u8fc7\u81ea\u52a8\u5316\u6d88\u606f\u4f20\u9012\u534f\u4f5c<\/td>\n<td>\u6d8c\u73b0\u5f0f&#xff08;\u5b9a\u4e49\u89d2\u8272\u4e0e\u89c4\u5219&#xff0c;\u6d41\u7a0b\u81ea\u7136\u53d1\u751f&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>AgentScope<\/td>\n<td>\u667a\u80fd\u4f53\u64cd\u4f5c\u7cfb\u7edf<\/td>\n<td>\u6d88\u606f\u9a71\u52a8&#xff0c;MsgHub \u4f5c\u6d88\u606f\u4e2d\u67a2<\/td>\n<td>\u5de5\u7a0b\u5316 &#043; \u5e76\u53d1 \/ \u5206\u5e03\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>CAMEL<\/td>\n<td>\u4e24\u4e2a\u4e13\u5bb6\u5bf9\u8c08<\/td>\n<td>\u89d2\u8272\u626e\u6f14 &#043; \u5f15\u5bfc\u6027\u63d0\u793a&#xff0c;\u53cc\u667a\u80fd\u4f53\u81ea\u4e3b\u5bf9\u8bdd<\/td>\n<td>\u6d8c\u73b0\u5f0f&#xff08;\u6700\u5c11\u4eba\u7c7b\u5e72\u9884&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>LangGraph<\/td>\n<td>\u6709\u5411\u56fe \/ \u72b6\u6001\u673a<\/td>\n<td>\u8282\u70b9\u4e0e\u8fb9\u6784\u6210\u5de5\u4f5c\u6d41<\/td>\n<td>\u663e\u5f0f\u63a7\u5236&#xff08;\u9884\u5b9a\u4e49\u6bcf\u6b65\u4e0e\u8df3\u8f6c\u6761\u4ef6&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>6.2 AutoGen \u2014\u2014 \u4ee5\u5bf9\u8bdd\u9a71\u52a8\u534f\u4f5c<\/h3>\n<p>\u8bbe\u8ba1\u54f2\u5b66&#xff1a;\u628a\u590d\u6742\u4efb\u52a1\u89e3\u51b3\u6d41\u7a0b\u6620\u5c04\u4e3a\u4e0d\u540c\u89d2\u8272\u667a\u80fd\u4f53\u4e4b\u95f4\u7684\u4e00\u7cfb\u5217\u81ea\u52a8\u5316\u5bf9\u8bdd&#xff08;Wu et al., COLM 2024&#xff09;\u3002\u672c\u7ae0\u4ee5 0.7.4 \u7248\u672c\u4e3a\u4f8b&#xff0c;\u5b83\u4ee3\u8868\u4ece\u7c7b\u7ee7\u627f\u8bbe\u8ba1\u8f6c\u5411\u7ec4\u5408\u5f0f\u67b6\u6784\u7684\u4e00\u6b21\u91cd\u5927\u91cd\u6784\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182447-6aea26ef03fcf.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>6.2.1 \u6838\u5fc3\u673a\u5236<\/h4>\n<p>\u2460 \u5206\u5c42 &#043; \u5f02\u6b65\u4f18\u5148&#xff1a;<\/p>\n<ul>\n<li>autogen-core&#xff1a;\u5e95\u5c42\u57fa\u7840&#xff0c;\u5c01\u88c5 LLM \u4ea4\u4e92\u4e0e\u6d88\u606f\u4f20\u9012&#xff0c;\u4fdd\u8bc1\u7a33\u5b9a\u4e0e\u6269\u5c55\u6027\u3002<\/li>\n<li>autogen-agentchat&#xff1a;\u57fa\u4e8e core \u7684\u9ad8\u7ea7\u63a5\u53e3&#xff0c;\u7b80\u5316\u5bf9\u8bdd\u5f0f\u5e94\u7528\u5f00\u53d1\u3002<\/li>\n<li>\u5f02\u6b65\u4f18\u5148&#xff08;async\/await&#xff09;&#xff1a;\u591a\u667a\u80fd\u4f53\u573a\u666f\u4e2d\u7f51\u7edc\u8bf7\u6c42\u662f\u4e3b\u8981\u8017\u65f6&#xff0c;\u5f02\u6b65\u907f\u514d\u7ebf\u7a0b\u963b\u585e&#xff0c;\u663e\u8457\u63d0\u5347\u5e76\u53d1\u80fd\u529b\u3002<\/li>\n<\/ul>\n<p>\u2461 \u6838\u5fc3\u667a\u80fd\u4f53\u7ec4\u4ef6&#xff1a;<\/p>\n<ul>\n<li>AssistantAgent&#xff1a;\u4efb\u52a1\u4e3b\u8981\u89e3\u51b3\u8005&#xff0c;\u5185\u90e8\u5c01\u88c5 LLM&#xff0c;\u9760\u4e0d\u540c\u7cfb\u7edf\u6d88\u606f\u8d4b\u4e88\u4e0d\u540c&#034;\u4e13\u5bb6&#034;\u89d2\u8272\u3002<\/li>\n<li>UserProxyAgent&#xff1a;\u53cc\u91cd\u89d2\u8272 \u2014\u2014 \u65e2\u662f\u4eba\u7c7b\u7684&#034;\u4ee3\u8a00\u4eba&#034;&#xff08;\u53d1\u8d77\u4efb\u52a1\u3001\u4f20\u8fbe\u610f\u56fe&#xff09;&#xff0c;\u53c8\u662f\u53ef\u9760\u7684\u6267\u884c\u5668&#xff08;\u6267\u884c\u4ee3\u7801\/\u8c03\u7528\u5de5\u5177&#xff09;\u3002\u8fd9\u6e05\u6670\u5730\u533a\u5206\u4e86**\u201c\u601d\u8003\u201d&#xff08;Assistant&#xff09;\u4e0e&#034;\u884c\u52a8&#034;&#xff08;UserProxy&#xff09;**\u3002<\/li>\n<\/ul>\n<p>\u2462 \u4ece GroupChatManager \u5230 Team&#xff1a;\u65b0\u67b6\u6784\u5f15\u5165\u66f4\u7075\u6d3b\u7684 Team \u6982\u5ff5&#xff0c;\u5178\u578b\u5982 RoundRobinGroupChat&#xff08;\u8f6e\u8be2\u7fa4\u804a&#xff09;&#xff1a;\u6309\u9884\u5b9a\u4e49\u987a\u5e8f\u4f9d\u6b21\u6fc0\u6d3b\u667a\u80fd\u4f53\u53d1\u8a00&#xff0c;\u76f4\u5230\u6700\u5927\u5bf9\u8bdd\u8f6e\u6b21\u6216\u6ee1\u8db3\u7ec8\u6b62\u6761\u4ef6\u3002\u9002\u7528\u4e8e\u6d41\u7a0b\u56fa\u5b9a\u7684\u4efb\u52a1\u3002<\/p>\n<h4>6.2.2 \u6848\u4f8b&#xff1a;\u6a21\u62df\u8f6f\u4ef6\u5f00\u53d1\u56e2\u961f&#xff08;\u6bd4\u7279\u5e01\u4ef7\u683c\u663e\u793a\u5e94\u7528&#xff09;<\/h4>\n<p>\u89d2\u8272\u5212\u5206&#xff08;\u591a\u667a\u80fd\u4f53\u7cfb\u7edf\u8bbe\u8ba1\u7684\u5173\u952e\u4e00\u6b65&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u89d2\u8272\u804c\u8d23\u7cfb\u7edf\u6d88\u606f\u4e2d\u7684&#034;\u4ea4\u63a5\u8bed&#034;<\/tr>\n<tbody>\n<tr>\n<td>ProductManager(\u4ea7\u54c1\u7ecf\u7406)<\/td>\n<td>\u9700\u6c42\u5206\u6790\u3001\u6280\u672f\u89c4\u5212\u3001\u98ce\u9669\u8bc4\u4f30<\/td>\n<td>\u5206\u6790\u5b8c\u6210\u540e\u8bf4&#034;\u8bf7\u5de5\u7a0b\u5e08\u5f00\u59cb\u5b9e\u73b0&#034;<\/td>\n<\/tr>\n<tr>\n<td>Engineer(\u5de5\u7a0b\u5e08)<\/td>\n<td>\u6280\u672f\u5b9e\u73b0\u3001\u7f16\u5199\u4ee3\u7801\u3001\u5f02\u5e38\u5904\u7406<\/td>\n<td>\u5b8c\u6210\u540e\u8bf4&#034;\u8bf7\u4ee3\u7801\u5ba1\u67e5\u5458\u68c0\u67e5&#034;<\/td>\n<\/tr>\n<tr>\n<td>CodeReviewer(\u4ee3\u7801\u5ba1\u67e5\u5458)<\/td>\n<td>\u8d28\u91cf\u3001\u5b89\u5168\u6027\u3001\u6700\u4f73\u5b9e\u8df5\u5ba1\u67e5<\/td>\n<td>\u5b8c\u6210\u540e\u8bf4&#034;\u4ee3\u7801\u5ba1\u67e5\u5b8c\u6210&#xff0c;\u8bf7\u7528\u6237\u4ee3\u7406\u6d4b\u8bd5&#034;<\/td>\n<\/tr>\n<tr>\n<td>UserProxy(\u7528\u6237\u4ee3\u7406)<\/td>\n<td>\u4ee3\u8868\u7528\u6237\u53d1\u8d77\u4efb\u52a1\u3001\u6267\u884c\u9a8c\u8bc1<\/td>\n<td>\u6d4b\u8bd5\u5b8c\u6210\u540e\u56de\u590d TERMINATE<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u534f\u4f5c\u4e09\u8981\u7d20&#xff1a;participants&#xff08;\u5217\u8868\u987a\u5e8f &#061; \u53d1\u8a00\u987a\u5e8f&#xff09;\u3001termination_condition&#061;TextMentionTermination(&#034;TERMINATE&#034;)&#xff08;\u6d88\u606f\u542b\u5173\u952e\u8bcd\u5373\u7ec8\u6b62&#xff09;\u3001max_turns&#061;20&#xff08;\u5b89\u5168\u9600&#xff09;\u3002\u8fd0\u884c\u7528 await Console(team_chat.run_stream(task&#061;task)) &#043; asyncio.run(&#8230;)\u3002<\/p>\n<p>\u2b50 \u5173\u952e\u6d1e\u5bdf&#xff1a;\u5b9a\u4e49\u667a\u80fd\u4f53\u7684\u6838\u5fc3\u5728\u4e8e\u7f16\u5199\u9ad8\u8d28\u91cf\u7684\u7cfb\u7edf\u6d88\u606f&#xff08;System Message&#xff09; \u2014\u2014 \u5b83\u65e2\u662f&#034;\u884c\u4e3a\u51c6\u5219&#034;\u4e5f\u662f&#034;\u4e13\u4e1a\u77e5\u8bc6\u5e93&#034;&#xff0c;\u89c4\u5b9a\u4e86\u89d2\u8272\u3001\u804c\u8d23\u3001\u5de5\u4f5c\u6d41\u7a0b\u4e43\u81f3\u4e0e\u5176\u4ed6\u667a\u80fd\u4f53\u7684\u4ea4\u4e92\u65b9\u5f0f\u3002\u201c\u901a\u8fc7\u7cfb\u7edf\u6d88\u606f\u8fdb\u884c\u63d0\u793a\u5de5\u7a0b&#xff0c;\u662f\u8bbe\u8ba1\u9ad8\u6548\u591a\u667a\u80fd\u4f53\u5e94\u7528\u7684\u6838\u5fc3\u73af\u8282\u3002\u201d<\/p>\n<h4>6.2.3 \u4f18\u52bf\u4e0e\u5c40\u9650<\/h4>\n<p>\u4f18\u52bf&#xff1a;\u2460 \u65e0\u9700\u8bbe\u8ba1\u590d\u6742\u72b6\u6001\u673a&#xff0c;\u628a\u5f00\u53d1\u6d41\u7a0b\u81ea\u7136\u6620\u5c04\u4e3a\u89d2\u8272\u5bf9\u8bdd&#xff0c;\u964d\u4f4e\u5efa\u6a21\u95e8\u69db\u2014\u2014\u5f00\u53d1\u8005\u53ea\u9700\u5173\u6ce8&#034;\u8c01&#xff08;\u89d2\u8272&#xff09;\u201c\u4e0e&#034;\u505a\u4ec0\u4e48&#xff08;\u804c\u8d23&#xff09;\u201d&#xff0c;\u800c\u975e&#034;\u5982\u4f55\u505a&#xff08;\u6d41\u7a0b\u63a7\u5236&#xff09;&#034;&#xff1b;\u2461 \u89d2\u8272\u9ad8\u5ea6\u4e13\u4e1a\u5316\u4e14\u53ef\u8de8\u9879\u76ee\u590d\u7528&#xff1b;\u2462 UserProxyAgent \u5929\u7136\u63d0\u4f9b&#034;\u4eba\u7c7b\u5728\u73af&#xff08;Human-in-the-loop&#xff09;&#034;\u63a5\u53e3&#xff0c;\u4fdd\u8bc1\u81ea\u52a8\u5316\u59cb\u7ec8\u53d7\u4eba\u7c7b\u76d1\u7763\u3002<\/p>\n<p>\u5c40\u9650&#xff1a;\u2460 \u57fa\u4e8e LLM \u7684\u5bf9\u8bdd\u672c\u8d28\u4e0d\u786e\u5b9a&#xff0c;\u53ef\u80fd\u504f\u79bb\u9884\u671f\u5206\u652f\u751a\u81f3\u9677\u5165\u5faa\u73af&#xff1b;\u2461 &#034;\u5bf9\u8bdd\u5f0f\u8c03\u8bd5&#034;\u96be\u9898 \u2014\u2014 \u51fa\u9519\u65f6\u5f97\u5230\u7684\u4e0d\u662f\u6e05\u6670\u9519\u8bef\u5806\u6808&#xff0c;\u800c\u662f\u4e00\u957f\u4e32\u5bf9\u8bdd\u5386\u53f2\u3002<\/p>\n<p>\u975e OpenAI \u6a21\u578b\u914d\u7f6e\u8865\u5145&#xff1a;\u9700\u5728 OpenAIChatCompletionClient \u4e2d\u4f20\u5165 model_info \u5b57\u5178&#xff0c;\u663e\u5f0f\u58f0\u660e function_calling \/ max_tokens \/ context_length \/ vision \/ json_output \/ structured_output \u7b49\u80fd\u529b\u9879 \u2014\u2014 \u544a\u8bc9\u6846\u67b6\u6a21\u578b\u7684\u80fd\u529b\u8fb9\u754c\u3002<\/p>\n<h3>6.3 AgentScope \u2014\u2014 \u5de5\u7a0b\u5316\u4f18\u5148\u7684\u591a\u667a\u80fd\u4f53\u5e73\u53f0<\/h3>\n<p>\u7531\u963f\u91cc\u5df4\u5df4\u8fbe\u6469\u9662\u5f00\u53d1&#xff0c;\u9762\u5411\u5927\u89c4\u6a21\u3001\u9ad8\u53ef\u9760\u7684\u591a\u667a\u80fd\u4f53\u5e94\u7528&#xff0c;\u5185\u7f6e\u5206\u5e03\u5f0f\u90e8\u7f72\u3001\u5bb9\u9519\u6062\u590d\u3001\u53ef\u89c2\u6d4b\u6027\u7b49\u4f01\u4e1a\u7ea7\u7279\u6027\u3002<br \/>\n\u7c7b\u6bd4&#xff1a;AutoGen \u50cf\u7075\u6d3b\u7684&#034;\u5bf9\u8bdd\u5de5\u4f5c\u5ba4&#034;&#xff0c;AgentScope \u5219\u662f\u5b8c\u6574\u7684&#034;\u667a\u80fd\u4f53\u64cd\u4f5c\u7cfb\u7edf&#034;\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182447-6aea26ef7add0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>6.3.1 \u8bbe\u8ba1&#xff1a;\u5206\u5c42\u67b6\u6784 &#043; \u6d88\u606f\u9a71\u52a8<\/h4>\n<p>\u56db\u5c42\u67b6\u6784&#xff1a;<\/p>\n<table>\n<tr>\u5c42\u5185\u5bb9<\/tr>\n<tbody>\n<tr>\n<td>\u57fa\u7840\u7ec4\u4ef6\u5c42<\/td>\n<td>Message&#xff08;\u7edf\u4e00\u6d88\u606f\u683c\u5f0f&#xff0c;\u652f\u6301\u591a\u6a21\u6001&#xff09;\u3001Memory&#xff08;\u77ed\u671f\/\u957f\u671f\u8bb0\u5fc6&#xff09;\u3001Model API&#xff08;\u62bd\u8c61\u4e0d\u540c LLM&#xff09;\u3001Tool<\/td>\n<\/tr>\n<tr>\n<td>\u667a\u80fd\u4f53\u57fa\u7840\u8bbe\u65bd\u5c42<\/td>\n<td>\u9884\u6784\u5efa\u667a\u80fd\u4f53&#xff08;\u6d4f\u89c8\u5668\u3001\u6df1\u5ea6\u7814\u7a76\u7b49&#xff09;\u3001ReAct \u8303\u5f0f\u3001\u667a\u80fd\u4f53\u94a9\u5b50\u3001\u5e76\u884c\u5de5\u5177\u8c03\u7528\u3001\u72b6\u6001\u7ba1\u7406&#xff1b;\u539f\u751f\u652f\u6301\u5f02\u6b65\u6267\u884c\u4e0e\u5b9e\u65f6\u63a7\u5236<\/td>\n<\/tr>\n<tr>\n<td>\u591a\u667a\u80fd\u4f53\u534f\u4f5c\u5c42<\/td>\n<td>\u2b50 MsgHub&#xff08;\u6d88\u606f\u4e2d\u5fc3&#xff0c;\u8d1f\u8d23\u8def\u7531\u4e0e\u72b6\u6001\u7ba1\u7406&#xff09;&#043; Pipeline&#xff08;\u987a\u5e8f\/\u5e76\u53d1\u7b49\u7f16\u6392\u6a21\u5f0f&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5f00\u53d1\u4e0e\u90e8\u7f72\u5c42<\/td>\n<td>AgentScope Runtime&#xff08;\u751f\u4ea7\u7ea7\u8fd0\u884c\u65f6&#xff09;&#043; AgentScope Studio&#xff08;\u53ef\u89c6\u5316\u5f00\u53d1\u5de5\u5177\u94fe&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6d88\u606f\u9a71\u52a8\u7684\u56db\u4e2a\u4f18\u52bf&#xff1a;\u5f02\u6b65\u89e3\u8026&#xff08;\u6536\u53d1\u53cc\u65b9\u65f6\u95f4\u4e0a\u89e3\u8026&#xff0c;\u5929\u7136\u9ad8\u5e76\u53d1&#xff09;\u3001\u4f4d\u7f6e\u900f\u660e&#xff08;\u4e0d\u5173\u5fc3\u5bf9\u65b9\u5728\u672c\u5730\u8fdb\u7a0b\u8fd8\u662f\u8fdc\u7a0b\u670d\u52a1\u5668&#xff0c;\u8def\u7531\u81ea\u52a8\u5904\u7406&#xff09;\u3001\u53ef\u89c2\u6d4b\u6027&#xff08;\u6bcf\u6761\u6d88\u606f\u53ef\u8bb0\u5f55\u8ffd\u8e2a\u5206\u6790&#xff09;\u3001\u53ef\u9760\u6027&#xff08;\u6d88\u606f\u53ef\u6301\u4e45\u5316\u4e0e\u91cd\u8bd5&#xff0c;\u6545\u969c\u540e\u4fdd\u8bc1\u6700\u7ec8\u4e00\u81f4\u6027&#xff09;\u3002<\/p>\n<p>\u7edf\u4e00\u6d88\u606f\u7ed3\u6784&#xff1a;Msg(name&#061;\u53d1\u9001\u8005, content&#061;\u5185\u5bb9, role&#061;\u89d2\u8272, metadata&#061;{timestamp, message_type, priority})\u3002<\/p>\n<p>\u667a\u80fd\u4f53\u751f\u547d\u5468\u671f&#xff1a;\u7edf\u4e00\u57fa\u7c7b AgentBase&#xff0c;\u5f00\u53d1\u8005\u53ea\u9700\u5b9e\u73b0\u6838\u5fc3\u7684 reply(x: Msg) -&gt; Msg&#xff08;\u601d\u8003\u4e0e\u56de\u5e94&#xff09;\u4e0e\u53ef\u9009\u7684 observe(x: Msg)&#xff08;\u89c2\u5bdf&#xff0c;\u901a\u5e38\u5199\u5165\u8bb0\u5fc6&#xff09;\u2014\u2014 \u5206\u79bb\u4e86\u5185\u90e8\u903b\u8f91\u4e0e\u5916\u90e8\u901a\u4fe1\u3002<\/p>\n<p>MsgHub \u4e09\u5927\u80fd\u529b&#xff1a;\u7075\u6d3b\u8def\u7531&#xff08;\u70b9\u5bf9\u70b9\/\u5e7f\u64ad\/\u7ec4\u64ad&#xff09;\u3001\u6d88\u606f\u6301\u4e45\u5316&#xff08;SQLite\/MongoDB&#xff0c;\u652f\u6301\u957f\u671f\u4efb\u52a1\u72b6\u6001\u6062\u590d&#xff09;\u3001\u539f\u751f\u5206\u5e03\u5f0f&#xff08;\u8de8\u8fdb\u7a0b\/\u8de8\u670d\u52a1\u5668\u90e8\u7f72\u65f6\u7531 RPC \u81ea\u52a8\u5904\u7406\u901a\u4fe1&#xff0c;\u5bf9\u5f00\u53d1\u8005\u900f\u660e&#xff09;\u3002<\/p>\n<h4>6.3.2 \u6848\u4f8b&#xff1a;\u4e09\u56fd\u72fc\u4eba\u6740&#xff08;\u7406\u89e3\u6d88\u606f\u9a71\u52a8\u4e0e\u5e76\u53d1&#xff09;<\/h4>\n<p>\u4e09\u5c42\u8bbe\u8ba1&#xff1a;\u6e38\u620f\u63a7\u5236\u5c42&#xff08;ThreeKingdomsWerewolfGame \u7ef4\u62a4\u5168\u5c40\u72b6\u6001\u3001\u63a8\u8fdb\u9636\u6bb5\u3001\u88c1\u5b9a\u80dc\u8d1f&#xff09;&#043; \u667a\u80fd\u4f53\u4ea4\u4e92\u5c42&#xff08;\u5b8c\u5168\u7531 MsgHub \u9a71\u52a8&#xff09;&#043; \u89d2\u8272\u5efa\u6a21\u5c42&#xff08;\u6bcf\u4e2a\u73a9\u5bb6\u662f DialogAgent \u5b9e\u4f8b&#xff0c;\u63d0\u793a\u8bcd\u6ce8\u5165&#034;\u6e38\u620f\u89d2\u8272&#034;\u4e0e&#034;\u4e09\u56fd\u4eba\u683c&#034;\u53cc\u91cd\u8eab\u4efd&#xff09;\u3002<\/p>\n<p>\u4e24\u4e2a\u6700\u503c\u5f97\u8bb0\u7684\u6280\u672f\u70b9&#xff1a;<\/p>\n<li>\u7528\u6d88\u606f\u9891\u9053\u4ee3\u66ff\u72b6\u6001\u673a&#xff1a;\u72fc\u4eba\u9636\u6bb5\u901a\u8fc7 async with MsgHub(self.werewolves, enable_auto_broadcast&#061;True, announcement&#061;&#8230;) \u52a8\u6001\u521b\u5efa\u4e00\u4e2a\u4e34\u65f6\u79c1\u5bc6\u9891\u9053&#xff1b;\u8ba8\u8bba\u9636\u6bb5\u5e7f\u64ad\u534f\u5546&#xff0c;\u6295\u7968\u9636\u6bb5 set_auto_broadcast(False) \u540e\u7528 fanout_pipeline \u5e76\u884c\u6536\u96c6\u51b3\u7b56\u3002\u6e38\u620f\u903b\u8f91\u88ab\u8868\u8fbe\u4e3a&#034;\u5728\u7279\u5b9a\u4e0a\u4e0b\u6587\u4e2d\u4ee5\u4f55\u79cd\u6a21\u5f0f\u4ea4\u6362\u6d88\u606f&#034;&#xff0c;\u800c\u975e\u4e00\u8fde\u4e32\u50f5\u786c\u7684\u72b6\u6001\u8f6c\u6362\u3002<\/li>\n<li>\u7528\u7ed3\u6784\u5316\u8f93\u51fa\u7ea6\u675f\u6e38\u620f\u89c4\u5219&#xff1a;\u4e3a\u6bcf\u4e2a\u884c\u4e3a\u5b9a\u4e49 Pydantic \u6a21\u578b&#xff08;\u5982 DiscussionModelCN{reach_agreement, confidence_level(ge&#061;1,le&#061;10), key_evidence}\u3001WitchActionModelCN{use_antidote, use_poison, target_name}&#xff09;&#xff0c;\u628a\u6e38\u620f\u89c4\u5219\u76f4\u63a5\u8f6c\u5316\u4e3a\u4ee3\u7801\u5c42\u9762\u7684\u5b57\u6bb5\u7ea6\u675f\u4e0e\u9a8c\u8bc1&#xff08;\u5973\u5deb\u4e0d\u80fd\u540c\u65f6\u5bf9\u540c\u4e00\u76ee\u6807\u7528\u89e3\u836f\u548c\u6bd2\u836f\u3001\u9884\u8a00\u5bb6\u6bcf\u665a\u53ea\u67e5\u4e00\u4eba&#xff09;\u3002<\/li>\n<p>\u5e76\u53d1\u4e0e\u5bb9\u9519&#xff1a;fanout_pipeline(&#8230;) \u5e76\u884c\u5411\u6240\u6709\u667a\u80fd\u4f53\u53d1\u6d88\u606f\u5e76\u5f02\u6b65\u6536\u96c6\u54cd\u5e94&#xff08;\u6a21\u62df&#034;\u540c\u65f6\u6295\u7968&#034;&#xff09;&#xff1b;\u5173\u952e\u73af\u8282 try\/except \u6355\u83b7\u5f02\u5e38\u540e\u6784\u9020\u9ed8\u8ba4\u54cd\u5e94&#xff08;\u5982 confidence_level&#061;5&#xff09;\u4fdd\u8bc1\u6d41\u7a0b\u4e0d\u4e2d\u65ad\u3002<\/p>\n<h4>6.3.3 \u4f18\u52bf\u4e0e\u5c40\u9650<\/h4>\n<p>\u4f18\u52bf&#xff1a;\u6d88\u606f\u9a71\u52a8\u4f18\u96c5\u66ff\u4ee3\u50f5\u786c\u72b6\u6001\u673a&#xff1b;\u7ed3\u6784\u5316\u8f93\u51fa\u628a\u89c4\u5219\u53d8\u6210\u53ef\u9a8c\u8bc1\u7684\u4ee3\u7801\u7ea6\u675f&#xff1b;\u539f\u751f\u5e76\u53d1 &#043; \u5355\u70b9\u5f02\u5e38\u4e0d\u5f71\u54cd\u6574\u4f53\u6d41\u7a0b\u3002<br \/>\n\u5c40\u9650&#xff1a;\u26a0\ufe0f \u67b6\u6784\u590d\u6742\u3001\u6280\u672f\u95e8\u69db\u9ad8&#xff08;\u9700\u7406\u89e3\u5f02\u6b65\u7f16\u7a0b\u4e0e\u5206\u5e03\u5f0f\u901a\u4fe1&#xff09;&#xff1b;\u7b80\u5355\u5bf9\u8bdd\u573a\u666f\u4e0b\u6709**\u201c\u8fc7\u5ea6\u5de5\u7a0b\u5316\u201d**\u98ce\u9669&#xff1b;\u4f5c\u4e3a\u8f83\u65b0\u7684\u6846\u67b6&#xff0c;\u751f\u6001\u4e0e\u793e\u533a\u8d44\u6e90\u6709\u5f85\u5b8c\u5584\u3002\u66f4\u9002\u5408\u751f\u4ea7\u7ea7\u5927\u89c4\u6a21\u7cfb\u7edf&#xff0c;\u5feb\u901f\u539f\u578b\u5e94\u9009\u66f4\u8f7b\u91cf\u7684\u6846\u67b6\u3002<\/p>\n<h3>6.4 CAMEL \u2014\u2014 \u89d2\u8272\u626e\u6f14\u5f0f\u7684\u8f7b\u91cf\u534f\u4f5c<\/h3>\n<p>CAMEL\u521d\u59cb\u76ee\u6807&#xff1a;\u63a2\u7d22\u5982\u4f55\u5728\u6700\u5c11\u4eba\u7c7b\u5e72\u9884\u4e0b&#xff0c;\u8ba9\u4e24\u4e2a\u667a\u80fd\u4f53\u901a\u8fc7&#034;\u89d2\u8272\u626e\u6f14&#034;\u81ea\u4e3b\u534f\u4f5c\u89e3\u51b3\u590d\u6742\u4efb\u52a1&#xff08;Li et al., NeurIPS 2023&#xff09;\u3002<\/p>\n<h4>6.4.1 \u4e24\u5927\u57fa\u77f3 \u2b50<\/h4>\n<p>\u2460 \u89d2\u8272\u626e\u6f14&#xff08;Role-Playing&#xff09;&#xff1a;\u4e24\u4e2a\u4e92\u8865\u89d2\u8272\u7684\u667a\u80fd\u4f53\u534f\u4f5c \u2014\u2014<\/p>\n<ul>\n<li>AI User\u7528\u6237&#xff1a;\u63d0\u51fa\u9700\u6c42\u3001\u4e0b\u8fbe\u6307\u4ee4\u3001\u6784\u601d\u4efb\u52a1\u6b65\u9aa4\u3002<\/li>\n<li>AI Assistant\u52a9\u7406&#xff1a;\u6267\u884c\u5177\u4f53\u64cd\u4f5c\u3001\u63d0\u4f9b\u89e3\u51b3\u65b9\u6848\u3002<\/li>\n<\/ul>\n<p>\u5178\u578b\u8bbe\u5b9a&#xff08;\u80a1\u7968\u4ea4\u6613\u7b56\u7565\u5206\u6790\u5de5\u5177&#xff09;&#xff1a;AI User &#061; \u61c2\u5e02\u573a\u4f46\u4e0d\u61c2\u7f16\u7a0b\u7684&#034;\u8d44\u6df1\u80a1\u7968\u4ea4\u6613\u5458&#034;&#xff1b;AI Assistant &#061; \u7cbe\u901a\u7f16\u7a0b\u4f46\u4e0d\u61c2\u80a1\u7968\u7684&#034;Python \u7a0b\u5e8f\u5458&#034;\u3002\u4efb\u52a1\u89e3\u51b3\u8fc7\u7a0b\u88ab\u81ea\u7136\u8f6c\u5316\u4e3a\u4e24\u4f4d\u8de8\u9886\u57df\u4e13\u5bb6\u7684\u5bf9\u8bdd\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182448-6aea26f0714f4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u2461 \u5f15\u5bfc\u6027\u63d0\u793a&#xff08;Inception Prompting&#xff09;&#xff1a;\u2b50 CAMEL \u6700\u6838\u5fc3\u7684\u6280\u672f \u2014\u2014 \u5bf9\u8bdd\u5f00\u59cb\u524d\u5206\u522b\u6ce8\u5165\u7ed9\u4e24\u4e2a\u667a\u80fd\u4f53\u7684\u7ed3\u6784\u5316\u521d\u59cb\u6307\u4ee4&#xff0c;\u786e\u4fdd\u5b83\u4eec&#034;\u5f85\u5728\u81ea\u5df1\u7684\u89d2\u8272\u91cc&#034;\u5e76\u671d\u5171\u540c\u76ee\u6807\u524d\u8fdb\u3002\u56db\u8981\u7d20&#xff1a;<\/p>\n<li>\u660e\u786e\u81ea\u8eab\u89d2\u8272&#xff1a;\u201c\u4f60\u662f\u4e00\u4f4d\u8d44\u6df1\u7684\u80a1\u7968\u4ea4\u6613\u5458\u2026\u2026\u201d<\/li>\n<li>\u544a\u77e5\u534f\u4f5c\u8005\u89d2\u8272&#xff1a;\u201c\u4f60\u6b63\u5728\u4e0e\u4e00\u4f4d\u4f18\u79c0\u7684 Python \u7a0b\u5e8f\u5458\u5408\u4f5c\u2026\u2026\u201d<\/li>\n<li>\u5b9a\u4e49\u5171\u540c\u76ee\u6807&#xff1a;\u201c\u4f60\u4eec\u7684\u5171\u540c\u76ee\u6807\u662f\u5f00\u53d1\u4e00\u4e2a\u80a1\u7968\u4ea4\u6613\u7b56\u7565\u5206\u6790\u5de5\u5177\u3002\u201d<\/li>\n<li>\u8bbe\u5b9a\u884c\u4e3a\u7ea6\u675f\u4e0e\u6c9f\u901a\u534f\u8bae&#xff08;\u6700\u5173\u952e&#xff09;&#xff1a;\u8981\u6c42 AI User&#034;\u4e00\u6b21\u53ea\u63d0\u51fa\u4e00\u4e2a\u6e05\u6670\u5177\u4f53\u7684\u6b65\u9aa4&#034;\u3001AI Assistant&#034;\u5728\u5b8c\u6210\u4e0a\u4e00\u6b65\u4e4b\u524d\u4e0d\u8981\u8ffd\u95ee\u66f4\u591a\u7ec6\u8282&#034;\u3001\u53cc\u65b9\u7528\u7279\u5b9a\u6807\u5fd7&#xff08;\u5982 &lt;SOLUTION&gt; \/ &lt;CAMEL_TASK_DONE&gt;&#xff09;\u6807\u8bc6\u5b8c\u6210\u3002<\/li>\n<h4>6.4.2 \u6848\u4f8b&#xff1a;AI \u79d1\u666e\u7535\u5b50\u4e66&#xff08;\u5fc3\u7406\u5b66\u5bb6 \u00d7 \u4f5c\u5bb6&#xff09;<\/h4>\n<ul>\n<li>\u89d2\u8272\u5206\u914d&#xff1a;user_role_name&#061;&#034;\u4f5c\u5bb6&#034;&#xff08;\u5bf9\u8bdd\u63a8\u52a8\u8005\u3001\u9700\u6c42\u65b9&#xff0c;\u8d1f\u8d23\u7ed3\u6784\u89c4\u5212\u4e0e\u53ef\u8bfb\u6027&#xff09;\u3001assistant_role_name&#061;&#034;\u5fc3\u7406\u5b66\u5bb6&#034;&#xff08;\u6267\u884c\u8005\u3001\u65b9\u6848\u63d0\u4f9b\u65b9&#xff0c;\u8d1f\u8d23\u4e13\u4e1a\u77e5\u8bc6&#xff09;\u3002<\/li>\n<li>API&#xff1a;RolePlaying(assistant_role_name, user_role_name, task_prompt, model&#061;&#8230;)&#xff1b;init_chat() \u81ea\u52a8\u751f\u6210\u5f00\u573a&#xff08;\u65e0\u9700\u4eba\u5de5\u5199&#xff09;&#xff0c;step(input_msg) \u9a71\u52a8\u4e00\u8f6e\u5b8c\u6574\u4ea4\u4e92&#xff08;\u4f5c\u5bb6\u63d0\u9700\u6c42 &#043; \u5fc3\u7406\u5b66\u5bb6\u7ed9\u5185\u5bb9&#xff09;&#xff0c;\u5e76\u628a\u4e0a\u4e00\u8f6e assistant \u7684\u8f93\u51fa\u4f5c\u4e3a\u4e0b\u4e00\u8f6e\u8f93\u5165\u3002<\/li>\n<li>\u7ec8\u6b62&#xff1a;\u8fbe\u5230 chat_turn_limit&#xff08;30 \u8f6e&#xff09;\u6216\u4efb\u4e00\u65b9\u8f93\u51fa &lt;CAMEL_TASK_DONE&gt;\u3002<\/li>\n<li>\u89c2\u5bdf\u5230\u7684\u56db\u4e2a\u81ea\u53d1\u9636\u6bb5&#xff1a;\u6846\u67b6\u642d\u5efa\u4e0e\u76ee\u6807\u5bf9\u9f50&#xff08;1\u20135 \u8f6e&#xff09;\u2192 \u6838\u5fc3\u5185\u5bb9\u751f\u6210\u4e0e\u77e5\u8bc6\u8f6c\u8bd1&#xff08;6\u201320 \u8f6e&#xff0c;\u201c\u8bf7\u6c42\u2014\u54cd\u5e94&#034;\u5faa\u73af&#xff0c;\u5fc3\u7406\u5b66\u5bb6\u63d0\u4f9b\u786c\u6838\u77e5\u8bc6\u3001\u4f5c\u5bb6\u505a&#034;\u7ffb\u8bd1\u5b98\u201d&#xff09;\u2192 \u8fed\u4ee3\u4f18\u5316\u4e0e\u8d28\u91cf\u4fdd\u8bc1&#xff08;21\u201325 \u8f6e&#xff0c;\u4f5c\u5bb6\u770b\u6d41\u7545\u6027\u3001\u5fc3\u7406\u5b66\u5bb6\u505a\u4e8b\u5b9e\u6838\u67e5&#xff09;\u2192 \u603b\u7ed3\u4e0e\u5347\u534e\u3002<\/li>\n<\/ul>\n<h4>6.4.3 \u4f18\u52bf\u4e0e\u5c40\u9650<\/h4>\n<p>\u4f18\u52bf&#xff1a;\u2b50&#034;\u8f7b\u67b6\u6784\u3001\u91cd\u63d0\u793a&#034;\u2014\u2014 \u76f8\u6bd4 AutoGen \u7684\u590d\u6742\u5bf9\u8bdd\u7ba1\u7406\u4e0e AgentScope \u7684\u5206\u5e03\u5f0f\u67b6\u6784&#xff0c;\u9760\u7cbe\u5fc3\u8bbe\u8ba1\u7684\u521d\u59cb\u63d0\u793a\u5c31\u80fd\u5b9e\u73b0\u9ad8\u8d28\u91cf\u534f\u4f5c&#xff0c;\u81ea\u7136\u6d8c\u73b0\u7684\u534f\u4f5c\u5f80\u5f80\u6bd4\u786c\u7f16\u7801\u5de5\u4f5c\u6d41\u66f4\u7075\u6d3b\u9ad8\u6548\u3002\u73b0\u5df2\u6709\u591a\u6a21\u6001\u3001\u5de5\u5177\u5e93\u3001\u591a\u6a21\u578b\u540e\u7aef&#xff0c;\u5e76\u4e0e LangChain \/ CrewAI \/ AutoGen \u4e92\u64cd\u4f5c\u3002<\/p>\n<p>\u5c40\u9650&#xff1a;\u2460 \u5bf9\u63d0\u793a\u5de5\u7a0b\u9ad8\u5ea6\u4f9d\u8d56&#xff08;\u8bbe\u8ba1\u95e8\u69db\u9ad8\u3001\u8c03\u8bd5\u96be\u5b9a\u4f4d\u3001\u4e0d\u540c LLM \u7406\u89e3\u4e0d\u4e00\u81f4&#xff09;&#xff1b;\u2461 \u534f\u4f5c\u89c4\u6a21\u53d7\u9650&#xff08;\u7f3a AutoGen \u5f0f\u5bf9\u8bdd\u8def\u7531\u3001\u7f3a AgentScope \u5f0f\u5206\u5e03\u5f0f\u72b6\u6001\u7ba1\u7406\u3001\u7f3a\u51b2\u7a81\u4ef2\u88c1&#xff09;&#xff1b;\u2462 \u4efb\u52a1\u8fb9\u754c&#xff08;\u4e25\u683c\u6d41\u7a0b\u63a7\u5236 \u2192 LangGraph \u66f4\u5408\u9002&#xff1b;\u5927\u89c4\u6a21\u5e76\u53d1 \u2192 AgentScope \u66f4\u4f18&#xff1b;\u590d\u6742\u591a\u65b9\u51b3\u7b56 \u2192 AutoGen \u7fa4\u804a\u66f4\u7075\u6d3b&#xff09;\u3002<\/p>\n<h3>6.5 LangGraph \u2014\u2014 \u7528\u72b6\u6001\u56fe\u7cbe\u786e\u63a7\u5236\u6d41\u7a0b&#xff08;\u672c\u7ae0\u91cd\u70b9&#xff09;<\/h3>\n<p>LangGraph \u662f LangChain \u751f\u6001\u7cfb\u7edf\u7684\u6269\u5c55\u3002LangGraph \u4e0e\u57fa\u4e8e&#034;\u5bf9\u8bdd&#034;\u7684\u6846\u67b6\u4e0d\u540c&#xff0c;\u5b83\u5c06\u667a\u80fd\u4f53\u7684\u6267\u884c\u6d41\u7a0b\u5efa\u6a21\u4e3a\u4e00\u79cd\u72b6\u6001\u673a &#xff08;State Machine&#xff09;&#xff0c;\u5e76\u5c06\u5176\u8868\u793a\u4e3a\u6709\u5411\u56fe&#xff08;Directed Graph&#xff09;\u3002\u5728\u8fd9\u79cd\u8303\u5f0f\u4e2d&#xff0c;\u56fe\u7684**\u8282\u70b9&#xff08;Nodes&#xff09;\u4ee3\u8868\u4e00 \u4e2a\u5177\u4f53\u7684\u8ba1\u7b97\u6b65\u9aa4&#xff08;\u5982\u8c03\u7528 LLM\u3001\u6267\u884c\u5de5\u5177&#xff09;&#xff0c;\u800c\u8fb9&#xff08;Edges&#xff09;**\u5219\u5b9a\u4e49\u4e86\u4ece\u4e00\u4e2a\u8282\u70b9\u5230\u53e6\u4e00\u4e2a\u8282\u70b9\u7684\u8df3\u8f6c\u903b \u8f91\u3002<\/p>\n<p>LangGraph\u8bbe\u8ba1\u7684\u9769\u547d\u6027\u4e4b\u5904\u5728\u4e8e\u5b83\u5929\u7136\u652f\u6301\u5faa\u73af&#xff0c;\u4f7f\u5f97\u6784\u5efa\u80fd\u591f\u8fdb\u884c\u8fed\u4ee3\u3001\u53cd\u601d\u548c\u81ea\u6211\u4fee\u6b63\u7684\u590d\u6742\u667a\u80fd\u4f53\u5de5\u4f5c \u6d41\u53d8\u5f97\u524d\u6240\u672a\u6709\u7684\u76f4\u89c2\u548c\u7b80\u5355\u3002<\/p>\n<h4>6.5.1 \u4e09\u4e2a\u57fa\u672c\u6784\u6210\u8981\u7d20 \u2b50<\/h4>\n<table>\n<tr>\u8981\u7d20\u5b9a\u4e49\u8981\u70b9<\/tr>\n<tbody>\n<tr>\n<td>\u5168\u5c40\u72b6\u6001 State<\/td>\n<td>\u7528 TypedDict \u5b9a\u4e49\u7684\u5171\u4eab\u72b6\u6001\u5bf9\u8c61&#xff08;\u5bf9\u8bdd\u5386\u53f2\u3001\u4e2d\u95f4\u7ed3\u679c\u3001\u8fed\u4ee3\u6b21\u6570\u3001\u5f53\u524d\u6b65\u9aa4\u6807\u8bb0\u7b49&#xff09;<\/td>\n<td>\u6240\u6709\u8282\u70b9\u90fd\u80fd\u8bfb\u3001\u90fd\u80fd\u66f4\u65b0<\/td>\n<\/tr>\n<tr>\n<td>\u8282\u70b9 Node<\/td>\n<td>def node(state) -&gt; dict&#xff0c;\u63a5\u6536\u72b6\u6001\u3001\u8fd4\u56de\u8981\u66f4\u65b0\u7684\u5b57\u6bb5\u589e\u91cf<\/td>\n<td>\u6267\u884c\u5177\u4f53\u5de5\u4f5c\u7684\u5355\u5143&#xff1b;\u662f\u7eaf\u51fd\u6570&#xff0c;\u4fbf\u4e8e\u5355\u6d4b<\/td>\n<\/tr>\n<tr>\n<td>\u8fb9 Edge<\/td>\n<td>\u8fde\u63a5\u8282\u70b9&#xff1b;\u542b\u5e38\u89c4\u8fb9\u4e0e\u6761\u4ef6\u8fb9&#xff08;Conditional Edges&#xff09;<\/td>\n<td>\u2b50 \u6761\u4ef6\u8fb9\u901a\u8fc7\u51fd\u6570\u5224\u65ad\u72b6\u6001\u3001\u52a8\u6001\u51b3\u5b9a\u8df3\u5411\u54ea\u4e2a\u8282\u70b9 \u2014\u2014 \u5b9e\u73b0\u5faa\u73af\u4e0e\u5206\u652f\u7684\u5173\u952e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">AgentState<\/span><span class=\"token punctuation\">(<\/span>TypedDict<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span>          <span class=\"token comment\"># \u2460 \u72b6\u6001<\/span><br \/>\n    messages<span class=\"token punctuation\">:<\/span> List<span class=\"token punctuation\">[<\/span><span class=\"token builtin\">str<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> current_task<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">;<\/span> final_answer<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">str<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">should_continue<\/span><span class=\"token punctuation\">(<\/span>state<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">:<\/span>    <span class=\"token comment\"># \u2462 \u6761\u4ef6\u8fb9\u51fd\u6570<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;continue_to_planner&#034;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;end_workflow&#034;<\/span><\/p>\n<p>workflow <span class=\"token operator\">&#061;<\/span> StateGraph<span class=\"token punctuation\">(<\/span>AgentState<span class=\"token punctuation\">)<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>add_node<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;planner&#034;<\/span><span class=\"token punctuation\">,<\/span> planner_node<span class=\"token punctuation\">)<\/span>           <span class=\"token comment\"># \u2461 \u8282\u70b9<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>set_entry_point<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;planner&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>add_edge<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;planner&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;executor&#034;<\/span><span class=\"token punctuation\">)<\/span>             <span class=\"token comment\"># \u5e38\u89c4\u8fb9<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>add_conditional_edges<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;executor&#034;<\/span><span class=\"token punctuation\">,<\/span> should_continue<span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;continue_to_planner&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;planner&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;end_workflow&#034;<\/span><span class=\"token punctuation\">:<\/span> END<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span>   <span class=\"token comment\"># \u2b50 \u6761\u4ef6\u8fb9 \u2192 \u5f62\u6210\u5faa\u73af<\/span><br \/>\napp <span class=\"token operator\">&#061;<\/span> workflow<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">compile<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">for<\/span> event <span class=\"token keyword\">in<\/span> app<span class=\"token punctuation\">.<\/span>stream<span class=\"token punctuation\">(<\/span>inputs<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>event<span class=\"token punctuation\">)<\/span>        <span class=\"token comment\"># \u8fd0\u884c<\/span><\/p>\n<h4>6.5.2 \u6848\u4f8b&#xff1a;\u4e09\u6b65\u95ee\u7b54\u52a9\u624b&#xff08;\u7406\u89e3 \u2192 \u641c\u7d22 \u2192 \u56de\u7b54&#xff09;<\/h4>\n<p>\u72b6\u6001\u8bbe\u8ba1\u7684\u5173\u952e&#xff1a;SearchState \u540c\u65f6\u5305\u542b user_query&#xff08;LLM \u7406\u89e3\u540e\u7684\u9700\u6c42\u603b\u7ed3&#xff09;\u4e0e search_query&#xff08;\u4f18\u5316\u540e\u7528\u4e8e\u641c\u7d22\u5f15\u64ce\u7684\u5173\u952e\u8bcd&#xff09;\u2014\u2014 \u8ba9\u667a\u80fd\u4f53\u5148\u628a\u81ea\u7136\u8bed\u8a00\u63d0\u95ee\u4f18\u5316\u6210\u7cbe\u70bc\u5173\u952e\u8bcd&#xff0c;\u663e\u8457\u63d0\u5347\u641c\u7d22\u8d28\u91cf&#xff1b;\u53e6\u6709 step \u5b57\u6bb5\u6807\u8bb0\u5f53\u524d\u6b65\u9aa4&#xff0c;\u4f9b\u4e0b\u6e38\u8282\u70b9\u505a\u6761\u4ef6\u5224\u65ad\u3002<\/p>\n<p>\u4e09\u4e2a\u8282\u70b9&#xff1a;<\/p>\n<table>\n<tr>\u8282\u70b9\u804c\u8d23\u5de5\u7a0b\u7ec6\u8282<\/tr>\n<tbody>\n<tr>\n<td>understand<\/td>\n<td>\u610f\u56fe\u7406\u89e3 &#043; \u751f\u6210\u641c\u7d22\u5173\u952e\u8bcd<\/td>\n<td>\u63d0\u793a\u8bcd\u8981\u6c42\u6309&#034;\u7406\u89e3&#xff1a;\u2026 \/ \u641c\u7d22\u8bcd&#xff1a;\u2026&#034;\u683c\u5f0f\u8f93\u51fa&#xff0c;\u518d\u6309\u5206\u9694\u7b26\u5207\u51fa\u5173\u952e\u8bcd<\/td>\n<\/tr>\n<tr>\n<td>search&#xff08;Tavily&#xff09;<\/td>\n<td>\u771f\u5b9e\u8054\u7f51\u641c\u7d22<\/td>\n<td>\u2b50 try\/except \u6355\u83b7\u5f02\u5e38&#xff0c;\u5931\u8d25\u65f6\u628a step \u7f6e\u4e3a &#034;search_failed&#034;&#xff08;\u628a\u5931\u8d25\u5199\u8fdb\u72b6\u6001&#xff0c;\u4f9b\u4e0b\u6e38\u51b3\u7b56&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>answer<\/td>\n<td>\u751f\u6210\u6700\u7ec8\u7b54\u6848<\/td>\n<td>\u2b50 \u68c0\u67e5 state[&#034;step&#034;]&#xff1a;\u5931\u8d25\u5219\u56de\u9000\u4e3a\u57fa\u4e8e LLM \u81ea\u8eab\u77e5\u8bc6\u56de\u7b54\u5e76\u544a\u77e5\u7528\u6237&#xff1b;\u6210\u529f\u5219\u7528\u5e26\u5b9e\u65f6\u7ed3\u679c\u7684\u63d0\u793a\u751f\u6210\u6709\u636e\u53ef\u4f9d\u7684\u7b54\u6848<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u56fe\u7ed3\u6784&#xff1a;START \u2192 understand \u2192 search \u2192 answer \u2192 END&#xff1b;\u7f16\u8bd1\u65f6\u53ef\u4f20\u5165 checkpointer&#061;InMemorySaver() \u83b7\u5f97\u6301\u4e45\u5316\u4e0e\u591a\u8f6e\u4ea4\u4e92\u80fd\u529b\u3002<\/p>\n<h4>6.5.3 \u4f18\u52bf\u4e0e\u5c40\u9650<\/h4>\n<p>\u4f18\u52bf&#xff1a;\u2460 \u2b50 \u9ad8\u5ea6\u53ef\u63a7\u4e0e\u53ef\u9884\u6d4b \u2014\u2014 \u53ef\u7cbe\u786e\u89c4\u5212\u6bcf\u4e00\u6b65\u884c\u4e3a&#xff0c;\u5bf9\u9ad8\u53ef\u9760\u6027\u3001\u53ef\u5ba1\u8ba1\u7684\u751f\u4ea7\u7ea7\u5e94\u7528\u81f3\u5173\u91cd\u8981&#xff1b;\u2461 \u5bf9\u5faa\u73af\u7684\u539f\u751f\u652f\u6301 \u2014\u2014 \u6761\u4ef6\u8fb9\u53ef\u8f7b\u677e\u6784\u5efa&#034;\u53cd\u601d\u2014\u4fee\u6b63&#034;\u4e0e&#034;\u5931\u8d25\u56de\u9000&#034;\u8def\u5f84&#xff1b;\u2462 \u6a21\u5757\u5316&#xff08;\u6bcf\u4e2a\u8282\u70b9\u662f\u72ec\u7acb Python \u51fd\u6570&#xff09;&#xff1b;\u2463 \u63d2\u5165&#034;\u7b49\u5f85\u4eba\u5de5\u5ba1\u6838&#034;\u8282\u70b9\u975e\u5e38\u76f4\u63a5 \u2192 \u5929\u7136\u7684 Human-in-the-loop\u3002<\/p>\n<p>\u5c40\u9650&#xff1a;\u2460 \u6837\u677f\u4ee3\u7801\u591a&#xff08;Boilerplate&#xff09;&#xff0c;\u7b80\u5355\u4efb\u52a1\u663e\u5f97\u7e41\u7410&#xff1b;\u5f00\u53d1\u8005\u8981\u66f4\u591a\u601d\u8003&#034;\u5982\u4f55\u63a7\u5236\u6d41\u7a0b&#xff08;how&#xff09;\u201c\u800c\u975e&#034;\u505a\u4ec0\u4e48&#xff08;what&#xff09;\u201d&#xff1b;\u2461 \u2b50 \u7f3a\u5c11&#034;\u6d8c\u73b0\u5f0f&#034;\u7684\u52a8\u6001\u4ea4\u4e92 \u2014\u2014 \u5f3a\u9879\u662f\u6267\u884c\u786e\u5b9a\u7684\u53ef\u9760\u6d41\u7a0b&#xff0c;\u800c\u975e\u6a21\u62df\u5f00\u653e\u5f0f\u793e\u4f1a\u534f\u4f5c&#xff1b;\u2462 \u8c03\u8bd5\u8981\u6c42\u5bf9\u6574\u56fe\u6709\u5168\u5c40\u7406\u89e3&#xff08;\u95ee\u9898\u53ef\u80fd\u5728\u8282\u70b9\u5185\u90e8\u903b\u8f91\u3001\u8282\u70b9\u95f4\u72b6\u6001\u5f02\u53d8\u3001\u6216\u8fb9\u6761\u4ef6\u5224\u65ad&#xff09;\u3002<\/p>\n<h3>6.6 \u56db\u6846\u67b6\u5bf9\u6bd4\u4e0e\u9009\u578b \u2b50<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182448-6aea26f0d6e12.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u7ef4\u5ea6AutoGenAgentScopeCAMELLangGraph<\/tr>\n<tbody>\n<tr>\n<td>\u534f\u4f5c\u6a21\u5f0f<\/td>\n<td>\u7fa4\u804a&#xff08;RoundRobin \/ Team&#xff09;<\/td>\n<td>MsgHub \u6d88\u606f\u4e2d\u5fc3 &#043; Pipeline<\/td>\n<td>\u53cc\u667a\u80fd\u4f53\u89d2\u8272\u626e\u6f14<\/td>\n<td>\u6709\u5411\u56fe &#043; \u72b6\u6001\u673a<\/td>\n<\/tr>\n<tr>\n<td>\u63a7\u5236\u65b9\u5f0f<\/td>\n<td>\u6d8c\u73b0\u5f0f&#xff08;\u5b9a\u89d2\u8272\u4e0e\u89c4\u5219&#xff09;<\/td>\n<td>\u6d88\u606f\u9a71\u52a8 &#043; \u5de5\u7a0b\u5316<\/td>\n<td>\u6d8c\u73b0\u5f0f&#xff08;\u5f15\u5bfc\u6027\u63d0\u793a&#xff09;<\/td>\n<td>\u663e\u5f0f\u63a7\u5236&#xff08;\u9884\u5b9a\u4e49\u8282\u70b9\u4e0e\u8fb9&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5e76\u53d1\/\u5206\u5e03\u5f0f<\/td>\n<td>\u5f02\u6b65\u4f18\u5148<\/td>\n<td>\u2b50 \u539f\u751f\u5206\u5e03\u5f0f\u3001\u9ad8\u5e76\u53d1<\/td>\n<td>\u5f31<\/td>\n<td>\u4f9d\u8d56 LangChain \u751f\u6001<\/td>\n<\/tr>\n<tr>\n<td>\u5faa\u73af\u652f\u6301<\/td>\n<td>\u95f4\u63a5&#xff08;\u9760\u5bf9\u8bdd\u8f6e\u6b21&#xff09;<\/td>\n<td>\u9760\u6d88\u606f\u6a21\u5f0f<\/td>\n<td>\u9760\u5bf9\u8bdd\u8f6e\u6b21<\/td>\n<td>\u2b50 \u539f\u751f\u652f\u6301&#xff08;\u6761\u4ef6\u8fb9&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u4eba\u7c7b\u5728\u73af<\/td>\n<td>\u2b50 UserProxyAgent \u5929\u7136\u652f\u6301<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u5f31<\/td>\n<td>\u2b50 \u63d2\u5165\u4eba\u5de5\u5ba1\u6838\u8282\u70b9\u5373\u53ef<\/td>\n<\/tr>\n<tr>\n<td>\u4e0a\u624b\u6210\u672c<\/td>\n<td>\u4e2d<\/td>\n<td>\u9ad8&#xff08;\u9700\u61c2\u5f02\u6b65\/\u5206\u5e03\u5f0f&#xff09;<\/td>\n<td>\u4f4e&#xff08;\u63d0\u793a\u8bcd\u9a71\u52a8&#xff09;<\/td>\n<td>\u4e2d&#xff08;\u6837\u677f\u4ee3\u7801\u591a&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5178\u578b\u573a\u666f<\/td>\n<td>\u6d41\u7a0b\u56fa\u5b9a\u7684\u591a\u4eba\u534f\u4f5c&#xff08;\u8f6f\u4ef6\u5f00\u53d1\u56e2\u961f&#xff09;<\/td>\n<td>\u5927\u89c4\u6a21\u751f\u4ea7\u7ea7\u3001\u9ad8\u5e76\u53d1<\/td>\n<td>\u521b\u610f\/\u6df1\u5ea6\u534f\u4f5c&#xff08;\u5199\u4f5c\u3001\u7814\u7a76&#xff09;<\/td>\n<td>\u9700\u53ef\u5ba1\u8ba1\u3001\u53ef\u56de\u6eaf\u7684\u4e25\u8c28\u6d41\u7a0b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e24\u6761\u8bbe\u8ba1\u6743\u8861\u4e3b\u7ebf&#xff08;\u539f\u6587\u7ed3\u8bba&#xff09;&#xff1a;<\/p>\n<li>\u2b50 \u201c\u6d8c\u73b0\u5f0f\u534f\u4f5c\u201d vs \u201c\u663e\u5f0f\u63a7\u5236\u201d&#xff1a;AutoGen \u4e0e CAMEL \u901a\u8fc7\u5b9a\u4e49&#034;\u89d2\u8272&#034;\u4e0e&#034;\u76ee\u6807&#034;\u8ba9\u534f\u4f5c\u884c\u4e3a\u4ece\u7b80\u5355\u5bf9\u8bdd\u89c4\u5219\u4e2d\u6d8c\u73b0&#xff0c;\u8d34\u8fd1\u4eba\u7c7b\u4ea4\u4e92\u4f46\u96be\u9884\u6d4b\u3001\u96be\u8c03\u8bd5&#xff1b;LangGraph \u8981\u6c42\u660e\u786e\u5b9a\u4e49\u6bcf\u4e2a\u6b65\u9aa4\u4e0e\u8df3\u8f6c\u6761\u4ef6&#xff0c;\u727a\u7272\u4e86\u6d8c\u73b0\u7684\u60ca\u559c&#xff0c;\u6362\u6765\u53ef\u9760\u6027\u3001\u53ef\u63a7\u6027\u4e0e\u53ef\u89c2\u6d4b\u6027\u3002<\/li>\n<li>\u2b50 \u5de5\u7a0b\u5316\u7ef4\u5ea6&#xff1a;AgentScope \u63ed\u793a\u4e86\u7b2c\u4e8c\u91cd\u6311\u6218 \u2014\u2014 \u65e0\u8bba\u9009\u54ea\u79cd\u534f\u4f5c\u8303\u5f0f&#xff0c;\u4ece\u5b9e\u9a8c\u539f\u578b\u63a8\u5411\u751f\u4ea7\u90fd\u5fc5\u987b\u9762\u5bf9\u5e76\u53d1\u3001\u5bb9\u9519\u3001\u5206\u5e03\u5f0f\u90e8\u7f72&#xff0c;\u8fd9\u4ee3\u8868&#034;\u4ece\u80fd\u8fd0\u884c\u5230\u80fd\u7a33\u5b9a\u670d\u52a1&#034;\u7684\u5173\u952e\u8de8\u8d8a\u3002<\/li>\n<p>\u9009\u578b\u901f\u7b54&#xff08;\u5bf9\u5e94\u6559\u6750\u4e60\u9898 6&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u9ad8\u5e76\u53d1\u5ba2\u670d&#xff08;1000&#043; QPS\u30017\u00d724\u3001\u9700\u6c34\u5e73\u6269\u5c55&#xff09;\u2192 AgentScope&#xff08;\u539f\u751f\u5e76\u53d1\u4e0e\u5206\u5e03\u5f0f&#xff09;\u3002<\/li>\n<li>\u79d1\u7814\u8bba\u6587\u8f85\u52a9\u5199\u4f5c&#xff08;\u4e24\u667a\u80fd\u4f53\u591a\u8f6e\u6df1\u5ea6\u8ba8\u8bba\u3001\u81ea\u4e3b\u63a8\u8fdb&#xff09;\u2192 CAMEL&#xff08;\u89d2\u8272\u626e\u6f14 &#043; \u5f15\u5bfc\u6027\u63d0\u793a&#xff09;\u3002<\/li>\n<li>\u91d1\u878d\u98ce\u63a7\u5ba1\u6279&#xff08;\u4e25\u683c\u6d41\u7a0b\u3001\u660e\u786e\u5206\u652f\u3001\u53ef\u8ffd\u6eaf\u53ef\u5ba1\u8ba1&#xff09;\u2192 LangGraph&#xff08;\u663e\u5f0f\u56fe\u7ed3\u6784 &#043; \u6761\u4ef6\u8fb9&#xff09;\u3002<\/li>\n<\/ul>\n<h4>\u7b2c\u516d\u7ae0\u5c0f\u7ed3<\/h4>\n<p>\u672c\u7ae0\u7528\u56db\u4e2a\u6846\u67b6\u56de\u7b54\u4e86\u540c\u4e00\u4e2a\u95ee\u9898&#xff1a;\u591a\u667a\u80fd\u4f53\u4e0e\u590d\u6742\u6d41\u7a0b\u8be5\u600e\u4e48\u89c4\u8303\u5730\u6784\u5efa\u3002<\/p>\n<p>AutoGen \u628a\u534f\u4f5c\u62bd\u8c61\u6210\u4e00\u573a\u81ea\u52a8\u8fdb\u884c\u7684&#034;\u7fa4\u804a&#034;&#xff0c;\u8ba9\u5f00\u53d1\u8005\u53ea\u9700\u5b9a\u4e49\u89d2\u8272\u4e0e\u804c\u8d23&#xff0c;\u5176\u6838\u5fc3\u4ef7\u503c\u662f&#034;\u7cfb\u7edf\u6d88\u606f\u5373\u63d0\u793a\u5de5\u7a0b&#034;\u4e0e UserProxyAgent \u5e26\u6765\u7684\u4eba\u7c7b\u5728\u73af&#xff1b;<\/p>\n<p>AgentScope \u8d70\u5de5\u7a0b\u5316\u8def\u7ebf&#xff0c;\u7528\u7edf\u4e00\u7684 Msg \u6d88\u606f\u3001MsgHub \u6d88\u606f\u4e2d\u67a2\u4e0e AgentBase.reply \u751f\u547d\u5468\u671f\u628a\u5e76\u53d1\u3001\u5206\u5e03\u5f0f\u3001\u5bb9\u9519\u4e0e\u53ef\u89c2\u6d4b\u6027\u505a\u6210\u57fa\u7840\u8bbe\u65bd&#xff0c;\u5e76\u7528 Pydantic \u7ed3\u6784\u5316\u8f93\u51fa\u628a\u4e1a\u52a1\u89c4\u5219\u53d8\u6210\u53ef\u9a8c\u8bc1\u7ea6\u675f&#xff1b;<\/p>\n<p>CAMEL \u53cd\u5176\u9053\u800c\u884c&#xff0c;\u4ee5&#034;\u8f7b\u67b6\u6784\u3001\u91cd\u63d0\u793a&#034;\u7684\u89d2\u8272\u626e\u6f14 &#043; \u5f15\u5bfc\u6027\u63d0\u793a&#xff0c;\u7528\u6700\u5c11\u4ee3\u7801\u6fc0\u53d1\u4e24\u4e2a\u4e13\u5bb6\u667a\u80fd\u4f53\u7684\u6df1\u5ea6\u81ea\u4e3b\u534f\u4f5c&#xff1b;<\/p>\n<p>LangGraph \u5219\u56de\u5230\u5e95\u5c42\u7684\u72b6\u6001\u673a\u6a21\u578b&#xff0c;\u4ee5 State \/ Node \/ Edge&#xff08;\u5c24\u5176\u662f\u6761\u4ef6\u8fb9&#xff09; \u4e09\u8981\u7d20\u8d4b\u4e88\u5f00\u53d1\u8005\u5bf9\u5de5\u4f5c\u6d41\u7684\u7cbe\u786e\u63a7\u5236&#xff0c;\u539f\u751f\u5faa\u73af\u4e3a\u53ef\u53cd\u601d\u3001\u53ef\u4fee\u6b63\u7684\u667a\u80fd\u4f53\u94fa\u5e73\u9053\u8def\u3002<\/p>\n<p>\u56db\u8005\u7684\u53d6\u820d\u6700\u7ec8\u6536\u655b\u5230\u4e24\u6761\u4e3b\u7ebf&#xff1a;\u4e00\u662f**&#034;\u6d8c\u73b0\u5f0f\u534f\u4f5c&#034;\u4e0e&#034;\u663e\u5f0f\u63a7\u5236&#034;\u7684\u6743\u8861**&#xff0c;\u4e8c\u662f\u4ece\u539f\u578b\u5230\u751f\u4ea7\u7684\u5de5\u7a0b\u5316\u8de8\u8d8a\u2014\u2014\u7406\u89e3\u8fd9\u4e24\u70b9&#xff0c;\u624d\u7b97\u771f\u6b63\u8bfb\u61c2\u6846\u67b6&#xff0c;\u4e5f\u624d\u80fd\u5728\u7b2c 7 \u7ae0\u9020\u51fa\u5c5e\u4e8e\u81ea\u5df1\u7684\u6846\u67b6\u3002<\/p>\n<hr \/>\n<h2>\u9644\u5f55&#xff1a;\u901f\u67e5\u8868<\/h2>\n<table>\n<tr>\u6982\u5ff5\u4e00\u53e5\u8bdd<\/tr>\n<tbody>\n<tr>\n<td>ReAct<\/td>\n<td>\u8fb9\u60f3\u8fb9\u505a&#xff1a;Thought \u2192 Action \u2192 Observation \u5faa\u73af&#xff0c;\u8d62\u5728\u52a8\u6001\u7ea0\u9519<\/td>\n<\/tr>\n<tr>\n<td>Plan-and-Solve<\/td>\n<td>\u5148\u8c0b\u540e\u52a8&#xff1a;\u89c4\u5212\u5668\u51fa Python \u5217\u8868\u8ba1\u5212&#xff0c;\u6267\u884c\u5668\u6309\u6b65\u6267\u884c\u5e76\u4f20\u9012\u5386\u53f2\u7ed3\u679c<\/td>\n<\/tr>\n<tr>\n<td>Reflection<\/td>\n<td>\u6267\u884c \u2192 \u53cd\u601d \u2192 \u4f18\u5316&#xff1b;\u9760 Memory \u8bb0\u8f68\u8ff9&#xff0c;\u4ee5\u6210\u672c\u6362\u8d28\u91cf<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u5177\u4e09\u8981\u7d20<\/td>\n<td>\u540d\u79f0 \/ \u63cf\u8ff0&#xff08;\u6700\u5173\u952e&#xff0c;\u51b3\u5b9a LLM \u9009\u8c01&#xff09; \/ \u6267\u884c\u903b\u8f91<\/td>\n<\/tr>\n<tr>\n<td>max_steps \/ max_iterations \/ max_turns<\/td>\n<td>\u9632\u6b7b\u5faa\u73af\u7684\u4e09\u9053\u5b89\u5168\u9600<\/td>\n<\/tr>\n<tr>\n<td>Finish[&#8230;] \/ \u201c\u65e0\u9700\u6539\u8fdb\u201d \/ TERMINATE<\/td>\n<td>\u4e09\u79cd\u8303\u5f0f\u7684\u663e\u5f0f\u7ec8\u6b62\u4fe1\u53f7<\/td>\n<\/tr>\n<tr>\n<td>\u7ed3\u6784\u5316\u8f93\u51fa<\/td>\n<td>\u5f3a\u5236 python\u5305\u88f9\u6216 Pydantic \u6a21\u578b&#xff1b;\u7528 ast.literal_eval \u89e3\u6790&#xff0c;\u7edd\u4e0d\u7528 eval<\/td>\n<\/tr>\n<tr>\n<td>\u7ec4\u5408\u4f18\u4e8e\u7ee7\u627f<\/td>\n<td>Agent \u6301\u6709 LLM\/Planner\/Executor&#xff0c;\u800c\u975e\u7ee7\u627f\u5b83\u4eec<\/td>\n<\/tr>\n<tr>\n<td>\u6846\u67b6\u7684\u4e09\u4e2a\u89e3\u8026\u5c42<\/td>\n<td>\u6a21\u578b\u5c42 \/ \u5de5\u5177\u5c42 \/ \u8bb0\u5fc6\u5c42<\/td>\n<\/tr>\n<tr>\n<td>AutoGen<\/td>\n<td>\u7fa4\u804a\u9a71\u52a8&#xff1b;System Message \u5b9a\u4e49\u89d2\u8272&#xff1b;UserProxy &#061; \u4eba\u7c7b\u5728\u73af &#043; \u6267\u884c\u5668<\/td>\n<\/tr>\n<tr>\n<td>AgentScope<\/td>\n<td>\u6d88\u606f\u9a71\u52a8&#xff1b;MsgHub \u8def\u7531 &#043; \u6301\u4e45\u5316 &#043; \u5206\u5e03\u5f0f&#xff1b;reply \u5b9a\u4e49\u667a\u80fd\u4f53<\/td>\n<\/tr>\n<tr>\n<td>CAMEL<\/td>\n<td>\u89d2\u8272\u626e\u6f14 &#043; \u5f15\u5bfc\u6027\u63d0\u793a&#xff1b;AI User \u63d0\u9700\u6c42\u3001AI Assistant \u7ed9\u65b9\u6848<\/td>\n<\/tr>\n<tr>\n<td>LangGraph<\/td>\n<td>State &#043; Node &#043; Edge&#xff1b;\u6761\u4ef6\u8fb9\u5b9e\u73b0\u5faa\u73af&#xff1b;\u8282\u70b9\u662f\u7eaf\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u6d8c\u73b0 vs \u63a7\u5236<\/td>\n<td>AutoGen\/CAMEL \u6d8c\u73b0\u5f0f&#xff1b;LangGraph \u663e\u5f0f\u63a7\u5236<\/td>\n<\/tr>\n<tr>\n<td>\u4f4e\u4ee3\u7801\u56db\u5e73\u53f0<\/td>\n<td>Coze \u96f6\u4ee3\u7801\u5206\u53d1 \/ Dify \u4f01\u4e1a\u7ea7\u5168\u6808 \/ FastGPT \u6781\u81f4 RAG \/ n8n \u901a\u7528\u8fde\u63a5<\/td>\n<\/tr>\n<tr>\n<td>\u6df7\u5408\u5f00\u53d1<\/td>\n<td>\u5e73\u53f0\u5feb\u901f\u9a8c\u8bc1 &#043; \u4ee3\u7801\u7cbe\u7ec6\u63a7\u5236&#xff0c;\u624d\u662f\u6700\u4f73\u5b9e\u8df5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u8303\u56f4&#xff1a;\u7b2c\u4e8c\u90e8\u5206\u300c\u667a\u80fd\u4f53\u6784\u5efa\u5b9e\u8df5\u300d&#xff5c;PDF p82\u2013205&#xff08;\u7b2c\u56db\u7ae0 p82\u2013114\u3001\u7b2c\u4e94\u7ae0 p115\u2013170\u3001\u7b2c\u516d\u7ae0 p171\u2013205&#xff09;\u5168\u5c40\u77e5\u8bc6\u5730\u56fe&#xff1a;\u8fd9\u4e09\u7ae0\u5728\u8bb2\u4ec0\u4e48\u7ae0\u56de\u7b54\u7684\u6838\u5fc3\u95ee\u9898\u4e0e\u524d\u540e\u7ae0\u8282\u7684\u5173\u7cfb\u7b2c\u56db\u7ae0\u4e09\u79cd\u7ecf\u5178\u8303\u5f0f\u600e\u4e48\u4ece\u96f6\u624b\u5199\u51fa\u6765\u76f4\u63a5\u843d\u5730\u7b2c 1 \u7ae0\u7684 Agent Loop \u4e0e T-A-O \u534f\u8bae&#xff1b;\u662f\u7b2c 7 \u7ae0\u81ea\u5efa\u6846\u67b6\u3001\u7b2c 10 \u7ae0\u591a\u667a\u80fd\u4f53\u7684\u8303\u5f0f\u6765\u6e90\u7b2c\u4e94\u7ae0\u4e0d\u5199\u4ee3\u7801\u80fd\u4e0d\u80fd\u66f4\u5feb\u642d\u51fa\u667a\u80fd\u4f53\u4e0e\u7b2c\u56db\u7ae0\u6784\u6210\\&#8221;\u624b<\/p>\n","protected":false},"author":2,"featured_media":121947,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13953,13954,74,81,723],"topic":[],"class_list":["post-121957","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-plan-and-solve","tag-reflection","tag-agent","tag-python","tag-react"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/121957.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u8303\u56f4&#xff1a;\u7b2c\u4e8c\u90e8\u5206\u300c\u667a\u80fd\u4f53\u6784\u5efa\u5b9e\u8df5\u300d&#xff5c;PDF p82\u2013205&#xff08;\u7b2c\u56db\u7ae0 p82\u2013114\u3001\u7b2c\u4e94\u7ae0 p115\u2013170\u3001\u7b2c\u516d\u7ae0 p171\u2013205&#xff09;\u5168\u5c40\u77e5\u8bc6\u5730\u56fe&#xff1a;\u8fd9\u4e09\u7ae0\u5728\u8bb2\u4ec0\u4e48\u7ae0\u56de\u7b54\u7684\u6838\u5fc3\u95ee\u9898\u4e0e\u524d\u540e\u7ae0\u8282\u7684\u5173\u7cfb\u7b2c\u56db\u7ae0\u4e09\u79cd\u7ecf\u5178\u8303\u5f0f\u600e\u4e48\u4ece\u96f6\u624b\u5199\u51fa\u6765\u76f4\u63a5\u843d\u5730\u7b2c 1 \u7ae0\u7684 Agent Loop \u4e0e T-A-O \u534f\u8bae&#xff1b;\u662f\u7b2c 7 \u7ae0\u81ea\u5efa\u6846\u67b6\u3001\u7b2c 10 \u7ae0\u591a\u667a\u80fd\u4f53\u7684\u8303\u5f0f\u6765\u6e90\u7b2c\u4e94\u7ae0\u4e0d\u5199\u4ee3\u7801\u80fd\u4e0d\u80fd\u66f4\u5feb\u642d\u51fa\u667a\u80fd\u4f53\u4e0e\u7b2c\u56db\u7ae0\u6784\u6210&quot;\u624b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/121957.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-03T18:24:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182444-6aea26ec6d576.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/121957.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/121957.html\",\"name\":\"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-03T18:24:50+00:00\",\"dateModified\":\"2026-11-03T18:24:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/121957.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/121957.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/121957.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/121957.html","og_locale":"zh_CN","og_type":"article","og_title":"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u8303\u56f4&#xff1a;\u7b2c\u4e8c\u90e8\u5206\u300c\u667a\u80fd\u4f53\u6784\u5efa\u5b9e\u8df5\u300d&#xff5c;PDF p82\u2013205&#xff08;\u7b2c\u56db\u7ae0 p82\u2013114\u3001\u7b2c\u4e94\u7ae0 p115\u2013170\u3001\u7b2c\u516d\u7ae0 p171\u2013205&#xff09;\u5168\u5c40\u77e5\u8bc6\u5730\u56fe&#xff1a;\u8fd9\u4e09\u7ae0\u5728\u8bb2\u4ec0\u4e48\u7ae0\u56de\u7b54\u7684\u6838\u5fc3\u95ee\u9898\u4e0e\u524d\u540e\u7ae0\u8282\u7684\u5173\u7cfb\u7b2c\u56db\u7ae0\u4e09\u79cd\u7ecf\u5178\u8303\u5f0f\u600e\u4e48\u4ece\u96f6\u624b\u5199\u51fa\u6765\u76f4\u63a5\u843d\u5730\u7b2c 1 \u7ae0\u7684 Agent Loop \u4e0e T-A-O \u534f\u8bae&#xff1b;\u662f\u7b2c 7 \u7ae0\u81ea\u5efa\u6846\u67b6\u3001\u7b2c 10 \u7ae0\u591a\u667a\u80fd\u4f53\u7684\u8303\u5f0f\u6765\u6e90\u7b2c\u4e94\u7ae0\u4e0d\u5199\u4ee3\u7801\u80fd\u4e0d\u80fd\u66f4\u5feb\u642d\u51fa\u667a\u80fd\u4f53\u4e0e\u7b2c\u56db\u7ae0\u6784\u6210\"\u624b","og_url":"https:\/\/www.wsisp.com\/helps\/121957.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-03T18:24:50+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261103182444-6aea26ec6d576.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/121957.html","url":"https:\/\/www.wsisp.com\/helps\/121957.html","name":"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-03T18:24:50+00:00","dateModified":"2026-11-03T18:24:50+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/121957.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/121957.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/121957.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u300aHello-Agents\u300b\u7b2c\u56db\u81f3\u516d\u7ae0 \u6838\u5fc3\u77e5\u8bc6 \u68b3\u7406\u603b\u7ed3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/121957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=121957"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/121957\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/121947"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=121957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=121957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=121957"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=121957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}