{"id":103,"date":"2026-03-21T22:47:17","date_gmt":"2026-03-21T14:47:17","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/concepts-session\/"},"modified":"2026-03-21T23:08:52","modified_gmt":"2026-03-21T15:08:52","slug":"concepts-session","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/concepts-session\/","title":{"rendered":"\u4f1a\u8bdd\u7ba1\u7406"},"content":{"rendered":"<h1>\u4f1a\u8bdd\u7ba1\u7406<\/h1>\n<p>OpenClaw \u5c06<strong>\u6bcf\u4e2a\u667a\u80fd\u4f53\u7684\u4e00\u4e2a\u76f4\u63a5\u804a\u5929\u4f1a\u8bdd<\/strong>\u89c6\u4e3a\u4e3b\u4f1a\u8bdd\u3002\u76f4\u63a5\u804a\u5929\u6298\u53e0\u4e3a <code>agent:&lt;agentId&gt;:&lt;mainKey&gt;<\/code>\uff08\u9ed8\u8ba4 <code>main<\/code>\uff09\uff0c\u800c\u7fa4\u7ec4\/\u9891\u9053\u804a\u5929\u83b7\u5f97\u5404\u81ea\u7684\u952e\u3002<code>session.mainKey<\/code> \u4f1a\u88ab\u9075\u5faa\u3002<\/p>\n<p>\u4f7f\u7528 <code>session.dmScope<\/code> \u63a7\u5236<strong>\u79c1\u4fe1<\/strong>\u5982\u4f55\u5206\u7ec4\uff1a<\/p>\n<ul>\n<li><code>main<\/code>\uff08\u9ed8\u8ba4\uff09\uff1a\u6240\u6709\u79c1\u4fe1\u5171\u4eab\u4e3b\u4f1a\u8bdd\u4ee5\u4fdd\u6301\u8fde\u7eed\u6027\u3002<\/li>\n<li><code>per-peer<\/code>\uff1a\u8de8\u6e20\u9053\u6309\u53d1\u9001\u8005 ID \u9694\u79bb\u3002<\/li>\n<li><code>per-channel-peer<\/code>\uff1a\u6309\u6e20\u9053 + \u53d1\u9001\u8005\u9694\u79bb\uff08\u63a8\u8350\u7528\u4e8e\u591a\u7528\u6237\u6536\u4ef6\u7bb1\uff09\u3002<\/li>\n<li><code>per-account-channel-peer<\/code>\uff1a\u6309\u8d26\u6237 + \u6e20\u9053 + \u53d1\u9001\u8005\u9694\u79bb\uff08\u63a8\u8350\u7528\u4e8e\u591a\u8d26\u6237\u6536\u4ef6\u7bb1\uff09\u3002<br \/>\n  \u4f7f\u7528 <code>session.identityLinks<\/code> \u5c06\u5e26\u63d0\u4f9b\u5546\u524d\u7f00\u7684\u5bf9\u7b49 ID \u6620\u5c04\u5230\u89c4\u8303\u8eab\u4efd\uff0c\u8fd9\u6837\u5728\u4f7f\u7528 <code>per-peer<\/code>\u3001<code>per-channel-peer<\/code> \u6216 <code>per-account-channel-peer<\/code> \u65f6\uff0c\u540c\u4e00\u4e2a\u4eba\u53ef\u4ee5\u8de8\u6e20\u9053\u5171\u4eab\u79c1\u4fe1\u4f1a\u8bdd\u3002<\/li>\n<\/ul>\n<h2>Gateway \u7f51\u5173\u662f\u552f\u4e00\u6570\u636e\u6e90<\/h2>\n<p>\u6240\u6709\u4f1a\u8bdd\u72b6\u6001\u90fd<strong>\u7531 Gateway \u7f51\u5173\u62e5\u6709<\/strong>\uff08&#8221;\u4e3b&#8221; OpenClaw\uff09\u3002UI \u5ba2\u6237\u7aef\uff08macOS \u5e94\u7528\u3001WebChat \u7b49\uff09\u5fc5\u987b\u5411 Gateway \u7f51\u5173\u67e5\u8be2\u4f1a\u8bdd\u5217\u8868\u548c\u4ee4\u724c\u8ba1\u6570\uff0c\u800c\u4e0d\u662f\u8bfb\u53d6\u672c\u5730\u6587\u4ef6\u3002<\/p>\n<ul>\n<li>\u5728<strong>\u8fdc\u7a0b\u6a21\u5f0f<\/strong>\u4e0b\uff0c\u4f60\u5173\u5fc3\u7684\u4f1a\u8bdd\u5b58\u50a8\u4f4d\u4e8e\u8fdc\u7a0b Gateway \u7f51\u5173\u4e3b\u673a\u4e0a\uff0c\u800c\u4e0d\u662f\u4f60\u7684 Mac \u4e0a\u3002<\/li>\n<li>UI \u4e2d\u663e\u793a\u7684\u4ee4\u724c\u8ba1\u6570\u6765\u81ea Gateway \u7f51\u5173\u7684\u5b58\u50a8\u5b57\u6bb5\uff08<code>inputTokens<\/code>\u3001<code>outputTokens<\/code>\u3001<code>totalTokens<\/code>\u3001<code>contextTokens<\/code>\uff09\u3002\u5ba2\u6237\u7aef\u4e0d\u4f1a\u89e3\u6790 JSONL \u5bf9\u8bdd\u8bb0\u5f55\u6765&#8221;\u4fee\u6b63&#8221;\u603b\u6570\u3002<\/li>\n<\/ul>\n<h2>\u72b6\u6001\u5b58\u50a8\u4f4d\u7f6e<\/h2>\n<ul>\n<li>\u5728 <strong>Gateway \u7f51\u5173\u4e3b\u673a<\/strong>\u4e0a\uff1a<\/li>\n<li>\u5b58\u50a8\u6587\u4ef6\uff1a<code>~\/.openclaw\/agents\/&lt;agentId&gt;\/sessions\/sessions.json<\/code>\uff08\u6bcf\u4e2a\u667a\u80fd\u4f53\uff09\u3002<\/li>\n<li>\u5bf9\u8bdd\u8bb0\u5f55\uff1a<code>~\/.openclaw\/agents\/&lt;agentId&gt;\/sessions\/&lt;SessionId&gt;.jsonl<\/code>\uff08Telegram \u8bdd\u9898\u4f1a\u8bdd\u4f7f\u7528 <code>...\/&lt;SessionId&gt;-topic-&lt;threadId&gt;.jsonl<\/code>\uff09\u3002<\/li>\n<li>\u5b58\u50a8\u662f\u4e00\u4e2a\u6620\u5c04 <code>sessionKey -&gt; { sessionId, updatedAt, ... }<\/code>\u3002\u5220\u9664\u6761\u76ee\u662f\u5b89\u5168\u7684\uff1b\u5b83\u4eec\u4f1a\u6309\u9700\u91cd\u65b0\u521b\u5efa\u3002<\/li>\n<li>\u7fa4\u7ec4\u6761\u76ee\u53ef\u80fd\u5305\u542b <code>displayName<\/code>\u3001<code>channel<\/code>\u3001<code>subject<\/code>\u3001<code>room<\/code> \u548c <code>space<\/code> \u4ee5\u5728 UI \u4e2d\u6807\u8bb0\u4f1a\u8bdd\u3002<\/li>\n<li>\u4f1a\u8bdd\u6761\u76ee\u5305\u542b <code>origin<\/code> \u5143\u6570\u636e\uff08\u6807\u7b7e + \u8def\u7531\u63d0\u793a\uff09\uff0c\u4ee5\u4fbf UI \u53ef\u4ee5\u89e3\u91ca\u4f1a\u8bdd\u7684\u6765\u6e90\u3002<\/li>\n<li>OpenClaw <strong>\u4e0d<\/strong>\u8bfb\u53d6\u65e7\u7248 Pi\/Tau \u4f1a\u8bdd\u6587\u4ef6\u5939\u3002<\/li>\n<\/ul>\n<h2>\u4f1a\u8bdd\u4fee\u526a<\/h2>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOpenClaw \u5728 LLM \u8c03\u7528\u4e4b\u524d\u4ece\u5185\u5b58\u4e0a\u4e0b\u6587\u4e2d\u4fee\u526a<strong>\u65e7\u7684\u5de5\u5177\u7ed3\u679c<\/strong>\u3002<br \/>\n\u8fd9<strong>\u4e0d\u4f1a<\/strong>\u91cd\u5199 JSONL \u5386\u53f2\u8bb0\u5f55\u3002\u53c2\u89c1 <a href=\"\/concepts\/session-pruning\">\/concepts\/session-pruning<\/a>\u3002<\/p>\n<h2>\u538b\u7f29\u524d\u8bb0\u5fc6\u5237\u65b0<\/h2>\n<p>\u5f53\u4f1a\u8bdd\u63a5\u8fd1\u81ea\u52a8\u538b\u7f29\u65f6\uff0cOpenClaw \u53ef\u4ee5\u8fd0\u884c\u4e00\u4e2a<strong>\u9759\u9ed8\u8bb0\u5fc6\u5237\u65b0<\/strong>\u8f6e\u6b21\uff0c\u63d0\u9192\u6a21\u578b\u5c06\u6301\u4e45\u6027\u7b14\u8bb0\u5199\u5165\u78c1\u76d8\u3002\u8fd9\u4ec5\u5728\u5de5\u4f5c\u533a\u53ef\u5199\u65f6\u8fd0\u884c\u3002\u53c2\u89c1<a href=\"\/concepts\/memory\">\u8bb0\u5fc6<\/a>\u548c<a href=\"\/concepts\/compaction\">\u538b\u7f29<\/a>\u3002<\/p>\n<h2>\u4f20\u8f93\u5230\u4f1a\u8bdd\u952e\u7684\u6620\u5c04<\/h2>\n<ul>\n<li>\u76f4\u63a5\u804a\u5929\u9075\u5faa <code>session.dmScope<\/code>\uff08\u9ed8\u8ba4 <code>main<\/code>\uff09\u3002<\/li>\n<li><code>main<\/code>\uff1a<code>agent:&lt;agentId&gt;:&lt;mainKey&gt;<\/code>\uff08\u8de8\u8bbe\u5907\/\u6e20\u9053\u7684\u8fde\u7eed\u6027\uff09\u3002\n<ul>\n<li>\u591a\u4e2a\u7535\u8bdd\u53f7\u7801\u548c\u6e20\u9053\u53ef\u4ee5\u6620\u5c04\u5230\u540c\u4e00\u4e2a\u667a\u80fd\u4f53\u4e3b\u952e\uff1b\u5b83\u4eec\u4f5c\u4e3a\u8fdb\u5165\u540c\u4e00\u4e2a\u5bf9\u8bdd\u7684\u4f20\u8f93\u901a\u9053\u3002<\/li>\n<\/ul>\n<\/li>\n<li><code>per-peer<\/code>\uff1a<code>agent:&lt;agentId&gt;:dm:&lt;peerId&gt;<\/code>\u3002<\/li>\n<li><code>per-channel-peer<\/code>\uff1a<code>agent:&lt;agentId&gt;:&lt;channel&gt;:dm:&lt;peerId&gt;<\/code>\u3002<\/li>\n<li><code>per-account-channel-peer<\/code>\uff1a<code>agent:&lt;agentId&gt;:&lt;channel&gt;:&lt;accountId&gt;:dm:&lt;peerId&gt;<\/code>\uff08accountId \u9ed8\u8ba4\u4e3a <code>default<\/code>\uff09\u3002<\/li>\n<li>\u5982\u679c <code>session.identityLinks<\/code> \u5339\u914d\u5e26\u63d0\u4f9b\u5546\u524d\u7f00\u7684\u5bf9\u7b49 ID\uff08\u4f8b\u5982 <code>telegram:123<\/code>\uff09\uff0c\u5219\u89c4\u8303\u952e\u66ff\u6362 <code>&lt;peerId&gt;<\/code>\uff0c\u8fd9\u6837\u540c\u4e00\u4e2a\u4eba\u53ef\u4ee5\u8de8\u6e20\u9053\u5171\u4eab\u4f1a\u8bdd\u3002<\/li>\n<li>\u7fa4\u7ec4\u804a\u5929\u9694\u79bb\u72b6\u6001\uff1a<code>agent:&lt;agentId&gt;:&lt;channel&gt;:group:&lt;id&gt;<\/code>\uff08\u623f\u95f4\/\u9891\u9053\u4f7f\u7528 <code>agent:&lt;agentId&gt;:&lt;channel&gt;:channel:&lt;id&gt;<\/code>\uff09\u3002<\/li>\n<li>Telegram \u8bba\u575b\u8bdd\u9898\u5728\u7fa4\u7ec4 ID \u540e\u9644\u52a0 <code>:topic:&lt;threadId&gt;<\/code> \u4ee5\u8fdb\u884c\u9694\u79bb\u3002<\/li>\n<li>\u65e7\u7248 <code>group:&lt;id&gt;<\/code> \u952e\u4ecd\u88ab\u8bc6\u522b\u4ee5\u8fdb\u884c\u8fc1\u79fb\u3002<\/li>\n<li>\u5165\u7ad9\u4e0a\u4e0b\u6587\u53ef\u80fd\u4ecd\u4f7f\u7528 <code>group:&lt;id&gt;<\/code>\uff1b\u6e20\u9053\u4ece <code>Provider<\/code> \u63a8\u65ad\u5e76\u89c4\u8303\u5316\u4e3a\u89c4\u8303\u7684 <code>agent:&lt;agentId&gt;:&lt;channel&gt;:group:&lt;id&gt;<\/code> \u5f62\u5f0f\u3002<\/li>\n<li>\u5176\u4ed6\u6765\u6e90\uff1a<\/li>\n<li>\u5b9a\u65f6\u4efb\u52a1\uff1a<code>cron:&lt;job.id&gt;<\/code><\/li>\n<li>Webhooks\uff1a<code>hook:&lt;uuid&gt;<\/code>\uff08\u9664\u975e\u7531 hook \u663e\u5f0f\u8bbe\u7f6e\uff09<\/li>\n<li>\u8282\u70b9\u8fd0\u884c\uff1a<code>node-&lt;nodeId&gt;<\/code><\/li>\n<\/ul>\n<h2>\u751f\u547d\u5468\u671f<\/h2>\n<ul>\n<li>\u91cd\u7f6e\u7b56\u7565\uff1a\u4f1a\u8bdd\u88ab\u91cd\u7528\u76f4\u5230\u8fc7\u671f\uff0c\u8fc7\u671f\u5728\u4e0b\u4e00\u6761\u5165\u7ad9\u6d88\u606f\u65f6\u8bc4\u4f30\u3002<\/li>\n<li>\u6bcf\u65e5\u91cd\u7f6e\uff1a\u9ed8\u8ba4\u4e3a <strong>Gateway \u7f51\u5173\u4e3b\u673a\u672c\u5730\u65f6\u95f4\u51cc\u6668 4:00<\/strong>\u3002\u5f53\u4f1a\u8bdd\u7684\u6700\u540e\u66f4\u65b0\u65e9\u4e8e\u6700\u8fd1\u7684\u6bcf\u65e5\u91cd\u7f6e\u65f6\u95f4\u65f6\uff0c\u4f1a\u8bdd\u5373\u4e3a\u8fc7\u671f\u3002<\/li>\n<li>\u7a7a\u95f2\u91cd\u7f6e\uff08\u53ef\u9009\uff09\uff1a<code>idleMinutes<\/code> \u6dfb\u52a0\u4e00\u4e2a\u6ed1\u52a8\u7a7a\u95f2\u7a97\u53e3\u3002\u5f53\u540c\u65f6\u914d\u7f6e\u6bcf\u65e5\u548c\u7a7a\u95f2\u91cd\u7f6e\u65f6\uff0c<strong>\u5148\u8fc7\u671f\u8005<\/strong>\u5f3a\u5236\u65b0\u4f1a\u8bdd\u3002<\/li>\n<li>\u65e7\u7248\u4ec5\u7a7a\u95f2\u6a21\u5f0f\uff1a\u5982\u679c\u4f60\u8bbe\u7f6e\u4e86 <code>session.idleMinutes<\/code> \u800c\u6ca1\u6709\u4efb\u4f55 <code>session.reset<\/code>\/<code>resetByType<\/code> \u914d\u7f6e\uff0cOpenClaw \u4f1a\u4fdd\u6301\u4ec5\u7a7a\u95f2\u6a21\u5f0f\u4ee5\u4fdd\u6301\u5411\u540e\u517c\u5bb9\u3002<\/li>\n<li>\u6309\u7c7b\u578b\u8986\u76d6\uff08\u53ef\u9009\uff09\uff1a<code>resetByType<\/code> \u5141\u8bb8\u4f60\u8986\u76d6 <code>dm<\/code>\u3001<code>group<\/code> \u548c <code>thread<\/code> \u4f1a\u8bdd\u7684\u7b56\u7565\uff08thread = Slack\/Discord \u7ebf\u7a0b\u3001Telegram \u8bdd\u9898\u3001\u8fde\u63a5\u5668\u63d0\u4f9b\u7684 Matrix \u7ebf\u7a0b\uff09\u3002<\/li>\n<li>\u6309\u6e20\u9053\u8986\u76d6\uff08\u53ef\u9009\uff09\uff1a<code>resetByChannel<\/code> \u8986\u76d6\u6e20\u9053\u7684\u91cd\u7f6e\u7b56\u7565\uff08\u9002\u7528\u4e8e\u8be5\u6e20\u9053\u7684\u6240\u6709\u4f1a\u8bdd\u7c7b\u578b\uff0c\u4f18\u5148\u4e8e <code>reset<\/code>\/<code>resetByType<\/code>\uff09\u3002<\/li>\n<li>\u91cd\u7f6e\u89e6\u53d1\u5668\uff1a\u7cbe\u786e\u7684 <code>\/new<\/code> \u6216 <code>\/reset<\/code>\uff08\u52a0\u4e0a <code>resetTriggers<\/code> \u4e2d\u7684\u4efb\u4f55\u989d\u5916\u9879\uff09\u542f\u52a8\u65b0\u7684\u4f1a\u8bdd ID \u5e76\u4f20\u9012\u6d88\u606f\u7684\u5176\u4f59\u90e8\u5206\u3002<code>\/new &lt;model&gt;<\/code> \u63a5\u53d7\u6a21\u578b\u522b\u540d\u3001<code>provider\/model<\/code> \u6216\u63d0\u4f9b\u5546\u540d\u79f0\uff08\u6a21\u7cca\u5339\u914d\uff09\u6765\u8bbe\u7f6e\u65b0\u4f1a\u8bdd\u6a21\u578b\u3002\u5982\u679c\u5355\u72ec\u53d1\u9001 <code>\/new<\/code> \u6216 <code>\/reset<\/code>\uff0cOpenClaw \u4f1a\u8fd0\u884c\u4e00\u4e2a\u7b80\u77ed\u7684&#8221;\u95ee\u5019&#8221;\u8f6e\u6b21\u6765\u786e\u8ba4\u91cd\u7f6e\u3002<\/li>\n<li>\u624b\u52a8\u91cd\u7f6e\uff1a\u4ece\u5b58\u50a8\u4e2d\u5220\u9664\u7279\u5b9a\u952e\u6216\u5220\u9664 JSONL \u5bf9\u8bdd\u8bb0\u5f55\uff1b\u4e0b\u4e00\u6761\u6d88\u606f\u4f1a\u91cd\u65b0\u521b\u5efa\u5b83\u4eec\u3002<\/li>\n<li>\u9694\u79bb\u7684\u5b9a\u65f6\u4efb\u52a1\u603b\u662f\u6bcf\u6b21\u8fd0\u884c\u751f\u6210\u65b0\u7684 <code>sessionId<\/code>\uff08\u6ca1\u6709\u7a7a\u95f2\u91cd\u7528\uff09\u3002<\/li>\n<\/ul>\n<h2>\u53d1\u9001\u7b56\u7565\uff08\u53ef\u9009\uff09<\/h2>\n<p>\u963b\u6b62\u7279\u5b9a\u4f1a\u8bdd\u7c7b\u578b\u7684\u6295\u9012\uff0c\u65e0\u9700\u5217\u51fa\u5355\u4e2a ID\u3002<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  session: {<br \/>\n    sendPolicy: {<br \/>\n      rules: [<br \/>\n        { action: &#8220;deny&#8221;, match: { channel: &#8220;discord&#8221;, chatType: &#8220;group&#8221; } },<br \/>\n        { action: &#8220;deny&#8221;, match: { keyPrefix: &#8220;cron:&#8221; } },<br \/>\n      ],<br \/>\n      default: &#8220;allow&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u8fd0\u884c\u65f6\u8986\u76d6\uff08\u4ec5\u6240\u6709\u8005\uff09\uff1a\n\n* `\/send on` \u2192 \u4e3a\u6b64\u4f1a\u8bdd\u5141\u8bb8\n* `\/send off` \u2192 \u4e3a\u6b64\u4f1a\u8bdd\u62d2\u7edd\n* `\/send inherit` \u2192 \u6e05\u9664\u8986\u76d6\u5e76\u4f7f\u7528\u914d\u7f6e\u89c4\u5219\n  \u5c06\u8fd9\u4e9b\u4f5c\u4e3a\u72ec\u7acb\u6d88\u606f\u53d1\u9001\u4ee5\u4f7f\u5176\u751f\u6548\u3002\n\n## \u914d\u7f6e\uff08\u53ef\u9009\u91cd\u547d\u540d\u793a\u4f8b\uff09\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n\/\/ ~\/.openclaw\/openclaw.json\n{\n  session: {\n    scope: &quot;per-sender&quot;, \/\/ keep group keys separate\n    dmScope: &quot;main&quot;, \/\/ DM continuity (set per-channel-peer\/per-account-channel-peer for shared inboxes)\n    identityLinks: {\n      alice: [&quot;telegram:123456789&quot;, &quot;discord:987654321012345678&quot;],\n    },\n    reset: {\n      \/\/ Defaults: mode=daily, atHour=4 (gateway host local time).\n      \/\/ If you also set idleMinutes, whichever expires first wins.\n      mode: &quot;daily&quot;,\n      atHour: 4,\n      idleMinutes: 120,\n    },\n    resetByType: {\n      thread: { mode: &quot;daily&quot;, atHour: 4 },\n      dm: { mode: &quot;idle&quot;, idleMinutes: 240 },\n      group: { mode: &quot;idle&quot;, idleMinutes: 120 },\n    },\n    resetByChannel: {\n      discord: { mode: &quot;idle&quot;, idleMinutes: 10080 },\n    },\n    resetTriggers: [&quot;\/new&quot;, &quot;\/reset&quot;],\n    store: &quot;~\/.openclaw\/agents\/{agentId}\/sessions\/sessions.json&quot;,\n    mainKey: &quot;main&quot;,\n  },\n}\n<\/code><\/pre>\n<h2>\u68c0\u67e5<\/h2>\n<ul>\n<li><code>openclaw status<\/code> \u2014 \u663e\u793a\u5b58\u50a8\u8def\u5f84\u548c\u6700\u8fd1\u7684\u4f1a\u8bdd\u3002<\/li>\n<li><code>openclaw sessions --json<\/code> \u2014 \u5bfc\u51fa\u6bcf\u4e2a\u6761\u76ee\uff08\u4f7f\u7528 <code>--active &lt;minutes&gt;<\/code> \u8fc7\u6ee4\uff09\u3002<\/li>\n<li><code>openclaw gateway call sessions.list --params '{}'<\/code> \u2014 \u4ece\u8fd0\u884c\u4e2d\u7684 Gateway \u7f51\u5173\u83b7\u53d6\u4f1a\u8bdd\uff08\u4f7f\u7528 <code>--url<\/code>\/<code>--token<\/code> \u8fdb\u884c\u8fdc\u7a0b Gateway \u7f51\u5173\u8bbf\u95ee\uff09\u3002<\/li>\n<li>\u5728\u804a\u5929\u4e2d\u5355\u72ec\u53d1\u9001 <code>\/status<\/code> \u6d88\u606f\u53ef\u67e5\u770b\u667a\u80fd\u4f53\u662f\u5426\u53ef\u8fbe\u3001\u4f1a\u8bdd\u4e0a\u4e0b\u6587\u4f7f\u7528\u4e86\u591a\u5c11\u3001\u5f53\u524d\u7684\u601d\u8003\/\u8be6\u7ec6\u6a21\u5f0f\u5f00\u5173\uff0c\u4ee5\u53ca\u4f60\u7684 WhatsApp Web \u51ed\u8bc1\u4e0a\u6b21\u5237\u65b0\u65f6\u95f4\uff08\u6709\u52a9\u4e8e\u53d1\u73b0\u91cd\u65b0\u94fe\u63a5\u9700\u6c42\uff09\u3002<\/li>\n<li>\u53d1\u9001 <code>\/context list<\/code> \u6216 <code>\/context detail<\/code> \u67e5\u770b\u7cfb\u7edf\u63d0\u793a\u4e2d\u7684\u5185\u5bb9\u548c\u6ce8\u5165\u7684\u5de5\u4f5c\u533a\u6587\u4ef6\uff08\u4ee5\u53ca\u6700\u5927\u7684\u4e0a\u4e0b\u6587\u8d21\u732e\u8005\uff09\u3002<\/li>\n<li>\u5355\u72ec\u53d1\u9001 <code>\/stop<\/code> \u6d88\u606f\u53ef\u4e2d\u6b62\u5f53\u524d\u8fd0\u884c\u3001\u6e05\u9664\u8be5\u4f1a\u8bdd\u7684\u6392\u961f\u540e\u7eed\u64cd\u4f5c\uff0c\u5e76\u505c\u6b62\u4ece\u4e2d\u751f\u6210\u7684\u4efb\u4f55\u5b50\u667a\u80fd\u4f53\u8fd0\u884c\uff08\u56de\u590d\u5305\u542b\u5df2\u505c\u6b62\u7684\u6570\u91cf\uff09\u3002<\/li>\n<li>\u5355\u72ec\u53d1\u9001 <code>\/compact<\/code>\uff08\u53ef\u9009\u6307\u4ee4\uff09\u6d88\u606f\u53ef\u603b\u7ed3\u65e7\u4e0a\u4e0b\u6587\u5e76\u91ca\u653e\u7a97\u53e3\u7a7a\u95f4\u3002\u53c2\u89c1 <a href=\"\/concepts\/compaction\">\/concepts\/compaction<\/a>\u3002<\/li>\n<li>\u53ef\u4ee5\u76f4\u63a5\u6253\u5f00 JSONL \u5bf9\u8bdd\u8bb0\u5f55\u67e5\u770b\u5b8c\u6574\u8f6e\u6b21\u3002<\/li>\n<\/ul>\n<h2>\u63d0\u793a<\/h2>\n<ul>\n<li>\u5c06\u4e3b\u952e\u4e13\u7528\u4e8e 1:1 \u901a\u4fe1\uff1b\u8ba9\u7fa4\u7ec4\u4fdd\u7559\u5404\u81ea\u7684\u952e\u3002<\/li>\n<li>\u81ea\u52a8\u6e05\u7406\u65f6\uff0c\u5220\u9664\u5355\u4e2a\u952e\u800c\u4e0d\u662f\u6574\u4e2a\u5b58\u50a8\uff0c\u4ee5\u4fdd\u7559\u5176\u4ed6\u5730\u65b9\u7684\u4e0a\u4e0b\u6587\u3002<\/li>\n<\/ul>\n<h2>\u4f1a\u8bdd\u6765\u6e90\u5143\u6570\u636e<\/h2>\n<p>\u6bcf\u4e2a\u4f1a\u8bdd\u6761\u76ee\u8bb0\u5f55\u5176\u6765\u6e90\uff08\u5c3d\u529b\u800c\u4e3a\uff09\u5728 <code>origin<\/code> \u4e2d\uff1a<\/p>\n<ul>\n<li><code>label<\/code>\uff1a\u4eba\u7c7b\u53ef\u8bfb\u6807\u7b7e\uff08\u4ece\u5bf9\u8bdd\u6807\u7b7e + \u7fa4\u7ec4\u4e3b\u9898\/\u9891\u9053\u89e3\u6790\uff09<\/li>\n<li><code>provider<\/code>\uff1a\u89c4\u8303\u5316\u7684\u6e20\u9053 ID\uff08\u5305\u62ec\u6269\u5c55\uff09<\/li>\n<li><code>from<\/code>\/<code>to<\/code>\uff1a\u5165\u7ad9\u4fe1\u5c01\u4e2d\u7684\u539f\u59cb\u8def\u7531 ID<\/li>\n<li><code>accountId<\/code>\uff1a\u63d0\u4f9b\u5546\u8d26\u6237 ID\uff08\u591a\u8d26\u6237\u65f6\uff09<\/li>\n<li><code>threadId<\/code>\uff1a\u6e20\u9053\u652f\u6301\u65f6\u7684\u7ebf\u7a0b\/\u8bdd\u9898 ID<br \/>\n  \u6765\u6e90\u5b57\u6bb5\u4e3a\u79c1\u4fe1\u3001\u9891\u9053\u548c\u7fa4\u7ec4\u586b\u5145\u3002\u5982\u679c\u8fde\u63a5\u5668\u4ec5\u66f4\u65b0\u6295\u9012\u8def\u7531\uff08\u4f8b\u5982\uff0c\u4fdd\u6301\u79c1\u4fe1\u4e3b\u4f1a\u8bdd\u65b0\u9c9c\uff09\uff0c\u5b83\u4ecd\u5e94\u63d0\u4f9b\u5165\u7ad9\u4e0a\u4e0b\u6587\uff0c\u4ee5\u4fbf\u4f1a\u8bdd\u4fdd\u7559\u5176\u89e3\u91ca\u5668\u5143\u6570\u636e\u3002\u6269\u5c55\u53ef\u4ee5\u901a\u8fc7\u5728\u5165\u7ad9\u4e0a\u4e0b\u6587\u4e2d\u53d1\u9001 <code>ConversationLabel<\/code>\u3001<code>GroupSubject<\/code>\u3001<code>GroupChannel<\/code>\u3001<code>GroupSpace<\/code> \u548c <code>SenderName<\/code> \u5e76\u8c03\u7528 <code>recordSessionMetaFromInbound<\/code>\uff08\u6216\u5c06\u76f8\u540c\u4e0a\u4e0b\u6587\u4f20\u9012\u7ed9 <code>updateLastRoute<\/code>\uff09\u6765\u5b9e\u73b0\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4f1a\u8bdd\u7ba1\u7406 OpenClaw \u5c06\u6bcf\u4e2a\u667a\u80fd\u4f53\u7684\u4e00\u4e2a\u76f4\u63a5\u804a\u5929\u4f1a\u8bdd\u89c6\u4e3a\u4e3b\u4f1a\u8bdd\u3002\u76f4\u63a5\u804a\u5929\u6298\u53e0\u4e3a agent:&lt;ag [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=103"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/103\/revisions"}],"predecessor-version":[{"id":398,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/103\/revisions\/398"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}