{"id":85722,"date":"2026-07-27T21:41:35","date_gmt":"2026-07-27T13:41:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/85722.html"},"modified":"2026-07-27T21:41:35","modified_gmt":"2026-07-27T13:41:35","slug":"%e6%b2%99%e7%ae%b1%e7%ae%a1%e7%90%86%e5%a5%97%e4%bb%b6%e8%ae%a9-ai-agent-%e6%8b%a5%e6%9c%89%e5%8f%af%e8%a7%82%e6%b5%8b%e7%9a%84%e4%bb%a3%e7%a0%81%e6%89%a7%e8%a1%8c%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/85722.html","title":{"rendered":"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883"},"content":{"rendered":"<p>\u4e00\u5957\u300cAgent \u5e72\u6d3b,\u4eba\u7c7b\u56f4\u89c2\u300d\u7684\u5b8c\u6574\u6c99\u7bb1\u751f\u6001 \u2014\u2014 SDK \u8d1f\u8d23\u521b\u5efa\u548c\u64cd\u4f5c,Console \u8d1f\u8d23\u89c2\u5bdf\u548c\u7ba1\u7406,\u4e24\u8005\u901a\u8fc7\u5171\u4eab\u5386\u53f2\u6570\u636e\u5e93\u65e0\u7f1d\u534f\u4f5c\u3002 \u914d\u5957\u7ec4\u4ef6\u5f00\u6e90\u5730\u5740: agent-sandbox-backends:https:\/\/gitee.com\/rainbow-zhou\/agent-sandbox-backend.git sandbox-web:https:\/\/gitee.com\/rainbow-zhou\/sandbox-web.git<\/p>\n<h3>\u4e3a\u4ec0\u4e48\u9700\u8981\u5b83?<\/h3>\n<p>\u5f53 AI Agent(\u5982 Deep Agents)\u5f00\u59cb\u5728\u6c99\u7bb1\u91cc\u5199\u4ee3\u7801\u3001\u8dd1\u547d\u4ee4\u3001\u6539\u6587\u4ef6\u65f6,\u4e00\u4e2a\u5173\u952e\u95ee\u9898\u6d6e\u73b0:\u4eba\u7c7b\u600e\u4e48\u77e5\u9053 Agent \u5230\u5e95\u505a\u4e86\u4ec0\u4e48?<\/p>\n<p>\u4f20\u7edf\u65b9\u6848\u8981\u4e48\u8ba9 Agent \u81ea\u8bf4\u81ea\u8bdd(\u9ed1\u76d2),\u8981\u4e48\u8ba9\u4eba\u624b\u52a8\u7ffb\u65e5\u5fd7(\u75db\u82e6)\u3002\u66f4\u68d8\u624b\u7684\u662f,\u5982\u679c\u51fa\u4e86\u95ee\u9898\u2014\u2014\u6587\u4ef6\u88ab\u8986\u76d6\u4e86\u3001\u547d\u4ee4\u8dd1\u98de\u4e86\u3001\u6c99\u7bb1\u6302\u4e86\u2014\u2014\u4f60\u8fde\u73b0\u573a\u90fd\u770b\u4e0d\u5230\u3002<\/p>\n<p>OpenSandbox \u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6 \u6b63\u662f\u4e3a\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u800c\u751f:<\/p>\n<ul>\n<li>\n<p>agent-sandbox-backends \u2014\u2014 \u7ed9 Agent \u7528\u7684 SDK,\u4e00\u6761\u547d\u4ee4\u521b\u5efa\u6c99\u7bb1\u3001\u6267\u884c\u64cd\u4f5c\u3001\u81ea\u52a8\u8bb0\u5f55\u5b8c\u6574\u5386\u53f2<\/p>\n<\/li>\n<li>\n<p>sandbox-console \u2014\u2014 \u7ed9\u4eba\u7528\u7684 Web \u63a7\u5236\u53f0,\u6d4f\u89c8\u5668\u91cc\u67e5\u770b\u6587\u4ef6\u3001\u6267\u884c\u547d\u4ee4\u3001\u56de\u6eaf\u64cd\u4f5c\u5386\u53f2<\/p>\n<\/li>\n<\/ul>\n<p>\u4e24\u8005\u4e0d\u76f4\u63a5\u901a\u4fe1,\u800c\u662f\u901a\u8fc7\u6c99\u7bb1\u5185\u7684\u5171\u4eab SQLite \u5386\u53f2\u6570\u636e\u5e93\u534f\u4f5c\u3002Agent \u5199\u5165\u64cd\u4f5c\u8bb0\u5f55,Console \u540c\u6b65\u5e76\u5c55\u793a,\u5f62\u6210\u7edf\u4e00\u7684\u65f6\u95f4\u7ebf\u3002<\/p>\n<h3>\u5b83\u80fd\u505a\u4ec0\u4e48?<\/h3>\n<h4>Console \u7684\u4e94\u5927\u6838\u5fc3\u529f\u80fd<\/h4>\n<table>\n<tr>\u529f\u80fd\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u6c99\u7bb1\u7ba1\u7406<\/td>\n<td>\u521b\u5efa\u3001\u5217\u8868\u3001\u6682\u505c\u3001\u6062\u590d\u3001\u5220\u9664\u6c99\u7bb1<\/td>\n<\/tr>\n<tr>\n<td>\u6587\u4ef6\u6d4f\u89c8\u5668<\/td>\n<td>\u6d4f\u89c8\u3001\u8bfb\u53d6\u3001\u7f16\u8f91(Monaco Editor)\u3001\u4e0a\u4f20\u3001\u4e0b\u8f7d<\/td>\n<\/tr>\n<tr>\n<td>\u547d\u4ee4\u6267\u884c\u5668<\/td>\n<td>\u6267\u884c\u547d\u4ee4,SSE \u5b9e\u65f6\u6d41\u5f0f\u8f93\u51fa stdout\/stderr<\/td>\n<\/tr>\n<tr>\n<td>\u5386\u53f2\u65f6\u95f4\u7ebf<\/td>\n<td>Agent \u548c Console \u7684\u6240\u6709\u64cd\u4f5c\u7edf\u4e00\u5c55\u793a,\u53ef\u8fc7\u6ee4\u3001\u53ef\u4e0b\u94bb<\/td>\n<\/tr>\n<tr>\n<td>\u8fde\u63a5\u7ba1\u7406<\/td>\n<td>\u6ce8\u518c\u591a\u4e2a OpenSandbox \u5b9e\u4f8b,\u52a0\u5bc6\u5b58\u50a8\u51ed\u8bc1,\u4e00\u952e\u6d4b\u8bd5\u8fde\u901a\u6027<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>SDK \u7684\u6838\u5fc3\u80fd\u529b<\/h4>\n<ul>\n<li>\n<p>\u6c99\u7bb1\u751f\u547d\u5468\u671f:\u521b\u5efa\u3001\u8fde\u63a5\u3001\u6682\u505c\u3001\u6062\u590d\u3001\u5220\u9664\u3001TTL \u81ea\u52a8\u7eed\u671f<\/p>\n<\/li>\n<li>\n<p>\u6587\u4ef6\u64cd\u4f5c:\u8bfb\u5199\u3001\u7f16\u8f91(\u4e50\u89c2\u5e76\u53d1 CAS)\u3001\u5220\u9664\u3001\u6279\u91cf\u4e0a\u4f20(\u5b89\u5168\u626b\u63cf &#043; Manifest \u6821\u9a8c)<\/p>\n<\/li>\n<li>\n<p>\u547d\u4ee4\u6267\u884c:\u6d41\u5f0f\u8f93\u51fa\u3001\u8d85\u65f6\u63a7\u5236\u3001\u53d6\u6d88\u3001\u8f93\u51fa\u622a\u65ad\u4fdd\u62a4<\/p>\n<\/li>\n<li>\n<p>\u64cd\u4f5c\u5386\u53f2:\u81ea\u52a8\u8bb0\u5f55\u6bcf\u4e2a\u64cd\u4f5c\u7684 STARTED \u2192 OUTPUT \u2192 TERMINAL \u5168\u751f\u547d\u5468\u671f<\/p>\n<\/li>\n<li>\n<p>\u5e76\u53d1\u63a7\u5236:\u6587\u4ef6 KeyedRWLock\u3001\u547d\u4ee4\u961f\u5217\u9650\u6d41\u3001\u751f\u547d\u5468\u671f\u4e92\u65a5<\/p>\n<\/li>\n<li>\n<p>Deep Agents \u96c6\u6210:\u4e00\u6761\u547d\u4ee4\u9002\u914d\u4e3a Deep Agents Backend \u534f\u8bae<\/p>\n<\/li>\n<\/ul>\n<h3>\u4e09\u5206\u949f\u5feb\u901f\u4e0a\u624b<\/h3>\n<h4>\u7b2c\u4e00\u6b65:\u5b89\u88c5 agent-sandbox-backends\u548csandbox-web<\/h4>\n<p>pip install sandbox-console agent-sandbox-backends <\/p>\n<p>\u524d\u7aef\u5df2\u9884\u7f16\u8bd1\u5e76\u6253\u5305\u8fdb wheel,\u65e0\u9700 Node.js\u3002\u542f\u52a8:<\/p>\n<p>sandbox-console-server \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  # \u9ed8\u8ba4 http:\/\/localhost:9090<br \/>\nsandbox-console-server &#8211;port 3000 \u00a0 \u00a0 \u00a0 \u00a0  # \u81ea\u5b9a\u4e49\u7aef\u53e3 <\/p>\n<p>Console \u9ed8\u8ba4\u7aef\u53e3 9090,\u907f\u5f00 OpenSandbox Service \u7684 8080\u3002\u672c\u5730\u4f7f\u7528\u65e0\u9700\u4efb\u4f55\u73af\u5883\u53d8\u91cf,\u9274\u6743\u9ed8\u8ba4\u5173\u95ed\u3002<\/p>\n<h4>\u7b2c\u4e8c\u6b65:\u6ce8\u518c\u8fde\u63a5<\/h4>\n<p>\u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost:9090,\u8fdb\u5165 Connections \u9875\u9762:<\/p>\n<li>\n<p>\u70b9\u51fb\u300cNew Connection\u300d<\/p>\n<\/li>\n<li>\n<p>\u586b\u5199\u4f60\u7684 OpenSandbox Service \u5730\u5740(\u5982 http:\/\/localhost:8080)<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c Service \u5f00\u542f\u4e86\u9274\u6743,\u586b\u5165 API Key<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u300cTest Connection\u300d\u9a8c\u8bc1\u8fde\u901a\u6027<\/p>\n<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"502\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134130-6a67600ab2ca1.png\" width=\"512\" \/><\/p>\n<h4>\u7b2c\u4e09\u6b65:\u521b\u5efa\u6c99\u7bb1(\u53ef\u4ee5\u521b\u5efa,\u4e5f\u53ef\u4ee5\u4e0d\u521b\u5efa,sdk\u7aef\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u65b0\u7684)<\/h4>\n<p>\u5728 Sandboxes \u9875\u9762\u70b9\u51fb\u300cCreate Sandbox\u300d,\u9009\u62e9\u955c\u50cf(\u9ed8\u8ba4 python:3.12),\u8bbe\u7f6e\u5de5\u4f5c\u76ee\u5f55,\u5373\u53ef\u521b\u5efa\u3002<\/p>\n<h4>\u7b2c\u56db\u6b65:\u7ed9 Agent \u7528<\/h4>\n<p>from agent_sandbox_backends.integrations.deepagents import as_deepagents_backend<br \/>\nimport asyncio<br \/>\nimport os<br \/>\n\u200b<br \/>\nfrom deepagents import create_deep_agent<br \/>\n\u200b<br \/>\nfrom dotenv import load_dotenv<br \/>\nfrom agent_sandbox_backends import create_opensandbox_backend<br \/>\nfrom langchain.chat_models import init_chat_model<br \/>\nfrom langgraph.checkpoint.memory import InMemorySaver<br \/>\n\u200b<br \/>\nload_dotenv(override&#061;True)<br \/>\nAPI_KEY &#061; os.getenv(&#034;API_KEY&#034;)<br \/>\nBASE_URL &#061; os.getenv(&#034;BASE_URL&#034;)<br \/>\nmodel &#061; init_chat_model(<br \/>\n \u00a0  model&#061;&#034;deepseek-v4-flash&#034;,<br \/>\n \u00a0  api_key&#061;API_KEY,<br \/>\n \u00a0  base_url&#061;BASE_URL<br \/>\n)<br \/>\nasync def create():<br \/>\n \u00a0  backend &#061; await create_opensandbox_backend(<br \/>\n \u00a0 \u00a0 \u00a0  &#034;http:\/\/localhost:9090&#034;, # \u6c99\u7bb1\u670d\u52a1\u7684\u5730\u5740\u548c\u7aef\u53e3\u53f7<br \/>\n \u00a0 \u00a0 \u00a0  sandbox_name&#061;&#034;research-workspace&#034;, # \u6c99\u7bb1\u7684\u540d\u79f0<br \/>\n \u00a0  )<br \/>\n \u00a0  # \u521b\u5efa\u6c99\u7bb1<br \/>\n \u00a0  deepagents_backend &#061; as_deepagents_backend(backend)<br \/>\n \u00a0  return create_deep_agent(<br \/>\n \u00a0 \u00a0 \u00a0  model&#061;model,<br \/>\n \u00a0 \u00a0 \u00a0  backend&#061;deepagents_backend<br \/>\n \u00a0  )<br \/>\nagent &#061; asyncio.run(create()) <\/p>\n<h4>\u7b2c\u4e94\u6b65:\u56de\u5230 Console \u89c2\u5bdf<\/h4>\n<p>\u73b0\u5728\u56de\u5230\u6d4f\u89c8\u5668,\u8fdb\u5165\u6c99\u7bb1\u8be6\u60c5\u9875:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"338\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134130-6a67600ad0267.png\" width=\"1901\" \/><\/p>\n<p>\u70b9\u51fbOpen\u8fdb\u5165\u6c99\u7bb1\u5185\u90e8,\u4f1a\u770b\u5230\u4ee5\u4e0b\u51e0\u4e2a\u6807\u7b7e<\/p>\n<ul>\n<li>\n<p>Files Tab<\/p>\n<ul>\n<li>\n<p>\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u6811<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Commands Tab<\/p>\n<ul>\n<li>\n<p>\u7528\u4e8e\u6267\u884c\u547d\u4ee4<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>History Tab<\/p>\n<ul>\n<li>\n<p>\u7528\u4e8e\u67e5\u770b\u6c99\u7bb1\u7684\u64cd\u4f5c\u5386\u53f2:\u5982\u521b\u5efa\u6c99\u7bb1\u548c\u521b\u5efa\u6587\u4ef6,\u6267\u884c\u547d\u4ee4\u7b49\u64cd\u4f5c\u5386\u53f2<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u5173\u952e\u4f53\u9a8c:Agent \u548c\u4f60\u7684\u64cd\u4f5c\u5728\u5386\u53f2\u65f6\u95f4\u7ebf\u91cc\u7edf\u4e00\u6392\u5e8f\u5c55\u793a,\u4f60\u80fd\u6e05\u695a\u770b\u5230\u300cAgent \u5148\u5199\u4e86\u6587\u4ef6 \u2192 \u4f60\u624b\u52a8\u8dd1\u4e86\u4e2a\u547d\u4ee4 \u2192 Agent \u53c8\u6539\u4e86\u6587\u4ef6\u300d\u7684\u5b8c\u6574\u8fc7\u7a0b\u3002<\/p>\n<h4>\u5feb\u901f\u4f53\u9a8c<\/h4>\n<p>1. \u901a\u8fc7Agent\u521b\u5efa\u6587\u4ef6\u5939\u548c\u6587\u4ef6,\u540c\u65f6\u5199\u5165\u5185\u5bb9<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"497\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134131-6a67600b19adc.png\" width=\"1894\" \/><\/p>\n<p>1.1 \u67e5\u770b\u64cd\u4f5c\u5386\u53f2<\/p>\n<p>\u6ce8: \u64cd\u4f5c\u5386\u53f2\u52a0\u8f7d\u53ef\u80fd\u4f1a\u6162\u4e00\u70b9,\u5982\u679c\u53d1\u73b0\u6ca1\u6709\u5386\u53f2,\u53ef\u4ee5\u7a0d\u7b49\u4e00\u4e0b\u5237\u65b0\u4e00\u4e0b\u5373\u53ef<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"576\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134131-6a67600b6ccd7.png\" width=\"1914\" \/><\/p>\n<h3>2. \u5bf9\u6587\u4ef6\u5185\u5bb9\u8fdb\u884c\u66f4\u6539<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"899\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134131-6a67600bcb07d.png\" width=\"1051\" \/><\/h3>\n<p>2.1 \u67e5\u770b\u64cd\u4f5c\u5386\u53f2<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"542\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134132-6a67600c33376.png\" width=\"1909\" \/><\/p>\n<p>3. \u6267\u884c\u547d\u4ee4<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"277\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134132-6a67600c8e5d0.png\" width=\"976\" \/><\/p>\n<p>3.1 \u67e5\u770b\u64cd\u4f5c\u5386\u53f2<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"472\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134132-6a67600ca8a7a.png\" width=\"1911\" \/><\/p>\n<p>4. \u4e0a\u4f20\u6587\u4ef6\u64cd\u4f5c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"463\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134133-6a67600d054b7.png\" width=\"476\" \/><\/p>\n<p>5. web\u7aef\u66f4\u6539\u6587\u4ef6\u5185\u5bb9<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"790\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134133-6a67600d1b5f4.png\" width=\"1908\" \/><\/p>\n<p>5.1 \u67e5\u770b\u64cd\u4f5c\u5386\u53f2<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"580\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134133-6a67600dbbb4b.png\" width=\"1895\" \/><\/p>\n<p>6. web\u7aef\u6267\u884c\u547d\u4ee4<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"319\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134134-6a67600e2adbb.png\" width=\"1909\" \/><\/p>\n<h4>6.1 \u67e5\u770b\u64cd\u4f5c\u5386\u53f2<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"457\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134134-6a67600e6590d.png\" width=\"1906\" \/><\/h4>\n<h3>\u5176\u4ed6\u8bbe\u8ba1<\/h3>\n<h4>1. \u5386\u53f2\u4e0d\u4e22:Dual Cursor \u673a\u5236<\/h4>\n<p>Console \u540c\u6b65\u5386\u53f2\u65f6\u4f7f\u7528\u53cc\u6e38\u6807\u786e\u4fdd\u6570\u636e\u4e0d\u4e22:<\/p>\n<p>acknowledged_seq  \u2190 \u5df2\u786e\u8ba4 ACK \u7684\u4f4d\u7f6e<br \/>\npending_seq \u00a0 \u00a0 \u00a0 \u2190 \u5df2\u5199\u5165\u672c\u5730\u4f46\u672a ACK \u7684\u4f4d\u7f6e <\/p>\n<p>\u6d41\u7a0b:\u62c9\u53d6\u53d8\u66f4 \u2192 \u5199\u5165\u672c\u5730 Projection &#043; pending_seq \u2192 \u63d0\u4ea4\u4e8b\u52a1 \u2192 ACK \u2192 \u63d0\u5347\u4e3a acknowledged\u3002ACK \u5931\u8d25?\u4e0b\u6b21\u91cd\u8bd5,pending_seq \u4fdd\u7559,\u6570\u636e\u4e0d\u4e22\u3002<\/p>\n<h4>2. \u5386\u53f2\u4e0d\u91cd:\u5e42\u7b49 Upsert<\/h4>\n<p>\u6bcf\u6761\u5386\u53f2\u4e8b\u4ef6\u6709 event_id(UUIDv7)\u548c source_seq(\u5355\u8c03\u9012\u589e)\u3002\u540c\u6b65\u65f6\u6309 event_id \u53bb\u91cd,source_seq \u66f4\u9ad8\u624d\u66f4\u65b0,\u5929\u7136\u5e42\u7b49\u3002<\/p>\n<h4>3. \u5386\u53f2\u5b8c\u6574:Console \u64cd\u4f5c\u4e5f\u56de\u5199<\/h4>\n<p>Console \u81ea\u5df1\u6267\u884c\u7684\u64cd\u4f5c(\u547d\u4ee4\u3001\u6587\u4ef6\u7f16\u8f91)\u4e0d\u4ec5\u8bb0\u5f55\u5728\u672c\u5730 console_activities \u8868,\u8fd8\u901a\u8fc7 SandboxHistoryStore.append() \u56de\u5199\u5230\u6c99\u7bb1\u7684 Canonical History,\u786e\u4fdd Agent \u548c Console \u7684\u64cd\u4f5c\u5728\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u91cc\u7edf\u4e00\u7ba1\u7406\u3002<\/p>\n<h4>4. \u5e76\u53d1\u5b89\u5168:SDK \u5c42\u7684\u7cbe\u7ec6\u5316\u9501<\/h4>\n<table>\n<tr>\u64cd\u4f5c\u7c7b\u578b\u9501\u7b56\u7565<\/tr>\n<tbody>\n<tr>\n<td>\u6587\u4ef6\u8bfb<\/td>\n<td>KeyedRWLock \u5171\u4eab\u6a21\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>\u6587\u4ef6\u5199\/\u5220\u9664<\/td>\n<td>KeyedRWLock \u6392\u4ed6\u6a21\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>\u547d\u4ee4\u6267\u884c<\/td>\n<td>\u72ec\u7acb Semaphore &#043; \u961f\u5217\u8d85\u65f6<\/td>\n<\/tr>\n<tr>\n<td>\u4e0a\u4f20<\/td>\n<td>\u76ee\u6807\u6839\u76ee\u5f55\u6392\u4ed6\u9501<\/td>\n<\/tr>\n<tr>\n<td>\u751f\u547d\u5468\u671f<\/td>\n<td>Sandbox \u7ea7 mutex<\/td>\n<\/tr>\n<tr>\n<td>Backend \u5173\u95ed<\/td>\n<td>\u5f15\u7528\u8ba1\u6570 &#043; \u6d3b\u8dc3\u64cd\u4f5c\u6392\u7a7a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5. \u4e0a\u4f20\u5b89\u5168:\u9632 zip-slip \u7b49<\/h4>\n<p>SDK \u7684\u4e0a\u4f20\u7ba1\u7ebf\u5305\u542b:\u8def\u5f84\u89c4\u8303\u5316 \u2192 \u5141\u8bb8\u6839\u76ee\u5f55\u6821\u9a8c \u2192 \u654f\u611f\u6587\u4ef6\u6392\u9664(.env\/.ssh\/.aws\/.git)\u2192 SHA-256 Manifest \u2192 Staging \u5b89\u5168\u89e3\u538b(\u9632\u7edd\u5bf9\u8def\u5f84\/..\/symlink\/device)\u2192 \u6821\u9a8c \u2192 \u539f\u5b50\u63d0\u4ea4\u6216\u56de\u6eda\u3002<\/p>\n<h4>6. Provider Key \u5bf9\u9f50<\/h4>\n<p>Console \u7684 Adapter \u5185\u90e8\u5f3a\u5236\u4f7f\u7528 provider_key&#061;&#034;opensandbox-default&#034; \u4f20\u7ed9 SDK(\u800c\u975e\u7528 connection.id),\u56e0\u4e3a SDK \u5728\u521d\u59cb\u5316\u6c99\u7bb1\u5386\u53f2\u65f6\u7528\u8fd9\u4e2a key \u505a\u8eab\u4efd\u6821\u9a8c\u3002\u4e0d\u5339\u914d\u4f1a\u62a5 History identity conflict,\u5bfc\u81f4 Console \u65e0\u6cd5\u8bfb\u5199\u5386\u53f2\u3002<\/p>\n<h3>\u9002\u7528\u573a\u666f<\/h3>\n<ul>\n<li>\n<p>AI \u4ee3\u7801\u52a9\u624b\u5f00\u53d1:\u7ed9 Agent \u4e00\u4e2a\u5b89\u5168\u6c99\u7bb1\u8dd1\u4ee3\u7801,\u4f60\u5b9e\u65f6\u89c2\u5bdf<\/p>\n<\/li>\n<li>\n<p>\u81ea\u52a8\u5316\u7814\u7a76\u6d41\u6c34\u7ebf:Agent \u5728\u6c99\u7bb1\u91cc\u88c5\u5305\u3001\u8dd1\u5b9e\u9a8c,\u4f60\u5728 Console \u5ba1\u8ba1\u6bcf\u4e00\u6b65<\/p>\n<\/li>\n<li>\n<p>\u6559\u5b66\u4e0e\u6f14\u793a:\u5b66\u751f\u770b Agent \u64cd\u4f5c\u6c99\u7bb1\u7684\u8fc7\u7a0b,\u7406\u89e3 AI \u7f16\u7a0b\u7684\u5de5\u4f5c\u65b9\u5f0f<\/p>\n<\/li>\n<li>\n<p>\u591a Agent \u534f\u4f5c\u8c03\u8bd5:\u591a\u4e2a Agent \u5171\u4eab\u4e00\u4e2a\u6c99\u7bb1,\u901a\u8fc7\u5386\u53f2\u65f6\u95f4\u7ebf\u6392\u67e5\u51b2\u7a81<\/p>\n<\/li>\n<li>\n<p>\u5b89\u5168\u5ba1\u8ba1:\u6240\u6709\u64cd\u4f5c\u6709\u636e\u53ef\u67e5,\u547d\u4ee4\u3001\u6587\u4ef6\u53d8\u66f4\u3001stdout\/stderr \u5168\u7559\u5b58<\/p>\n<\/li>\n<\/ul>\n<h3>\u603b\u7ed3<\/h3>\n<table>\n<tr>agent-sandbox-backendssandbox-console<\/tr>\n<tbody>\n<tr>\n<td>\u7ed9\u8c01\u7528<\/td>\n<td>AI Agent \u7a0b\u5e8f<\/td>\n<td>\u4eba\u7c7b(\u6d4f\u89c8\u5668)<\/td>\n<\/tr>\n<tr>\n<td>\u600e\u4e48\u7528<\/td>\n<td>pip install \u540e import<\/td>\n<td>pip install \u540e\u542f\u52a8\u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td>\u6838\u5fc3\u4ef7\u503c<\/td>\n<td>\u4e00\u884c\u4ee3\u7801\u521b\u5efa\u53ef\u89c2\u6d4b\u7684\u6c99\u7bb1 Backend<\/td>\n<td>\u6d4f\u89c8\u5668\u91cc\u56f4\u89c2\u548c\u64cd\u4f5c\u6c99\u7bb1<\/td>\n<\/tr>\n<tr>\n<td>\u5386\u53f2\u89d2\u8272<\/td>\n<td>\u5199\u5165\u8005(\u81ea\u52a8)<\/td>\n<td>\u8bfb\u53d6 &#043; \u56de\u5199<\/td>\n<\/tr>\n<tr>\n<td>\u7aef\u53e3<\/td>\n<td>\u5e93,\u65e0\u7aef\u53e3<\/td>\n<td>9090<\/td>\n<\/tr>\n<tr>\n<td>\u4f9d\u8d56<\/td>\n<td>opensandbox SDK<\/td>\n<td>agent-sandbox-backends<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e00\u53e5\u8bdd:Agent \u7528 SDK \u5728\u6c99\u7bb1\u91cc\u5e72\u6d3b\u5e76\u81ea\u52a8\u8bb0\u5f55\u5386\u53f2,\u4f60\u7528 Console \u5728\u6d4f\u89c8\u5668\u91cc\u770b\u5386\u53f2\u3001\u67e5\u6587\u4ef6\u3001\u8dd1\u547d\u4ee4\u3002\u4e24\u8005\u901a\u8fc7\u6c99\u7bb1\u5185\u7684\u5171\u4eab SQLite \u534f\u4f5c,\u65e0\u9700 Agent \u5173\u5fc3 Console \u662f\u5426\u5728\u7ebf,\u4e5f\u65e0\u9700 Console \u5173\u5fc3 Agent \u662f\u8c01\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u5957\u300cAgent \u5e72\u6d3b,\u4eba\u7c7b\u56f4\u89c2\u300d\u7684\u5b8c\u6574\u6c99\u7bb1\u751f\u6001 \u2014\u2014 SDK \u8d1f\u8d23\u521b\u5efa\u548c\u64cd\u4f5c,Console \u8d1f\u8d23\u89c2\u5bdf\u548c\u7ba1\u7406,\u4e24\u8005\u901a\u8fc7\u5171\u4eab\u5386\u53f2\u6570\u636e\u5e93\u65e0\u7f1d\u534f\u4f5c\u3002 \u914d\u5957\u7ec4\u4ef6\u5f00\u6e90\u5730\u5740: agent-sandbox-backends:https:\/\/gitee.com\/rainbow-zhou\/agent-sandbox-backend.git sandbox-web:https:\/\/gitee.com\/rainbow-zhou\/sandbox-web.git \u4e3a\u4ec0\u4e48\u9700\u8981\u5b83?<br \/>\n\u5f53 AI Agen<\/p>\n","protected":false},"author":2,"featured_media":85709,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50],"topic":[],"class_list":["post-85722","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883 - \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\/85722.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u5957\u300cAgent \u5e72\u6d3b,\u4eba\u7c7b\u56f4\u89c2\u300d\u7684\u5b8c\u6574\u6c99\u7bb1\u751f\u6001 \u2014\u2014 SDK \u8d1f\u8d23\u521b\u5efa\u548c\u64cd\u4f5c,Console \u8d1f\u8d23\u89c2\u5bdf\u548c\u7ba1\u7406,\u4e24\u8005\u901a\u8fc7\u5171\u4eab\u5386\u53f2\u6570\u636e\u5e93\u65e0\u7f1d\u534f\u4f5c\u3002 \u914d\u5957\u7ec4\u4ef6\u5f00\u6e90\u5730\u5740: agent-sandbox-backends:https:\/\/gitee.com\/rainbow-zhou\/agent-sandbox-backend.git sandbox-web:https:\/\/gitee.com\/rainbow-zhou\/sandbox-web.git \u4e3a\u4ec0\u4e48\u9700\u8981\u5b83? \u5f53 AI Agen\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/85722.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-27T13:41:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134130-6a67600ab2ca1.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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85722.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/85722.html\",\"name\":\"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-27T13:41:35+00:00\",\"dateModified\":\"2026-07-27T13:41:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/85722.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/85722.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85722.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883\"}]},{\"@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":"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883 - \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\/85722.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u5957\u300cAgent \u5e72\u6d3b,\u4eba\u7c7b\u56f4\u89c2\u300d\u7684\u5b8c\u6574\u6c99\u7bb1\u751f\u6001 \u2014\u2014 SDK \u8d1f\u8d23\u521b\u5efa\u548c\u64cd\u4f5c,Console \u8d1f\u8d23\u89c2\u5bdf\u548c\u7ba1\u7406,\u4e24\u8005\u901a\u8fc7\u5171\u4eab\u5386\u53f2\u6570\u636e\u5e93\u65e0\u7f1d\u534f\u4f5c\u3002 \u914d\u5957\u7ec4\u4ef6\u5f00\u6e90\u5730\u5740: agent-sandbox-backends:https:\/\/gitee.com\/rainbow-zhou\/agent-sandbox-backend.git sandbox-web:https:\/\/gitee.com\/rainbow-zhou\/sandbox-web.git \u4e3a\u4ec0\u4e48\u9700\u8981\u5b83? \u5f53 AI Agen","og_url":"https:\/\/www.wsisp.com\/helps\/85722.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-27T13:41:35+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727134130-6a67600ab2ca1.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/85722.html","url":"https:\/\/www.wsisp.com\/helps\/85722.html","name":"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-27T13:41:35+00:00","dateModified":"2026-07-27T13:41:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/85722.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/85722.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/85722.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6c99\u7bb1\u7ba1\u7406\u5957\u4ef6:\u8ba9 AI Agent \u62e5\u6709\u53ef\u89c2\u6d4b\u7684\u4ee3\u7801\u6267\u884c\u73af\u5883"}]},{"@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\/85722","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=85722"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85722\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/85709"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=85722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=85722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=85722"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=85722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}