{"id":86961,"date":"2026-07-29T14:24:44","date_gmt":"2026-07-29T06:24:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/86961.html"},"modified":"2026-07-29T14:24:44","modified_gmt":"2026-07-29T06:24:44","slug":"agent-%e8%af%bb%e4%ba%86-30-%e4%b8%aa%e6%96%87%e4%bb%b6%e4%b9%8b%e5%90%8e%ef%bc%8c%e4%b8%ba%e4%bb%80%e4%b9%88%e4%bc%9a%e7%aa%81%e7%84%b6%e5%81%9c%e4%bd%8f%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/86961.html","title":{"rendered":"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f"},"content":{"rendered":"<p>\u672c\u6587\u662f\u300c\u4ece\u96f6\u7406\u89e3 Claude Code&#xff1a;20 \u4e2a Agent Harness \u673a\u5236\u300d\u7cfb\u5217\u7684\u7b2c 8 \u7bc7\u3002 \u6e90\u7801\u4ed3\u5e93&#xff1a;shareAI-lab\/learn-claude-code \u672c\u6587\u57fa\u4e8e\u5f00\u6e90\u4ed3\u5e93\u5b66\u4e60\u6574\u7406&#xff0c;\u5177\u4f53\u5b9e\u73b0\u4ee5\u4ed3\u5e93\u4ee3\u7801\u4e3a\u51c6\u3002<\/p>\n<p>\u6211\u7b2c\u4e00\u6b21\u78b0\u5230\u4e0a\u4e0b\u6587\u8d85\u9650\u65f6&#xff0c;\u4efb\u52a1\u6b63\u5728\u6392\u67e5\u4e00\u7ec4\u8ba4\u8bc1\u6d4b\u8bd5\u3002<\/p>\n<p>Agent \u5148\u8bfb\u4e86\u5931\u8d25\u65e5\u5fd7&#xff0c;\u53c8\u8bfb\u4e86\u8ba4\u8bc1\u670d\u52a1\u3001\u4ee4\u724c\u5904\u7406\u3001\u914d\u7f6e\u6587\u4ef6\u548c\u51e0\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u3002\u524d\u9762\u7684\u8fc7\u7a0b\u6ca1\u6709\u4efb\u4f55\u5f02\u5e38&#xff0c;\u547d\u4ee4\u80fd\u6267\u884c&#xff0c;\u6587\u4ef6\u4e5f\u80fd\u6b63\u5e38\u8bfb\u53d6\u3002\u7b49\u5b83\u51c6\u5907\u53d1\u8d77\u4e0b\u4e00\u6b21\u6a21\u578b\u8c03\u7528\u65f6&#xff0c;\u63a5\u53e3\u76f4\u63a5\u8fd4\u56de\u4e86 prompt_too_long\u3002<\/p>\n<p>\u56de\u5934\u770b\u6d88\u606f\u5386\u53f2&#xff0c;\u95ee\u9898\u5c31\u5f88\u6e05\u695a\u4e86\u3002<\/p>\n<p>\u524d\u9762\u8bfb\u8fc7\u7684\u5b8c\u6574\u6587\u4ef6\u3001\u51e0\u8f6e\u6d4b\u8bd5\u8f93\u51fa\u3001\u641c\u7d22\u7ed3\u679c\u548c\u4fee\u6539\u8bb0\u5f55\u90fd\u8fd8\u7559\u5728 messages \u91cc\u3002Agent \u5df2\u7ecf\u4e0d\u9700\u8981\u5176\u4e2d\u7684\u5927\u90e8\u5206\u5185\u5bb9&#xff0c;\u4f46\u63a5\u53e3\u4e0d\u4f1a\u66ff\u5b83\u5224\u65ad\u54ea\u4e9b\u7ed3\u679c\u5df2\u7ecf\u8fc7\u671f\u3002\u53ea\u8981\u8fd9\u4e9b\u5185\u5bb9\u8fd8\u5728\u5386\u53f2\u4e2d&#xff0c;\u4e0b\u4e00\u6b21\u8c03\u7528\u5c31\u5f97\u7ee7\u7eed\u643a\u5e26\u3002<\/p>\n<p>\u4e0a\u4e0b\u6587\u538b\u7f29\u89e3\u51b3\u7684&#xff0c;\u662f\u957f\u4efb\u52a1\u8fdb\u884c\u5230\u4e2d\u9014\u4ee5\u540e&#xff0c;\u5982\u4f55\u8ba9 Agent \u4e22\u6389\u5df2\u7ecf\u7528\u5b8c\u7684\u4fe1\u606f&#xff0c;\u540c\u65f6\u4fdd\u7559\u7ee7\u7eed\u5b8c\u6210\u4efb\u52a1\u6240\u9700\u7684\u7ebf\u7d22\u3002<\/p>\n<h3>\u4e00\u6b21\u8bf7\u6c42\u5931\u8d25\u524d&#xff0c;messages \u91cc\u5230\u5e95\u5806\u4e86\u4ec0\u4e48<\/h3>\n<p>\u4e00\u5f00\u59cb\u5f88\u5bb9\u6613\u76ef\u7740\u6d88\u606f\u6570\u91cf\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u4e00\u6bb5\u4efb\u52a1\u8dd1\u4e86\u51e0\u5341\u8f6e&#xff0c;messages \u957f\u5ea6\u770b\u8d77\u6765\u5df2\u7ecf\u5f88\u5927&#xff0c;\u7b2c\u4e00\u53cd\u5e94\u901a\u5e38\u662f\u5220\u6389\u65e9\u671f\u5bf9\u8bdd\u3002\u8fd9\u4e2a\u5224\u65ad\u53ea\u89e3\u51b3\u4e86\u4e00\u90e8\u5206\u95ee\u9898\u3002<\/p>\n<p>\u5b9e\u9645\u5360\u7a7a\u95f4\u7684&#xff0c;\u5f80\u5f80\u662f\u5de5\u5177\u7ed3\u679c\u3002<\/p>\n<p>read_file \u53ef\u80fd\u8fd4\u56de\u5b8c\u6574\u6e90\u7801&#xff0c;bash \u53ef\u80fd\u8fd4\u56de\u6570\u767e\u884c\u6d4b\u8bd5\u65e5\u5fd7&#xff0c;load_skill \u53ef\u80fd\u5e26\u56de\u5b8c\u6574\u7684\u6280\u80fd\u8bf4\u660e\u3002\u6d88\u606f\u53ea\u6709\u5341\u51e0\u6761\u65f6&#xff0c;\u53ea\u8981\u5176\u4e2d\u6709\u4e24\u4e09\u6bb5\u5927\u8f93\u51fa&#xff0c;\u4e0a\u4e0b\u6587\u7167\u6837\u4f1a\u63a5\u8fd1\u9650\u5236\u3002<\/p>\n<p>\u4ee5\u8ba4\u8bc1\u6d4b\u8bd5\u8fd9\u4e2a\u573a\u666f\u4e3a\u4f8b&#xff0c;\u771f\u6b63\u503c\u5f97\u957f\u671f\u4fdd\u7559\u7684\u4fe1\u606f\u5f88\u5c11&#xff1a;<\/p>\n<p>\u5f53\u524d\u76ee\u6807&#xff1a;\u4fee\u590d\u8ba4\u8bc1\u6d4b\u8bd5\u5931\u8d25<br \/>\n\u5df2\u786e\u8ba4&#xff1a;\u5931\u8d25\u4e0e token \u914d\u7f6e\u6709\u5173<br \/>\n\u5df2\u4fee\u6539&#xff1a;tests\/auth\/test_token.py<br \/>\n\u5f85\u5b8c\u6210&#xff1a;\u91cd\u65b0\u8fd0\u884c\u76f8\u5173\u6d4b\u8bd5&#xff0c;\u68c0\u67e5\u56de\u5f52\u5f71\u54cd<\/p>\n<p>\u800c\u5386\u53f2\u4e2d\u53ef\u80fd\u8fd8\u585e\u7740&#xff1a;<\/p>\n<p>\u7b2c\u4e00\u6b21 pytest \u7684\u5b8c\u6574\u8f93\u51fa<br \/>\n\u591a\u4e2a\u5df2\u7ecf\u6392\u9664\u7684\u641c\u7d22\u7ed3\u679c<br \/>\n\u51e0\u4efd\u540e\u7eed\u4e0d\u518d\u4f7f\u7528\u7684\u6587\u4ef6\u5168\u6587<br \/>\n\u65e7\u7248\u672c\u7684\u914d\u7f6e\u5185\u5bb9<\/p>\n<p>\u8fd9\u4e9b\u5185\u5bb9\u5728\u5f53\u65f6\u90fd\u6709\u7528&#xff0c;\u540e\u9762\u5374\u53d8\u6210\u4e86\u8d1f\u62c5\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u538b\u7f29\u4e0d\u80fd\u53ea\u770b\u6d88\u606f\u51fa\u73b0\u5f97\u65e9\u4e0d\u65e9&#xff0c;\u8fd8\u8981\u770b\u5b83\u662f\u4efb\u52a1\u76ee\u6807\u3001\u8fd1\u671f\u7ed3\u679c&#xff0c;\u8fd8\u662f\u5df2\u7ecf\u5931\u6548\u7684\u5927\u6bb5\u8f93\u51fa\u3002<\/p>\n<h3>\u538b\u7f29\u987a\u5e8f\u91cc&#xff0c;\u6709\u4e00\u4e2a\u4f4d\u7f6e\u4e0d\u80fd\u6362<\/h3>\n<p>\u8fd9\u4e00\u7ae0\u5728\u6bcf\u6b21\u8c03\u7528\u6a21\u578b\u524d&#xff0c;\u90fd\u4f1a\u5148\u5904\u7406\u6d88\u606f\u5386\u53f2\u3002\u6267\u884c\u987a\u5e8f\u662f&#xff1a;<\/p>\n<p>\u5927\u5de5\u5177\u7ed3\u679c\u8f6c\u5b58\u5230\u78c1\u76d8<br \/>\n\u2192 \u88c1\u6389\u8fc7\u8fdc\u7684\u4e2d\u95f4\u6d88\u606f<br \/>\n\u2192 \u5c06\u8f83\u65e9\u5de5\u5177\u7ed3\u679c\u66ff\u6362\u4e3a\u5360\u4f4d\u4fe1\u606f<br \/>\n\u2192 \u4e0a\u4e0b\u6587\u4ecd\u7136\u8fc7\u5927\u65f6&#xff0c;\u751f\u6210\u5386\u53f2\u6458\u8981<\/p>\n<p>\u770b\u4e0a\u53bb\u53ea\u662f\u51e0\u4e2a\u9884\u5904\u7406\u51fd\u6570&#xff0c;\u987a\u5e8f\u5374\u4e0d\u80fd\u968f\u4fbf\u8c03\u6574\u3002<\/p>\n<p>\u5148\u8bf4\u6700\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u4e00\u5c42&#xff1a;\u5927\u5de5\u5177\u7ed3\u679c\u8f6c\u5b58\u3002<\/p>\n<p>tool_result_budget() \u4f1a\u68c0\u67e5\u6700\u8fd1\u4e00\u6761\u5de5\u5177\u7ed3\u679c\u6d88\u606f\u7684\u603b\u5927\u5c0f\u3002\u8d85\u8fc7\u9608\u503c\u540e&#xff0c;\u7a0b\u5e8f\u4ece\u6700\u5927\u7684\u7ed3\u679c\u5f00\u59cb\u5904\u7406&#xff0c;\u628a\u5b8c\u6574\u5185\u5bb9\u5199\u8fdb .task_outputs\/tool-results\/&#xff0c;\u4e0a\u4e0b\u6587\u4e2d\u53ea\u7559\u4e0b\u6587\u4ef6\u8def\u5f84\u548c\u524d 2000 \u4e2a\u5b57\u7b26\u9884\u89c8\u3002<\/p>\n<p>&lt;persisted-output&gt;<br \/>\nFull output: .task_outputs\/tool-results\/toolu_123.txt<br \/>\nPreview:<br \/>\n&#8230;<br \/>\n&lt;\/persisted-output&gt;<\/p>\n<p>\u8fd9\u6837&#xff0c;Agent \u540e\u7eed\u53d1\u73b0\u9884\u89c8\u4e0d\u591f\u65f6&#xff0c;\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6\u8bfb\u53d6\u5de5\u5177\u91cd\u65b0\u67e5\u770b\u5b8c\u6574\u7ed3\u679c\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u624d\u662f micro_compact()\u3002<\/p>\n<p>\u5b83\u4fdd\u7559\u6700\u8fd1 3 \u6761\u5de5\u5177\u7ed3\u679c&#xff0c;\u5c06\u66f4\u65e9\u7684\u7ed3\u679c\u66ff\u6362\u6210\u4e00\u884c\u8bf4\u660e&#xff1a;<\/p>\n<p>[Earlier tool result compacted. Re-run if needed.]<\/p>\n<p>\u5982\u679c\u8fd9\u4e24\u6b65\u987a\u5e8f\u53cd\u8fc7\u6765&#xff0c;\u95ee\u9898\u5c31\u51fa\u73b0\u4e86\u3002<\/p>\n<p>\u8f83\u65e9\u7684\u5927\u7ed3\u679c\u4f1a\u5148\u88ab\u66ff\u6362\u6210\u5360\u4f4d\u6587\u672c&#xff0c;\u540e\u9762\u7684\u8f6c\u5b58\u903b\u8f91\u518d\u4e5f\u62ff\u4e0d\u5230\u5b8c\u6574\u5185\u5bb9&#xff0c;\u4e5f\u5c31\u65e0\u6cd5\u5199\u5165\u78c1\u76d8\u3002Agent \u770b\u5230\u7684\u53ea\u5269\u4e00\u884c\u63d0\u793a&#xff0c;\u539f\u59cb\u8f93\u51fa\u6ca1\u6709\u4fdd\u5b58\u5165\u53e3\u3002<\/p>\n<p>\u8fd9\u4e5f\u662f\u8fd9\u7ae0\u6700\u503c\u5f97\u6ce8\u610f\u7684\u8bbe\u8ba1\u7ec6\u8282&#xff1a;\u538b\u7f29\u8fc7\u7a0b\u672c\u8eab\u4e5f\u4f1a\u4e22\u4fe1\u606f&#xff0c;\u5fc5\u987b\u5148\u5904\u7406\u53ef\u6062\u590d\u7684\u5927\u5185\u5bb9&#xff0c;\u518d\u5904\u7406\u53ef\u4ee5\u4e22\u5f03\u7684\u65e7\u5185\u5bb9\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260729062443-6a699cab74bd6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u524d\u9762\u7684 tool_result_budget() \u5173\u6ce8\u5355\u6761\u6216\u5355\u8f6e\u7ed3\u679c\u662f\u5426\u8fc7\u5927&#xff0c;snip_compact() \u5904\u7406\u7684\u662f\u53e6\u4e00\u7c7b\u95ee\u9898&#xff1a;\u4e00\u6bb5\u4efb\u52a1\u8fd0\u884c\u592a\u4e45&#xff0c;\u6d88\u606f\u6570\u91cf\u672c\u8eab\u5df2\u7ecf\u5f88\u957f\u3002<\/p>\n<p>\u6559\u5b66\u4ee3\u7801\u8d85\u8fc7 50 \u6761\u6d88\u606f\u540e&#xff0c;\u4f1a\u4fdd\u7559\u6700\u5f00\u59cb\u7684 3 \u6761\u548c\u6700\u8fd1\u7684 47 \u6761&#xff0c;\u4e2d\u95f4\u90e8\u5206\u7528\u4e00\u6761\u7b80\u77ed\u6807\u8bb0\u4ee3\u66ff\u3002\u5f00\u5934\u901a\u5e38\u4fdd\u7559\u4e86\u7528\u6237\u6700\u521d\u63d0\u51fa\u7684\u4efb\u52a1\u548c\u9650\u5236\u6761\u4ef6&#xff0c;\u6700\u8fd1\u7684\u6d88\u606f\u5219\u5bf9\u5e94 Agent \u5f53\u524d\u6b63\u5728\u5904\u7406\u7684\u6587\u4ef6\u3001\u62a5\u9519\u6216\u6d4b\u8bd5\u7ed3\u679c\u3002\u4e2d\u95f4\u7684\u641c\u7d22\u8fc7\u7a0b\u867d\u7136\u66fe\u7ecf\u6709\u7528&#xff0c;\u8ddd\u79bb\u5f53\u524d\u4efb\u52a1\u5df2\u7ecf\u6bd4\u8f83\u8fdc&#xff0c;\u4f18\u5148\u7f29\u77ed\u7684\u98ce\u9669\u76f8\u5bf9\u8f83\u4f4e\u3002<\/p>\n<p>\u88c1\u526a\u65f6\u6709\u4e00\u4e2a\u8fb9\u754c\u9700\u8981\u989d\u5916\u5904\u7406&#xff1a;\u6a21\u578b\u53d1\u8d77\u5de5\u5177\u8c03\u7528\u548c\u7a0b\u5e8f\u8fd4\u56de\u5de5\u5177\u7ed3\u679c&#xff0c;\u5fc5\u987b\u4f5c\u4e3a\u4e00\u7ec4\u6d88\u606f\u4fdd\u7559\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;Agent \u60f3\u786e\u8ba4\u6d4b\u8bd5\u73af\u5883\u7684\u6570\u636e\u5e93\u914d\u7f6e&#xff0c;\u4e8e\u662f\u5148\u8bf7\u6c42\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>\u52a9\u624b&#xff1a;\u8c03\u7528 read_file&#xff0c;\u53c2\u6570\u4e3a config.py<\/p>\n<p>\u7a0b\u5e8f\u6267\u884c\u540e&#xff0c;\u5c06\u7ed3\u679c\u4ea4\u56de\u6a21\u578b&#xff1a;<\/p>\n<p>\u5de5\u5177\u7ed3\u679c&#xff1a;config.py \u4e2d DATABASE_URL \u4e3a\u7a7a<\/p>\n<p>\u8fd9\u4e24\u6761\u6d88\u606f\u5408\u5728\u4e00\u8d77&#xff0c;\u624d\u6784\u6210\u4e00\u6b21\u5b8c\u6574\u7684\u4fe1\u606f\u4ea4\u6362\u3002\u6a21\u578b\u77e5\u9053\u81ea\u5df1\u8bfb\u4e86\u54ea\u4e2a\u6587\u4ef6&#xff0c;\u4e5f\u77e5\u9053\u4ece\u6587\u4ef6\u91cc\u5f97\u5230\u4e86\u4ec0\u4e48\u7ed3\u8bba\u3002<\/p>\n<p>\u5982\u679c\u538b\u7f29\u65f6\u53ea\u7559\u4e0b\u524d\u4e00\u6761\u8c03\u7528\u8bb0\u5f55&#xff0c;\u6a21\u578b\u4f1a\u77e5\u9053\u81ea\u5df1\u66fe\u7ecf\u8bfb\u8fc7 config.py&#xff0c;\u5374\u4e0d\u77e5\u9053\u8bfb\u53d6\u7ed3\u679c\u3002\u5b83\u540e\u7eed\u53ef\u80fd\u91cd\u590d\u8bfb\u53d6\u6587\u4ef6&#xff0c;\u4e5f\u53ef\u80fd\u5728\u7f3a\u5c11\u4f9d\u636e\u7684\u60c5\u51b5\u4e0b\u7ee7\u7eed\u63a8\u65ad\u3002<\/p>\n<p>\u5982\u679c\u53ea\u7559\u4e0b\u540e\u4e00\u6761\u5de5\u5177\u7ed3\u679c&#xff0c;\u6a21\u578b\u867d\u7136\u770b\u5230\u4e86 DATABASE_URL \u4e3a\u7a7a&#xff0c;\u5374\u65e0\u6cd5\u786e\u8ba4\u8fd9\u6bb5\u5185\u5bb9\u6765\u81ea\u54ea\u4e2a\u6587\u4ef6\u3001\u5bf9\u5e94\u4ec0\u4e48\u64cd\u4f5c&#xff0c;\u66f4\u96be\u5224\u65ad\u5b83\u662f\u5426\u4ecd\u7136\u4e0e\u5f53\u524d\u4efb\u52a1\u6709\u5173\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;snip_compact() \u5728\u786e\u5b9a\u88c1\u526a\u8fb9\u754c\u65f6&#xff0c;\u4f1a\u68c0\u67e5\u8fb9\u754c\u9644\u8fd1\u662f\u5426\u5b58\u5728\u8fd9\u7c7b\u8c03\u7528\u4e0e\u7ed3\u679c\u7684\u914d\u5bf9\u5173\u7cfb\u3002\u8fb9\u754c\u521a\u597d\u843d\u5728\u4e24\u8005\u4e4b\u95f4\u65f6&#xff0c;\u7a0b\u5e8f\u4f1a\u5411\u524d\u6216\u5411\u540e\u8c03\u6574&#xff0c;\u4fdd\u8bc1\u8fd9\u7ec4\u6d88\u606f\u4e00\u8d77\u7559\u4e0b&#xff0c;\u6216\u8005\u4e00\u8d77\u8fdb\u5165\u88ab\u538b\u7f29\u7684\u5386\u53f2\u3002<\/p>\n<h3>\u6458\u8981\u80fd\u8ba9\u4efb\u52a1\u7ee7\u7eed&#xff0c;\u4e22\u6389\u7684\u7ec6\u8282\u4e0d\u4f1a\u81ea\u52a8\u56de\u6765<\/h3>\n<p>\u524d\u4e09\u5c42\u538b\u7f29\u90fd\u4e0d\u9700\u8981\u518d\u8c03\u7528\u6a21\u578b\u3002<\/p>\n<p>\u5b83\u4eec\u53ea\u662f\u79fb\u52a8\u3001\u5220\u9664\u6216\u66ff\u6362\u6587\u672c&#xff0c;\u6210\u672c\u4f4e&#xff0c;\u4e5f\u4e0d\u4f1a\u5f15\u5165\u65b0\u7684\u63a8\u7406\u8fc7\u7a0b\u3002\u7ecf\u8fc7\u8fd9\u4e9b\u5904\u7406\u540e&#xff0c;\u5982\u679c\u4e0a\u4e0b\u6587\u4ecd\u7136\u8d85\u8fc7\u9608\u503c&#xff0c;\u7a0b\u5e8f\u624d\u4f1a\u8c03\u7528 compact_history()\u3002<\/p>\n<p>\u8fd9\u4e00\u6b65\u5148\u628a\u5b8c\u6574\u6d88\u606f\u5199\u5165 .transcripts\/&#xff0c;\u518d\u8bf7\u6c42\u6a21\u578b\u751f\u6210\u6458\u8981\u3002\u6458\u8981\u9700\u8981\u4fdd\u7559\u5f53\u524d\u76ee\u6807\u3001\u91cd\u8981\u53d1\u73b0\u3001\u5df2\u4fee\u6539\u6587\u4ef6\u3001\u5269\u4f59\u5de5\u4f5c\u548c\u7528\u6237\u9650\u5236\u3002\u968f\u540e&#xff0c;\u539f\u6765\u7684\u6d88\u606f\u5386\u53f2\u4f1a\u88ab\u66ff\u6362\u6210\u4e00\u6761\u6458\u8981\u6d88\u606f\u3002<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">compact_history<\/span><span class=\"token punctuation\">(<\/span>messages<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    write_transcript<span class=\"token punctuation\">(<\/span>messages<span class=\"token punctuation\">)<\/span><br \/>\n    summary <span class=\"token operator\">&#061;<\/span> summarize_history<span class=\"token punctuation\">(<\/span>messages<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string\">&#034;role&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;content&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;[Compacted]\\\\n\\\\n<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>summary<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">]<\/span><\/p>\n<p>\u538b\u7f29\u540e&#xff0c;\u8ba4\u8bc1\u6d4b\u8bd5\u4efb\u52a1\u53ef\u80fd\u53ea\u5269\u4e0b\u8fd9\u6837\u7684\u4e0a\u4e0b\u6587&#xff1a;<\/p>\n<p>\u5f53\u524d\u76ee\u6807&#xff1a;\u4fee\u590d\u8ba4\u8bc1\u6d4b\u8bd5\u5931\u8d25\u3002<\/p>\n<p>\u5df2\u786e\u8ba4&#xff1a;token \u914d\u7f6e\u7f3a\u5c11\u6d4b\u8bd5\u73af\u5883\u53d8\u91cf\u3002<br \/>\n\u5df2\u4fee\u6539&#xff1a;tests\/auth\/test_token.py\u3002<br \/>\n\u5f85\u5b8c\u6210&#xff1a;\u8fd0\u884c pytest tests\/auth&#xff0c;\u5e76\u68c0\u67e5\u76f8\u5173\u914d\u7f6e\u662f\u5426\u5f71\u54cd\u5176\u4ed6\u6d4b\u8bd5\u3002<br \/>\n\u7528\u6237\u9650\u5236&#xff1a;\u4e0d\u8981\u4fee\u6539\u751f\u4ea7\u73af\u5883\u914d\u7f6e\u3002<\/p>\n<p>\u8fd9\u8db3\u4ee5\u652f\u6491\u540e\u7eed\u4efb\u52a1\u7ee7\u7eed\u6267\u884c\u3002<\/p>\n<p>\u4e0d\u8fc7&#xff0c;\u5b8c\u6574\u5386\u53f2\u5df2\u7ecf\u4e0d\u5728\u6a21\u578b\u53ef\u89c1\u7684\u4e0a\u4e0b\u6587\u91cc\u4e86\u3002\u6559\u5b66\u4ee3\u7801\u867d\u7136\u4fdd\u5b58\u4e86\u8f6c\u5f55\u6587\u4ef6&#xff0c;\u4f46\u6ca1\u6709\u63d0\u4f9b\u8ba9\u6a21\u578b\u91cd\u65b0\u8bfb\u53d6 .transcripts\/ \u7684\u5de5\u5177\u3002\u6458\u8981\u6f0f\u6389\u7684\u67d0\u4e2a\u7ec6\u8282&#xff0c;Agent \u4e0d\u4f1a\u81ea\u52a8\u627e\u56de\u6765\u3002<\/p>\n<p>\u8fd9\u4e5f\u662f\u6458\u8981\u538b\u7f29\u7684\u8fb9\u754c\u3002<\/p>\n<p>\u6458\u8981\u9002\u5408\u4fdd\u7559\u4efb\u52a1\u4e3b\u7ebf\u548c\u5173\u952e\u7ed3\u8bba&#xff0c;\u65e0\u6cd5\u66ff\u4ee3\u5b8c\u6574\u8bc1\u636e\u3002\u6d89\u53ca\u6587\u4ef6\u5185\u5bb9\u3001\u6d4b\u8bd5\u65e5\u5fd7\u3001\u63a5\u53e3\u8fd4\u56de\u503c\u7b49\u7ec6\u8282\u65f6&#xff0c;Agent \u540e\u7eed\u4ecd\u7136\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u8bfb\u53d6\u6587\u4ef6\u3001\u91cd\u65b0\u8fd0\u884c\u547d\u4ee4&#xff0c;\u6216\u8005\u7531\u7cfb\u7edf\u989d\u5916\u6062\u590d\u8fd1\u671f\u7684\u5173\u952e\u5185\u5bb9\u3002<\/p>\n<h3>\u63a5\u53e3\u5df2\u7ecf\u62d2\u7edd\u8bf7\u6c42\u540e&#xff0c;\u7cfb\u7edf\u8fd8\u5269\u4e00\u6b21\u8865\u6551\u673a\u4f1a<\/h3>\n<p>\u4e0a\u4e0b\u6587\u9608\u503c\u901a\u5e38\u662f\u4f30\u7b97\u503c\u3002<\/p>\n<p>\u6559\u5b66\u4ee3\u7801\u901a\u8fc7\u5b57\u7b26\u6570\u91cf\u4f30\u7b97\u6d88\u606f\u4f53\u79ef&#xff0c;\u5b83\u65e0\u6cd5\u5b8c\u5168\u7b49\u540c\u4e8e\u6a21\u578b\u5b9e\u9645\u8ba1\u7b97\u7684 token \u6570\u3002\u518d\u52a0\u4e0a\u4e00\u8f6e\u5de5\u5177\u8c03\u7528\u53ef\u80fd\u7a81\u7136\u8fd4\u56de\u5927\u91cf\u5185\u5bb9&#xff0c;\u7a0b\u5e8f\u6709\u673a\u4f1a\u5728\u538b\u7f29\u524d\u5c31\u6536\u5230 prompt_too_long\u3002<\/p>\n<p>\u8fd9\u65f6\u4f1a\u8fdb\u5165 reactive_compact()\u3002<\/p>\n<p>\u5b83\u4f1a\u4fdd\u7559\u6700\u8fd1\u51e0\u6761\u6d88\u606f&#xff0c;\u628a\u66f4\u65e9\u7684\u5386\u53f2\u4ea4\u7ed9\u6a21\u578b\u603b\u7ed3&#xff0c;\u7136\u540e\u91cd\u8bd5\u8bf7\u6c42\u3002\u8fd1\u671f\u6d88\u606f\u901a\u5e38\u5305\u542b\u6b63\u5728\u6267\u884c\u7684\u5de5\u5177\u8c03\u7528\u548c\u6700\u65b0\u7ed3\u679c&#xff0c;\u76f4\u63a5\u4e22\u6389\u4f1a\u8ba9\u5f53\u524d\u4efb\u52a1\u5931\u53bb\u4e0a\u4e0b\u6587\u3002<\/p>\n<p>\u7d27\u6025\u538b\u7f29\u53ea\u5141\u8bb8\u6709\u9650\u6b21\u6570\u91cd\u8bd5\u3002<\/p>\n<p>\u5982\u679c\u538b\u7f29\u540e\u4ecd\u7136\u8d85\u9650&#xff0c;\u7ee7\u7eed\u91cd\u8bd5\u6ca1\u6709\u610f\u4e49&#xff0c;\u53ea\u4f1a\u4e0d\u65ad\u6d88\u8017\u8c03\u7528\u6b21\u6570\u3002\u4ed3\u5e93\u4e3a\u8fd9\u6761\u8def\u5f84\u8bbe\u7f6e\u4e86\u91cd\u8bd5\u4e0a\u9650&#xff0c;\u8fbe\u5230\u9650\u5236\u540e\u629b\u51fa\u5f02\u5e38&#xff0c;\u7559\u7ed9\u540e\u7eed\u7684\u9519\u8bef\u6062\u590d\u673a\u5236\u5904\u7406\u3002<\/p>\n<p>\u8fd9\u4e00\u70b9\u770b\u8d77\u6765\u5f88\u666e\u901a&#xff0c;\u5374\u662f\u957f\u4efb\u52a1\u7cfb\u7edf\u5fc5\u987b\u5177\u5907\u7684\u5931\u8d25\u51fa\u53e3\u3002\u538b\u7f29\u903b\u8f91\u5982\u679c\u6c38\u8fdc\u76f8\u4fe1\u4e0b\u4e00\u6b21\u4f1a\u6210\u529f&#xff0c;\u6700\u7ec8\u53ea\u4f1a\u628a\u4e00\u6b21\u63a5\u53e3\u9519\u8bef\u53d8\u6210\u5faa\u73af\u8c03\u7528\u3002<\/p>\n<h3>\u8fd9\u5957\u65b9\u6848\u9002\u5408\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898<\/h3>\n<p>\u4e0a\u4e0b\u6587\u538b\u7f29\u4e0d\u4f1a\u63d0\u5347\u6a21\u578b\u5bf9\u4ee3\u7801\u7684\u7406\u89e3\u80fd\u529b&#xff0c;\u4e5f\u4e0d\u4f1a\u8ba9 Agent \u6c38\u8fdc\u8bb0\u4f4f\u6240\u6709\u7ec6\u8282\u3002<\/p>\n<p>\u5b83\u89e3\u51b3\u7684\u662f\u957f\u4efb\u52a1\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u7684\u5bb9\u91cf\u7ba1\u7406\u95ee\u9898\u3002<\/p>\n<p>\u5bf9\u4e8e\u6301\u7eed\u8bfb\u6587\u4ef6\u3001\u53cd\u590d\u8fd0\u884c\u6d4b\u8bd5\u3001\u9010\u6b65\u4fee\u6539\u4ee3\u7801\u7684\u4efb\u52a1&#xff0c;\u65e9\u671f\u5de5\u5177\u7ed3\u679c\u4f1a\u4e0d\u65ad\u5931\u53bb\u4ef7\u503c\u3002\u538b\u7f29\u673a\u5236\u8d1f\u8d23\u56de\u6536\u8fd9\u4e9b\u5185\u5bb9\u5360\u7528\u7684\u7a7a\u95f4&#xff0c;\u5e76\u5c3d\u53ef\u80fd\u7559\u4e0b\u4efb\u52a1\u76ee\u6807\u3001\u5f53\u524d\u8fdb\u5ea6\u548c\u53ef\u6062\u590d\u5165\u53e3\u3002<\/p>\n<p>\u8fd0\u884c\u8fd9\u4e00\u7ae0\u7684\u4ee3\u7801\u65f6&#xff0c;\u53ef\u4ee5\u91cd\u70b9\u89c2\u5bdf\u4e09\u4e2a\u73b0\u8c61&#xff1a;<\/p>\n<p>python s08_context_compact\/code.py<\/p>\n<p>\u5148\u8ba9 Agent \u8fde\u7eed\u8bfb\u53d6\u591a\u4e2a\u6587\u4ef6&#xff0c;\u89c2\u5bdf\u8f83\u65e9\u7684\u5de5\u5177\u7ed3\u679c\u662f\u5426\u88ab\u66ff\u6362\u4e3a\u5360\u4f4d\u4fe1\u606f\u3002\u63a5\u7740\u8bfb\u53d6\u8f83\u591a\u5185\u5bb9&#xff0c;\u68c0\u67e5 .task_outputs\/tool-results\/ \u662f\u5426\u51fa\u73b0\u8f6c\u5b58\u6587\u4ef6\u3002\u6700\u540e\u8fdb\u884c\u4e00\u6bb5\u8f83\u957f\u5bf9\u8bdd&#xff0c;\u89c2\u5bdf\u7ec8\u7aef\u662f\u5426\u51fa\u73b0 [auto compact] \u6216 [reactive compact]\u3002<\/p>\n<p>\u524d\u8005\u8868\u793a\u7a0b\u5e8f\u5728\u8c03\u7528\u6a21\u578b\u524d\u5b8c\u6210\u4e86\u4e3b\u52a8\u538b\u7f29&#xff1b;\u540e\u8005\u8bf4\u660e\u63a5\u53e3\u5df2\u7ecf\u62d2\u7edd\u5f53\u524d\u8bf7\u6c42&#xff0c;\u7a0b\u5e8f\u5f00\u59cb\u6267\u884c\u7d27\u6025\u5904\u7406\u3002<\/p>\n<p>\u4e0b\u4e00\u7bc7\u4f1a\u8ba8\u8bba Memory\u3002<\/p>\n<p>\u4e0a\u4e0b\u6587\u538b\u7f29\u4f1a\u4e3b\u52a8\u4e22\u5f03\u8fc7\u7a0b\u5185\u5bb9&#xff0c;\u7528\u6237\u504f\u597d\u3001\u9879\u76ee\u7ea6\u675f\u548c\u91cd\u8981\u51b3\u7b56\u4e5f\u53ef\u80fd\u968f\u7740\u5386\u53f2\u4e00\u8d77\u88ab\u7f29\u77ed\u3002Memory \u8981\u89e3\u51b3\u7684\u662f\u53e6\u4e00\u7c7b\u95ee\u9898&#xff1a;\u54ea\u4e9b\u4fe1\u606f\u5e94\u8be5\u5728\u538b\u7f29\u540e\u7ee7\u7eed\u4fdd\u7559&#xff0c;\u54ea\u4e9b\u4fe1\u606f\u503c\u5f97\u8de8\u4f1a\u8bdd\u4fdd\u5b58\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u662f\u300c\u4ece\u96f6\u7406\u89e3 Claude Code&#xff1a;20 \u4e2a Agent Harness \u673a\u5236\u300d\u7cfb\u5217\u7684\u7b2c 8 \u7bc7\u3002 \u6e90\u7801\u4ed3\u5e93&#xff1a;shareAI-lab\/learn-claude-code \u672c\u6587\u57fa\u4e8e\u5f00\u6e90\u4ed3\u5e93\u5b66\u4e60\u6574\u7406&#xff0c;\u5177\u4f53\u5b9e\u73b0\u4ee5\u4ed3\u5e93\u4ee3\u7801\u4e3a\u51c6\u3002 \u6211\u7b2c\u4e00\u6b21\u78b0\u5230\u4e0a\u4e0b\u6587\u8d85\u9650\u65f6&#xff0c;\u4efb\u52a1\u6b63\u5728\u6392\u67e5\u4e00\u7ec4\u8ba4\u8bc1\u6d4b\u8bd5\u3002<br \/>\nAgent \u5148\u8bfb\u4e86\u5931\u8d25\u65e5\u5fd7&#xff0c;\u53c8\u8bfb\u4e86\u8ba4\u8bc1\u670d\u52a1\u3001\u4ee4\u724c\u5904\u7406\u3001\u914d\u7f6e\u6587\u4ef6\u548c\u51e0\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u3002\u524d\u9762\u7684\u8fc7\u7a0b\u6ca1\u6709\u4efb\u4f55\u5f02\u5e38&#xff0c;\u547d\u4ee4\u80fd\u6267\u884c<\/p>\n","protected":false},"author":2,"featured_media":86960,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[53,50],"topic":[],"class_list":["post-86961","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ai","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f - \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\/86961.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u662f\u300c\u4ece\u96f6\u7406\u89e3 Claude Code&#xff1a;20 \u4e2a Agent Harness \u673a\u5236\u300d\u7cfb\u5217\u7684\u7b2c 8 \u7bc7\u3002 \u6e90\u7801\u4ed3\u5e93&#xff1a;shareAI-lab\/learn-claude-code \u672c\u6587\u57fa\u4e8e\u5f00\u6e90\u4ed3\u5e93\u5b66\u4e60\u6574\u7406&#xff0c;\u5177\u4f53\u5b9e\u73b0\u4ee5\u4ed3\u5e93\u4ee3\u7801\u4e3a\u51c6\u3002 \u6211\u7b2c\u4e00\u6b21\u78b0\u5230\u4e0a\u4e0b\u6587\u8d85\u9650\u65f6&#xff0c;\u4efb\u52a1\u6b63\u5728\u6392\u67e5\u4e00\u7ec4\u8ba4\u8bc1\u6d4b\u8bd5\u3002 Agent \u5148\u8bfb\u4e86\u5931\u8d25\u65e5\u5fd7&#xff0c;\u53c8\u8bfb\u4e86\u8ba4\u8bc1\u670d\u52a1\u3001\u4ee4\u724c\u5904\u7406\u3001\u914d\u7f6e\u6587\u4ef6\u548c\u51e0\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u3002\u524d\u9762\u7684\u8fc7\u7a0b\u6ca1\u6709\u4efb\u4f55\u5f02\u5e38&#xff0c;\u547d\u4ee4\u80fd\u6267\u884c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/86961.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-29T06:24:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260729062443-6a699cab74bd6.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\/86961.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/86961.html\",\"name\":\"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-29T06:24:44+00:00\",\"dateModified\":\"2026-07-29T06:24:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/86961.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/86961.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/86961.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f\"}]},{\"@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":"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f - \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\/86961.html","og_locale":"zh_CN","og_type":"article","og_title":"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u672c\u6587\u662f\u300c\u4ece\u96f6\u7406\u89e3 Claude Code&#xff1a;20 \u4e2a Agent Harness \u673a\u5236\u300d\u7cfb\u5217\u7684\u7b2c 8 \u7bc7\u3002 \u6e90\u7801\u4ed3\u5e93&#xff1a;shareAI-lab\/learn-claude-code \u672c\u6587\u57fa\u4e8e\u5f00\u6e90\u4ed3\u5e93\u5b66\u4e60\u6574\u7406&#xff0c;\u5177\u4f53\u5b9e\u73b0\u4ee5\u4ed3\u5e93\u4ee3\u7801\u4e3a\u51c6\u3002 \u6211\u7b2c\u4e00\u6b21\u78b0\u5230\u4e0a\u4e0b\u6587\u8d85\u9650\u65f6&#xff0c;\u4efb\u52a1\u6b63\u5728\u6392\u67e5\u4e00\u7ec4\u8ba4\u8bc1\u6d4b\u8bd5\u3002 Agent \u5148\u8bfb\u4e86\u5931\u8d25\u65e5\u5fd7&#xff0c;\u53c8\u8bfb\u4e86\u8ba4\u8bc1\u670d\u52a1\u3001\u4ee4\u724c\u5904\u7406\u3001\u914d\u7f6e\u6587\u4ef6\u548c\u51e0\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u3002\u524d\u9762\u7684\u8fc7\u7a0b\u6ca1\u6709\u4efb\u4f55\u5f02\u5e38&#xff0c;\u547d\u4ee4\u80fd\u6267\u884c","og_url":"https:\/\/www.wsisp.com\/helps\/86961.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-29T06:24:44+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260729062443-6a699cab74bd6.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\/86961.html","url":"https:\/\/www.wsisp.com\/helps\/86961.html","name":"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-29T06:24:44+00:00","dateModified":"2026-07-29T06:24:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/86961.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/86961.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/86961.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Agent \u8bfb\u4e86 30 \u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u7a81\u7136\u505c\u4f4f\uff1f"}]},{"@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\/86961","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=86961"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/86961\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/86960"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=86961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=86961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=86961"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=86961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}