{"id":119516,"date":"2026-10-29T22:08:50","date_gmt":"2026-10-29T14:08:50","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/119516.html"},"modified":"2026-10-29T22:08:50","modified_gmt":"2026-10-29T14:08:50","slug":"%e3%80%90%e5%b0%81%e9%97%ad%e7%bb%93%e6%9d%9f6%e3%80%91agent-%e4%bc%9a%e8%af%9d%e6%9c%8d%e5%8a%a1%e4%b8%8e%e9%89%b4%e6%9d%83%e4%b8%8a%e4%b8%8b%e6%96%87%ef%bc%8c%e8%ae%a9%e7%94%9f%e4%ba%a7%e7%8e%af","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/119516.html","title":{"rendered":"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7"},"content":{"rendered":"<p>\u524d\u8a00&#xff1a;\u5c01\u95ed\u544a\u4e00\u6bb5\u843d&#xff0c;\u5f00\u59cb\u7cfb\u7edf\u590d\u76d8&#xff1a;\u4e00\u4e2a\u751f\u4ea7 Agent \u5230\u5e95\u600e\u4e48\u8dd1\u8d77\u6765\u3002\u8e29\u5751\u3001\u7ecf\u9a8c\u548c\u843d\u5730&#xff0c;\u5c3d\u91cf\u7528\u51e0\u7bc7\u6587\u7ae0\u8bb2\u6e05&#xff0c;\u8fd9\u7bc7\u6587\u7ae0\u662f\u7cfb\u5217\u7b2c6\u7bc7&#xff1a;Agent \u6302\u6389\u5e38\u5e38\u4e0d\u662f\u6a21\u578b\u50bb&#xff0c;\u800c\u662f\u8eab\u4efd\u4f20\u4e22\u4e86\u3001\u4f1a\u8bdd\u53ea\u653e\u5728\u5185\u5b58\u91cc&#xff08;\u91cd\u542f\u6216\u6362\u673a\u5668\u5c31\u6ca1\u4e86&#xff09;\u3001\u7528\u6237\u70b9\u4e86\u53d6\u6d88\u4f46\u6a21\u578b\u548c\u5de5\u5177\u8bf7\u6c42\u8fd8\u5728\u8dd1\u3002<br \/>\n\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u7ed9\u6b63\u5728\u505a Agent \u843d\u5730\u7684\u670b\u53cb\u4e00\u4e9b\u53c2\u8003&#xff0c;\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u533a\u4ea4\u6d41\u81ea\u5df1\u7684\u5b9e\u8df5\u3002<\/p>\n<p>\u7ebf\u4e0a\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u4e0b\u9762\u8fd9\u4e9b\u95ee\u9898\u7ecf\u5e38\u4f1a\u53e0\u5728\u4e00\u8d77&#xff1a;<\/p>\n<ul>\n<li>\u7528\u6237\u8fde\u7eed\u70b9\u51fb\u53d1\u9001&#xff0c;\u540e\u53f0\u542f\u52a8\u4e86\u4e24\u4e2a\u4efb\u52a1&#xff0c;\u6a21\u578b\u548c\u5de5\u5177\u88ab\u91cd\u590d\u8c03\u7528\u3002<\/li>\n<li>\u70b9\u4e86\u53d6\u6d88&#xff0c;\u524d\u7aef\u4e0d\u518d\u663e\u793a\u7ed3\u679c&#xff0c;\u4f46\u6a21\u578b\u548c\u5de5\u5177\u4ecd\u5728\u8fd0\u884c&#xff0c;\u8c03\u7528\u8d39\u7528\u8fd8\u5728\u4ea7\u751f\u3002<\/li>\n<li>\u6362\u624b\u673a\u6216\u6d4f\u89c8\u5668\u6253\u5f00\u5e94\u7528&#xff0c;\u53d1\u73b0\u521a\u624d\u7684\u4f1a\u8bdd\u4e0d\u89c1\u4e86\u3002<\/li>\n<li>\u5de5\u5177\u5c45\u7136\u628a\u6a21\u578b\u53c2\u6570\u91cc\u4f20\u5165\u7684 userId \u5f53\u6210\u771f\u5b9e\u767b\u5f55\u8eab\u4efd&#xff0c;\u5bfc\u81f4\u9274\u6743\u8fb9\u754c\u88ab\u7ed5\u8fc7\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u95ee\u9898\u770b\u8d77\u6765\u4e92\u4e0d\u76f8\u5173&#xff0c;\u5b9e\u9645\u4e0a\u90fd\u6307\u5411\u540c\u4e00\u4e2a\u6838\u5fc3&#xff1a;Agent \u4e0d\u53ea\u662f\u4e00\u6b21\u6a21\u578b\u8c03\u7528&#xff0c;\u5b83\u8fd8\u9700\u8981\u4e00\u5957\u53ef\u9760\u7684\u4f1a\u8bdd\u3001\u8eab\u4efd\u548c\u4efb\u52a1\u751f\u547d\u5468\u671f\u7ba1\u7406\u673a\u5236\u3002<\/p>\n<p>\u8fd9\u7bc7\u4e3b\u8981\u8bb2\u6e05\u695a\u56db\u4ef6\u4e8b&#xff1a;<\/p>\n<li>\u8c01\u5728\u804a&#xff1a;\u79df\u6237&#xff08;\u4e00\u5bb6\u516c\u53f8\u6216\u4e00\u4e2a\u5ba2\u6237\u5728\u7cfb\u7edf\u4e2d\u7684\u9694\u79bb\u8fb9\u754c&#xff09;\u548c\u7528\u6237\u8eab\u4efd\u5fc5\u987b\u6765\u81ea\u53ef\u4fe1\u7684\u767b\u5f55\u6001&#xff0c;\u5e76\u6b63\u786e\u5199\u5165\u6570\u636e\u5e93\u4e2d\u7684\u4f1a\u8bdd\u4e0e Run&#xff08;\u53ef\u4ee5\u7406\u89e3\u4e3a\u7528\u6237\u70b9\u51fb\u4e00\u6b21\u53d1\u9001\u540e&#xff0c;\u540e\u53f0\u4e3a\u672c\u8f6e\u8bf7\u6c42\u521b\u5efa\u7684\u4e00\u6b21\u4efb\u52a1&#xff09;\u3002<\/li>\n<li>\u7528\u8c01\u7684\u6743\u9650\u8c03\u5de5\u5177&#xff1a;\u6574\u6761\u8c03\u7528\u94fe\u8def\u90fd\u8981\u4f20\u9012\u540c\u4e00\u4efd\u53ef\u4fe1\u8bf7\u6c42\u4e0a\u4e0b\u6587&#xff0c;\u4e0d\u80fd\u4f7f\u7528\u6a21\u578b\u53c2\u6570\u91cc\u7684 userId \u6765\u786e\u5b9a\u5f53\u524d\u7528\u6237\u8eab\u4efd\u3002<\/li>\n<li>\u540c\u4e00\u6b21\u70b9\u51fb\u4e0d\u8981\u8d77\u4e24\u4e2a\u4efb\u52a1&#xff1a;\u65e0\u8bba\u662f\u7528\u6237\u53cc\u51fb\u53d1\u9001&#xff0c;\u8fd8\u662f\u7f51\u7edc\u8d85\u65f6\u540e\u81ea\u52a8\u91cd\u8bd5&#xff0c;\u90fd\u5e94\u8be5\u56de\u5230\u540c\u4e00\u6761 Run\u3002<\/li>\n<li>\u53d6\u6d88\u600e\u6837\u624d\u7b97\u771f\u7684\u505c&#xff1a;\u4e0d\u80fd\u53ea\u5173\u95ed\u524d\u7aef\u63a8\u6d41&#xff0c;\u8fd8\u8981\u5c3d\u53ef\u80fd\u4e2d\u65ad\u6b63\u5728\u6267\u884c\u7684\u6a21\u578b\u8bf7\u6c42\u548c\u5de5\u5177\u8bf7\u6c42&#xff0c;\u5e76\u786e\u8ba4\u4efb\u52a1\u6700\u7ec8\u8fdb\u5165\u6b63\u786e\u7684\u72b6\u6001\u3002<\/li>\n<p>\u7ee7\u7eed\u4f7f\u7528\u6848\u4f8b OpsPilot&#xff08;\u865a\u6784\u7684\u4f01\u4e1a\u8fd0\u7ef4\u52a9\u624b&#xff09;&#xff0c;\u6280\u672f\u6808\u4ecd\u7136\u662f TypeScript\u3002Go\u3001Java\u3001Node.js \u7b49\u6280\u672f\u6808\u540c\u6837\u53ef\u4ee5\u5b9e\u73b0&#xff0c;\u5173\u952e\u662f\u628a\u804c\u8d23\u548c\u8fb9\u754c\u5212\u6e05\u695a&#xff1a;\u4e0d\u8981\u8ba9\u524d\u7aef\u76f4\u63a5\u6301\u6709\u6a21\u578b API Key\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261029140846-6ae3536ebf138.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u4f1a\u8bdd\u670d\u52a1\u5230\u5e95\u7ba1\u4ec0\u4e48&#xff1f;<\/h3>\n<p>\u4f1a\u8bdd\u670d\u52a1\u81f3\u5c11\u8981\u8d1f\u8d23\u4e94\u4ef6\u4e8b&#xff1a;<\/p>\n<li>\u4f1a\u8bdd\u4e0e\u6d88\u606f\u6301\u4e45\u5316&#xff1a;\u5c06\u4f1a\u8bdd\u548c\u6d88\u606f\u5199\u5165\u6570\u636e\u5e93&#xff0c;\u652f\u6301\u521b\u5efa\u3001\u8ffd\u52a0\u548c\u5206\u9875\u67e5\u8be2\u3002<\/li>\n<li>Run \u7684\u751f\u547d\u5468\u671f\u7ba1\u7406&#xff1a;\u7ba1\u7406\u4efb\u52a1\u6392\u961f\u3001\u6267\u884c\u3001\u7b49\u5f85\u4eba\u5de5\u786e\u8ba4\u3001\u5b8c\u6210\u3001\u5931\u8d25\u548c\u53d6\u6d88\u7b49\u72b6\u6001\u3002<\/li>\n<li>\u53ef\u4fe1\u8eab\u4efd\u4e0a\u4e0b\u6587\u7684\u4f20\u9012&#xff1a;\u5c06\u767b\u5f55\u6001\u8f6c\u6362\u4e3a\u660e\u786e\u7684\u8bf7\u6c42\u4e0a\u4e0b\u6587&#xff0c;\u5e76\u4f20\u9012\u7ed9\u7f16\u6392\u5c42\u548c\u5de5\u5177\u5c42&#xff0c;\u4e0d\u80fd\u4f7f\u7528\u6a21\u578b\u53c2\u6570\u91cc\u7684 userId\u3002<\/li>\n<li>Run \u7684\u5e42\u7b49\u521b\u5efa&#xff1a;\u9632\u6b62\u7528\u6237\u53cc\u51fb\u3001\u7f51\u7edc\u91cd\u8bd5\u7b49\u60c5\u51b5\u5bfc\u81f4\u540c\u4e00\u8f6e\u8bf7\u6c42\u88ab\u91cd\u590d\u6267\u884c\u3002<\/li>\n<li>\u4efb\u52a1\u53d6\u6d88\u4e0e\u4e2d\u65ad&#xff1a;\u4e0d\u4ec5\u8981\u901a\u77e5\u524d\u7aef\u505c\u6b62\u663e\u793a&#xff0c;\u8fd8\u8981\u5c3d\u53ef\u80fd\u4e2d\u65ad\u6b63\u5728\u6267\u884c\u7684\u6a21\u578b\u548c\u5de5\u5177\u8bf7\u6c42\u3002<\/li>\n<p>\u4e3a\u4ec0\u4e48\u8981\u5355\u72ec\u5f3a\u8c03\u4f1a\u8bdd\u670d\u52a1&#xff1f;<\/p>\n<p>\u56e0\u4e3a\u5728\u4e0d\u540c\u7684 Agent \u5e94\u7528\u573a\u666f\u4e2d&#xff0c;\u5b83\u627f\u62c5\u7684\u8d23\u4efb\u5e76\u4e0d\u4e00\u6837\u3002<\/p>\n<ul>\n<li>\u666e\u901a\u804a\u5929\u52a9\u624b&#xff1a;\u91cd\u70b9\u662f\u5386\u53f2\u6d88\u606f\u6301\u4e45\u5316\u3001\u8de8\u8bbe\u5907\u6062\u590d\u548c\u591a\u7528\u6237\u9694\u79bb\u3002<\/li>\n<li>\u4f01\u4e1a\u77e5\u8bc6\u5e93\u52a9\u624b&#xff1a;\u9664\u4e86\u4fdd\u5b58\u4f1a\u8bdd&#xff0c;\u8fd8\u5fc5\u987b\u786e\u4fdd\u6bcf\u6b21\u68c0\u7d22\u90fd\u9075\u5b88\u79df\u6237\u548c\u7528\u6237\u7684\u6570\u636e\u6743\u9650\u3002<\/li>\n<li>\u8fd0\u7ef4 Agent \u6216\u81ea\u52a8\u5316 Agent&#xff1a;\u53ef\u80fd\u4f1a\u6267\u884c\u91cd\u542f\u670d\u52a1\u3001\u4fee\u6539\u914d\u7f6e\u3001\u8c03\u7528\u5185\u90e8 API \u7b49\u64cd\u4f5c\u3002\u6b64\u65f6&#xff0c;\u91cd\u590d\u6267\u884c\u548c\u53d6\u6d88\u5931\u6548\u5c31\u4e0d\u53ea\u662f\u4f53\u9a8c\u95ee\u9898&#xff0c;\u8fd8\u53ef\u80fd\u5f71\u54cd\u771f\u5b9e\u4e1a\u52a1\u3002<\/li>\n<li>\u9700\u8981\u4eba\u5de5\u5ba1\u6279\u7684 Agent&#xff1a;\u4efb\u52a1\u53ef\u80fd\u6682\u505c\u51e0\u5206\u949f\u751a\u81f3\u51e0\u5c0f\u65f6\u3002\u7cfb\u7edf\u5fc5\u987b\u80fd\u4fdd\u5b58\u72b6\u6001&#xff0c;\u5e76\u5728\u4eba\u5de5\u786e\u8ba4\u540e\u51c6\u786e\u6062\u590d&#xff0c;\u800c\u4e0d\u662f\u91cd\u65b0\u6267\u884c\u6574\u6761\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u573a\u666f\u7684\u4e1a\u52a1\u903b\u8f91\u4e0d\u540c&#xff0c;\u4f46\u5e95\u5c42\u90fd\u9700\u8981\u53ef\u9760\u7684\u4f1a\u8bdd\u548c\u4efb\u52a1\u7ba1\u7406\u3002<\/p>\n<p>\u5373\u4f7f\u4f7f\u7528 LangGraph \u8fd9\u7c7b\u6846\u67b6\u8fd0\u884c Agent \u5faa\u73af&#xff0c;\u79df\u6237\u9694\u79bb\u3001\u767b\u5f55\u6001\u3001\u53d6\u6d88\u673a\u5236\u4ee5\u53ca\u4e0e\u524d\u7aef\u7684\u63a5\u53e3&#xff0c;\u4ecd\u7136\u5c5e\u4e8e\u4f1a\u8bdd\u670d\u52a1\u9700\u8981\u89e3\u51b3\u7684\u95ee\u9898\u3002\u6846\u67b6\u53ef\u4ee5\u8d1f\u8d23\u8bb0\u5f55\u56fe\u6267\u884c\u5230\u54ea\u4e00\u6b65&#xff0c;\u4f46\u4efb\u52a1\u662f\u5426\u6b63\u5728\u8fd0\u884c\u3001\u662f\u5426\u5df2\u53d6\u6d88&#xff0c;\u4ee5\u53ca\u5f53\u524d\u7528\u6237\u662f\u5426\u6709\u6743\u64cd\u4f5c\u8fd9\u6761\u4efb\u52a1&#xff0c;\u90fd\u5fc5\u987b\u6709\u660e\u786e\u3001\u53ef\u4fe1\u7684\u7ba1\u7406\u4f9d\u636e\u3002<\/p>\n<p>\u4e0d\u8981\u8ba9\u6846\u67b6\u72b6\u6001\u548c\u4e1a\u52a1\u6570\u636e\u5e93\u91cc\u7684 Run \u72b6\u6001\u5404\u8bf4\u5404\u7684&#xff0c;\u5426\u5219\u6392\u67e5\u95ee\u9898\u65f6\u5f88\u5bb9\u6613\u51fa\u73b0&#xff1a;\u6846\u67b6\u8ba4\u4e3a\u4efb\u52a1\u8fd8\u5728\u8fd0\u884c&#xff0c;\u524d\u7aef\u5374\u5df2\u7ecf\u663e\u793a\u53d6\u6d88\u6210\u529f\u3002<\/p>\n<h3>\u8bf7\u6c42\u4e0a\u4e0b\u6587&#xff1a;\u6574\u6761\u94fe\u8def\u53ea\u4fe1\u8fd9\u4e00\u4efd<\/h3>\n<p>\u8bf7\u6c42\u8fdb\u5165\u4f1a\u8bdd\u670d\u52a1\u540e&#xff0c;\u9996\u5148\u8981\u6839\u636e\u5df2\u7ecf\u9a8c\u8bc1\u7684\u767b\u5f55\u6001&#xff0c;\u6784\u5efa\u4e00\u4efd RequestContext \u5bf9\u8c61\u3002\u540e\u7eed\u7f16\u6392\u548c\u5de5\u5177\u8c03\u7528\u90fd\u4ee5\u8fd9\u4efd\u53ef\u4fe1\u4e0a\u4e0b\u6587\u4e3a\u51c6&#xff0c;\u5fc5\u8981\u65f6\u901a\u8fc7\u53c2\u6570\u663e\u5f0f\u4f20\u9012&#xff1b;\u4e0d\u8981\u5728\u5404\u5c42\u91cd\u65b0\u4ece\u96f6\u6563\u7684 Header \u4e2d\u62fc\u51d1\u8eab\u4efd&#xff0c;\u66f4\u4e0d\u80fd\u76f8\u4fe1\u6a21\u578b\u81ea\u5df1\u58f0\u660e\u7684\u300c\u6211\u662f\u8c01\u300d\u3002<\/p>\n<p><span class=\"token keyword\">type<\/span> <span class=\"token class-name\">RequestContext<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token comment\">\/\/ \u5165\u53e3\u9274\u6743\u540e\u7684\u8bf7\u6c42\u4e0a\u4e0b\u6587<\/span><br \/>\n  requestId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span>         <span class=\"token comment\">\/\/ \u672c\u8bf7\u6c42 id&#xff0c;\u65e5\u5fd7\u4e0e\u6392\u969c\u7528<\/span><br \/>\n  traceId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span>           <span class=\"token comment\">\/\/ \u5168\u94fe\u8def\u8ffd\u8e2a id&#xff0c;\u4f1a\u8bdd \/ \u5de5\u5177 \/ \u6a21\u578b\u5171\u7528<\/span><br \/>\n  tenantId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span>          <span class=\"token comment\">\/\/ \u79df\u6237&#xff1b;\u67e5\u5e93\u3001\u68c0\u7d22\u8fc7\u6ee4\u4ee5\u6b64\u4e3a\u51c6<\/span><br \/>\n  userId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span>            <span class=\"token comment\">\/\/ \u5f53\u524d\u7528\u6237&#xff1b;\u5de5\u5177\u9274\u6743\u8bfb\u8fd9\u91cc<\/span><br \/>\n  roles<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>           <span class=\"token comment\">\/\/ \u89d2\u8272&#xff0c;\u7528\u4e8e\u6743\u9650\u4e0e\u53ef\u89c1\u8303\u56f4<\/span><br \/>\n  scopes<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>          <span class=\"token comment\">\/\/ \u5141\u8bb8\u8c03\u7528\u7684\u5de5\u5177\u6216\u8d44\u6e90\u8303\u56f4<\/span><br \/>\n  authHeader<span class=\"token operator\">?<\/span><span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span>       <span class=\"token comment\">\/\/ \u4ec5\u670d\u52a1\u7aef\u6301\u6709&#xff0c;\u4e0d\u8fdb Prompt\u3001\u4e0d\u8fdb\u65e5\u5fd7\u660e\u6587<\/span><br \/>\n  locale<span class=\"token operator\">?<\/span><span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span>           <span class=\"token comment\">\/\/ \u53ef\u9009&#xff1a;\u8bed\u8a00 \/ \u5730\u533a<\/span><br \/>\n  deadlineAt<span class=\"token operator\">?<\/span><span class=\"token operator\">:<\/span> <span class=\"token builtin\">number<\/span>       <span class=\"token comment\">\/\/ \u8fd9\u6b21 Run \u7684\u622a\u6b62\u65f6\u95f4&#xff0c;\u5230\u70b9\u5e94\u53d6\u6d88<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u4efd\u5bf9\u8c61\u7684\u7528\u6cd5&#xff0c;\u53ef\u4ee5\u8bb0\u4f4f\u4e09\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u63a7\u5236\u6a21\u578b\u80fd\u770b\u5230\u4ec0\u4e48&#xff1a;\u6784\u5efa Prompt\u3001\u6267\u884c\u77e5\u8bc6\u68c0\u7d22\u65f6&#xff0c;\u7ed3\u5408 tenantId\u3001roles \u7b49\u53ef\u4fe1\u4fe1\u606f&#xff0c;\u51b3\u5b9a\u5f53\u524d\u7528\u6237\u53ef\u4ee5\u8bbf\u95ee\u54ea\u4e9b\u6570\u636e\u3002\u6ce8\u610f&#xff0c;\u6743\u9650\u8fc7\u6ee4\u4e0d\u80fd\u53ea\u9760 Prompt \u544a\u8bc9\u6a21\u578b\u300c\u4e0d\u8981\u770b\u300d&#xff0c;\u800c\u8981\u5728\u6570\u636e\u5e93\u6216\u68c0\u7d22\u5c42\u771f\u6b63\u6267\u884c\u3002<\/li>\n<li>\u63a7\u5236\u5de5\u5177\u80fd\u505a\u4ec0\u4e48&#xff1a;\u8c03\u7528\u4e1a\u52a1\u63a5\u53e3\u65f6&#xff0c;\u4f7f\u7528\u670d\u52a1\u7aef\u6301\u6709\u6216\u6839\u636e\u5f53\u524d\u7528\u6237\u8eab\u4efd\u6362\u53d6\u7684\u8bbf\u95ee\u51ed\u8bc1\u3002\u82e5\u9700\u8981\u4ee5\u5f53\u524d\u7528\u6237\u8eab\u4efd\u6267\u884c\u64cd\u4f5c&#xff0c;\u5e94\u7531\u670d\u52a1\u7aef\u5b8c\u6210\u51ed\u8bc1\u8f6c\u6362\u548c\u6743\u9650\u6821\u9a8c&#xff0c;\u4e0d\u80fd\u8ba9\u6a21\u578b\u5728\u53c2\u6570\u91cc\u586b\u5199\u8bbf\u95ee\u5bc6\u94a5\u3002<\/li>\n<li>\u63a7\u5236\u654f\u611f\u4fe1\u606f\u5982\u4f55\u6d41\u8f6c&#xff1a;\u8bb0\u5f55\u65e5\u5fd7\u65f6&#xff0c;\u53ea\u4fdd\u7559\u5fc5\u8981\u7684\u51ed\u8bc1\u6807\u8bc6\u3001hash \u6216\u8131\u654f\u540e\u7684\u5c3e\u90e8\u4fe1\u606f&#xff0c;\u4e0d\u80fd\u628a\u5b8c\u6574\u8bbf\u95ee\u51ed\u8bc1\u5199\u8fdb\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u91cc\u6709\u4e00\u4e2a\u5bb9\u6613\u5ffd\u7565\u7684\u7ec6\u8282&#xff1a;RequestContext \u662f\u670d\u52a1\u7aef\u5185\u90e8\u53ef\u4fe1\u7684\u6570\u636e\u7ed3\u6784&#xff0c;\u4e0d\u4ee3\u8868\u91cc\u9762\u7684\u6bcf\u4e2a\u5b57\u6bb5\u90fd\u5e94\u8be5\u76f4\u63a5\u4f20\u7ed9\u6a21\u578b&#xff0c;\u4e5f\u4e0d\u4ee3\u8868\u6bcf\u4e2a\u5b57\u6bb5\u90fd\u53ef\u4ee5\u65e0\u6761\u4ef6\u4fe1\u4efb\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;tenantId \u548c userId \u5e94\u7531\u8ba4\u8bc1\u7ed3\u679c\u786e\u5b9a&#xff1b;roles \u548c scopes \u5e94\u6765\u81ea\u53ef\u4fe1\u7684\u6388\u6743\u903b\u8f91&#xff1b;traceId \u53ef\u4ee5\u7528\u4e8e\u8ffd\u8e2a\u8bf7\u6c42&#xff0c;\u5374\u4e0d\u80fd\u7528\u6765\u5224\u65ad\u7528\u6237\u662f\u5426\u6709\u6743\u9650\u3002<\/p>\n<p>\u65f6\u5e8f\u53ef\u4ee5\u770b\u6210&#xff1a;<\/p>\n<p>\u5de5\u5177Agent Runtime\u4f1a\u8bdd\u670d\u52a1\u524d\u7aef\u5de5\u5177Agent Runtime\u4f1a\u8bdd\u670d\u52a1\u524d\u7aef#mermaid-svg-yiZrWtW4CX8wSSEf{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-yiZrWtW4CX8wSSEf .error-icon{fill:#552222;}#mermaid-svg-yiZrWtW4CX8wSSEf .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-yiZrWtW4CX8wSSEf .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-yiZrWtW4CX8wSSEf .marker{fill:#333333;stroke:#333333;}#mermaid-svg-yiZrWtW4CX8wSSEf .marker.cross{stroke:#333333;}#mermaid-svg-yiZrWtW4CX8wSSEf svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-yiZrWtW4CX8wSSEf p{margin:0;}#mermaid-svg-yiZrWtW4CX8wSSEf .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-yiZrWtW4CX8wSSEf text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-yiZrWtW4CX8wSSEf .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-yiZrWtW4CX8wSSEf .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-yiZrWtW4CX8wSSEf .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-yiZrWtW4CX8wSSEf .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-yiZrWtW4CX8wSSEf #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-yiZrWtW4CX8wSSEf .sequenceNumber{fill:white;}#mermaid-svg-yiZrWtW4CX8wSSEf #sequencenumber{fill:#333;}#mermaid-svg-yiZrWtW4CX8wSSEf #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-yiZrWtW4CX8wSSEf .messageText{fill:#333;stroke:none;}#mermaid-svg-yiZrWtW4CX8wSSEf .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-yiZrWtW4CX8wSSEf .labelText,#mermaid-svg-yiZrWtW4CX8wSSEf .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-yiZrWtW4CX8wSSEf .loopText,#mermaid-svg-yiZrWtW4CX8wSSEf .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-yiZrWtW4CX8wSSEf .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-yiZrWtW4CX8wSSEf .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-yiZrWtW4CX8wSSEf .noteText,#mermaid-svg-yiZrWtW4CX8wSSEf .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-yiZrWtW4CX8wSSEf .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-yiZrWtW4CX8wSSEf .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-yiZrWtW4CX8wSSEf .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-yiZrWtW4CX8wSSEf .actorPopupMenu{position:absolute;}#mermaid-svg-yiZrWtW4CX8wSSEf .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-yiZrWtW4CX8wSSEf .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-yiZrWtW4CX8wSSEf .actor-man circle,#mermaid-svg-yiZrWtW4CX8wSSEf line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-yiZrWtW4CX8wSSEf :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}POST \/chat\u8bfb\u5386\u53f2\u3001\u5f00\u59cb Run\u8fdb\u5ea6\u4e8b\u4ef6SSE \u63a8\u8fdb\u5ea6\u5e26 RequestContext \u8c03\u5de5\u5177\u5de5\u5177\u7ed3\u679cPOST \/cancel\u53d6\u6d88 Run&#xff08;\u5199\u5e93 &#043; abort&#xff09;<\/p>\n<p>\u518d\u8bb0\u4f4f\u4e09\u4ef6\u4e0e ID\u3001\u53d6\u6d88\u548c\u5386\u53f2\u6d88\u606f\u6709\u5173\u7684\u4e8b&#xff1a;<\/p>\n<ul>\n<li>\u4e00\u4e2a\u4f1a\u8bdd\u4f7f\u7528\u56fa\u5b9a\u7684 conversationId&#xff1b;\u7528\u6237\u6bcf\u70b9\u51fb\u4e00\u6b21\u53d1\u9001&#xff0c;\u90fd\u5bf9\u5e94\u4e00\u4e2a\u72ec\u7acb\u7684 runId\u3002<\/li>\n<li>\u53d6\u6d88\u8bf7\u6c42\u5fc5\u987b\u643a\u5e26\u660e\u786e\u7684 runId&#xff0c;\u8bf4\u660e\u8981\u505c\u6b62\u54ea\u4e00\u6b21\u4efb\u52a1\u3002\u5bf9\u4e8e\u957f\u65f6\u95f4\u8fd0\u884c\u7684 Agent&#xff0c;\u4e0d\u80fd\u53ea\u53d1\u9001\u4e00\u53e5\u300c\u505c\u4e00\u4e0b\u300d&#xff0c;\u5374\u6ca1\u6709\u660e\u786e\u7684\u4efb\u52a1\u6807\u8bc6\u3002<\/li>\n<li>\u7ed9\u7528\u6237\u5c55\u793a\u7684\u5386\u53f2\u6d88\u606f&#xff0c;\u4e0e Run \u6267\u884c\u671f\u95f4\u4ea7\u751f\u7684\u5185\u90e8\u8fc7\u7a0b\u5e94\u533a\u5206\u5b58\u50a8\u3002\u6a21\u578b\u8c03\u7528\u8bb0\u5f55\u3001\u5de5\u5177\u8c03\u7528\u53c2\u6570\u3001\u4e2d\u95f4\u63a8\u7406\u72b6\u6001\u7b49&#xff0c;\u4e0d\u5e94\u8be5\u672a\u7ecf\u7b5b\u9009\u5c31\u5168\u90e8\u5f53\u4f5c\u666e\u901a\u804a\u5929\u6d88\u606f\u5c55\u793a\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261029140847-6ae3536f982de.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u9274\u6743\u3001\u591a\u79df\u6237\u4e0e\u51ed\u8bc1<\/h3>\n<p>\u8eab\u4efd\u6821\u9a8c\u81f3\u5c11\u8981\u5206\u4e09\u5c42\u505a&#xff0c;\u4e0d\u80fd\u53ea\u5728\u8bf7\u6c42\u5165\u53e3\u9a8c\u8bc1\u4e00\u6b21\u3002\u539f\u56e0\u5f88\u7b80\u5355&#xff1a;\u5165\u53e3\u9a8c\u8bc1\u7684\u662f\u300c\u8c01\u53d1\u8d77\u4e86\u8bf7\u6c42\u300d&#xff0c;\u5de5\u5177\u6267\u884c\u65f6\u8fd8\u9700\u8981\u9a8c\u8bc1\u300c\u8fd9\u4e2a\u7528\u6237\u6709\u6ca1\u6709\u6743\u9650\u6267\u884c\u5f53\u524d\u64cd\u4f5c\u300d\u3002<\/p>\n<table>\n<tr>\u5c42\u4e3b\u8981\u804c\u8d23<\/tr>\n<tbody>\n<tr>\n<td>\u7f51\u5173 \/ \u4f1a\u8bdd\u670d\u52a1<\/td>\n<td>\u9a8c\u8bc1\u767b\u5f55\u6001\u662f\u5426\u6709\u6548&#xff0c;\u6784\u5efa RequestContext&#xff0c;\u5fc5\u8981\u65f6\u8fdb\u884c\u9650\u6d41<\/td>\n<\/tr>\n<tr>\n<td>Agent Runtime&#xff08;\u7f16\u6392\u6267\u884c&#xff09;<\/td>\n<td>\u6839\u636e\u6388\u6743\u8303\u56f4\u51b3\u5b9a\u54ea\u4e9b\u5de5\u5177\u53ef\u4ee5\u88ab\u8c03\u7528&#xff0c;\u5e76\u5c06\u53ef\u4fe1\u7684 RequestContext \u4f20\u7ed9\u771f\u6b63\u6267\u884c\u5de5\u5177\u7684\u4ee3\u7801<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u5177\u5b9e\u73b0<\/td>\n<td>\u6839\u636e\u5177\u4f53\u4e1a\u52a1\u89c4\u5219\u518d\u6b21\u9a8c\u8bc1\u300c\u8fd9\u4e2a\u7528\u6237\u80fd\u4e0d\u80fd\u505a\u8fd9\u4ef6\u4e8b\u300d&#xff1b;\u5bf9\u4e8e\u5199\u64cd\u4f5c&#xff0c;\u8bb0\u5f55\u64cd\u4f5c\u4eba\u3001\u64cd\u4f5c\u65f6\u95f4\u548c\u64cd\u4f5c\u7ed3\u679c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5e38\u89c1\u4e8b\u6545\u662f&#xff1a;\u5165\u53e3\u5df2\u7ecf\u9a8c\u8bc1\u8fc7\u767b\u5f55\u6001&#xff0c;\u5de5\u5177\u91cc\u5374\u76f4\u63a5\u4f7f\u7528\u6a21\u578b\u53c2\u6570\u4e2d\u7684 userId \u6765\u9274\u6743\u3002\u6a21\u578b\u4e00\u65e6\u53d7\u5230\u63d0\u793a\u6ce8\u5165\u7b49\u56e0\u7d20\u5f71\u54cd&#xff0c;\u751f\u6210\u4e86\u53e6\u4e00\u4e2a\u7528\u6237\u7684 ID&#xff0c;\u5c31\u53ef\u80fd\u8ba9\u5de5\u5177\u8bef\u4ee5\u4e3a\u81ea\u5df1\u5728\u66ff\u53e6\u4e00\u4e2a\u7528\u6237\u6267\u884c\u64cd\u4f5c\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u5de5\u5177\u53c2\u6570\u4e2d\u7684\u7528\u6237\u8eab\u4efd\u4e0d\u80fd\u4f5c\u4e3a\u9274\u6743\u4f9d\u636e&#xff0c;\u53ea\u80fd\u4f7f\u7528\u7531\u670d\u52a1\u7aef\u53ef\u4fe1\u8ba4\u8bc1\u6d41\u7a0b\u6784\u5efa\u7684 RequestContext\u3002<\/p>\n<h4>\u67e5\u5e93\u5fc5\u5e26\u79df\u6237<\/h4>\n<p>\u79df\u6237 ID\u3001\u7528\u6237 ID \u5e94\u5199\u5165\u76f8\u5173\u4e1a\u52a1\u8868&#xff0c;\u5e76\u4e14\u6bcf\u6b21\u67e5\u8be2\u90fd\u8981\u5e26\u4e0a\u76f8\u5e94\u7684\u9694\u79bb\u6761\u4ef6\u3002\u4e0d\u80fd\u53ea\u4f9d\u8d56\u524d\u7aef\u300c\u4e0d\u8981\u8bf7\u6c42\u522b\u4eba\u7684\u4f1a\u8bdd ID\u300d\u8fd9\u79cd\u7ea6\u5b9a\u3002<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> conversations <span class=\"token punctuation\">(<\/span><br \/>\n  id UUID <span class=\"token keyword\">PRIMARY<\/span> <span class=\"token keyword\">KEY<\/span><span class=\"token punctuation\">,<\/span>                 <span class=\"token comment\">&#8212; \u4f1a\u8bdd id<\/span><br \/>\n  tenant_id <span class=\"token keyword\">TEXT<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span>            <span class=\"token comment\">&#8212; \u79df\u6237&#xff1b;\u67e5\u8be2\u5fc5\u5e26<\/span><br \/>\n  user_id <span class=\"token keyword\">TEXT<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span>              <span class=\"token comment\">&#8212; \u6240\u5c5e\u7528\u6237&#xff1b;\u67e5\u8be2\u5fc5\u5e26<\/span><br \/>\n  title <span class=\"token keyword\">TEXT<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span>                <span class=\"token comment\">&#8212; \u4f1a\u8bdd\u6807\u9898&#xff0c;\u5982\u300c\u6392\u969c &#8211; payment-api\u300d<\/span><br \/>\n  created_at TIMESTAMPTZ <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span> <span class=\"token keyword\">DEFAULT<\/span> <span class=\"token function\">NOW<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u6309\u79df\u6237 &#043; \u7528\u6237\u5217\u4f1a\u8bdd\u5217\u8868\u65f6\u7528<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">INDEX<\/span> conversations_tenant_user_idx<br \/>\n  <span class=\"token keyword\">ON<\/span> conversations <span class=\"token punctuation\">(<\/span>tenant_id<span class=\"token punctuation\">,<\/span> user_id<span class=\"token punctuation\">,<\/span> created_at <span class=\"token keyword\">DESC<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u67e5\u8be2\u4f1a\u8bdd\u65f6&#xff0c;\u5c3d\u91cf\u4e0d\u8981\u63d0\u4f9b\u53ea\u63a5\u53d7 conversationId \u7684\u901a\u7528\u67e5\u8be2\u51fd\u6570\u3002\u5426\u5219&#xff0c;\u4e00\u65e6\u6709\u4eba\u731c\u5230\u6216\u62ff\u5230\u4e86\u5176\u4ed6\u4eba\u7684\u4f1a\u8bdd ID&#xff0c;\u5c31\u53ef\u80fd\u5c1d\u8bd5\u8d8a\u6743\u8bfb\u53d6\u6570\u636e\u3002<\/p>\n<p>\u66f4\u7a33\u59a5\u7684\u65b9\u5f0f\u662f\u540c\u65f6\u5339\u914d\u4e09\u4e2a\u6761\u4ef6&#xff1a;<\/p>\n<ul>\n<li>conversationId<\/li>\n<li>\u79df\u6237 ID<\/li>\n<li>\u7528\u6237 ID<\/li>\n<\/ul>\n<p><span class=\"token keyword\">type<\/span> <span class=\"token class-name\">ConversationScope<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  tenantId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span><br \/>\n  userId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">async<\/span> <span class=\"token keyword\">function<\/span> <span class=\"token function\">getConversation<\/span><span class=\"token punctuation\">(<\/span><br \/>\n  db<span class=\"token operator\">:<\/span> Database<span class=\"token punctuation\">,<\/span><br \/>\n  scope<span class=\"token operator\">:<\/span> ConversationScope<span class=\"token punctuation\">,<\/span><br \/>\n  conversationId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span><br \/>\n<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token comment\">\/\/ id &#043; \u79df\u6237 &#043; \u7528\u6237\u4e00\u8d77\u5339\u914d&#xff0c;\u7f3a\u4e00\u4e0d\u53ef<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> db<span class=\"token punctuation\">.<\/span><span class=\"token function\">oneOrNone<\/span><span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">SELECT * FROM conversations<br \/>\n     WHERE id &#061; $1 AND tenant_id &#061; $2 AND user_id &#061; $3<\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span>conversationId<span class=\"token punctuation\">,<\/span> scope<span class=\"token punctuation\">.<\/span>tenantId<span class=\"token punctuation\">,<\/span> scope<span class=\"token punctuation\">.<\/span>userId<span class=\"token punctuation\">]<\/span><br \/>\n  <span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u91cc\u8fd8\u8981\u6ce8\u610f\u4e00\u4e2a\u4e1a\u52a1\u8fb9\u754c&#xff1a;\u4e0d\u662f\u6240\u6709\u7528\u6237\u90fd\u53ea\u80fd\u8bbf\u95ee\u81ea\u5df1\u521b\u5efa\u7684\u4f1a\u8bdd\u3002 \u5982\u679c\u4ea7\u54c1\u652f\u6301\u56e2\u961f\u5171\u4eab\u4f1a\u8bdd\u3001\u9879\u76ee\u534f\u4f5c\u6216\u79df\u6237\u7ba1\u7406\u5458\u67e5\u770b\u6570\u636e&#xff0c;\u5c31\u5e94\u8be5\u5728\u67e5\u8be2\u4e2d\u663e\u5f0f\u52a0\u5165\u5bf9\u5e94\u7684\u5171\u4eab\u5173\u7cfb\u548c\u6388\u6743\u89c4\u5219&#xff0c;\u800c\u4e0d\u662f\u7b80\u5355\u5730\u53bb\u6389 userId \u6761\u4ef6\u3002\u9694\u79bb\u89c4\u5219\u5e94\u8be5\u7531\u4e1a\u52a1\u6743\u9650\u51b3\u5b9a&#xff0c;\u4e0d\u80fd\u9760\u67d0\u4e2a ID \u662f\u5426\u5b58\u5728\u6765\u51b3\u5b9a\u3002<\/p>\n<p>\u4e0d\u53ea\u662f\u804a\u5929\u8868&#xff0c;\u4e0b\u9762\u8fd9\u4e9b\u5730\u65b9\u4e5f\u5fc5\u987b\u4f7f\u7528\u540c\u4e00\u5957\u9694\u79bb\u539f\u5219&#xff0c;\u5426\u5219\u6570\u636e\u4ecd\u53ef\u80fd\u4ece\u5176\u4ed6\u5165\u53e3\u6cc4\u6f0f&#xff1a;<\/p>\n<ul>\n<li>\u77e5\u8bc6\u68c0\u7d22&#xff1a;\u5411\u91cf\u68c0\u7d22\u548c\u5168\u6587\u68c0\u7d22\u90fd\u5e94\u5728\u670d\u52a1\u7aef\u67e5\u8be2\u6761\u4ef6\u4e2d\u52a0\u5165\u79df\u6237\u53ca\u5fc5\u8981\u7684\u8bbf\u95ee\u8303\u56f4&#xff0c;\u800c\u4e0d\u662f\u67e5\u8be2\u5b8c\u6210\u540e\u518d\u8fc7\u6ee4\u3002<\/li>\n<li>\u957f\u671f\u8bb0\u5fc6&#xff1a;\u8bfb\u5199\u8bb0\u5fc6\u65f6&#xff0c;Key \u6216\u67e5\u8be2\u6761\u4ef6\u5e94\u5305\u542b\u6b63\u786e\u7684\u79df\u6237\u3001\u7528\u6237\u6216\u4f1a\u8bdd\u8303\u56f4\u3002<\/li>\n<li>\u5de5\u5177\u8c03\u7528&#xff1a;\u8c03\u7528\u4e1a\u52a1\u63a5\u53e3\u65f6&#xff0c;\u4f7f\u7528\u4e0e\u5f53\u524d\u8bf7\u6c42\u5bf9\u5e94\u7684\u8eab\u4efd\u548c\u6388\u6743\u8303\u56f4\u3002<\/li>\n<li>\u94fe\u8def\u8ffd\u8e2a\u4e0e\u8fd0\u8425\u540e\u53f0&#xff1a;\u8ffd\u8e2a\u8bb0\u5f55\u3001\u5ba1\u8ba1\u65e5\u5fd7\u548c\u7ba1\u7406\u9875\u9762\u4e5f\u8981\u63a7\u5236\u53ef\u89c1\u8303\u56f4&#xff0c;\u907f\u514d\u666e\u901a\u7528\u6237\u901a\u8fc7\u65e5\u5fd7\u6216\u540e\u53f0\u63a5\u53e3\u770b\u5230\u5176\u4ed6\u79df\u6237\u7684\u6570\u636e\u3002<\/li>\n<\/ul>\n<h4>\u4e3a\u4ec0\u4e48\u5f3a\u8c03\u300c\u5148\u9694\u79bb&#xff0c;\u518d\u67e5\u8be2\u300d&#xff1f;<\/h4>\n<p>\u56e0\u4e3a\u5148\u67e5\u51fa\u6240\u6709\u76f8\u5173\u6570\u636e\u3001\u518d\u5728\u5e94\u7528\u5c42\u8fc7\u6ee4&#xff0c;\u5e76\u4e0d\u80fd\u4fdd\u8bc1\u65e0\u6743\u9650\u7684\u6570\u636e\u4ece\u672a\u88ab\u63a5\u89e6\u3002\u8fd9\u4e9b\u6570\u636e\u53ef\u80fd\u5df2\u7ecf\u8fdb\u5165\u6392\u5e8f\u8fc7\u7a0b\u3001\u7f13\u5b58\u3001\u65e5\u5fd7&#xff0c;\u751a\u81f3\u6a21\u578b\u4e0a\u4e0b\u6587\u3002\u5bf9\u4e8e\u4f01\u4e1a\u77e5\u8bc6\u5e93\u3001\u5185\u90e8\u8fd0\u7ef4\u52a9\u624b\u7b49\u573a\u666f&#xff0c;\u8fd9\u53ef\u80fd\u76f4\u63a5\u6f14\u53d8\u4e3a\u8de8\u79df\u6237\u6570\u636e\u6cc4\u6f0f\u3002<\/p>\n<p>\u7ba1\u7406\u5458\u786e\u5b9e\u9700\u8981\u8de8\u79df\u6237\u6392\u67e5\u95ee\u9898\u65f6&#xff0c;\u5e94\u8d70\u5355\u72ec\u7684\u7ba1\u7406\u63a5\u53e3\u548c\u6388\u6743\u6d41\u7a0b&#xff0c;\u6309\u9700\u5f00\u653e\u6743\u9650&#xff0c;\u5e76\u8bb0\u5f55\u64cd\u4f5c\u4eba\u3001\u67e5\u8be2\u539f\u56e0\u548c\u8bbf\u95ee\u8303\u56f4&#xff0c;\u4e0d\u8981\u76f4\u63a5\u590d\u7528\u666e\u901a\u804a\u5929\u63a5\u53e3\u3002<\/p>\n<p>\u53e6\u5916&#xff0c;\u7528\u6237\u6ce8\u9500\u6216\u79df\u6237\u505c\u7528\u540e&#xff0c;\u4e5f\u8981\u6709\u660e\u786e\u7684\u6570\u636e\u4fdd\u7559\u3001\u5220\u9664\u548c\u7d22\u5f15\u6e05\u7406\u7b56\u7565\u3002\u4f1a\u8bdd\u3001\u8bb0\u5fc6\u3001\u4e0a\u4f20\u6587\u4ef6\u53ca\u68c0\u7d22\u7d22\u5f15\u90fd\u9700\u8981\u7eb3\u5165\u7ba1\u7406&#xff0c;\u5e76\u80fd\u591f\u6838\u9a8c\u6e05\u7406\u7ed3\u679c\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261029140848-6ae35370168ac.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>\u5404\u79cd\u5bc6\u94a5\u4e0d\u8981\u8fdb Prompt<\/h4>\n<p>\u5bc6\u94a5\u548c\u8bbf\u95ee\u51ed\u8bc1\u53ea\u5e94\u8be5\u7531\u670d\u52a1\u7aef\u7ba1\u7406&#xff0c;\u4e0d\u8981\u5199\u8fdb\u53d1\u7ed9\u6a21\u578b\u7684 Prompt&#xff0c;\u4e5f\u4e0d\u8981\u5199\u8fdb\u4f1a\u6301\u4e45\u5316\u7684\u804a\u5929\u6b63\u6587\u6216\u6d88\u606f\u5386\u53f2\u3002<\/p>\n<table>\n<tr>\u51ed\u8bc1\u7c7b\u578b\u5b58\u653e\u4e0e\u4f7f\u7528\u65b9\u5f0f<\/tr>\n<tbody>\n<tr>\n<td>\u8c03\u7528\u5927\u6a21\u578b\u7684 API Key<\/td>\n<td>\u653e\u5728\u5bc6\u94a5\u7ba1\u7406\u7cfb\u7edf\u6216\u53d7\u4fdd\u62a4\u7684\u670d\u52a1\u7aef\u914d\u7f6e\u4e2d&#xff0c;\u4ec5\u6388\u6743\u7ed9\u9700\u8981\u8c03\u7528\u6a21\u578b\u7684\u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td>\u7528\u6237\u8bbf\u95ee\u51ed\u8bc1<\/td>\n<td>\u7531\u670d\u52a1\u7aef\u5b89\u5168\u6301\u6709&#xff0c;\u5e76\u6839\u636e\u4e1a\u52a1\u9700\u8981\u8c03\u7528\u6216\u6362\u53d6\u8bbf\u95ee\u4e1a\u52a1\u63a5\u53e3\u7684\u51ed\u8bc1&#xff1b;\u4e0d\u8981\u585e\u8fdb\u804a\u5929\u8bb0\u5f55<\/td>\n<\/tr>\n<tr>\n<td>\u79df\u6237\u81ea\u5df1\u7684\u63d2\u4ef6\u5bc6\u94a5<\/td>\n<td>\u6309\u79df\u6237\u9694\u79bb\u5e76\u52a0\u5bc6\u5b58\u50a8&#xff0c;\u771f\u6b63\u8c03\u7528\u63d2\u4ef6\u65f6\u518d\u7531\u670d\u52a1\u7aef\u89e3\u5bc6\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u8c03\u7528\u5185\u90e8\u4e1a\u52a1\u7cfb\u7edf\u7684\u8eab\u4efd\u51ed\u8bc1<\/td>\n<td>\u670d\u52a1\u7aef\u6839\u636e RequestContext \u548c\u6388\u6743\u7b56\u7565\u83b7\u53d6\u5408\u9002\u7684\u51ed\u8bc1&#xff0c;\u5e76\u5728\u5de5\u5177\u4fa7\u6267\u884c\u5fc5\u8981\u7684\u6743\u9650\u6821\u9a8c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u518d\u5f3a\u8c03\u4e00\u6b21&#xff1a; \u6a21\u578b\u5de5\u5177\u53c2\u6570\u91cc\u7684 userId\u3001tenantId\u3001roles \u7b49\u5b57\u6bb5&#xff0c;\u4e0d\u80fd\u76f4\u63a5\u4f5c\u4e3a\u53ef\u4fe1\u7684\u8eab\u4efd\u548c\u6388\u6743\u4f9d\u636e\u3002\u5de5\u5177\u5e94\u5ffd\u7565\u8fd9\u4e9b\u5b57\u6bb5\u5728\u9274\u6743\u4e0a\u7684\u4f5c\u7528&#xff0c;\u53ea\u8ba4\u670d\u52a1\u7aef\u6784\u5efa\u7684 RequestContext \u548c\u6b63\u5f0f\u7684\u6388\u6743\u7ed3\u679c\u3002<\/p>\n<p>\u8fd8\u6709\u4e00\u4e2a\u7ec6\u8282\u503c\u5f97\u6ce8\u610f&#xff1a;\u5373\u4f7f\u6a21\u578b\u672c\u8eab\u6ca1\u6709\u6076\u610f&#xff0c;\u4e5f\u53ef\u80fd\u56e0\u4e3a\u7528\u6237\u8f93\u5165\u3001\u63d0\u793a\u6ce8\u5165\u6216\u4e0a\u4e0b\u6587\u6df7\u6dc6\u800c\u751f\u6210\u4e0d\u53ef\u4fe1\u7684\u5de5\u5177\u53c2\u6570\u3002\u56e0\u6b64&#xff0c;\u5b89\u5168\u8fb9\u754c\u4e0d\u80fd\u5efa\u7acb\u5728\u300c\u6a21\u578b\u5e94\u8be5\u4f1a\u586b\u5bf9\u300d\u8fd9\u4e2a\u5047\u8bbe\u4e0a\u3002<\/p>\n<h3>\u8d77 Run&#xff1a;\u540c\u4e00\u6b21\u70b9\u51fb\u53ea\u8981\u4e00\u4e2a\u4efb\u52a1<\/h3>\n<p>\u7528\u6237\u70b9\u51fb\u53d1\u9001\u65f6&#xff0c;\u8bf7\u6c42\u4f53\u81f3\u5c11\u8981\u5e26\u4e0a\u4e09\u4e2a\u4fe1\u606f&#xff1a;\u4f1a\u8bdd ID\u3001\u7528\u6237\u539f\u8bdd&#xff0c;\u4ee5\u53ca\u4e00\u4e2a\u5e42\u7b49\u952e&#xff08;Idempotency Key&#xff0c;\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u8bf7\u6c42\u53bb\u91cd\u952e&#xff09; \u3002<\/p>\n<p>\u8fd9\u4e2a\u952e\u7531\u5ba2\u6237\u7aef\u5728\u7528\u6237\u53d1\u8d77\u672c\u6b21\u53d1\u9001\u65f6\u751f\u6210\u3002\u6d4f\u89c8\u5668\u6216 App \u90fd\u53ef\u4ee5\u751f\u6210&#xff0c;\u4f46\u540c\u4e00\u6b21\u53d1\u9001\u53d1\u751f\u7f51\u7edc\u91cd\u8bd5\u65f6&#xff0c;\u5fc5\u987b\u7ee7\u7eed\u4f7f\u7528\u539f\u6765\u7684\u952e\u3002\u4e0d\u80fd\u6bcf\u6b21\u91cd\u8bd5\u90fd\u751f\u6210\u4e00\u4e2a\u65b0\u952e&#xff0c;\u5426\u5219\u670d\u52a1\u7aef\u65e0\u6cd5\u5224\u65ad\u8fd9\u4e9b\u8bf7\u6c42\u5176\u5b9e\u5c5e\u4e8e\u540c\u4e00\u6b21\u64cd\u4f5c\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u7528\u6237\u70b9\u51fb\u53d1\u9001\u540e&#xff0c;\u7f51\u7edc\u8bf7\u6c42\u5df2\u7ecf\u5230\u8fbe\u670d\u52a1\u7aef&#xff0c;\u4f46\u54cd\u5e94\u5728\u8fd4\u56de\u9014\u4e2d\u4e22\u5931\u3002\u524d\u7aef\u4ee5\u4e3a\u8bf7\u6c42\u5931\u8d25&#xff0c;\u53c8\u53d1\u9001\u4e86\u4e00\u6b21\u3002\u5982\u679c\u670d\u52a1\u7aef\u6ca1\u6709\u5e42\u7b49\u673a\u5236&#xff0c;\u5c31\u53ef\u80fd\u542f\u52a8\u7b2c\u4e8c\u4e2a Agent \u5faa\u73af&#xff0c;\u5bfc\u81f4\u6a21\u578b\u91cd\u590d\u8c03\u7528&#xff0c;\u5de5\u5177\u751a\u81f3\u91cd\u590d\u6267\u884c\u771f\u5b9e\u4e1a\u52a1\u64cd\u4f5c\u3002<\/p>\n<p><span class=\"token keyword\">type<\/span> <span class=\"token class-name\">StartChatInput<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  conversationId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span><br \/>\n  idempotencyKey<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span> <span class=\"token comment\">\/\/ \u8bf7\u6c42\u952e&#xff1b;\u77ed\u65f6\u95f4\u5185\u76f8\u540c\u5219\u8fd4\u56de\u540c\u4e00\u6761 Run<\/span><br \/>\n  message<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span>        <span class=\"token comment\">\/\/ \u7528\u6237\u672c\u8f6e\u8f93\u5165<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u91cc\u7684\u91cd\u70b9\u4e0d\u662f\u7b80\u5355\u5730\u5224\u65ad\u300c\u4e24\u6761\u6d88\u606f\u662f\u4e0d\u662f\u4e00\u6837\u300d&#xff0c;\u800c\u662f\u5224\u65ad\u300c\u4e24\u6b21\u8bf7\u6c42\u662f\u4e0d\u662f\u540c\u4e00\u6b21\u4e1a\u52a1\u64cd\u4f5c\u300d\u3002\u7528\u6237\u5b8c\u5168\u53ef\u80fd\u6709\u610f\u8fde\u7eed\u53d1\u9001\u4e24\u6761\u76f8\u540c\u7684\u6d88\u606f&#xff0c;\u6240\u4ee5\u4e0d\u5e94\u8be5\u53ea\u9760\u6d88\u606f\u6587\u672c\u53bb\u91cd\u3002<\/p>\n<p>\u77ed\u65f6\u95f4\u5185&#xff0c;\u540c\u4e00\u79df\u6237\u4e0b\u7684\u540c\u4e00\u4e2a\u8bf7\u6c42\u952e\u5fc5\u987b\u5bf9\u5e94\u540c\u4e00\u6761 Run\u3002\u670d\u52a1\u7aef\u8fd8\u5e94\u6821\u9a8c\u8bf7\u6c42\u952e\u4e0e\u539f\u59cb\u8bf7\u6c42\u7684\u5173\u8054&#xff1a;\u5982\u679c\u540c\u4e00\u4e2a\u952e\u88ab\u62ff\u6765\u63d0\u4ea4\u4e0d\u540c\u7684\u4f1a\u8bdd\u6216\u4e0d\u540c\u7684\u6d88\u606f&#xff0c;\u5e94\u62d2\u7edd\u8bf7\u6c42\u6216\u8fd4\u56de\u660e\u786e\u7684\u51b2\u7a81\u9519\u8bef&#xff0c;\u800c\u4e0d\u662f\u628a\u65b0\u5185\u5bb9\u6084\u6084\u7ed1\u5b9a\u5230\u65e7\u4efb\u52a1\u4e0a\u3002<\/p>\n<p>Agent \u53ef\u80fd\u8fd0\u884c\u5f88\u4e45&#xff0c;\u56e0\u6b64\u4e0d\u8981\u8ba9\u63a5\u6536\u53d1\u9001\u8bf7\u6c42\u7684 HTTP \u8bf7\u6c42\u4e00\u76f4\u7b49\u5f85\u6a21\u578b\u548c\u5de5\u5177\u5168\u90e8\u6267\u884c\u5b8c\u6bd5\u3002\u66f4\u5408\u7406\u7684\u65b9\u5f0f\u662f\u62c6\u6210\u4e24\u4e2a\u9636\u6bb5&#xff1a;<\/p>\n<li>\u5148\u767b\u8bb0\u4efb\u52a1&#xff1a;\u5728\u6570\u636e\u5e93\u4e2d\u521b\u5efa\u4e00\u6761 Run&#xff0c;\u5e76\u901a\u8fc7\u552f\u4e00\u7ea6\u675f\u9632\u6b62\u540c\u4e00\u4e2a\u8bf7\u6c42\u952e\u91cd\u590d\u521b\u5efa\u3002\u63d2\u5165\u6210\u529f\u4ee3\u8868\u521b\u5efa\u4e86\u65b0\u4efb\u52a1&#xff1b;\u5982\u679c\u53d1\u73b0\u8bf7\u6c42\u952e\u5df2\u5b58\u5728&#xff0c;\u5c31\u8fd4\u56de\u5df2\u6709\u7684 runId&#xff0c;\u800c\u4e0d\u662f\u518d\u6b21\u542f\u52a8 Agent\u3002<\/li>\n<li>\u518d\u4ea4\u7ed9\u540e\u53f0\u6267\u884c&#xff1a;\u5c06 runId \u4ea4\u7ed9\u540e\u53f0\u961f\u5217\u6216\u4efb\u52a1\u8c03\u5ea6\u673a\u5236&#xff0c;\u7531 Worker \u8c03\u7528\u6a21\u578b\u548c\u5de5\u5177\u3002\u63a5\u6536\u8bf7\u6c42\u7684\u4e00\u4fa7\u8d1f\u8d23\u8fd4\u56de\u4efb\u52a1\u4fe1\u606f&#xff0c;\u5e76\u901a\u8fc7 SSE \u7b49\u65b9\u5f0f\u5411\u524d\u7aef\u63a8\u9001\u8fdb\u5ea6\u3002<\/li>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> runs <span class=\"token punctuation\">(<\/span><br \/>\n  id UUID <span class=\"token keyword\">PRIMARY<\/span> <span class=\"token keyword\">KEY<\/span><span class=\"token punctuation\">,<\/span>                          <span class=\"token comment\">&#8212; Run id<\/span><br \/>\n  tenant_id <span class=\"token keyword\">TEXT<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span>                     <span class=\"token comment\">&#8212; \u79df\u6237&#xff1b;\u4e0e\u8bf7\u6c42\u952e\u4e00\u8d77\u505a\u552f\u4e00\u7ea6\u675f<\/span><br \/>\n  conversation_id UUID <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span>               <span class=\"token comment\">&#8212; \u843d\u5728\u54ea\u4e2a\u4f1a\u8bdd<\/span><br \/>\n  idempotency_key <span class=\"token keyword\">TEXT<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span>               <span class=\"token comment\">&#8212; \u5ba2\u6237\u7aef\u5e26\u6765\u7684\u8bf7\u6c42\u952e&#xff1b;\u77ed\u65f6\u95f4\u5185\u540c\u952e\u540c Run<\/span><br \/>\n  <span class=\"token keyword\">status<\/span> <span class=\"token keyword\">TEXT<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span>                        <span class=\"token comment\">&#8212; queued \/ running \/ interrupted \/ \u2026<\/span><br \/>\n  cancel_requested <span class=\"token keyword\">BOOLEAN<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span> <span class=\"token keyword\">DEFAULT<\/span> <span class=\"token boolean\">FALSE<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token comment\">&#8212; \u7528\u6237\u662f\u5426\u5df2\u70b9\u53d6\u6d88&#xff1b;\u540e\u53f0\u6bcf\u6b65\u8981\u770b<\/span><br \/>\n  created_at TIMESTAMPTZ <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span> <span class=\"token keyword\">DEFAULT<\/span> <span class=\"token function\">NOW<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token keyword\">UNIQUE<\/span> <span class=\"token punctuation\">(<\/span>tenant_id<span class=\"token punctuation\">,<\/span> idempotency_key<span class=\"token punctuation\">)<\/span>           <span class=\"token comment\">&#8212; \u540c\u4e00\u79df\u6237\u4e0b&#xff0c;\u540c\u952e\u53ea\u80fd\u6709\u4e00\u6761 Run<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u6b65\u9aa4 1&#xff1a;\u767b\u8bb0 Run&#xff1b;\u540c\u79df\u6237\u540c\u8bf7\u6c42\u952e\u91cd\u590d\u63d0\u4ea4\u65f6&#xff0c;\u5e94\u8fd4\u56de\u5df2\u6709 runId<\/span><br \/>\n<span class=\"token comment\">\/\/ \u6b65\u9aa4 2&#xff1a;\u901a\u77e5\u540e\u53f0\u6267\u884c&#xff1b;\u672c\u51fd\u6570\u4e0d\u5728\u8fd9\u91cc\u8dd1\u5b8c\u6574 Agent<\/span><br \/>\n<span class=\"token keyword\">async<\/span> <span class=\"token keyword\">function<\/span> <span class=\"token function\">startRun<\/span><span class=\"token punctuation\">(<\/span>input<span class=\"token operator\">:<\/span> StartChatInput<span class=\"token punctuation\">,<\/span> ctx<span class=\"token operator\">:<\/span> RequestContext<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">const<\/span> run <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> db<span class=\"token punctuation\">.<\/span><span class=\"token function\">insertRun<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n    tenantId<span class=\"token operator\">:<\/span> ctx<span class=\"token punctuation\">.<\/span>tenantId<span class=\"token punctuation\">,<\/span><br \/>\n    conversationId<span class=\"token operator\">:<\/span> input<span class=\"token punctuation\">.<\/span>conversationId<span class=\"token punctuation\">,<\/span><br \/>\n    idempotencyKey<span class=\"token operator\">:<\/span> input<span class=\"token punctuation\">.<\/span>idempotencyKey<span class=\"token punctuation\">,<\/span><br \/>\n    status<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;queued&#039;<\/span> <span class=\"token comment\">\/\/ \u5df2\u767b\u8bb0&#xff0c;\u7b49\u540e\u53f0\u6765\u6267\u884c<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n  <span class=\"token keyword\">await<\/span> queue<span class=\"token punctuation\">.<\/span><span class=\"token function\">publish<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;agent.runs&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">{<\/span> runId<span class=\"token operator\">:<\/span> run<span class=\"token punctuation\">.<\/span>id<span class=\"token punctuation\">,<\/span> tenantId<span class=\"token operator\">:<\/span> ctx<span class=\"token punctuation\">.<\/span>tenantId <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> run<br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c55\u793a\u7684\u662f\u57fa\u672c\u6d41\u7a0b&#xff0c;\u771f\u6b63\u4e0a\u7ebf\u65f6\u8fd8\u9700\u8981\u6ce8\u610f\u4e00\u4e2a\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u6545\u969c\u7a97\u53e3&#xff1a;<\/p>\n<p>\u6570\u636e\u5e93\u5199\u5165\u6210\u529f&#xff0c;\u4e0d\u4ee3\u8868\u961f\u5217\u6d88\u606f\u4e00\u5b9a\u53d1\u5e03\u6210\u529f\u3002<\/p>\n<p>\u5047\u8bbe Run \u5df2\u7ecf\u5199\u8fdb\u6570\u636e\u5e93&#xff0c;\u4f46\u670d\u52a1\u6070\u597d\u5728 queue.publish() \u4e4b\u524d\u5d29\u6e83&#xff0c;\u8fd9\u6761 Run \u5c31\u53ef\u80fd\u4e00\u76f4\u505c\u7559\u5728 queued \u72b6\u6001\u3002\u53cd\u8fc7\u6765&#xff0c;\u5982\u679c\u6d88\u606f\u91cd\u590d\u6295\u9012&#xff0c;\u4e5f\u53ef\u80fd\u5bfc\u81f4\u591a\u4e2a Worker \u540c\u65f6\u5c1d\u8bd5\u6267\u884c\u540c\u4e00\u6761 Run\u3002<\/p>\n<p>\u751f\u4ea7\u73af\u5883\u901a\u5e38\u8fd8\u9700\u8981\u914d\u5957\u673a\u5236&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\u901a\u8fc7\u4e8b\u52a1\u53d1\u4ef6\u7bb1&#xff08;Transactional Outbox&#xff09;\u7b49\u65b9\u5f0f&#xff0c;\u534f\u8c03\u6570\u636e\u5e93\u5199\u5165\u4e0e\u961f\u5217\u6d88\u606f\u53d1\u5e03\u3002<\/li>\n<li>\u8ba9 Worker \u901a\u8fc7\u539f\u5b50\u72b6\u6001\u66f4\u65b0\u6216\u79df\u7ea6\u673a\u5236\u9886\u53d6\u4efb\u52a1&#xff0c;\u907f\u514d\u591a\u4e2a Worker \u540c\u65f6\u6267\u884c\u540c\u4e00\u6761 Run\u3002<\/li>\n<li>\u5bf9\u8d85\u65f6\u672a\u9886\u53d6\u3001\u6267\u884c\u4e2d\u65ad\u6216 Worker \u5d29\u6e83\u7684\u4efb\u52a1&#xff0c;\u63d0\u4f9b\u53ef\u6062\u590d\u7684\u8c03\u5ea6\u4e0e\u6392\u67e5\u673a\u5236\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u53ea\u5199\u4e00\u4e2a insert \u52a0\u4e00\u4e2a publish&#xff0c;\u5c31\u8ba4\u4e3a\u4efb\u52a1\u8c03\u5ea6\u5df2\u7ecf\u53ef\u9760\u4e86\u3002<\/p>\n<p>\u8d85\u65f6\u600e\u4e48\u5206\u5c42&#xff08;\u5efa\u8bae&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u6a21\u578b\u8c03\u7528\u8d85\u65f6&#xff1a;\u6839\u636e\u4efb\u52a1\u6267\u884c\u60c5\u51b5&#xff0c;\u5c06 Run \u6807\u8bb0\u4e3a\u5931\u8d25\u6216\u90e8\u5206\u5b8c\u6210&#xff0c;\u5e76\u901a\u8fc7 SSE \u5411\u524d\u7aef\u53d1\u9001\u660e\u786e\u7684\u9519\u8bef\u4e8b\u4ef6\u3002\u82e5\u4e1a\u52a1\u652f\u6301\u6062\u590d&#xff0c;\u4e5f\u53ef\u4ee5\u8fdb\u5165\u76f8\u5e94\u7684\u53ef\u6062\u590d\u72b6\u6001\u3002<\/li>\n<li>\u5de5\u5177\u8c03\u7528\u8d85\u65f6&#xff1a;\u7531\u5b9e\u9645\u6267\u884c\u5de5\u5177\u7684\u90a3\u4e00\u5c42\u5224\u65ad\u662f\u5426\u9002\u5408\u91cd\u8bd5&#xff0c;\u6216\u628a\u5931\u8d25\u7ed3\u679c\u4ea4\u7ed9 Agent \u51b3\u5b9a\u4e0b\u4e00\u6b65\u3002\u5bf9\u4e8e\u91cd\u542f\u670d\u52a1\u3001\u6263\u6b3e\u3001\u53d1\u901a\u77e5\u7b49\u6709\u526f\u4f5c\u7528\u7684\u64cd\u4f5c&#xff0c;\u4e0d\u80fd\u7b80\u5355\u5730\u8ba4\u4e3a\u91cd\u8bd5\u4e00\u5b9a\u5b89\u5168\u3002<\/li>\n<\/ul>\n<p>\u5c24\u5176\u8981\u533a\u5206\u4e24\u4e2a\u6982\u5ff5&#xff1a;\u8bf7\u6c42\u5e42\u7b49&#xff0c;\u4e0d\u7b49\u4e8e\u5de5\u5177\u6267\u884c\u5e42\u7b49\u3002 \u5373\u4f7f\u540c\u4e00\u4e2a\u8bf7\u6c42\u53ea\u521b\u5efa\u4e86\u4e00\u6761 Run&#xff0c;Worker \u5d29\u6e83\u540e\u91cd\u65b0\u6267\u884c\u5de5\u5177\u65f6&#xff0c;\u4ecd\u53ef\u80fd\u53d1\u751f\u91cd\u590d\u64cd\u4f5c\u3002\u56e0\u6b64&#xff0c;\u5bf9\u4e8e\u6709\u526f\u4f5c\u7528\u7684\u5de5\u5177&#xff0c;\u8fd8\u9700\u8981\u6839\u636e\u4e1a\u52a1\u8bbe\u8ba1\u72ec\u7acb\u7684\u5e42\u7b49\u952e\u3001\u6267\u884c\u8bb0\u5f55\u6216\u72b6\u6001\u6821\u9a8c\u673a\u5236\u3002<\/p>\n<h3>\u53d6\u6d88\u8981\u771f\u80fd\u505c\u4e0b\u6a21\u578b\u548c\u5de5\u5177\u8bf7\u6c42<\/h3>\n<p>SSE \u6216 HTTP \u8fde\u63a5\u65ad\u5f00&#xff0c;\u53ea\u80fd\u8bf4\u660e\u524d\u7aef\u6682\u65f6\u6536\u4e0d\u5230\u8fdb\u5ea6&#xff0c;\u4e0d\u4ee3\u8868\u7528\u6237\u660e\u786e\u8bf7\u6c42\u53d6\u6d88&#xff0c;\u66f4\u4e0d\u4ee3\u8868\u540e\u53f0\u4efb\u52a1\u5df2\u7ecf\u505c\u6b62\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u7528\u6237\u5728\u8fd0\u7ef4 Agent \u4e2d\u70b9\u51fb\u300c\u53d6\u6d88\u300d&#xff0c;\u9875\u9762\u4e0a\u7684\u52a0\u8f7d\u52a8\u753b\u6d88\u5931\u4e86&#xff0c;\u4f46\u540e\u53f0\u6b63\u5728\u6267\u884c\u7684\u6a21\u578b\u8bf7\u6c42\u548c\u5de5\u5177 HTTP \u8bf7\u6c42\u4ecd\u7136\u53ef\u80fd\u7ee7\u7eed\u8fd0\u884c\u3002\u5bf9\u4e8e\u8017\u65f6\u8f83\u957f\u7684\u4efb\u52a1&#xff0c;\u8fd9\u65e2\u4f1a\u4ea7\u751f\u989d\u5916\u8d39\u7528&#xff0c;\u4e5f\u53ef\u80fd\u5bfc\u81f4\u7528\u6237\u4ee5\u4e3a\u64cd\u4f5c\u5df2\u7ecf\u505c\u6b62&#xff0c;\u5b9e\u9645\u4e1a\u52a1\u5374\u4ecd\u5728\u53d1\u751f\u53d8\u5316\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u7528\u6237\u70b9\u51fb\u53d6\u6d88\u65f6&#xff0c;\u524d\u7aef\u5e94\u8c03\u7528\u660e\u786e\u7684\u53d6\u6d88\u63a5\u53e3&#xff0c;\u4e0d\u80fd\u53ea\u4f9d\u8d56\u5173\u95ed\u63a8\u6d41\u3002<\/p>\n<p>\u670d\u52a1\u7aef\u81f3\u5c11\u8981\u5b8c\u6210\u4e24\u4ef6\u4e8b&#xff1a;<\/p>\n<li>\u5c06\u53d6\u6d88\u610f\u56fe\u5199\u5165\u6570\u636e\u5e93&#xff0c;\u4f8b\u5982\u8bbe\u7f6e cancel_requested &#061; true&#xff0c;\u8ba9\u5176\u4ed6 Worker \u6216\u540e\u7eed\u6267\u884c\u6b65\u9aa4\u4e5f\u80fd\u611f\u77e5\u5230\u3002<\/li>\n<li>\u5c1d\u8bd5\u627e\u5230\u6b63\u5728\u6267\u884c\u8fd9\u6761 Run \u7684\u4efb\u52a1&#xff0c;\u5e76\u89e6\u53d1\u4e2d\u65ad\u4fe1\u53f7&#xff08;\u4f8b\u5982 abort()&#xff09;&#xff0c;\u6253\u65ad\u652f\u6301\u4e2d\u65ad\u7684\u6a21\u578b\u8bf7\u6c42\u548c\u5de5\u5177 HTTP \u8bf7\u6c42\u3002<\/li>\n<p><span class=\"token keyword\">async<\/span> <span class=\"token keyword\">function<\/span> <span class=\"token function\">cancelRun<\/span><span class=\"token punctuation\">(<\/span>runId<span class=\"token operator\">:<\/span> <span class=\"token builtin\">string<\/span><span class=\"token punctuation\">,<\/span> ctx<span class=\"token operator\">:<\/span> RequestContext<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token comment\">\/\/ 1) \u5148\u6301\u4e45\u5316\u53d6\u6d88\u610f\u56fe&#xff0c;\u8ba9\u5176\u4ed6\u673a\u5668\u548c\u540e\u7eed\u6b65\u9aa4\u4e5f\u80fd\u611f\u77e5<\/span><br \/>\n  <span class=\"token keyword\">await<\/span> db<span class=\"token punctuation\">.<\/span><span class=\"token function\">markCancelRequested<\/span><span class=\"token punctuation\">(<\/span>runId<span class=\"token punctuation\">,<\/span> ctx<span class=\"token punctuation\">.<\/span>tenantId<span class=\"token punctuation\">)<\/span><\/p>\n<p>  <span class=\"token comment\">\/\/ 2) \u5c1d\u8bd5\u4e2d\u65ad\u672c\u673a\u4efb\u52a1&#xff1b;\u8de8\u673a\u5668\u6267\u884c\u8fd8\u9700\u8981\u989d\u5916\u7684\u901a\u77e5\u673a\u5236<\/span><br \/>\n  <span class=\"token keyword\">const<\/span> worker <span class=\"token operator\">&#061;<\/span> workers<span class=\"token punctuation\">.<\/span><span class=\"token function\">get<\/span><span class=\"token punctuation\">(<\/span>runId<span class=\"token punctuation\">)<\/span><br \/>\n  worker<span class=\"token operator\">?.<\/span><span class=\"token function\">abort<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u91cc\u9700\u8981\u7279\u522b\u6ce8\u610f&#xff1a;\u628a cancel_requested \u5199\u8fdb\u6570\u636e\u5e93&#xff0c;\u53ea\u4ee3\u8868\u53d6\u6d88\u610f\u56fe\u5df2\u7ecf\u8bb0\u5f55&#xff0c;\u4e0d\u4ee3\u8868\u4efb\u52a1\u5df2\u7ecf\u505c\u6b62\u3002<\/p>\n<p>\u5982\u679c\u4efb\u52a1\u8fd0\u884c\u5728\u53e6\u4e00\u53f0\u673a\u5668\u4e0a&#xff0c;\u672c\u673a\u7684 workers.get(runId) \u5c31\u627e\u4e0d\u5230\u5b83&#xff1b;\u5982\u679c\u5de5\u5177\u5df2\u7ecf\u628a\u8bf7\u6c42\u53d1\u9001\u5230\u5916\u90e8\u7cfb\u7edf&#xff0c;\u5373\u4f7f\u672c\u5730\u4e2d\u65ad\u6210\u529f&#xff0c;\u5916\u90e8\u64cd\u4f5c\u4e5f\u672a\u5fc5\u80fd\u591f\u64a4\u9500\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u540e\u53f0\u6bcf\u4e00\u6b65\u90fd\u5e94\u540c\u65f6\u68c0\u67e5\u6570\u636e\u5e93\u4e2d\u7684 cancel_requested \u548c\u5f53\u524d\u8c03\u7528\u7684\u4e2d\u65ad\u4fe1\u53f7&#xff08;\u4f8b\u5982 AbortSignal&#xff09;\u3002\u5bf9\u4e8e\u8de8\u673a\u5668\u6267\u884c\u7684\u4efb\u52a1&#xff0c;\u8fd8\u9700\u8981\u901a\u8fc7\u961f\u5217\u901a\u77e5\u3001\u4e8b\u4ef6\u673a\u5236\u6216 Worker \u4e3b\u52a8\u8f6e\u8be2\u7b49\u65b9\u5f0f\u4f20\u9012\u53d6\u6d88\u4fe1\u53f7\u3002<\/p>\n<p>\u524d\u7aef\u53d6\u6d88\u8def\u5f84\u53ef\u4ee5\u7edf\u4e00\u4e3a POST \/runs\/:id\/cancel\u3002\u670d\u52a1\u7aef\u6536\u5230\u8bf7\u6c42\u540e&#xff0c;\u5e94\u5148\u6821\u9a8c\u5f53\u524d\u7528\u6237\u662f\u5426\u6709\u6743\u53d6\u6d88\u8fd9\u6761 Run&#xff0c;\u518d\u8bb0\u5f55\u53d6\u6d88\u610f\u56fe\u5e76\u901a\u77e5\u6267\u884c\u7aef\u3002<\/p>\n<p>\u5bf9\u4e8e\u72b6\u6001\u7ba1\u7406&#xff0c;\u4e5f\u8981\u533a\u5206&#xff1a;<\/p>\n<ul>\n<li>cancel_requested&#xff1a;\u7528\u6237\u5df2\u7ecf\u63d0\u51fa\u53d6\u6d88\u8bf7\u6c42\u3002<\/li>\n<li>cancelled&#xff1a;\u4efb\u52a1\u5df2\u786e\u8ba4\u505c\u6b62&#xff0c;\u8fdb\u5165\u7ec8\u6001\u3002<\/li>\n<li>failed&#xff1a;\u4efb\u52a1\u56e0\u4e3a\u9519\u8bef\u800c\u5931\u8d25\u3002<\/li>\n<li>completed&#xff1a;\u4efb\u52a1\u6b63\u5e38\u5b8c\u6210\u3002<\/li>\n<\/ul>\n<p>\u4e0d\u80fd\u5728\u6536\u5230\u53d6\u6d88\u8bf7\u6c42\u540e&#xff0c;\u5c31\u76f4\u63a5\u5411\u524d\u7aef\u5ba3\u79f0\u4efb\u52a1\u5df2\u7ecf\u53d6\u6d88\u6210\u529f\u3002\u66f4\u7a33\u59a5\u7684\u505a\u6cd5\u662f\u5148\u8fd4\u56de\u300c\u53d6\u6d88\u8bf7\u6c42\u5df2\u53d7\u7406\u300d&#xff0c;\u518d\u6839\u636e Worker \u7684\u5b9e\u9645\u72b6\u6001\u66f4\u65b0 Run\u3002<\/p>\n<p>\u5982\u679c\u5de5\u5177\u5df2\u7ecf\u4ea7\u751f\u4e86\u4e0d\u53ef\u9006\u7684\u4e1a\u52a1\u526f\u4f5c\u7528&#xff0c;\u4f8b\u5982\u91cd\u542f\u670d\u52a1\u3001\u53d1\u9001\u90ae\u4ef6\u6216\u63d0\u4ea4\u8ba2\u5355&#xff0c;\u53d6\u6d88\u673a\u5236\u4e5f\u4e0d\u80fd\u628a\u5df2\u7ecf\u53d1\u751f\u7684\u64cd\u4f5c\u53d8\u56de\u672a\u53d1\u751f\u3002\u6b64\u65f6\u9700\u8981\u660e\u786e\u544a\u77e5\u7528\u6237\u4efb\u52a1\u6267\u884c\u5230\u4e86\u54ea\u4e00\u6b65&#xff0c;\u5e76\u6839\u636e\u4e1a\u52a1\u8bbe\u8ba1\u8865\u507f\u64cd\u4f5c\u6216\u4eba\u5de5\u5904\u7406\u6d41\u7a0b\u3002<\/p>\n<p>\u4efb\u52a1\u53ef\u4ee5\u4ea4\u7ed9\u540e\u53f0\u961f\u5217\u8fd0\u884c&#xff0c;\u4f46\u8fd9\u6b21\u4efb\u52a1\u6267\u884c\u5230\u54ea\u4e00\u6b65\u3001\u8fdb\u5ea6\u5982\u4f55\u63a8\u9001\u3001\u8c01\u6709\u6743\u9650\u67e5\u770b\u548c\u53d6\u6d88&#xff0c;\u4ecd\u7136\u9700\u8981\u6709\u660e\u786e\u7684 Run \u72b6\u6001\u4f5c\u4e3a\u4f9d\u636e\u3002\u4e0d\u8981\u53e6\u5916\u5efa\u7acb\u4e00\u5f20\u7f3a\u5c11\u79df\u6237\u5b57\u6bb5\u7684\u4efb\u52a1\u8868&#xff0c;\u5426\u5219\u5f88\u5bb9\u6613\u51fa\u73b0\u4efb\u52a1\u72b6\u6001\u3001\u6743\u9650\u548c\u53d6\u6d88\u64cd\u4f5c\u5f7c\u6b64\u5bf9\u4e0d\u4e0a\u7684\u60c5\u51b5\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261029140848-6ae353708c7ab.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u5bf9\u5916\u63a5\u53e3\u4e0e\u6392\u67e5<\/h3>\n<p>\u5bf9\u5916\u6700\u5c11\u51c6\u5907\u4ee5\u4e0b\u51e0\u4e2a\u63a5\u53e3&#xff0c;\u8def\u5f84\u53ef\u4ee5\u6309\u9879\u76ee\u89c4\u8303\u8c03\u6574&#xff0c;\u4f46\u804c\u8d23\u8981\u660e\u786e&#xff1a;<\/p>\n<ul>\n<li>\u62c9\u53d6\u5386\u53f2\u6d88\u606f&#xff1a;GET \/conversations\/:id\/messages<\/li>\n<li>\u53d1\u8d77\u4e00\u6b21 Run&#xff1a;POST \/conversations\/:id\/runs&#xff0c;\u6267\u884c\u8fdb\u5ea6\u901a\u8fc7 SSE \u63a8\u9001<\/li>\n<li>\u4eba\u5de5\u786e\u8ba4\u540e\u6062\u590d\u4efb\u52a1&#xff1a;POST \/runs\/:id\/resume<\/li>\n<li>\u53d6\u6d88\u4efb\u52a1&#xff1a;POST \/runs\/:id\/cancel<\/li>\n<\/ul>\n<p>Run \u7684\u72b6\u6001\u5efa\u8bae\u7edf\u4e00\u5b9a\u4e49\u4e3a&#xff1a;<\/p>\n<ul>\n<li>queued&#xff1a;\u5df2\u767b\u8bb0&#xff0c;\u7b49\u5f85\u6267\u884c\u3002<\/li>\n<li>running&#xff1a;\u6267\u884c\u4e2d\u3002<\/li>\n<li>interrupted&#xff1a;\u6682\u505c\u6267\u884c&#xff0c;\u7b49\u5f85\u4eba\u5de5\u786e\u8ba4\u6216\u540e\u7eed\u6062\u590d\u3002<\/li>\n<li>completed&#xff1a;\u6b63\u5e38\u7ed3\u675f\u3002<\/li>\n<li>failed&#xff1a;\u6267\u884c\u5931\u8d25\u3002<\/li>\n<li>cancelled&#xff1a;\u4efb\u52a1\u5df2\u786e\u8ba4\u53d6\u6d88\u3002<\/li>\n<\/ul>\n<p>\u524d\u7aef\u6839\u636e\u8fd9\u4e9b\u72b6\u6001\u548c SSE \u4e1a\u52a1\u4e8b\u4ef6\u66f4\u65b0\u9875\u9762\u5373\u53ef&#xff0c;\u4e0d\u8981\u901a\u8fc7\u89e3\u6790\u4e0d\u5b8c\u6574\u7684\u5185\u90e8\u65e5\u5fd7\u6765\u731c\u6d4b\u4efb\u52a1\u8fdb\u5ea6\u3002<\/p>\n<p>\u53e6\u5916&#xff0c;SSE \u4e3b\u8981\u8d1f\u8d23\u5b9e\u65f6\u63a8\u9001&#xff0c;\u4e0d\u5e94\u8be5\u6210\u4e3a\u4efb\u52a1\u72b6\u6001\u7684\u552f\u4e00\u6765\u6e90\u3002\u6d4f\u89c8\u5668\u5237\u65b0\u3001\u7f51\u7edc\u5207\u6362\u6216\u79fb\u52a8\u7aef\u8fdb\u5165\u540e\u53f0&#xff0c;\u90fd\u53ef\u80fd\u5bfc\u81f4\u8fde\u63a5\u4e2d\u65ad\u3002\u5ba2\u6237\u7aef\u91cd\u65b0\u8fde\u63a5\u65f6&#xff0c;\u5e94\u80fd\u6839\u636e runId \u67e5\u8be2\u5f53\u524d\u72b6\u6001&#xff0c;\u5e76\u4ece\u670d\u52a1\u7aef\u6062\u590d\u5fc5\u8981\u7684\u8fdb\u5ea6\u4fe1\u606f\u3002<\/p>\n<p>\u51fa\u95ee\u9898\u5148\u67e5&#xff08;\u4e5f\u662f\u6700\u5e38\u89c1\u7684\u8e29\u5751\u70b9&#xff09;&#xff1a;<\/p>\n<li>\u6362\u624b\u673a\u6216\u6d4f\u89c8\u5668\u540e&#xff0c;\u65e0\u6cd5\u7ee7\u7eed\u521a\u624d\u7684\u5bf9\u8bdd&#xff1a;\u68c0\u67e5\u4f1a\u8bdd\u3001\u6d88\u606f\u548c Run \u662f\u5426\u6301\u4e45\u5316\u5230\u4e86\u6570\u636e\u5e93&#xff1b;\u5982\u679c\u53ea\u4fdd\u5b58\u5728\u5185\u5b58\u4e2d&#xff0c;\u670d\u52a1\u91cd\u542f\u6216\u6269\u5bb9\u540e\u5c31\u53ef\u80fd\u4e22\u5931\u3002<\/li>\n<li>\u5de5\u5177\u8fd4\u56de 401&#xff0c;\u6216\u8005\u5de5\u5177\u9519\u8bef\u5730\u4f7f\u7528\u4e86\u5176\u4ed6\u4eba\u7684\u8eab\u4efd&#xff1a;\u68c0\u67e5 RequestContext \u662f\u5426\u4f20\u5230\u4e86\u5de5\u5177\u5c42\u3001\u8bbf\u95ee\u51ed\u8bc1\u662f\u5426\u8fc7\u671f&#xff0c;\u4ee5\u53ca\u4ee3\u7801\u662f\u5426\u8bef\u7528\u4e86\u6a21\u578b\u53c2\u6570\u4e2d\u7684 userId \u6216 tenantId\u3002<\/li>\n<li>\u7528\u6237\u70b9\u4e86\u53d6\u6d88&#xff0c;\u8c03\u7528\u8d39\u7528\u4ecd\u5728\u4ea7\u751f&#xff1a;\u68c0\u67e5\u662f\u5426\u53ea\u5173\u95ed\u4e86 SSE&#xff1b;\u53d6\u6d88\u610f\u56fe\u662f\u5426\u5199\u5165\u6570\u636e\u5e93&#xff1b;\u6a21\u578b\u548c\u5de5\u5177\u8bf7\u6c42\u662f\u5426\u771f\u6b63\u652f\u6301\u5e76\u63a5\u6536\u4e86\u4e2d\u65ad\u4fe1\u53f7\u3002<\/li>\n<li>\u7528\u6237\u80fd\u770b\u5230\u5176\u4ed6\u79df\u6237\u6216\u5176\u4ed6\u7528\u6237\u7684\u4f1a\u8bdd&#xff1a;\u68c0\u67e5\u67e5\u8be2\u662f\u5426\u53ea\u6309 conversationId \u5339\u914d&#xff1b;\u79df\u6237\u3001\u7528\u6237\u53ca\u5171\u4eab\u6743\u9650\u6761\u4ef6\u662f\u5426\u5b8c\u6574\u3002<\/li>\n<li>\u8fde\u7eed\u70b9\u51fb\u53d1\u9001\u540e\u542f\u52a8\u4e86\u4e24\u4e2a\u4efb\u52a1&#xff1a;\u68c0\u67e5\u521b\u5efa Run \u65f6\u662f\u5426\u4f7f\u7528\u5ba2\u6237\u7aef\u751f\u6210\u7684\u5e42\u7b49\u952e&#xff1b;\u76f8\u540c\u8bf7\u6c42\u952e\u662f\u5426\u53ea\u5bf9\u5e94\u4e00\u6761 Run&#xff1b;Worker \u662f\u5426\u5b58\u5728\u5e76\u53d1\u9886\u53d6\u540c\u4e00\u4efb\u52a1\u7684\u95ee\u9898\u3002<\/li>\n<li>Run \u4e00\u76f4\u505c\u7559\u5728\u6392\u961f\u72b6\u6001&#xff1a;\u68c0\u67e5\u6570\u636e\u5e93\u5199\u5165\u6210\u529f\u540e&#xff0c;\u961f\u5217\u6d88\u606f\u662f\u5426\u53d1\u5e03\u6210\u529f&#xff1b;Worker \u662f\u5426\u6b63\u5e38\u9886\u53d6\u4efb\u52a1&#xff1b;\u662f\u5426\u5b58\u5728\u4efb\u52a1\u5df2\u767b\u8bb0\u4f46\u672a\u6210\u529f\u6295\u9012\u7684\u60c5\u51b5\u3002<\/li>\n<li>\u5de5\u5177\u64cd\u4f5c\u91cd\u590d\u6267\u884c&#xff1a;\u9664\u4e86\u68c0\u67e5 Run \u7684\u5e42\u7b49\u521b\u5efa&#xff0c;\u8fd8\u8981\u68c0\u67e5\u5de5\u5177\u81ea\u8eab\u662f\u5426\u5177\u5907\u5e42\u7b49\u4fdd\u62a4&#xff0c;\u5c24\u5176\u662f\u6d89\u53ca\u8ba2\u5355\u3001\u901a\u77e5\u3001\u914d\u7f6e\u4fee\u6539\u548c\u8fd0\u7ef4\u64cd\u4f5c\u7684\u5de5\u5177\u3002<\/li>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>\u4f1a\u8bdd\u670d\u52a1\u8981\u771f\u6b63\u7acb\u4f4f&#xff0c;\u6838\u5fc3\u662f\u4e09\u4ef6\u4e8b&#xff1a;\u8eab\u4efd\u4ece\u54ea\u91cc\u6765\u3001\u4e00\u6b21\u53d1\u9001\u5982\u4f55\u8d77\u505c\u3001\u6570\u636e\u5982\u4f55\u9694\u79bb\u3002<\/p>\n<li>\u8eab\u4efd\u53ea\u8ba4\u53ef\u4fe1\u7684 RequestContext \u3002 \u7f51\u5173\u6216\u4f1a\u8bdd\u670d\u52a1\u5b8c\u6210\u8eab\u4efd\u8ba4\u8bc1\u540e&#xff0c;\u5c06\u4e0a\u4e0b\u6587\u4f20\u9012\u5230\u6574\u4e2a\u8c03\u7528\u94fe\u8def\u3002\u5de5\u5177\u4e0d\u80fd\u4f7f\u7528\u6a21\u578b\u53c2\u6570\u91cc\u7684 userId \u6216 tenantId \u4f5c\u4e3a\u9274\u6743\u4f9d\u636e&#xff0c;\u8fd8\u8981\u6309\u7167\u5177\u4f53\u4e1a\u52a1\u89c4\u5219\u9a8c\u8bc1\u64cd\u4f5c\u6743\u9650\u3002\u5bc6\u94a5\u548c\u8bbf\u95ee\u51ed\u8bc1\u53ea\u7531\u670d\u52a1\u7aef\u7ba1\u7406&#xff0c;\u4e0d\u80fd\u8fdb\u5165 Prompt \u6216\u804a\u5929\u8bb0\u5f55\u3002<\/li>\n<li>\u4e00\u6b21\u70b9\u51fb\u5bf9\u5e94\u4e00\u6761 Run&#xff0c;\u53d6\u6d88\u4e5f\u5fc5\u987b\u6709\u660e\u786e\u7ed3\u679c\u3002 \u5ba2\u6237\u7aef\u901a\u8fc7\u5e42\u7b49\u952e\u6807\u8bc6\u540c\u4e00\u6b21\u53d1\u9001&#xff0c;\u670d\u52a1\u7aef\u8d1f\u8d23\u9632\u6b62\u91cd\u590d\u521b\u5efa\u4efb\u52a1&#xff0c;\u5e76\u5c06\u4efb\u52a1\u6301\u4e45\u5316\u540e\u4ea4\u7ed9\u540e\u53f0\u6267\u884c\u3002\u53d6\u6d88\u65f6&#xff0c;\u65e2\u8981\u8bb0\u5f55\u53d6\u6d88\u610f\u56fe&#xff0c;\u4e5f\u8981\u901a\u77e5\u6267\u884c\u7aef\u5e76\u4e2d\u65ad\u652f\u6301\u53d6\u6d88\u7684\u8bf7\u6c42\u3002\u5173\u95ed SSE \u53ea\u662f\u505c\u6b62\u63a5\u6536\u8fdb\u5ea6&#xff0c;\u4e0d\u7b49\u4e8e\u4efb\u52a1\u5df2\u7ecf\u505c\u6b62\u3002<\/li>\n<li>\u79df\u6237\u9694\u79bb\u5fc5\u987b\u53d1\u751f\u5728\u6570\u636e\u8bbf\u95ee\u8fc7\u7a0b\u4e2d&#xff0c;\u800c\u4e0d\u662f\u67e5\u8be2\u4e4b\u540e\u3002 \u4f1a\u8bdd\u3001\u77e5\u8bc6\u68c0\u7d22\u3001\u957f\u671f\u8bb0\u5fc6\u548c\u540e\u53f0\u4efb\u52a1\u90fd\u8981\u5e94\u7528\u6b63\u786e\u7684\u9694\u79bb\u89c4\u5219\u3002\u4e0d\u8981\u5148\u628a\u6240\u6709\u6570\u636e\u67e5\u51fa\u6765&#xff0c;\u518d\u5728\u5e94\u7528\u5c42\u8fc7\u6ee4&#xff1b;\u540c\u65f6&#xff0c;\u4e5f\u4e0d\u8981\u5ffd\u7565 Worker \u91cd\u8bd5\u3001\u8de8\u673a\u5668\u53d6\u6d88\u548c\u5de5\u5177\u526f\u4f5c\u7528\u8fd9\u4e9b\u5bb9\u6613\u88ab\u9057\u6f0f\u7684\u5de5\u7a0b\u7ec6\u8282\u3002<\/li>\n<p>\u6700\u540e&#xff0c;\u60f3\u548c\u5927\u5bb6\u4ea4\u6d41\u4e24\u4e2a\u5b9e\u9645\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u95ee\u9898\u4e00&#xff1a; \u4f60\u4eec\u5728 Agent \u9879\u76ee\u4e2d&#xff0c;\u662f\u628a\u4f1a\u8bdd\u548c Run \u72b6\u6001\u7edf\u4e00\u4ea4\u7ed9\u4e1a\u52a1\u670d\u52a1\u7ba1\u7406&#xff0c;\u8fd8\u662f\u66f4\u591a\u4f9d\u8d56 Agent \u6846\u67b6\u81ea\u5e26\u7684 Checkpoint&#xff1f;<\/li>\n<li>\u95ee\u9898\u4e8c&#xff1a; \u5bf9\u4e8e\u6267\u884c\u65f6\u95f4\u5f88\u957f\u3001\u8fd8\u4f1a\u8c03\u7528\u5916\u90e8\u7cfb\u7edf\u7684 Agent&#xff0c;\u4f60\u4eec\u662f\u600e\u4e48\u5b9e\u73b0\u771f\u6b63\u7684\u53d6\u6d88\u673a\u5236\u7684&#xff1f;\u6709\u6ca1\u6709\u9047\u5230\u8fc7\u524d\u7aef\u663e\u793a\u53d6\u6d88\u6210\u529f&#xff0c;\u4f46\u540e\u53f0\u4ecd\u5728\u6267\u884c\u7684\u60c5\u51b5&#xff1f;<\/li>\n<\/ul>\n<p>\u6b22\u8fce\u5728\u8bc4\u8bba\u533a\u5206\u4eab\u4f60\u7684\u5b9e\u8df5\u3001\u8e29\u8fc7\u7684\u5751&#xff0c;\u6216\u8005\u76f4\u63a5\u63d0\u51fa\u7591\u95ee\u3002\u5c24\u5176\u6b22\u8fce\u8865\u5145\u771f\u5b9e\u7684\u6545\u969c\u6848\u4f8b\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u7ed9\u6b63\u5728\u505a Agent \u843d\u5730\u7684\u670b\u53cb\u4e00\u4e9b\u53c2\u8003\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00&#xff1a;\u5c01\u95ed\u544a\u4e00\u6bb5\u843d&#xff0c;\u5f00\u59cb\u7cfb\u7edf\u590d\u76d8&#xff1a;\u4e00\u4e2a\u751f\u4ea7 Agent \u5230\u5e95\u600e\u4e48\u8dd1\u8d77\u6765\u3002\u8e29\u5751\u3001\u7ecf\u9a8c\u548c\u843d\u5730&#xff0c;\u5c3d\u91cf\u7528\u51e0\u7bc7\u6587\u7ae0\u8bb2\u6e05&#xff0c;\u8fd9\u7bc7\u6587\u7ae0\u662f\u7cfb\u5217\u7b2c6\u7bc7&#xff1a;Agent \u6302\u6389\u5e38\u5e38\u4e0d\u662f\u6a21\u578b\u50bb&#xff0c;\u800c\u662f\u8eab\u4efd\u4f20\u4e22\u4e86\u3001\u4f1a\u8bdd\u53ea\u653e\u5728\u5185\u5b58\u91cc&#xff08;\u91cd\u542f\u6216\u6362\u673a\u5668\u5c31\u6ca1\u4e86&#xff09;\u3001\u7528\u6237\u70b9\u4e86\u53d6\u6d88\u4f46\u6a21\u578b\u548c\u5de5\u5177\u8bf7\u6c42\u8fd8\u5728\u8dd1\u3002<br \/>\n\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u7ed9\u6b63\u5728\u505a Agent \u843d\u5730\u7684\u670b\u53cb\u4e00\u4e9b\u53c2\u8003&#xff0c;\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u533a\u4ea4\u6d41\u81ea\u5df1<\/p>\n","protected":false},"author":2,"featured_media":119512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10848,74,50,61,176],"topic":[],"class_list":["post-119516","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-harness","tag-agent","tag-50","tag-61","tag-176"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7 - \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\/119516.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00&#xff1a;\u5c01\u95ed\u544a\u4e00\u6bb5\u843d&#xff0c;\u5f00\u59cb\u7cfb\u7edf\u590d\u76d8&#xff1a;\u4e00\u4e2a\u751f\u4ea7 Agent \u5230\u5e95\u600e\u4e48\u8dd1\u8d77\u6765\u3002\u8e29\u5751\u3001\u7ecf\u9a8c\u548c\u843d\u5730&#xff0c;\u5c3d\u91cf\u7528\u51e0\u7bc7\u6587\u7ae0\u8bb2\u6e05&#xff0c;\u8fd9\u7bc7\u6587\u7ae0\u662f\u7cfb\u5217\u7b2c6\u7bc7&#xff1a;Agent \u6302\u6389\u5e38\u5e38\u4e0d\u662f\u6a21\u578b\u50bb&#xff0c;\u800c\u662f\u8eab\u4efd\u4f20\u4e22\u4e86\u3001\u4f1a\u8bdd\u53ea\u653e\u5728\u5185\u5b58\u91cc&#xff08;\u91cd\u542f\u6216\u6362\u673a\u5668\u5c31\u6ca1\u4e86&#xff09;\u3001\u7528\u6237\u70b9\u4e86\u53d6\u6d88\u4f46\u6a21\u578b\u548c\u5de5\u5177\u8bf7\u6c42\u8fd8\u5728\u8dd1\u3002 \u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u7ed9\u6b63\u5728\u505a Agent \u843d\u5730\u7684\u670b\u53cb\u4e00\u4e9b\u53c2\u8003&#xff0c;\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u533a\u4ea4\u6d41\u81ea\u5df1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/119516.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-29T14:08:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261029140846-6ae3536ebf138.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=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119516.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/119516.html\",\"name\":\"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-29T14:08:50+00:00\",\"dateModified\":\"2026-10-29T14:08:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/119516.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/119516.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119516.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7\"}]},{\"@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":"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7 - \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\/119516.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u8a00&#xff1a;\u5c01\u95ed\u544a\u4e00\u6bb5\u843d&#xff0c;\u5f00\u59cb\u7cfb\u7edf\u590d\u76d8&#xff1a;\u4e00\u4e2a\u751f\u4ea7 Agent \u5230\u5e95\u600e\u4e48\u8dd1\u8d77\u6765\u3002\u8e29\u5751\u3001\u7ecf\u9a8c\u548c\u843d\u5730&#xff0c;\u5c3d\u91cf\u7528\u51e0\u7bc7\u6587\u7ae0\u8bb2\u6e05&#xff0c;\u8fd9\u7bc7\u6587\u7ae0\u662f\u7cfb\u5217\u7b2c6\u7bc7&#xff1a;Agent \u6302\u6389\u5e38\u5e38\u4e0d\u662f\u6a21\u578b\u50bb&#xff0c;\u800c\u662f\u8eab\u4efd\u4f20\u4e22\u4e86\u3001\u4f1a\u8bdd\u53ea\u653e\u5728\u5185\u5b58\u91cc&#xff08;\u91cd\u542f\u6216\u6362\u673a\u5668\u5c31\u6ca1\u4e86&#xff09;\u3001\u7528\u6237\u70b9\u4e86\u53d6\u6d88\u4f46\u6a21\u578b\u548c\u5de5\u5177\u8bf7\u6c42\u8fd8\u5728\u8dd1\u3002 \u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u7ed9\u6b63\u5728\u505a Agent \u843d\u5730\u7684\u670b\u53cb\u4e00\u4e9b\u53c2\u8003&#xff0c;\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u533a\u4ea4\u6d41\u81ea\u5df1","og_url":"https:\/\/www.wsisp.com\/helps\/119516.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-29T14:08:50+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261029140846-6ae3536ebf138.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/119516.html","url":"https:\/\/www.wsisp.com\/helps\/119516.html","name":"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-29T14:08:50+00:00","dateModified":"2026-10-29T14:08:50+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/119516.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/119516.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/119516.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u5c01\u95ed\u7ed3\u675f6\u3011Agent \u4f1a\u8bdd\u670d\u52a1\u4e0e\u9274\u6743\u4e0a\u4e0b\u6587\uff0c\u8ba9\u751f\u4ea7\u73af\u5883\u4e2d\u7684 Agent \u771f\u6b63\u53ef\u63a7"}]},{"@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\/119516","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=119516"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/119516\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/119512"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=119516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=119516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=119516"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=119516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}