{"id":91123,"date":"2026-08-07T00:08:56","date_gmt":"2026-08-06T16:08:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/91123.html"},"modified":"2026-08-07T00:08:56","modified_gmt":"2026-08-06T16:08:56","slug":"%e4%bb%8e%e5%b7%a5%e5%85%b7%e4%b8%8d%e5%8f%af%e8%a7%81%e5%88%b0%e6%95%b0%e6%8d%ae%e4%b8%8d%e8%b6%8a%e6%9d%83%ef%bc%9aagentscope%e5%b7%a5%e5%85%b7%e6%9d%83%e9%99%90%e7%9a%84%e4%b8%89%e5%b1%82%e9%98%b2","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/91123.html","title":{"rendered":"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260806160851-6a74b193eed94.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743&#xff1a;AgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260806160853-6a74b1958f7e7.png\" alt=\"AgentScope \u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf\" \/><\/p>\n<p>\u524d\u7f6e\u9605\u8bfb&#xff1a;\u300a\u82e5\u4f9d\u6846\u67b6\u548c\u963f\u91cc AgentScope \u7684\u6743\u9650\u5c01\u88c5\u300b<\/p>\n<p>\u4e0a\u4e00\u7bc7\u4e3b\u8981\u8ba8\u8bba\u5982\u4f55\u628a\u82e5\u4f9d\u7684\u89d2\u8272\u6743\u9650\u63a5\u5165 Agent \u5de5\u5177\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u89e3\u51b3\u201c\u65e0\u6743\u9650\u7528\u6237\u4e0d\u5e94\u8be5\u5728\u6a21\u578b\u4e0a\u4e0b\u6587\u4e2d\u770b\u5230 Tool Schema\u201d&#xff0c;\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u53ea\u4f9d\u8d56\u5de5\u5177\u6267\u884c\u9636\u6bb5\u7684 &#064;PreAuthorize\u3002\u672c\u6587\u7ee7\u7eed\u5411\u4e0b\u62c6\u89e3&#xff0c;\u7ed9\u51fa\u4e00\u5957\u8986\u76d6\u5de5\u5177\u53ef\u89c1\u6027\u3001\u8c03\u7528\u51b3\u7b56\u548c\u4e1a\u52a1\u6570\u636e\u8303\u56f4\u7684\u4e09\u5c42\u6743\u9650\u6a21\u578b\u3002<\/p>\n<h3>\u4e00\u3001\u4e3a\u4ec0\u4e48 Agent \u5de5\u5177\u6743\u9650\u4e0d\u80fd\u53ea\u505a\u4e00\u6b21\u6821\u9a8c<\/h3>\n<p>\u4f20\u7edf Web \u63a5\u53e3\u7684\u6743\u9650\u63a7\u5236\u901a\u5e38\u53d1\u751f\u5728 Controller \u6216 Service \u6267\u884c\u4e4b\u524d&#xff1a;<\/p>\n<p><span class=\"token annotation punctuation\">&#064;PreAuthorize<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;&#064;ss.hasPermission(&#039;inventory:stock:query&#039;)&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u4f46 Agent \u7684\u6267\u884c\u94fe\u8def\u6bd4\u666e\u901a HTTP \u8bf7\u6c42\u66f4\u957f&#xff1a;<\/p>\n<p>\u7528\u6237\u95ee\u9898<br \/>\n  \u2192 Agent \u83b7\u53d6 Tool Schema<br \/>\n  \u2192 \u5927\u6a21\u578b\u9009\u62e9\u5de5\u5177<br \/>\n  \u2192 Agent \u53d1\u8d77 Tool Call<br \/>\n  \u2192 Java \u5de5\u5177\u65b9\u6cd5\u6267\u884c<br \/>\n  \u2192 Service \u67e5\u8be2\u4e1a\u52a1\u6570\u636e<br \/>\n  \u2192 \u7ed3\u679c\u8fd4\u56de\u5927\u6a21\u578b<\/p>\n<p>\u5982\u679c\u53ea\u5728 Java \u65b9\u6cd5\u6267\u884c\u524d\u6821\u9a8c\u6743\u9650&#xff0c;\u4f1a\u7559\u4e0b\u4e09\u4e2a\u4e0d\u540c\u7684\u95ee\u9898&#xff1a;<\/p>\n<li>\u7528\u6237\u6ca1\u6709\u5de5\u5177\u6743\u9650&#xff0c;\u4f46\u6a21\u578b\u5df2\u7ecf\u770b\u5230\u4e86\u5de5\u5177\u540d\u79f0\u3001\u63cf\u8ff0\u548c\u53c2\u6570\u7ed3\u6784\u3002<\/li>\n<li>\u7528\u6237\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177&#xff0c;\u4f46\u67d0\u6b21\u8c03\u7528\u5c5e\u4e8e\u9ad8\u98ce\u9669\u64cd\u4f5c&#xff0c;\u9700\u8981\u52a8\u6001\u62d2\u7edd\u6216\u4eba\u5de5\u786e\u8ba4\u3002<\/li>\n<li>\u4e24\u4e2a\u89d2\u8272\u90fd\u80fd\u8c03\u7528\u540c\u4e00\u4e2a\u67e5\u8be2\u5de5\u5177&#xff0c;\u4f46\u80fd\u591f\u8bfb\u53d6\u7684\u6570\u636e\u8303\u56f4\u4e0d\u540c\u3002<\/li>\n<p>\u8fd9\u4e09\u4e2a\u95ee\u9898\u5bf9\u5e94\u4e09\u4e2a\u4e0d\u540c\u7684\u5b89\u5168\u8fb9\u754c&#xff0c;\u4e0d\u80fd\u7528\u4e00\u4e2a\u6ce8\u89e3\u6216\u4e00\u6b21\u62e6\u622a\u5168\u90e8\u66ff\u4ee3\u3002<\/p>\n<h3>\u4e8c\u3001\u4e09\u5c42\u6743\u9650\u6a21\u578b<\/h3>\n<p>\u4e00\u5957\u5b8c\u6574\u7684 Agent \u5de5\u5177\u6743\u9650\u4f53\u7cfb&#xff0c;\u53ef\u4ee5\u62c6\u5206\u4e3a\u4ee5\u4e0b\u4e09\u5c42&#xff1a;<\/p>\n<table>\n<tr>\u5c42\u7ea7\u6838\u5fc3\u95ee\u9898\u63a7\u5236\u65f6\u673a\u5178\u578b\u7ed3\u679c<\/tr>\n<tbody>\n<tr>\n<td>\u7b2c\u4e00\u5c42&#xff1a;\u5de5\u5177\u53ef\u89c1\u6027<\/td>\n<td>\u8fd9\u4e2a\u89d2\u8272\u5bf9\u5e94\u7684 Agent \u662f\u5426\u62e5\u6709\u8be5\u5de5\u5177<\/td>\n<td>Tool Schema \u53d1\u9001\u7ed9\u6a21\u578b\u4e4b\u524d<\/td>\n<td>\u4fdd\u7559\u6216\u79fb\u9664 Tool Schema<\/td>\n<\/tr>\n<tr>\n<td>\u7b2c\u4e8c\u5c42&#xff1a;\u8c03\u7528\u51b3\u7b56<\/td>\n<td>\u5f53\u524d\u8fd9\u4e00\u6b21\u5de5\u5177\u8c03\u7528\u662f\u5426\u5141\u8bb8\u6267\u884c<\/td>\n<td>\u6bcf\u6b21 Tool Call \u6267\u884c\u4e4b\u524d<\/td>\n<td>ALLOW\u3001DENY\u3001ASK<\/td>\n<\/tr>\n<tr>\n<td>\u7b2c\u4e09\u5c42&#xff1a;\u6570\u636e\u6743\u9650<\/td>\n<td>\u5de5\u5177\u6267\u884c\u540e\u5141\u8bb8\u8bbf\u95ee\u54ea\u4e9b\u4e1a\u52a1\u6570\u636e<\/td>\n<td>Service\u3001Mapper \u6216\u67e5\u8be2\u6761\u4ef6\u6784\u5efa\u9636\u6bb5<\/td>\n<td>\u672c\u4eba\u3001\u672c\u5730\u533a\u3001\u672c\u90e8\u95e8\u6216\u8de8\u533a\u57df\u6570\u636e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e09\u5c42\u6743\u9650\u5206\u522b\u4fdd\u62a4\u4e0d\u540c\u5bf9\u8c61&#xff1a;<\/p>\n<p>\u7b2c\u4e00\u5c42\u4fdd\u62a4\u6a21\u578b\u4e0a\u4e0b\u6587<br \/>\n\u7b2c\u4e8c\u5c42\u4fdd\u62a4\u5de5\u5177\u6267\u884c\u5165\u53e3<br \/>\n\u7b2c\u4e09\u5c42\u4fdd\u62a4\u771f\u5b9e\u4e1a\u52a1\u6570\u636e<\/p>\n<h3>\u4e09\u3001\u7b2c\u4e00\u5c42&#xff1a;\u89d2\u8272\u4e0e Agent \u7684\u5de5\u5177\u53ef\u89c1\u6027<\/h3>\n<p>\u7b2c\u4e00\u5c42\u89e3\u51b3\u7684\u662f&#xff1a;<\/p>\n<p>\u5f53\u524d\u89d2\u8272\u5bf9\u5e94\u7684 Agent&#xff0c;\u7a76\u7adf\u5e94\u4e0d\u5e94\u8be5\u62e5\u6709\u8fd9\u4e2a\u5de5\u5177&#xff1f;<\/p>\n<p>\u5047\u8bbe\u7cfb\u7edf\u4e2d\u5b58\u5728\u4e09\u4e2a\u5de5\u5177&#xff1a;<\/p>\n<p>query_inventory        \u67e5\u8be2\u5e93\u5b58<br \/>\nallocate_spare_part    \u8c03\u62e8\u914d\u4ef6<br \/>\ndelete_maintenance     \u5220\u9664\u7ef4\u4fee\u8bb0\u5f55<\/p>\n<p>\u666e\u901a\u7ef4\u4fee\u5de5\u53ef\u80fd\u53ea\u62e5\u6709 query_inventory&#xff0c;\u533a\u57df\u7ba1\u7406\u5458\u62e5\u6709\u67e5\u8be2\u548c\u8c03\u62e8\u5de5\u5177&#xff0c;\u7cfb\u7edf\u7ba1\u7406\u5458\u624d\u62e5\u6709\u5220\u9664\u5de5\u5177\u3002<\/p>\n<p>\u5728\u6a21\u578b\u63a8\u7406\u4e4b\u524d&#xff0c;\u5e94\u6839\u636e\u5f53\u524d\u7528\u6237\u7684\u89d2\u8272\u4e0e\u6743\u9650\u751f\u6210\u672c\u8f6e\u53ef\u89c1\u5de5\u5177\u96c6\u5408&#xff1a;<\/p>\n<p>\u666e\u901a\u7ef4\u4fee\u5de5&#xff1a;<br \/>\n  query_inventory<\/p>\n<p>\u533a\u57df\u7ba1\u7406\u5458&#xff1a;<br \/>\n  query_inventory<br \/>\n  allocate_spare_part<\/p>\n<p>\u7cfb\u7edf\u7ba1\u7406\u5458&#xff1a;<br \/>\n  query_inventory<br \/>\n  allocate_spare_part<br \/>\n  delete_maintenance<\/p>\n<p>\u6ca1\u6709\u6388\u6743\u7684\u5de5\u5177\u4e0d\u4ec5\u4e0d\u80fd\u6267\u884c&#xff0c;\u800c\u4e14\u4e0d\u5e94\u8be5\u628a\u4ee5\u4e0b\u5185\u5bb9\u53d1\u9001\u7ed9\u6a21\u578b&#xff1a;<\/p>\n<ul>\n<li>\u5de5\u5177\u540d\u79f0&#xff1b;<\/li>\n<li>\u5de5\u5177\u7528\u9014\u63cf\u8ff0&#xff1b;<\/li>\n<li>\u53c2\u6570\u540d\u79f0&#xff1b;<\/li>\n<li>\u53c2\u6570 JSON Schema&#xff1b;<\/li>\n<li>\u53ef\u80fd\u66b4\u9732\u5185\u90e8\u4e1a\u52a1\u80fd\u529b\u7684\u793a\u4f8b\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e00\u5c42\u5c5e\u4e8e\u201c\u80fd\u529b\u62ab\u9732\u63a7\u5236\u201d\u3002\u5b83\u80fd\u591f\u51cf\u5c11\u6a21\u578b\u4e0a\u4e0b\u6587\u566a\u58f0&#xff0c;\u4e5f\u80fd\u964d\u4f4e\u63d0\u793a\u8bcd\u6ce8\u5165\u8bf1\u5bfc\u6a21\u578b\u5c1d\u8bd5\u8d8a\u6743\u5de5\u5177\u7684\u98ce\u9669\u3002<\/p>\n<p>\u9700\u8981\u7279\u522b\u6ce8\u610f&#xff1a;\u9690\u85cf Tool Schema \u4e0d\u7b49\u4e8e\u5b8c\u6210\u4e86\u5168\u90e8\u5b89\u5168\u63a7\u5236\u3002\u6a21\u578b\u4e0d\u53ef\u89c1\u53ea\u662f\u7b2c\u4e00\u9053\u95e8&#xff0c;\u5de5\u5177\u6267\u884c\u5165\u53e3\u4ecd\u7136\u9700\u8981\u72ec\u7acb\u6821\u9a8c\u3002<\/p>\n<h3>\u56db\u3001\u7b2c\u4e8c\u5c42&#xff1a;AgentScope Permission System \u7684\u8c03\u7528\u51b3\u7b56<\/h3>\n<p>AgentScope Java \u63d0\u4f9b\u4e86 io.agentscope.core.permission \u6743\u9650\u7cfb\u7edf\u3002\u6839\u636e\u5b98\u65b9\u6587\u6863&#xff0c;Permission System \u4f1a\u62e6\u622a Agent \u7684\u6bcf\u4e00\u6b21\u5de5\u5177\u8c03\u7528&#xff0c;\u5e76\u8fd4\u56de\u4e09\u79cd\u51b3\u7b56\u4e4b\u4e00&#xff1a;<\/p>\n<ul>\n<li>ALLOW&#xff1a;\u5141\u8bb8\u6267\u884c&#xff1b;<\/li>\n<li>DENY&#xff1a;\u62d2\u7edd\u6267\u884c&#xff1b;<\/li>\n<li>ASK&#xff1a;\u6682\u505c\u6267\u884c\u5e76\u8be2\u95ee\u7528\u6237\u662f\u5426\u786e\u8ba4\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u610f\u5473\u7740\u540c\u4e00\u4e2a\u5df2\u7ecf\u5bf9\u6a21\u578b\u53ef\u89c1\u7684\u5de5\u5177&#xff0c;\u4e0d\u540c\u8c03\u7528\u4ecd\u7136\u53ef\u4ee5\u5f97\u5230\u4e0d\u540c\u7ed3\u679c\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u7ef4\u4fee\u5de5\u62e5\u6709\u914d\u4ef6\u8c03\u62e8\u5de5\u5177&#xff0c;\u4f46\u4e0d\u540c\u53c2\u6570\u4ee3\u8868\u4e0d\u540c\u98ce\u9669&#xff1a;<\/p>\n<p>\u67e5\u8be2\u672c\u5730\u533a\u914d\u4ef6\u5e93\u5b58                 \u2192 ALLOW<br \/>\n\u8c03\u62e8\u4e00\u4e2a\u666e\u901a\u914d\u4ef6                   \u2192 ASK<br \/>\n\u8de8\u533a\u57df\u8c03\u62e8\u9ad8\u4ef7\u503c\u914d\u4ef6               \u2192 DENY<\/p>\n<h4>1. Permission System \u7684\u4e09\u4e2a\u5224\u65ad\u6765\u6e90<\/h4>\n<p>\u5b98\u65b9\u6743\u9650\u7cfb\u7edf\u7efc\u5408\u4ee5\u4e0b\u4e09\u4e2a\u7ec4\u4ef6\u8fdb\u884c\u51b3\u7b56\u3002<\/p>\n<h5>Rules<\/h5>\n<p>PermissionRule \u9488\u5bf9\u5177\u4f53\u5de5\u5177\u53ca\u8c03\u7528\u6a21\u5f0f\u914d\u7f6e ALLOW\u3001DENY \u6216 ASK\u3002<\/p>\n<p>\u89c4\u5219\u53ef\u4ee5\u5728 PermissionContextState \u4e2d\u9884\u5148\u914d\u7f6e&#xff0c;\u4e5f\u53ef\u4ee5\u5728\u7528\u6237\u786e\u8ba4 ASK \u65f6\u63a5\u53d7\u5efa\u8bae\u89c4\u5219&#xff0c;\u52a8\u6001\u52a0\u5165\u5f53\u524d\u6743\u9650\u4e0a\u4e0b\u6587\u3002<\/p>\n<p><span class=\"token class-name\">PermissionContextState<\/span> permissionContext <span class=\"token operator\">&#061;<\/span><br \/>\n        <span class=\"token class-name\">PermissionContextState<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">builder<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">mode<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">PermissionMode<\/span><span class=\"token punctuation\">.<\/span><span class=\"token constant\">DEFAULT<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">addAllowRule<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                        <span class=\"token string\">&#034;query_inventory&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                        <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">PermissionRule<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                                <span class=\"token string\">&#034;query_inventory&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token keyword\">null<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token class-name\">PermissionBehavior<\/span><span class=\"token punctuation\">.<\/span><span class=\"token constant\">ALLOW<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token string\">&#034;rolePolicy&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">addAskRule<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                        <span class=\"token string\">&#034;allocate_spare_part&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                        <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">PermissionRule<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                                <span class=\"token string\">&#034;allocate_spare_part&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token keyword\">null<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token class-name\">PermissionBehavior<\/span><span class=\"token punctuation\">.<\/span><span class=\"token constant\">ASK<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token string\">&#034;rolePolicy&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">addDenyRule<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                        <span class=\"token string\">&#034;delete_maintenance&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                        <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">PermissionRule<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                                <span class=\"token string\">&#034;delete_maintenance&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token keyword\">null<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token class-name\">PermissionBehavior<\/span><span class=\"token punctuation\">.<\/span><span class=\"token constant\">DENY<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                                <span class=\"token string\">&#034;rolePolicy&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">build<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u91cc\u7684 ruleContent \u4e0d\u4e00\u5b9a\u53ea\u80fd\u5339\u914d\u5de5\u5177\u540d\u79f0\u3002\u5de5\u5177\u53ef\u4ee5\u901a\u8fc7 matchRule() \u5bf9\u5b9e\u9645\u8c03\u7528\u53c2\u6570\u8fdb\u884c\u5339\u914d&#xff0c;\u4ece\u800c\u5b9e\u73b0\u201c\u540c\u4e00\u5de5\u5177\u3001\u4e0d\u540c\u53c2\u6570\u3001\u4e0d\u540c\u51b3\u7b56\u201d\u3002<\/p>\n<h5>Mode<\/h5>\n<p>PermissionMode \u51b3\u5b9a\u6ca1\u6709\u547d\u4e2d\u663e\u5f0f\u89c4\u5219\u65f6\u7684\u9ed8\u8ba4\u884c\u4e3a\u3002<\/p>\n<table>\n<tr>Mode\u884c\u4e3a\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>DEFAULT<\/td>\n<td>\u672a\u660e\u786e\u5141\u8bb8\u7684\u8c03\u7528\u8fdb\u5165\u786e\u8ba4\u6d41\u7a0b<\/td>\n<td>\u9ed8\u8ba4\u5b89\u5168\u7b56\u7565<\/td>\n<\/tr>\n<tr>\n<td>ACCEPT_EDITS<\/td>\n<td>\u81ea\u52a8\u5141\u8bb8\u5b89\u5168\u8303\u56f4\u5185\u7684\u7f16\u8f91\u64cd\u4f5c<\/td>\n<td>\u7528\u6237\u5728\u7ebf\u7684\u5f00\u53d1\u573a\u666f<\/td>\n<\/tr>\n<tr>\n<td>EXPLORE<\/td>\n<td>\u5141\u8bb8\u53ea\u8bfb&#xff0c;\u62d2\u7edd\u5199\u64cd\u4f5c\u548c\u547d\u4ee4<\/td>\n<td>\u53ea\u8bfb\u63a2\u7d22\u3001\u89c4\u5212<\/td>\n<\/tr>\n<tr>\n<td>BYPASS<\/td>\n<td>\u9ed8\u8ba4\u653e\u884c&#xff0c;\u4f46\u62d2\u7edd\u89c4\u5219\u548c\u5371\u9669\u68c0\u67e5\u4ecd\u6709\u6548<\/td>\n<td>\u5b8c\u5168\u53ef\u4fe1\u6c99\u7bb1<\/td>\n<\/tr>\n<tr>\n<td>DONT_ASK<\/td>\n<td>\u5c06\u6240\u6709 ASK \u8f6c\u6362\u6210 DENY<\/td>\n<td>\u5b9a\u65f6\u4efb\u52a1\u3001\u65e0\u4eba\u503c\u5b88\u6d41\u7a0b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5bf9\u4e8e\u6ca1\u6709\u5b9e\u65f6\u4ea4\u4e92\u754c\u9762\u7684\u540e\u53f0\u4efb\u52a1&#xff0c;\u4e0d\u5e94\u8be5\u8ba9 ASK \u65e0\u9650\u7b49\u5f85\u3002\u6b64\u65f6\u53ef\u4ee5\u4f7f\u7528 DONT_ASK&#xff0c;\u628a\u9700\u8981\u786e\u8ba4\u7684\u8c03\u7528\u5b89\u5168\u964d\u7ea7\u4e3a\u62d2\u7edd\u3002<\/p>\n<h5>Built-in Checks<\/h5>\n<p>\u5de5\u5177\u8fd8\u53ef\u4ee5\u901a\u8fc7 ToolBase#checkPermissions&#xff0c;\u57fa\u4e8e\u672c\u6b21\u771f\u5b9e\u8f93\u5165\u8fdb\u884c\u52a8\u6001\u98ce\u9669\u5206\u6790\u3002<\/p>\n<p>\u5b83\u9002\u5408\u68c0\u67e5\u65e0\u6cd5\u4ec5\u9760\u9759\u6001\u89d2\u8272\u8868\u8fbe\u7684\u98ce\u9669&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\u64cd\u4f5c\u76ee\u6807\u662f\u5426\u5c5e\u4e8e\u5371\u9669\u76ee\u5f55&#xff1b;<\/li>\n<li>\u8c03\u62e8\u6570\u91cf\u662f\u5426\u8d85\u8fc7\u9608\u503c&#xff1b;<\/li>\n<li>\u662f\u5426\u6d89\u53ca\u9ad8\u4ef7\u503c\u914d\u4ef6&#xff1b;<\/li>\n<li>\u76ee\u6807\u8bbe\u5907\u662f\u5426\u5904\u4e8e\u9501\u5b9a\u72b6\u6001&#xff1b;<\/li>\n<li>\u5f53\u524d\u8c03\u7528\u662f\u5426\u4f1a\u4ea7\u751f\u4e0d\u53ef\u9006\u526f\u4f5c\u7528\u3002<\/li>\n<\/ul>\n<p>\u5b98\u65b9\u6587\u6863\u5f3a\u8c03&#xff0c;\u5de5\u5177\u81ea\u8eab\u7684\u5371\u9669\u68c0\u67e5\u5c5e\u4e8e\u8fd0\u884c\u65f6\u68c0\u67e5&#xff0c;\u4e0d\u5e94\u88ab\u666e\u901a\u89c4\u5219\u6216\u6a21\u5f0f\u7ed5\u8fc7\u3002<\/p>\n<h4>2. ASK \u4e0d\u662f\u5f39\u4e00\u4e2a\u786e\u8ba4\u6846\u90a3\u4e48\u7b80\u5355<\/h4>\n<p>ASK \u8868\u793a Agent \u7684\u672c\u6b21\u6267\u884c\u88ab\u6302\u8d77&#xff0c;\u7cfb\u7edf\u9700\u8981\u4fdd\u5b58&#xff1a;<\/p>\n<ul>\n<li>\u7528\u6237\u8eab\u4efd&#xff1b;<\/li>\n<li>\u4f1a\u8bdd\u8eab\u4efd&#xff1b;<\/li>\n<li>Tool Call \u7f16\u53f7&#xff1b;<\/li>\n<li>\u5de5\u5177\u540d\u79f0&#xff1b;<\/li>\n<li>\u5de5\u5177\u53c2\u6570&#xff1b;<\/li>\n<li>\u98ce\u9669\u8bf4\u660e&#xff1b;<\/li>\n<li>\u5efa\u8bae\u89c4\u5219&#xff1b;<\/li>\n<li>\u786e\u8ba4\u6709\u6548\u671f\u3002<\/li>\n<\/ul>\n<p>\u7528\u6237\u786e\u8ba4\u65f6&#xff0c;\u5fc5\u987b\u6062\u590d\u539f\u6765\u7684\u8c03\u7528&#xff0c;\u800c\u4e0d\u662f\u91cd\u65b0\u8ba9\u6a21\u578b\u751f\u6210\u4e00\u6b21\u5de5\u5177\u53c2\u6570&#xff0c;\u5426\u5219\u786e\u8ba4\u7684\u5185\u5bb9\u548c\u6700\u7ec8\u6267\u884c\u7684\u5185\u5bb9\u53ef\u80fd\u4e0d\u4e00\u81f4\u3002<\/p>\n<p>\u786e\u8ba4\u9875\u9762\u8fd8\u5e94\u8be5\u660e\u786e\u5c55\u793a&#xff1a;<\/p>\n<p>\u51c6\u5907\u6267\u884c\u7684\u5de5\u5177&#xff1a;allocate_spare_part<br \/>\n\u8c03\u62e8\u914d\u4ef6&#xff1a;\u667a\u80fd\u9a6c\u6876\u4e3b\u63a7\u677f<br \/>\n\u8c03\u62e8\u6570\u91cf&#xff1a;2<br \/>\n\u6765\u6e90\u533a\u57df&#xff1a;\u534e\u4e1c\u4e00\u533a<br \/>\n\u76ee\u6807\u533a\u57df&#xff1a;\u534e\u4e1c\u4e09\u533a<br \/>\n\u98ce\u9669\u63d0\u793a&#xff1a;\u8de8\u533a\u57df\u8c03\u62e8<\/p>\n<p>\u7528\u6237\u786e\u8ba4\u7684\u662f\u4e00\u7b14\u786e\u5b9a\u7684\u64cd\u4f5c&#xff0c;\u800c\u4e0d\u662f\u6a21\u7cca\u7684\u201c\u662f\u5426\u5141\u8bb8 Agent \u7ee7\u7eed\u201d\u3002<\/p>\n<h3>\u4e94\u3001\u7b2c\u4e09\u5c42&#xff1a;\u5de5\u5177\u80cc\u540e\u7684\u4e1a\u52a1\u6570\u636e\u6743\u9650<\/h3>\n<p>\u7b2c\u4e09\u5c42\u89e3\u51b3\u7684\u662f&#xff1a;<\/p>\n<p>\u7528\u6237\u62e5\u6709\u8fd9\u4e2a\u5de5\u5177&#xff0c;\u4e5f\u5141\u8bb8\u6267\u884c\u8fd9\u6b21\u8c03\u7528&#xff0c;\u4f46\u4ed6\u6700\u7ec8\u53ef\u4ee5\u770b\u5230\u54ea\u4e9b\u6570\u636e&#xff1f;<\/p>\n<p>\u4ee5\u5e93\u5b58\u67e5\u8be2\u4e3a\u4f8b&#xff0c;\u666e\u901a\u7ef4\u4fee\u5de5\u548c\u533a\u57df\u7ba1\u7406\u5458\u90fd\u62e5\u6709&#xff1a;<\/p>\n<p>inventory:stock:query<\/p>\n<p>\u4ed6\u4eec\u4e5f\u90fd\u53ef\u80fd\u88ab Permission System \u5224\u5b9a\u4e3a ALLOW&#xff0c;\u4f46\u6570\u636e\u8303\u56f4\u5e76\u4e0d\u76f8\u540c&#xff1a;<\/p>\n<p>\u666e\u901a\u7ef4\u4fee\u5de5&#xff1a;<br \/>\n  \u53ea\u80fd\u67e5\u8be2\u6240\u5c5e\u5730\u533a\u7684\u5e93\u5b58<\/p>\n<p>\u533a\u57df\u7ba1\u7406\u5458&#xff1a;<br \/>\n  \u53ef\u4ee5\u67e5\u8be2\u7ba1\u8f96\u533a\u57df\u5185\u591a\u4e2a\u5730\u533a\u7684\u5e93\u5b58<\/p>\n<p>\u603b\u90e8\u7ba1\u7406\u5458&#xff1a;<br \/>\n  \u53ef\u4ee5\u67e5\u8be2\u5168\u56fd\u5e93\u5b58<\/p>\n<p>\u56e0\u6b64&#xff0c;\u6570\u636e\u6743\u9650\u5fc5\u987b\u5728\u4e1a\u52a1 Service \u6216\u6570\u636e\u5e93\u67e5\u8be2\u6761\u4ef6\u4e2d\u843d\u5b9e&#xff1a;<\/p>\n<p><span class=\"token class-name\">Set<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">Long<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> readableRegionIds <span class=\"token operator\">&#061;<\/span><br \/>\n        dataScopeService<span class=\"token punctuation\">.<\/span><span class=\"token function\">getReadableRegionIds<\/span><span class=\"token punctuation\">(<\/span>currentUserId<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">return<\/span> inventoryService<span class=\"token punctuation\">.<\/span><span class=\"token function\">getInventory<\/span><span class=\"token punctuation\">(<\/span><br \/>\n        request<span class=\"token punctuation\">.<\/span><span class=\"token function\">getProductId<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        readableRegionIds<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u67e5\u8be2\u6761\u4ef6\u5fc5\u987b\u53d6\u81ea\u670d\u52a1\u7aef\u53ef\u4fe1\u8eab\u4efd&#xff0c;\u800c\u4e0d\u80fd\u76f4\u63a5\u76f8\u4fe1\u5927\u6a21\u578b\u751f\u6210\u7684 regionId\u3002<\/p>\n<p>\u9519\u8bef\u65b9\u5f0f&#xff1a;<\/p>\n<p><span class=\"token keyword\">return<\/span> inventoryMapper<span class=\"token punctuation\">.<\/span><span class=\"token function\">selectByRegionId<\/span><span class=\"token punctuation\">(<\/span>toolRequest<span class=\"token punctuation\">.<\/span><span class=\"token function\">getRegionId<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u6b63\u786e\u601d\u8def&#xff1a;<\/p>\n<p>\u6a21\u578b\u4f20\u5165\u76ee\u6807\u533a\u57df<br \/>\n  \u2192 \u670d\u52a1\u7aef\u8ba1\u7b97\u5f53\u524d\u7528\u6237\u53ef\u8bbf\u95ee\u533a\u57df<br \/>\n  \u2192 \u5224\u65ad\u76ee\u6807\u533a\u57df\u662f\u5426\u5728\u6388\u6743\u96c6\u5408\u5185<br \/>\n  \u2192 \u5e26\u6570\u636e\u8303\u56f4\u6761\u4ef6\u67e5\u8be2<\/p>\n<p>\u5373\u4f7f\u6a21\u578b\u4f2a\u9020\u4e86\u5176\u4ed6\u533a\u57df\u7f16\u53f7&#xff0c;\u4e5f\u65e0\u6cd5\u8d8a\u8fc7\u670d\u52a1\u7aef\u7684\u6570\u636e\u8303\u56f4\u9650\u5236\u3002<\/p>\n<h3>\u516d\u3001\u4e09\u5c42\u6743\u9650\u5982\u4f55\u534f\u540c<\/h3>\n<p>\u4ee5\u201c\u533a\u57df\u7ba1\u7406\u5458\u8de8\u533a\u57df\u8c03\u62e8\u914d\u4ef6\u201d\u4e3a\u4f8b&#xff1a;<\/p>\n<p>\u7b2c\u4e00\u5c42&#xff1a;\u5de5\u5177\u53ef\u89c1\u6027<br \/>\n  \u533a\u57df\u7ba1\u7406\u5458\u62e5\u6709 allocate_spare_part<br \/>\n  \u2192 Tool Schema \u53ef\u4ee5\u8fdb\u5165\u6a21\u578b\u4e0a\u4e0b\u6587<\/p>\n<p>\u7b2c\u4e8c\u5c42&#xff1a;\u8c03\u7528\u51b3\u7b56<br \/>\n  \u5f53\u524d\u8c03\u7528\u5c5e\u4e8e\u8de8\u533a\u57df\u8c03\u62e8<br \/>\n  \u2192 Permission System \u8fd4\u56de ASK<br \/>\n  \u2192 \u7528\u6237\u786e\u8ba4\u540e\u624d\u7ee7\u7eed<\/p>\n<p>\u7b2c\u4e09\u5c42&#xff1a;\u6570\u636e\u6743\u9650<br \/>\n  \u6821\u9a8c\u6765\u6e90\u533a\u57df\u548c\u76ee\u6807\u533a\u57df\u662f\u5426\u90fd\u5728\u7ba1\u7406\u5458\u7ba1\u8f96\u8303\u56f4<br \/>\n  \u2192 \u5728\u8303\u56f4\u5185\u6267\u884c<br \/>\n  \u2192 \u8d85\u51fa\u8303\u56f4\u62d2\u7edd<\/p>\n<p>\u4efb\u4f55\u4e00\u5c42\u5931\u8d25&#xff0c;\u90fd\u5fc5\u987b\u505c\u6b62\u8c03\u7528&#xff1a;<\/p>\n<p>Tool \u4e0d\u53ef\u89c1<br \/>\n  OR Permission &#061; DENY<br \/>\n  OR \u7528\u6237\u62d2\u7edd ASK<br \/>\n  OR \u6570\u636e\u8303\u56f4\u4e0d\u6ee1\u8db3<br \/>\n  \u2192 \u4e0d\u6267\u884c\u5de5\u5177<\/p>\n<h3>\u4e03\u3001\u89d2\u8272\u6743\u9650\u77e9\u9635\u793a\u4f8b<\/h3>\n<table>\n<tr>\u89d2\u8272Tool SchemaPermission \u51b3\u7b56\u6570\u636e\u8303\u56f4<\/tr>\n<tbody>\n<tr>\n<td>\u4e09\u65b9\u7ef4\u4fee\u5de5<\/td>\n<td>\u67e5\u8be2\u7ef4\u4fee\u624b\u518c\u3001\u67e5\u8be2\u672c\u4eba\u7ef4\u4fee\u5355<\/td>\n<td>\u67e5\u8be2 ALLOW&#xff0c;\u5199\u64cd\u4f5c DENY<\/td>\n<td>\u672c\u4eba\u88ab\u6d3e\u53d1\u7684\u5de5\u5355<\/td>\n<\/tr>\n<tr>\n<td>\u666e\u901a\u7ef4\u4fee\u5de5<\/td>\n<td>\u67e5\u8be2\u5e93\u5b58\u3001\u7533\u8bf7\u914d\u4ef6<\/td>\n<td>\u67e5\u8be2 ALLOW&#xff0c;\u7533\u8bf7 ASK<\/td>\n<td>\u6240\u5c5e\u5730\u533a<\/td>\n<\/tr>\n<tr>\n<td>\u533a\u57df\u7ba1\u7406\u5458<\/td>\n<td>\u67e5\u8be2\u5e93\u5b58\u3001\u914d\u4ef6\u8c03\u62e8<\/td>\n<td>\u67e5\u8be2 ALLOW&#xff0c;\u8de8\u533a\u8c03\u62e8 ASK<\/td>\n<td>\u7ba1\u8f96\u533a\u57df<\/td>\n<\/tr>\n<tr>\n<td>\u603b\u90e8\u7ba1\u7406\u5458<\/td>\n<td>\u5168\u90e8\u7ba1\u7406\u5de5\u5177<\/td>\n<td>\u666e\u901a\u64cd\u4f5c ALLOW&#xff0c;\u9ad8\u98ce\u9669\u64cd\u4f5c ASK<\/td>\n<td>\u5168\u56fd<\/td>\n<\/tr>\n<tr>\n<td>\u65e0\u4eba\u503c\u5b88\u4efb\u52a1<\/td>\n<td>\u4ec5\u767d\u540d\u5355\u5de5\u5177<\/td>\n<td>DONT_ASK&#xff0c;\u5176\u4f59\u62d2\u7edd<\/td>\n<td>\u4efb\u52a1\u914d\u7f6e\u7684\u6570\u636e\u8303\u56f4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u4e2a\u77e9\u9635\u4e2d\u7684\u4e09\u5217\u4e0d\u80fd\u5408\u5e76&#xff1a;<\/p>\n<ul>\n<li>Tool Schema \u51b3\u5b9a\u6a21\u578b\u201c\u77e5\u4e0d\u77e5\u9053\u6709\u8fd9\u4e2a\u80fd\u529b\u201d&#xff1b;<\/li>\n<li>Permission \u51b3\u5b9a\u672c\u6b21\u8c03\u7528\u201c\u80fd\u4e0d\u80fd\u505a\u3001\u662f\u5426\u8981\u95ee\u201d&#xff1b;<\/li>\n<li>\u6570\u636e\u8303\u56f4\u51b3\u5b9a\u6700\u7ec8\u201c\u80fd\u64cd\u4f5c\u54ea\u4e9b\u4e1a\u52a1\u5bf9\u8c61\u201d\u3002<\/li>\n<\/ul>\n<h3>\u516b\u3001\u5de5\u7a0b\u843d\u5730\u65f6\u6700\u5bb9\u6613\u8e29\u7684\u5751<\/h3>\n<h4>1. \u53ea\u9690\u85cf\u5de5\u5177&#xff0c;\u4e0d\u6821\u9a8c\u6267\u884c\u5165\u53e3<\/h4>\n<p>\u653b\u51fb\u8005\u53ef\u80fd\u7ed5\u8fc7\u6a21\u578b\u5165\u53e3\u76f4\u63a5\u6784\u9020 Tool Call&#xff0c;\u56e0\u6b64\u6267\u884c\u9636\u6bb5\u4ecd\u9700\u6743\u9650\u63a7\u5236\u3002<\/p>\n<h4>2. \u53ea\u505a ALLOW \/ DENY&#xff0c;\u5ffd\u7565 ASK<\/h4>\n<p>\u5b8c\u5168\u653e\u884c\u548c\u5b8c\u5168\u62d2\u7edd\u4e4b\u95f4\u9700\u8981\u6709\u4eba\u673a\u534f\u540c\u8fb9\u754c\u3002\u914d\u4ef6\u8c03\u62e8\u3001\u5220\u9664\u8bb0\u5f55\u3001\u6279\u91cf\u4fee\u6539\u7b49\u64cd\u4f5c\u66f4\u9002\u5408 ASK\u3002<\/p>\n<h4>3. \u628a\u6570\u636e\u6743\u9650\u5199\u8fdb Prompt<\/h4>\n<p>Prompt \u53ea\u80fd\u63d0\u793a\u6a21\u578b&#xff0c;\u4e0d\u662f\u5b89\u5168\u8fb9\u754c\u3002\u5730\u533a\u3001\u90e8\u95e8\u3001\u7528\u6237\u7b49\u6570\u636e\u8303\u56f4\u5fc5\u987b\u7531\u540e\u7aef\u8eab\u4efd\u548c\u67e5\u8be2\u6761\u4ef6\u51b3\u5b9a\u3002<\/p>\n<h4>4. \u5171\u4eab\u53ef\u53d8\u6743\u9650\u4e0a\u4e0b\u6587<\/h4>\n<p>\u5982\u679c Agent \u662f\u5355\u4f8b&#xff0c;\u4e0d\u80fd\u628a\u67d0\u4e2a\u7528\u6237\u7684\u52a8\u6001\u6743\u9650\u76f4\u63a5\u4fee\u6539\u5230\u5168\u5c40\u5171\u4eab Toolkit \u6216\u5168\u5c40\u89c4\u5219\u96c6\u5408\u4e2d&#xff0c;\u5426\u5219\u5e76\u53d1\u8bf7\u6c42\u53ef\u80fd\u4e32\u6743\u3002<\/p>\n<p>\u6743\u9650\u72b6\u6001\u81f3\u5c11\u5e94\u6309\u7528\u6237\u548c\u4f1a\u8bdd\u9694\u79bb&#xff1a;<\/p>\n<p>(userId, sessionId) \u2192 PermissionContextState<\/p>\n<h4>5. ASK \u6062\u590d\u65f6\u91cd\u65b0\u751f\u6210\u53c2\u6570<\/h4>\n<p>\u786e\u8ba4\u524d\u540e\u7684\u5de5\u5177\u540d\u79f0\u548c\u53c2\u6570\u5fc5\u987b\u4e00\u81f4\u3002\u5efa\u8bae\u4fdd\u5b58\u539f\u59cb Tool Call&#xff0c;\u5e76\u5728\u786e\u8ba4\u540e\u6062\u590d\u6267\u884c\u3002<\/p>\n<h4>6. \u628a BYPASS \u5f53\u4f5c\u751f\u4ea7\u9ed8\u8ba4\u503c<\/h4>\n<p>BYPASS \u66f4\u9002\u5408\u5b8c\u5168\u53ef\u4fe1\u7684\u9694\u79bb\u73af\u5883\u3002\u751f\u4ea7\u7cfb\u7edf\u5e94\u4ece\u6700\u5c0f\u6743\u9650\u5f00\u59cb&#xff0c;\u6839\u636e\u660e\u786e\u89c4\u5219\u9010\u6b65\u653e\u884c\u3002<\/p>\n<h3>\u4e5d\u3001\u63a8\u8350\u7684\u5b89\u5168\u539f\u5219<\/h3>\n<p>\u53ef\u4ee5\u7528\u4e00\u53e5\u8bdd\u6982\u62ec\u4e09\u5c42\u5de5\u5177\u6743\u9650&#xff1a;<\/p>\n<p>\u6a21\u578b\u53ea\u770b\u89c1\u5e94\u8be5\u770b\u89c1\u7684\u5de5\u5177&#xff0c;\u6bcf\u6b21\u8c03\u7528\u90fd\u7ecf\u8fc7\u660e\u786e\u51b3\u7b56&#xff0c;\u5de5\u5177\u6700\u7ec8\u53ea\u80fd\u8bbf\u95ee\u6388\u6743\u8303\u56f4\u5185\u7684\u6570\u636e\u3002<\/p>\n<p>\u843d\u5730\u65f6\u5efa\u8bae\u9075\u5faa&#xff1a;<\/p>\n<li>\u9ed8\u8ba4\u4e0d\u66b4\u9732\u672a\u6388\u6743 Tool Schema\u3002<\/li>\n<li>\u9ed8\u8ba4\u4f7f\u7528\u5b89\u5168\u7684 Permission Mode\u3002<\/li>\n<li>\u9ad8\u98ce\u9669\u5199\u64cd\u4f5c\u4f18\u5148\u4f7f\u7528 ASK\u3002<\/li>\n<li>\u65e0\u4eba\u503c\u5b88\u573a\u666f\u5c06 ASK \u964d\u7ea7\u4e3a DENY\u3002<\/li>\n<li>\u6570\u636e\u6743\u9650\u5728 Service \u548c SQL \u67e5\u8be2\u4e2d\u5f3a\u5236\u6267\u884c\u3002<\/li>\n<li>\u6240\u6709\u8eab\u4efd\u548c\u6570\u636e\u8303\u56f4\u5747\u4ece\u670d\u52a1\u7aef\u53ef\u4fe1\u4e0a\u4e0b\u6587\u83b7\u53d6\u3002<\/li>\n<li>\u8bb0\u5f55 ALLOW \/ DENY \/ ASK\u3001\u7528\u6237\u786e\u8ba4\u548c\u6570\u636e\u8303\u56f4\u5ba1\u8ba1\u65e5\u5fd7\u3002<\/li>\n<li>\u5355\u4f8b Agent \u4e0b\u7684\u6743\u9650\u72b6\u6001\u5fc5\u987b\u6309\u7528\u6237\u4e0e\u4f1a\u8bdd\u9694\u79bb\u3002<\/li>\n<h3>\u5341\u3001\u603b\u7ed3<\/h3>\n<p>Agent \u5de5\u5177\u6743\u9650\u4e0d\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u201c\u80fd\u4e0d\u80fd\u8c03\u7528\u201d\u95ee\u9898&#xff0c;\u800c\u662f\u4e00\u6761\u5b8c\u6574\u7684\u5b89\u5168\u94fe\u8def&#xff1a;<\/p>\n<p>\u89d2\u8272\u4e0e Agent \u5de5\u5177\u6388\u6743<br \/>\n  \u2192 Tool Schema \u53ef\u89c1\u6027<br \/>\n  \u2192 Permission System \u8c03\u7528\u51b3\u7b56<br \/>\n  \u2192 \u7528\u6237\u786e\u8ba4<br \/>\n  \u2192 \u4e1a\u52a1\u6570\u636e\u6743\u9650<br \/>\n  \u2192 \u5ba1\u8ba1\u8bb0\u5f55<\/p>\n<p>\u7b2c\u4e00\u5c42\u8ba9\u65e0\u6743\u9650\u5de5\u5177\u4e0d\u8fdb\u5165\u6a21\u578b\u4e0a\u4e0b\u6587&#xff1b;\u7b2c\u4e8c\u5c42\u4f7f\u7528 AgentScope Permission System \u5bf9\u6bcf\u6b21\u8c03\u7528\u6267\u884c ALLOW \/ DENY \/ ASK \u51b3\u7b56&#xff1b;\u7b2c\u4e09\u5c42\u5728\u771f\u5b9e\u4e1a\u52a1\u67e5\u8be2\u4e2d\u843d\u5b9e\u5730\u533a\u3001\u90e8\u95e8\u3001\u7528\u6237\u7b49\u6570\u636e\u8303\u56f4\u3002<\/p>\n<p>\u4e09\u5c42\u5171\u540c\u5de5\u4f5c&#xff0c;\u624d\u80fd\u771f\u6b63\u5b9e\u73b0\u5de5\u5177\u80fd\u529b\u6700\u5c0f\u5316\u3001\u8c03\u7528\u8fc7\u7a0b\u53ef\u63a7\u5236\u3001\u4e1a\u52a1\u6570\u636e\u4e0d\u8d8a\u6743\u3002<\/p>\n<h3>\u53c2\u8003\u8d44\u6599<\/h3>\n<li>AgentScope Java&#xff1a;Permission System<\/li>\n<li>\u82e5\u4f9d\u6846\u67b6\u548c\u963f\u91cc AgentScope \u7684\u6743\u9650\u5c01\u88c5<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743&#xff1a;AgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf \u524d\u7f6e\u9605\u8bfb&#xff1a;\u300a\u82e5\u4f9d\u6846\u67b6\u548c\u963f\u91cc AgentScope \u7684\u6743\u9650\u5c01\u88c5\u300b \u4e0a\u4e00\u7bc7\u4e3b\u8981\u8ba8\u8bba\u5982\u4f55\u628a\u82e5\u4f9d\u7684\u89d2\u8272\u6743\u9650\u63a5\u5165 Agent \u5de5\u5177\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u89e3\u51b3\u201c\u65e0\u6743\u9650\u7528\u6237\u4e0d\u5e94\u8be5\u5728\u6a21\u578b\u4e0a\u4e0b\u6587\u4e2d\u770b\u5230 Tool Schema\u201d&#xff0c;\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u53ea\u4f9d\u8d56\u5de5\u5177\u6267\u884c\u9636\u6bb5\u7684 PreAuthorize\u3002\u672c\u6587\u7ee7\u7eed\u5411\u4e0b\u62c6\u89e3&#xff0c;\u7ed9\u51fa\u4e00\u5957\u8986\u76d6\u5de5\u5177\u53ef\u89c1\u6027\u3001\u8c03\u7528\u51b3\u7b56\u548c\u4e1a\u52a1\u6570\u636e\u8303\u56f4\u7684\u4e09\u5c42\u6743\u9650\u6a21\u578b\u3002 \u4e00<\/p>\n","protected":false},"author":2,"featured_media":91121,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[84,100],"topic":[],"class_list":["post-91123","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-android","tag-100"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf - \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\/91123.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743&#xff1a;AgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf \u524d\u7f6e\u9605\u8bfb&#xff1a;\u300a\u82e5\u4f9d\u6846\u67b6\u548c\u963f\u91cc AgentScope \u7684\u6743\u9650\u5c01\u88c5\u300b \u4e0a\u4e00\u7bc7\u4e3b\u8981\u8ba8\u8bba\u5982\u4f55\u628a\u82e5\u4f9d\u7684\u89d2\u8272\u6743\u9650\u63a5\u5165 Agent \u5de5\u5177\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u89e3\u51b3\u201c\u65e0\u6743\u9650\u7528\u6237\u4e0d\u5e94\u8be5\u5728\u6a21\u578b\u4e0a\u4e0b\u6587\u4e2d\u770b\u5230 Tool Schema\u201d&#xff0c;\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u53ea\u4f9d\u8d56\u5de5\u5177\u6267\u884c\u9636\u6bb5\u7684 PreAuthorize\u3002\u672c\u6587\u7ee7\u7eed\u5411\u4e0b\u62c6\u89e3&#xff0c;\u7ed9\u51fa\u4e00\u5957\u8986\u76d6\u5de5\u5177\u53ef\u89c1\u6027\u3001\u8c03\u7528\u51b3\u7b56\u548c\u4e1a\u52a1\u6570\u636e\u8303\u56f4\u7684\u4e09\u5c42\u6743\u9650\u6a21\u578b\u3002 \u4e00\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/91123.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-06T16:08:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260806160851-6a74b193eed94.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=\"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\/91123.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/91123.html\",\"name\":\"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-06T16:08:56+00:00\",\"dateModified\":\"2026-08-06T16:08:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/91123.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/91123.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/91123.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf\"}]},{\"@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":"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf - \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\/91123.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743&#xff1a;AgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf \u524d\u7f6e\u9605\u8bfb&#xff1a;\u300a\u82e5\u4f9d\u6846\u67b6\u548c\u963f\u91cc AgentScope \u7684\u6743\u9650\u5c01\u88c5\u300b \u4e0a\u4e00\u7bc7\u4e3b\u8981\u8ba8\u8bba\u5982\u4f55\u628a\u82e5\u4f9d\u7684\u89d2\u8272\u6743\u9650\u63a5\u5165 Agent \u5de5\u5177\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u89e3\u51b3\u201c\u65e0\u6743\u9650\u7528\u6237\u4e0d\u5e94\u8be5\u5728\u6a21\u578b\u4e0a\u4e0b\u6587\u4e2d\u770b\u5230 Tool Schema\u201d&#xff0c;\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u53ea\u4f9d\u8d56\u5de5\u5177\u6267\u884c\u9636\u6bb5\u7684 PreAuthorize\u3002\u672c\u6587\u7ee7\u7eed\u5411\u4e0b\u62c6\u89e3&#xff0c;\u7ed9\u51fa\u4e00\u5957\u8986\u76d6\u5de5\u5177\u53ef\u89c1\u6027\u3001\u8c03\u7528\u51b3\u7b56\u548c\u4e1a\u52a1\u6570\u636e\u8303\u56f4\u7684\u4e09\u5c42\u6743\u9650\u6a21\u578b\u3002 \u4e00","og_url":"https:\/\/www.wsisp.com\/helps\/91123.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-06T16:08:56+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260806160851-6a74b193eed94.png"}],"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\/91123.html","url":"https:\/\/www.wsisp.com\/helps\/91123.html","name":"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-06T16:08:56+00:00","dateModified":"2026-08-06T16:08:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/91123.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/91123.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/91123.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4ece\u5de5\u5177\u4e0d\u53ef\u89c1\u5230\u6570\u636e\u4e0d\u8d8a\u6743\uff1aAgentScope\u5de5\u5177\u6743\u9650\u7684\u4e09\u5c42\u9632\u7ebf"}]},{"@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\/91123","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=91123"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/91123\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/91121"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=91123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=91123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=91123"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=91123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}