{"id":109769,"date":"2026-09-24T21:40:55","date_gmt":"2026-09-24T13:40:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/109769.html"},"modified":"2026-09-24T21:40:55","modified_gmt":"2026-09-24T13:40:55","slug":"ai-agent-%e7%9a%84%e8%ae%b0%e5%bf%86%e7%b3%bb%e7%bb%9f%ef%bc%9a%e7%9f%ad%e6%9c%9f%e9%95%bf%e6%9c%9f%e4%b8%8e%e5%b7%a5%e4%bd%9c%e8%ae%b0%e5%bf%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/109769.html","title":{"rendered":"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6"},"content":{"rendered":"<h2>AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf&#xff1a;\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6<\/h2>\n<p>\u8ba9 Agent \u8bb0\u4f4f\u4e00\u4ef6\u4e8b\u5f88\u5bb9\u6613&#xff0c;\u96be\u7684\u662f\u51b3\u5b9a&#034;\u4ec0\u4e48\u65f6\u5019\u8bb0\u3001\u8bb0\u5728\u54ea\u3001\u4ec0\u4e48\u65f6\u5019\u53d6\u56de\u6765\u3001\u4ec0\u4e48\u65f6\u5019\u4e22\u6389&#034;\u3002\u4e0a\u4e0b\u6587\u7a97\u53e3\u53ea\u6709\u90a3\u4e48\u957f&#xff0c;\u800c\u5bf9\u8bdd\u53ef\u4ee5\u65e0\u9650\u957f\u2014\u2014\u8fd9\u4e09\u7c7b\u8bb0\u5fc6\u7684\u5206\u5de5\u5c31\u662f\u4e3a\u6b64\u800c\u751f\u3002<\/p>\n<h3>\u4e00\u3001\u80cc\u666f\u4e0e\u75db\u70b9<\/h3>\n<p>\u6240\u6709\u505a\u8fc7 Agent \u7684\u4eba\u90fd\u649e\u8fc7\u540c\u4e00\u5835\u5899&#xff1a;\u4e0a\u4e0b\u6587\u7a97\u53e3\u6709\u9650\u3002<\/p>\n<p>\u4e00\u4e2a\u5ba2\u670d Agent \u5904\u7406\u4e00\u5c0f\u65f6\u7684\u5bf9\u8bdd\u53ef\u80fd\u6709\u4e0a\u767e\u8f6e&#xff1b;\u4e00\u4e2a\u7f16\u7801 Agent \u62c6\u89e3\u4efb\u52a1\u3001\u8bd5\u9519\u3001\u56de\u6eda&#xff0c;\u4e2d\u95f4\u72b6\u6001\u66f4\u662f\u4e00\u5927\u5806\u3002\u5982\u679c\u5168\u90e8\u585e\u8fdb\u4e0a\u4e0b\u6587&#xff1a;<\/p>\n<ul>\n<li>\u8d35&#xff1a;token \u662f\u7ebf\u6027\u8ba1\u8d39\u7684&#xff0c;\u5386\u53f2\u8d8a\u957f\u6bcf\u8f6e\u6210\u672c\u8d8a\u9ad8&#xff1b;<\/li>\n<li>\u6162&#xff1a;prompt \u8d8a\u957f&#xff0c;\u9996 token \u5ef6\u8fdf\u8d8a\u5927&#xff1b;<\/li>\n<li>\u53cd\u800c\u66f4\u5dee&#xff1a;\u65e0\u5173\u5386\u53f2\u4f1a\u7a00\u91ca\u6ce8\u610f\u529b&#xff0c;\u6a21\u578b\u5f00\u59cb\u6293\u4e0d\u4f4f\u91cd\u70b9&#xff08;\u201clost in the middle\u201d&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u4f46\u7b80\u5355\u7c97\u66b4\u5730&#034;\u53ea\u4fdd\u7559\u6700\u8fd1\u51e0\u8f6e&#034;\u4e5f\u6709\u4ee3\u4ef7&#xff1a;<\/p>\n<ul>\n<li>\u7528\u6237\u4e09\u8f6e\u524d\u63d0\u8fc7\u7684\u504f\u597d&#xff08;\u201c\u6211\u503e\u5411\u76f4\u8fbe&#xff0c;\u4e0d\u4e2d\u8f6c\u201d&#xff09;\u4f1a\u88ab\u9057\u5fd8&#xff1b;<\/li>\n<li>\u4efb\u52a1\u505a\u5230\u4e00\u534a\u7684\u4e2d\u95f4\u72b6\u6001&#xff08;\u5df2\u7ecf\u786e\u8ba4\u4e86\u65e5\u671f\u548c\u76ee\u7684\u5730&#xff09;\u4f1a\u4e22\u5931&#xff1b;<\/li>\n<li>\u591a\u6b21\u4f1a\u8bdd\u4e4b\u95f4\u5b8c\u5168\u5931\u5fc6&#xff0c;\u6bcf\u6b21\u90fd\u8981\u91cd\u65b0\u81ea\u6211\u4ecb\u7ecd\u3002<\/li>\n<\/ul>\n<p>\u6240\u4ee5\u6210\u719f\u7684 Agent \u901a\u5e38\u540c\u65f6\u7ef4\u62a4\u4e09\u5c42\u8bb0\u5fc6&#xff0c;\u5404\u81ea\u89e3\u51b3\u4e0d\u540c\u7684\u95ee\u9898\u3002<\/p>\n<h3>\u4e8c\u3001\u6838\u5fc3\u539f\u7406<\/h3>\n<h4>1. \u77ed\u671f\u8bb0\u5fc6&#xff1a;\u6ed1\u52a8\u7a97\u53e3 &#043; \u4fdd\u771f<\/h4>\n<p>\u77ed\u671f\u8bb0\u5fc6\u4fdd\u7559&#034;\u6700\u8fd1\u82e5\u5e72\u8f6e\u5bf9\u8bdd\u7684\u539f\u6587&#034;\u3002\u5b83\u4fdd\u771f\u5ea6\u6700\u9ad8&#xff0c;\u4f46\u5bb9\u91cf\u6700\u5c0f\u3002<\/p>\n<p><span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">budgetshort&#061;\u7a97\u53e3\u8f6e\u6570\u00d7\u5e73\u5747\u8f6e\u957f\u5ea6\\\\text{budget}_{\\\\text{short}} &#061; \\\\text{\u7a97\u53e3\u8f6e\u6570} \\\\times \\\\text{\u5e73\u5747\u8f6e\u957f\u5ea6}<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.9386em;vertical-align: -0.2441em\"><\/span><span class=\"mord\"><span class=\"mord text\"><span class=\"mord\">budget<\/span><\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.242em\"><span class=\"\" style=\"top: -2.4559em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord text mtight\"><span class=\"mord mtight\">short<\/span><\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.2441em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/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: 0.7667em;vertical-align: -0.0833em\"><\/span><span class=\"mord text\"><span class=\"mord cjk_fallback\">\u7a97\u53e3\u8f6e\u6570<\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.6833em\"><\/span><span class=\"mord text\"><span class=\"mord cjk_fallback\">\u5e73\u5747\u8f6e\u957f\u5ea6<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>\u4ee3\u4ef7\u662f\u7ebf\u6027\u7684\u3002\u53ea\u8981\u7a97\u53e3\u6ed1\u52a8&#xff0c;\u6ed1\u51fa\u53bb\u7684\u4fe1\u606f\u5c31\u6c38\u4e45\u4e22\u5931\u2014\u2014\u6240\u4ee5\u5173\u952e\u4fe1\u606f\u5fc5\u987b\u5728\u6ed1\u51fa\u524d\u88ab&#034;\u4e0b\u6c89&#034;\u5230\u53e6\u5916\u4e24\u5c42\u3002<\/p>\n<h4>2. \u5de5\u4f5c\u8bb0\u5fc6&#xff1a;\u663e\u5f0f\u4efb\u52a1\u72b6\u6001<\/h4>\n<p>\u5de5\u4f5c\u8bb0\u5fc6\u4e0d\u5b58\u539f\u6587&#xff0c;\u5b58\u7684\u662f\u7ed3\u6784\u5316\u7684\u4efb\u52a1\u72b6\u6001&#xff1a;\u76ee\u6807\u3001\u5df2\u786e\u8ba4\u7684\u69fd\u4f4d\u3001\u5df2\u5b8c\u6210\u7684\u6b65\u9aa4\u3002<\/p>\n<p>state <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string\">&#034;goal&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u8ba2\u5468\u516d\u676d\u5dde\u706b\u8f66\u7968&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string\">&#034;slots&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;\u65e5\u671f&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u5468\u516d&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u76ee\u7684\u5730&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u676d\u5dde&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u65f6\u95f4&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u4e0a\u5348&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u51fa\u53d1\u5730&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u4e0a\u6d77&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u5ea7\u5e2d&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u4e8c\u7b49\u5ea7&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string\">&#034;done&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;\u786e\u8ba4\u65f6\u95f4&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u786e\u8ba4\u51fa\u53d1\u5730&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5b83\u7684\u4ef7\u503c\u5728\u4e8e\u628a&#034;\u591a\u8f6e\u8ffd\u95ee&#034;\u53d8\u6210&#034;\u663e\u5f0f\u72b6\u6001\u7ba1\u7406&#034;&#xff1a;<\/p>\n<ul>\n<li>\u4e0d\u7528\u91cd\u590d\u95ee\u5df2\u7ecf\u7b54\u8fc7\u7684\u69fd\u4f4d&#xff08;token \u7701\u3001\u4f53\u9a8c\u597d&#xff09;&#xff1b;<\/li>\n<li>\u7f3a\u54ea\u4e2a\u69fd\u4f4d\u4e00\u76ee\u4e86\u7136&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u53d1\u95ee&#xff1b;<\/li>\n<li>\u4efb\u52a1\u4e2d\u65ad\u540e\u53ef\u4ee5\u6062\u590d\u3002<\/li>\n<\/ul>\n<p>\u5de5\u4f5c\u8bb0\u5fc6\u53ea\u6709\u51e0\u767e token&#xff0c;\u662f\u4e09\u79cd\u8bb0\u5fc6\u91cc\u6027\u4ef7\u6bd4\u6700\u9ad8\u7684\u4e00\u5c42\u2014\u2014\u4f46\u5b83\u9700\u8981\u63d0\u524d\u8bbe\u8ba1 schema&#xff0c;\u5c5e\u4e8e&#034;\u5de5\u7a0b\u6d3b&#034;\u800c\u975e&#034;\u81ea\u52a8\u80fd\u529b&#034;\u3002<\/p>\n<h4>3. \u957f\u671f\u8bb0\u5fc6&#xff1a;\u5411\u91cf\u68c0\u7d22<\/h4>\n<p>\u957f\u671f\u8bb0\u5fc6\u628a\u8de8\u4f1a\u8bdd\u7684\u77e5\u8bc6\u5b58\u8fdb\u5411\u91cf\u5e93&#xff0c;\u68c0\u7d22\u65f6\u53ea\u6ce8\u5165 top-k \u7ed3\u679c&#xff1a;<\/p>\n<p><span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">sim(q,m)&#061;e(q)\u22c5e(m)\u2225e(q)\u2225\u2009\u2225e(m)\u2225\\\\text{sim}(q, m) &#061; \\\\frac{\\\\mathbf{e}(q)\\\\cdot \\\\mathbf{e}(m)}{\\\\|\\\\mathbf{e}(q)\\\\|\\\\,\\\\|\\\\mathbf{e}(m)\\\\|}<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord text\"><span class=\"mord\">sim<\/span><\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">q<\/span><span class=\"mpunct\">,<\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord mathnormal\">m<\/span><span class=\"mclose\">)<\/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: 2.363em;vertical-align: -0.936em\"><\/span><span class=\"mord\"><span class=\"mopen nulldelimiter\"><\/span><span class=\"mfrac\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 1.427em\"><span class=\"\" style=\"top: -2.314em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"mord\"><span class=\"mord\">\u2225<\/span><span class=\"mord mathbf\">e<\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">q<\/span><span class=\"mclose\">)<\/span><span class=\"mord\">\u2225<\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord\">\u2225<\/span><span class=\"mord mathbf\">e<\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\">m<\/span><span class=\"mclose\">)<\/span><span class=\"mord\">\u2225<\/span><\/span><\/span><span class=\"\" style=\"top: -3.23em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"frac-line\" style=\"border-bottom-width: 0.04em\"><\/span><\/span><span class=\"\" style=\"top: -3.677em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"mord\"><span class=\"mord mathbf\">e<\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">q<\/span><span class=\"mclose\">)<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u22c5<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mord mathbf\">e<\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\">m<\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.936em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><span class=\"mclose nulldelimiter\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>\u4ee3\u7801\u91cc\u7684\u73a9\u5177\u6f14\u793a\u4e2d&#xff0c;\u67e5\u8be2&#034;\u5e2e\u6211\u8ba2\u5468\u516d\u4e0a\u5348\u7684\u706b\u8f66\u7968&#034;\u547d\u4e2d\u4e86\u4e24\u6761\u8bb0\u5fc6&#xff08;\u201c\u4e0d\u559c\u6b22\u4e2d\u8f6c\u201d\u3001\u201c\u4e0a\u6b21\u9009\u4e86\u4e8c\u7b49\u5ea7\u201d&#xff09;&#xff1b;\u67e5\u8be2&#034;\u6211\u5e94\u8be5\u5728\u54ea\u513f\u53d6\u7968&#034;\u547d\u4e2d\u7684\u662f&#034;\u53d6\u7968\u7528\u8eab\u4efd\u8bc1&#034;\u3002\u8fd9\u4e24\u6b21\u547d\u4e2d\u7684\u8bb0\u5fc6&#xff0c;\u90fd\u4e0d\u662f\u6700\u8fd1\u51e0\u8f6e\u5bf9\u8bdd\u91cc\u51fa\u73b0\u8fc7\u7684\u2014\u2014\u8fd9\u6b63\u662f\u957f\u671f\u8bb0\u5fc6\u7684\u4ef7\u503c\u3002<\/p>\n<p>\u5173\u952e\u70b9&#xff1a;\u6ce8\u5165\u7684\u53ea\u6709 top-k&#xff0c;\u4e0d\u662f\u6574\u4e2a\u5e93\u3002\u6240\u4ee5\u957f\u671f\u8bb0\u5fc6\u7684\u5bb9\u91cf\u662f&#034;\u65e0\u9650&#034;\u7684&#xff0c;\u4f46\u6210\u672c\u53ea\u662f\u6bcf\u6b21\u68c0\u7d22\u7684 k \u6761\u3002<\/p>\n<h4>4. \u4e09\u5c42\u7684\u5206\u5de5\u4e0e\u6210\u672c<\/h4>\n<table>\n<tr>\u8bb0\u5fc6\u7c7b\u578b\u5bb9\u91cf\u6210\u672c\u98ce\u9669<\/tr>\n<tbody>\n<tr>\n<td>\u77ed\u671f&#xff08;\u539f\u6587\u7a97\u53e3&#xff09;<\/td>\n<td>\u51e0\u5343 token<\/td>\n<td>token \u7ebf\u6027\u5360\u7528<\/td>\n<td>\u6ed1\u51fa\u5373\u4e22\u5931<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u4f5c\u8bb0\u5fc6&#xff08;\u72b6\u6001&#xff09;<\/td>\n<td>\u51e0\u767e token<\/td>\n<td>\u7ed3\u6784\u5316\u3001\u6781\u7701<\/td>\n<td>\u9700\u8bbe\u8ba1 schema<\/td>\n<\/tr>\n<tr>\n<td>\u957f\u671f&#xff08;\u5411\u91cf\u5e93&#xff09;<\/td>\n<td>\u65e0\u9650<\/td>\n<td>\u4ec5\u6ce8\u5165 top-k<\/td>\n<td>\u6709\u68c0\u7d22\u8bef\u5dee\u3001\u9700\u7ef4\u62a4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e09\u8005\u7f3a\u4e00\u4e0d\u53ef&#xff1a;\u77ed\u671f\u4fdd\u5bf9\u8bdd\u6d41\u7545&#xff0c;\u5de5\u4f5c\u8bb0\u5fc6\u4fdd\u4efb\u52a1\u6b63\u786e&#xff0c;\u957f\u671f\u8bb0\u5fc6\u4fdd\u4e2a\u6027\u5316\u3002<\/p>\n<h4>5. \u4ec0\u4e48\u65f6\u5019&#034;\u5199&#034;\u8fdb\u957f\u671f\u8bb0\u5fc6<\/h4>\n<p>\u8fd9\u662f\u6700\u5bb9\u6613\u505a\u9519\u7684\u4e00\u73af\u3002\u5e38\u89c1\u7b56\u7565&#xff1a;<\/p>\n<ul>\n<li>\u663e\u5f0f\u8bb0\u4f4f&#xff1a;\u7528\u6237\u8bf4&#034;\u8bb0\u4f4f\u6211\u504f\u597d\u76f4\u8fbe&#034;&#xff0c;\u76f4\u63a5\u5199\u5165&#xff1b;<\/li>\n<li>\u81ea\u52a8\u6458\u8981&#xff1a;\u4f1a\u8bdd\u7ed3\u675f\u65f6\u8ba9\u6a21\u578b\u62bd\u53d6&#034;\u503c\u5f97\u8de8\u4f1a\u8bdd\u590d\u7528\u7684\u4e8b\u5b9e&#034;&#xff0c;\u8fc7\u6ee4\u6389\u5bd2\u6684\u4e0e\u4e34\u65f6\u4fe1\u606f&#xff1b;<\/li>\n<li>\u6309\u9700\u63d0\u5347&#xff1a;\u77ed\u671f\u8bb0\u5fc6\u91cc\u88ab\u53cd\u590d\u5f15\u7528\u7684\u4fe1\u606f&#xff0c;\u63d0\u5347\u4e3a\u957f\u671f\u8bb0\u5fc6\u3002<\/li>\n<\/ul>\n<p>\u53cd\u9762\u6a21\u5f0f\u662f&#034;\u628a\u6240\u6709\u5386\u53f2\u90fd\u585e\u8fdb\u5411\u91cf\u5e93&#034;\u2014\u2014\u68c0\u7d22\u566a\u58f0\u4f1a\u6025\u5267\u4e0a\u5347&#xff0c;\u547d\u4e2d\u7387\u53cd\u800c\u4e0b\u964d\u3002<\/p>\n<h3>\u4e09\u3001\u4ee3\u7801\u5b9e\u6218<\/h3>\n<p>\u7528 numpy \u5b9e\u73b0\u4e09\u5c42\u8bb0\u5fc6\u7684\u6700\u5c0f\u6a21\u578b\u3002<\/p>\n<p><span class=\"token keyword\">import<\/span> numpy <span class=\"token keyword\">as<\/span> np<\/p>\n<p>rng <span class=\"token operator\">&#061;<\/span> np<span class=\"token punctuation\">.<\/span>random<span class=\"token punctuation\">.<\/span>default_rng<span class=\"token punctuation\">(<\/span><span class=\"token number\">7<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u77ed\u671f&#xff1a;\u6ed1\u52a8\u7a97\u53e3<\/span><br \/>\ndialogue <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237&#xff1a;\u5e2e\u6211\u67e5\u4e00\u4e0b\u4e0a\u6d77\u660e\u5929\u7684\u5929\u6c14&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u52a9\u624b&#xff1a;\u4e0a\u6d77\u660e\u5929 22-28 \u5ea6&#xff0c;\u591a\u4e91\u8f6c\u6674&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237&#xff1a;\u90a3\u540e\u5929\u5462&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u52a9\u624b&#xff1a;\u540e\u5929 20-26 \u5ea6&#xff0c;\u6709\u5c0f\u96e8&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237&#xff1a;\u5468\u516d\u6211\u8981\u53bb\u676d\u5dde&#xff0c;\u90a3\u8fb9\u5462&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u52a9\u624b&#xff1a;\u676d\u5dde\u5468\u516d 19-25 \u5ea6&#xff0c;\u9634\u5929&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237&#xff1a;\u597d\u7684&#xff0c;\u5e2e\u6211\u8ba2\u5468\u516d\u7684\u706b\u8f66\u7968&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u52a9\u624b&#xff1a;\u8bf7\u95ee\u60a8\u60f3\u8ba2\u51e0\u70b9\u7684\u8f66\u6b21&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237&#xff1a;\u4e0a\u5348\u7684&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">]<\/span><br \/>\nWINDOW <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">4<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u5bf9\u8bdd %d \u8f6e&#xff0c;\u7a97\u53e3\u4fdd\u7559\u6700\u8fd1 %d \u8f6e&#xff1a;&#034;<\/span> <span class=\"token operator\">%<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>dialogue<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> WINDOW<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">for<\/span> line <span class=\"token keyword\">in<\/span> dialogue<span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span>WINDOW<span class=\"token punctuation\">:<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;   &#034;<\/span> <span class=\"token operator\">&#043;<\/span> line<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u957f\u671f&#xff1a;\u5411\u91cf\u68c0\u7d22&#xff08;\u73a9\u5177\u5d4c\u5165&#xff09;<\/span><br \/>\nmemories <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237\u5e38\u4f4f\u4e0a\u6d77&#xff0c;\u51fa\u5dee\u5e38\u53bb\u676d\u5dde&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u7528\u6237\u504f\u597d\u4e0a\u5348\u51fa\u53d1\u7684\u706b\u8f66&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237\u4e0d\u559c\u6b22\u4e2d\u8f6c&#xff0c;\u503e\u5411\u76f4\u8fbe&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u7528\u6237\u6709 12306 \u8d26\u53f7&#xff0c;\u53d6\u7968\u7528\u8eab\u4efd\u8bc1&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u7528\u6237\u4e0a\u6b21\u8ba2\u7968\u9009\u4e86\u4e8c\u7b49\u5ea7&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">]<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">embed<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">,<\/span> dim<span class=\"token operator\">&#061;<\/span><span class=\"token number\">32<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    v <span class=\"token operator\">&#061;<\/span> np<span class=\"token punctuation\">.<\/span>zeros<span class=\"token punctuation\">(<\/span>dim<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> i<span class=\"token punctuation\">,<\/span> ch <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">enumerate<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        v<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">ord<\/span><span class=\"token punctuation\">(<\/span>ch<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> i<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">%<\/span> dim<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#043;&#061;<\/span> <span class=\"token number\">1.0<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> v <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">(<\/span>np<span class=\"token punctuation\">.<\/span>linalg<span class=\"token punctuation\">.<\/span>norm<span class=\"token punctuation\">(<\/span>v<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1e-9<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>MEM <span class=\"token operator\">&#061;<\/span> np<span class=\"token punctuation\">.<\/span>stack<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">[<\/span>embed<span class=\"token punctuation\">(<\/span>m<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">for<\/span> m <span class=\"token keyword\">in<\/span> memories<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">for<\/span> q <span class=\"token keyword\">in<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;\u5e2e\u6211\u8ba2\u5468\u516d\u4e0a\u5348\u7684\u706b\u8f66\u7968&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u6211\u5e94\u8be5\u5728\u54ea\u513f\u53d6\u7968&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    sims <span class=\"token operator\">&#061;<\/span> MEM &#064; embed<span class=\"token punctuation\">(<\/span>q<span class=\"token punctuation\">)<\/span><br \/>\n    order <span class=\"token operator\">&#061;<\/span> np<span class=\"token punctuation\">.<\/span>argsort<span class=\"token punctuation\">(<\/span><span class=\"token operator\">&#8211;<\/span>sims<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u67e5\u8be2\u300c%s\u300d\u2192 \u547d\u4e2d&#xff1a;&#034;<\/span> <span class=\"token operator\">%<\/span> q<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> i <span class=\"token keyword\">in<\/span> order<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;   [%.3f] %s&#034;<\/span> <span class=\"token operator\">%<\/span> <span class=\"token punctuation\">(<\/span>sims<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> memories<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u5de5\u4f5c\u8bb0\u5fc6&#xff1a;\u4efb\u52a1\u72b6\u6001<\/span><br \/>\nstate <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;goal&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u8ba2\u5468\u516d\u676d\u5dde\u706b\u8f66\u7968&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n         <span class=\"token string\">&#034;slots&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;\u65e5\u671f&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u5468\u516d&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u76ee\u7684\u5730&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u676d\u5dde&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u65f6\u95f4&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">None<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u5ea7\u5e2d&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u4e8c\u7b49\u5ea7&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n         <span class=\"token string\">&#034;done&#034;<\/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\">for<\/span> k<span class=\"token punctuation\">,<\/span> v <span class=\"token keyword\">in<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u65f6\u95f4&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u4e0a\u5348&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u51fa\u53d1\u5730&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u4e0a\u6d77&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;slots&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span>k<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> v<br \/>\n    state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;done&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u786e\u8ba4&#034;<\/span> <span class=\"token operator\">&#043;<\/span> k<span class=\"token punctuation\">)<\/span><br \/>\nmissing <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span>k <span class=\"token keyword\">for<\/span> k<span class=\"token punctuation\">,<\/span> v <span class=\"token keyword\">in<\/span> state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;slots&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>items<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">if<\/span> v <span class=\"token keyword\">is<\/span> <span class=\"token boolean\">None<\/span><span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u5de5\u4f5c\u8bb0\u5fc6\u69fd\u4f4d&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;slots&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u5f85\u8865\u69fd\u4f4d&#xff1a;%s&#034;<\/span> <span class=\"token operator\">%<\/span> <span class=\"token punctuation\">(<\/span>missing <span class=\"token keyword\">if<\/span> missing <span class=\"token keyword\">else<\/span> <span class=\"token string\">&#034;\u65e0&#xff08;\u53ef\u4ee5\u6267\u884c\u4e0b\u5355&#xff09;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u8fd0\u884c\u7ed3\u679c&#xff1a;<\/p>\n<p>\u5bf9\u8bdd 9 \u8f6e&#xff0c;\u7a97\u53e3\u4fdd\u7559\u6700\u8fd1 4 \u8f6e&#xff1a;<br \/>\n   \u52a9\u624b&#xff1a;\u676d\u5dde\u5468\u516d 19-25 \u5ea6&#xff0c;\u9634\u5929<br \/>\n   \u7528\u6237&#xff1a;\u597d\u7684&#xff0c;\u5e2e\u6211\u8ba2\u5468\u516d\u7684\u706b\u8f66\u7968<br \/>\n   \u52a9\u624b&#xff1a;\u8bf7\u95ee\u60a8\u60f3\u8ba2\u51e0\u70b9\u7684\u8f66\u6b21<br \/>\n   \u7528\u6237&#xff1a;\u4e0a\u5348\u7684<br \/>\n\u67e5\u8be2\u300c\u5e2e\u6211\u8ba2\u5468\u516d\u4e0a\u5348\u7684\u706b\u8f66\u7968\u300d\u2192 \u547d\u4e2d&#xff1a;<br \/>\n   [0.401] \u7528\u6237\u4e0d\u559c\u6b22\u4e2d\u8f6c&#xff0c;\u503e\u5411\u76f4\u8fbe<br \/>\n   [0.382] \u7528\u6237\u4e0a\u6b21\u8ba2\u7968\u9009\u4e86\u4e8c\u7b49\u5ea7<br \/>\n\u67e5\u8be2\u300c\u6211\u5e94\u8be5\u5728\u54ea\u513f\u53d6\u7968\u300d\u2192 \u547d\u4e2d&#xff1a;<br \/>\n   [0.294] \u7528\u6237\u4e0a\u6b21\u8ba2\u7968\u9009\u4e86\u4e8c\u7b49\u5ea7<br \/>\n   [0.197] \u7528\u6237\u6709 12306 \u8d26\u53f7&#xff0c;\u53d6\u7968\u7528\u8eab\u4efd\u8bc1<br \/>\n\u5de5\u4f5c\u8bb0\u5fc6\u69fd\u4f4d&#xff1a; {&#039;\u65e5\u671f&#039;: &#039;\u5468\u516d&#039;, &#039;\u76ee\u7684\u5730&#039;: &#039;\u676d\u5dde&#039;, &#039;\u65f6\u95f4&#039;: &#039;\u4e0a\u5348&#039;, &#039;\u5ea7\u5e2d&#039;: &#039;\u4e8c\u7b49\u5ea7&#039;, &#039;\u51fa\u53d1\u5730&#039;: &#039;\u4e0a\u6d77&#039;}<br \/>\n\u5f85\u8865\u69fd\u4f4d&#xff1a;\u65e0&#xff08;\u53ef\u4ee5\u6267\u884c\u4e0b\u5355&#xff09;<\/p>\n<p>\u4e09\u70b9\u503c\u5f97\u6ce8\u610f&#xff1a;<\/p>\n<ul>\n<li>\u65e9\u671f\u7684\u5929\u6c14\u4fe1\u606f\u5df2\u7ecf\u6ed1\u51fa\u7a97\u53e3&#xff08;\u53ea\u7559\u6700\u8fd1 4 \u8f6e&#xff09;&#xff0c;\u4f46\u7528\u6237\u504f\u597d\u4ecd\u80fd\u901a\u8fc7\u957f\u671f\u8bb0\u5fc6\u627e\u56de&#xff1b;<\/li>\n<li>\u957f\u671f\u8bb0\u5fc6\u547d\u4e2d\u4e0e\u68c0\u7d22\u8bcd\u76f8\u5173&#xff1a;&#034;\u53d6\u7968&#034;\u547d\u4e2d\u4e86\u8eab\u4efd\u8bc1\u90a3\u6761&#xff0c;\u4e0e\u5bf9\u8bdd\u6700\u8fd1\u7684\u51e0\u8f6e\u65e0\u5173&#xff1b;<\/li>\n<li>\u5de5\u4f5c\u8bb0\u5fc6\u628a&#034;\u4e24\u8f6e\u8ffd\u95ee&#034;\u538b\u7f29\u6210\u4e24\u4e2a\u952e\u503c\u5bf9&#xff0c;\u6ca1\u6709\u5360\u7528\u5bf9\u8bdd\u4e0a\u4e0b\u6587\u3002<\/li>\n<\/ul>\n<h3>\u56db\u3001\u5173\u952e\u7ecf\u9a8c\/\u907f\u5751<\/h3>\n<li>\u4e0d\u8981\u628a\u5168\u90e8\u5386\u53f2\u585e\u8fdb\u4e0a\u4e0b\u6587\u3002 \u65e2\u8d35\u53c8\u4f1a\u7a00\u91ca\u6ce8\u610f\u529b&#xff0c;\u901a\u5e38&#034;\u6700\u8fd1 N \u8f6e &#043; \u6458\u8981&#034;\u6bd4&#034;\u5168\u90e8\u539f\u6587&#034;\u6548\u679c\u66f4\u597d\u3002<\/li>\n<li>\u6458\u8981\u8981\u5b9a\u671f\u505a&#xff0c;\u4e0d\u8981\u7b49\u5230\u6ea2\u51fa\u3002 \u4e0a\u4e0b\u6587\u5feb\u6ee1\u65f6\u518d\u505a\u6458\u8981&#xff0c;\u5f80\u5f80\u5df2\u7ecf\u4e22\u6389\u4e86\u6700\u91cd\u8981\u7684\u7ec6\u8282\u3002<\/li>\n<li>\u957f\u671f\u8bb0\u5fc6\u7684\u5199\u5165\u8981\u6709\u8fc7\u6ee4\u3002 \u53ea\u5199&#034;\u8de8\u4f1a\u8bdd\u53ef\u590d\u7528&#034;\u7684\u4e8b\u5b9e&#xff0c;\u522b\u628a\u5bd2\u6684\u548c\u4e34\u65f6\u72b6\u6001\u4e5f\u5199\u8fdb\u53bb&#xff0c;\u5426\u5219\u68c0\u7d22\u8d28\u91cf\u4f1a\u6301\u7eed\u4e0b\u964d\u3002<\/li>\n<li>\u68c0\u7d22\u6570\u91cf k \u8981\u5c0f\u3002 \u6ce8\u5165\u8fc7\u591a&#034;\u76f8\u5173\u4f46\u65e0\u7528&#034;\u7684\u8bb0\u5fc6&#xff0c;\u7b49\u4e8e\u7ed9\u6a21\u578b\u52a0\u566a\u58f0&#xff1b;\u4e00\u822c k&#061;3~5\u3002<\/li>\n<li>\u8bb0\u5fc6\u8981\u53ef\u5220\u9664\u3001\u53ef\u66f4\u65b0\u3002 \u7528\u6237\u8bf4&#034;\u6211\u4e0d\u518d\u504f\u597d\u76f4\u8fbe\u4e86&#034;&#xff0c;\u65e7\u8bb0\u5fc6\u5fc5\u987b\u80fd\u5931\u6548&#xff0c;\u5426\u5219 Agent \u4f1a\u4e00\u76f4\u7528\u9519\u8bef\u504f\u597d\u3002<\/li>\n<li>\u522b\u5fd8\u4e86\u4e00\u81f4\u6027\u3002 \u4e09\u5c42\u8bb0\u5fc6\u53ef\u80fd\u4e92\u76f8\u77db\u76fe&#xff08;\u5de5\u4f5c\u8bb0\u5fc6\u8bf4&#034;\u5468\u516d&#034;&#xff0c;\u957f\u671f\u8bb0\u5fc6\u8bf4&#034;\u7528\u6237\u901a\u5e38\u5468\u65e5\u51fa\u5dee&#034;&#xff09;&#xff0c;\u8981\u6709\u660e\u786e\u7684\u4f18\u5148\u7ea7\u89c4\u5219&#xff08;\u5f53\u524d\u4f1a\u8bdd &gt; \u957f\u671f\u8bb0\u5fc6&#xff09;\u3002<\/li>\n<h3>\u4e94\u3001\u5b8c\u6574\u7cfb\u5217\u63a8\u8350<\/h3>\n<p>&#x1f4da; \u672c\u6587\u9009\u81ea\u300aAI Agent \u5de5\u7a0b\u5b9e\u6218\u300b\u7cfb\u7edf\u6559\u7a0b&#xff08;\u7b2c 015 \u671f&#xff1a;\u8bb0\u5fc6\u7cfb\u7edf\u2014\u2014\u77ed\u671f\/\u957f\u671f\/\u5de5\u4f5c\u8bb0\u5fc6&#xff09;&#xff0c;\u6bcf\u671f\u914d\u53ef\u8fd0\u884c Python \u4ee3\u7801\u3002<\/p>\n<p>\u5b8c\u6574\u7cfb\u5217\u5df2\u5728 ima \u77e5\u8bc6\u53f7\u3010Kruptos\u3011\u6301\u7eed\u66f4\u65b0&#xff1a;<\/p>\n<ul>\n<li>&#x1f5c2; 73&#043; \u6280\u672f\u77e5\u8bc6\u5e93&#xff1a;AI Agent \u5de5\u7a0b\u5b9e\u6218\u3001AI \u5927\u6a21\u578b\u4e0e\u8fb9\u7f18\u667a\u80fd\u3001\u5927\u6a21\u578b\u5fae\u8c03\u5b9e\u6218\u3001\u7aef\u4fa7\u5927\u6a21\u578b\u63a8\u7406\u5f15\u64ce\u3001\u591a\u6a21\u6001\u5927\u6a21\u578b\u8be6\u89e3\u3001\u63a8\u8350\u7cfb\u7edf\u8be6\u89e3\u3001\u6570\u636e\u5e93\u7cfb\u7edf\u3001\u51f8\u4f18\u5316\u4e0e\u6570\u503c\u65b9\u6cd5\u2026\u2026\u51e0\u4e4e\u8986\u76d6\u5168\u90e8\u8f6f\u786c\u4ef6\u6280\u672f\u6808<\/li>\n<li>&#x1f9e0; 8 \u6b3e AI \u6280\u80fd&#xff1a;\u7cfb\u5217\u751f\u4ea7\u3001\u77e5\u8bc6\u5e93\u7ba1\u7406\u3001CMMI \u53d7\u7ba1\u5f00\u53d1\u3001\u81ea\u8fdb\u5316 Agent \u7b49&#xff0c;\u5df2\u5728 ima \u6280\u80fd\u5e7f\u573a\u4e0a\u67b6&#xff0c;\u5373\u88c5\u5373\u7528<\/li>\n<li>\u2705 \u5168\u90e8\u514d\u8d39\u8ba2\u9605&#xff0c;\u540e\u7eed\u66f4\u65b0\u81ea\u52a8\u63a8\u9001<\/li>\n<\/ul>\n<p>&#x1f50d; \u8ba2\u9605\u65b9\u5f0f&#xff1a;\u6253\u5f00 ima&#xff08;\u817e\u8baf\u667a\u80fd\u5de5\u4f5c\u53f0&#xff09;\u2192 \u641c\u7d22\u300cKruptos\u300d\u2192 \u4e00\u952e\u8ba2\u9605&#xff1b;\u6216\u5728 ima \u5185\u76f4\u63a5\u641c\u7d22\u300aAI Agent \u5de5\u7a0b\u5b9e\u6218\u300b\u3002<\/p>\n<hr \/>\n<p>\u4f5c\u8005&#xff1a;Kruptos&#xff08;\u897f\u7535\u6bd5\u4e1a&#xff0c;13 \u5e74\u65e0\u7ebf\u901a\u4fe1\/DSP\/\u5d4c\u5165\u5f0f\u79d1\u7814&#xff0c;\u73b0\u6df1\u8015 AI \u4e0e\u4e91\u539f\u751f&#xff09;<br \/>\n\u539f\u521b\u5185\u5bb9&#xff0c;\u8f6c\u8f7d\u6ce8\u660e\u51fa\u5904\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf&#xff1a;\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6\u8ba9 Agent \u8bb0\u4f4f\u4e00\u4ef6\u4e8b\u5f88\u5bb9\u6613&#xff0c;\u96be\u7684\u662f\u51b3\u5b9a\\&#8221;\u4ec0\u4e48\u65f6\u5019\u8bb0\u3001\u8bb0\u5728\u54ea\u3001\u4ec0\u4e48\u65f6\u5019\u53d6\u56de\u6765\u3001\u4ec0\u4e48\u65f6\u5019\u4e22\u6389\\&#8221;\u3002\u4e0a\u4e0b\u6587\u7a97\u53e3\u53ea\u6709\u90a3\u4e48\u957f&#xff0c;\u800c\u5bf9\u8bdd\u53ef\u4ee5\u65e0\u9650\u957f\u2014\u2014\u8fd9\u4e09\u7c7b\u8bb0\u5fc6\u7684\u5206\u5de5\u5c31\u662f\u4e3a\u6b64\u800c\u751f\u3002\u4e00\u3001\u80cc\u666f\u4e0e\u75db\u70b9<br \/>\n\u6240\u6709\u505a\u8fc7 Agent \u7684\u4eba\u90fd\u649e\u8fc7\u540c\u4e00\u5835\u5899&#xff1a;\u4e0a\u4e0b\u6587\u7a97\u53e3\u6709\u9650\u3002<br \/>\n\u4e00\u4e2a\u5ba2\u670d Agent \u5904\u7406\u4e00\u5c0f\u65f6\u7684\u5bf9\u8bdd\u53ef\u80fd\u6709\u4e0a\u767e\u8f6e&#xff1b;\u4e00\u4e2a\u7f16\u7801 Agent \u62c6\u89e3\u4efb\u52a1\u3001\u8bd5\u9519\u3001\u56de\u6eda&#xff0c;\u4e2d\u95f4\u72b6<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11653,12521,12520,12522,71,50],"topic":[],"class_list":["post-109769","post","type-post","status-publish","format-standard","hentry","category-server","tag-11653","tag-12521","tag-12520","tag-12522","tag-ai-agent","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6 - \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\/109769.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf&#xff1a;\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6\u8ba9 Agent \u8bb0\u4f4f\u4e00\u4ef6\u4e8b\u5f88\u5bb9\u6613&#xff0c;\u96be\u7684\u662f\u51b3\u5b9a&quot;\u4ec0\u4e48\u65f6\u5019\u8bb0\u3001\u8bb0\u5728\u54ea\u3001\u4ec0\u4e48\u65f6\u5019\u53d6\u56de\u6765\u3001\u4ec0\u4e48\u65f6\u5019\u4e22\u6389&quot;\u3002\u4e0a\u4e0b\u6587\u7a97\u53e3\u53ea\u6709\u90a3\u4e48\u957f&#xff0c;\u800c\u5bf9\u8bdd\u53ef\u4ee5\u65e0\u9650\u957f\u2014\u2014\u8fd9\u4e09\u7c7b\u8bb0\u5fc6\u7684\u5206\u5de5\u5c31\u662f\u4e3a\u6b64\u800c\u751f\u3002\u4e00\u3001\u80cc\u666f\u4e0e\u75db\u70b9 \u6240\u6709\u505a\u8fc7 Agent \u7684\u4eba\u90fd\u649e\u8fc7\u540c\u4e00\u5835\u5899&#xff1a;\u4e0a\u4e0b\u6587\u7a97\u53e3\u6709\u9650\u3002 \u4e00\u4e2a\u5ba2\u670d Agent \u5904\u7406\u4e00\u5c0f\u65f6\u7684\u5bf9\u8bdd\u53ef\u80fd\u6709\u4e0a\u767e\u8f6e&#xff1b;\u4e00\u4e2a\u7f16\u7801 Agent \u62c6\u89e3\u4efb\u52a1\u3001\u8bd5\u9519\u3001\u56de\u6eda&#xff0c;\u4e2d\u95f4\u72b6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/109769.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-24T13:40:55+00:00\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/109769.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/109769.html\",\"name\":\"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-24T13:40:55+00:00\",\"dateModified\":\"2026-09-24T13:40:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/109769.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/109769.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/109769.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6\"}]},{\"@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":"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6 - \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\/109769.html","og_locale":"zh_CN","og_type":"article","og_title":"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf&#xff1a;\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6\u8ba9 Agent \u8bb0\u4f4f\u4e00\u4ef6\u4e8b\u5f88\u5bb9\u6613&#xff0c;\u96be\u7684\u662f\u51b3\u5b9a\"\u4ec0\u4e48\u65f6\u5019\u8bb0\u3001\u8bb0\u5728\u54ea\u3001\u4ec0\u4e48\u65f6\u5019\u53d6\u56de\u6765\u3001\u4ec0\u4e48\u65f6\u5019\u4e22\u6389\"\u3002\u4e0a\u4e0b\u6587\u7a97\u53e3\u53ea\u6709\u90a3\u4e48\u957f&#xff0c;\u800c\u5bf9\u8bdd\u53ef\u4ee5\u65e0\u9650\u957f\u2014\u2014\u8fd9\u4e09\u7c7b\u8bb0\u5fc6\u7684\u5206\u5de5\u5c31\u662f\u4e3a\u6b64\u800c\u751f\u3002\u4e00\u3001\u80cc\u666f\u4e0e\u75db\u70b9 \u6240\u6709\u505a\u8fc7 Agent \u7684\u4eba\u90fd\u649e\u8fc7\u540c\u4e00\u5835\u5899&#xff1a;\u4e0a\u4e0b\u6587\u7a97\u53e3\u6709\u9650\u3002 \u4e00\u4e2a\u5ba2\u670d Agent \u5904\u7406\u4e00\u5c0f\u65f6\u7684\u5bf9\u8bdd\u53ef\u80fd\u6709\u4e0a\u767e\u8f6e&#xff1b;\u4e00\u4e2a\u7f16\u7801 Agent \u62c6\u89e3\u4efb\u52a1\u3001\u8bd5\u9519\u3001\u56de\u6eda&#xff0c;\u4e2d\u95f4\u72b6","og_url":"https:\/\/www.wsisp.com\/helps\/109769.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-24T13:40:55+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/109769.html","url":"https:\/\/www.wsisp.com\/helps\/109769.html","name":"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-24T13:40:55+00:00","dateModified":"2026-09-24T13:40:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/109769.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/109769.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/109769.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"AI Agent \u7684\u8bb0\u5fc6\u7cfb\u7edf\uff1a\u77ed\u671f\u957f\u671f\u4e0e\u5de5\u4f5c\u8bb0\u5fc6"}]},{"@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\/109769","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=109769"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/109769\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=109769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=109769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=109769"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=109769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}