{"id":122,"date":"2026-03-21T22:47:18","date_gmt":"2026-03-21T14:47:18","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-configuration-reference\/"},"modified":"2026-03-21T23:29:03","modified_gmt":"2026-03-21T15:29:03","slug":"gateway-configuration-reference","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-configuration-reference\/","title":{"rendered":"\u914d\u7f6e\u53c2\u8003"},"content":{"rendered":"<blockquote>\n<p>Complete field-by-field reference for ~\/.openclaw\/openclaw.json<\/p>\n<\/blockquote>\n<h1>\u914d\u7f6e\u53c2\u8003<\/h1>\n<p><code>~\/.openclaw\/openclaw.json<\/code> \u4e2d\u6240\u6709\u53ef\u7528\u5b57\u6bb5\u3002\u82e5\u9700\u9762\u5411\u4efb\u52a1\u7684\u6982\u89c8\uff0c\u8bf7\u53c2\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=120\">\u914d\u7f6e\u8bf4\u660e<\/a>\u3002<\/p>\n<p>\u914d\u7f6e\u683c\u5f0f\u4e3a <strong>JSON5<\/strong>\uff08\u5141\u8bb8\u6ce8\u91ca\u548c\u5c3e\u968f\u9017\u53f7\uff09\u3002\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u53ef\u9009\u7684\u2014\u2014\u7701\u7565\u65f6\uff0cOpenClaw \u4f1a\u4f7f\u7528\u5b89\u5168\u9ed8\u8ba4\u503c\u3002<\/p>\n<hr \/>\n<h2>\u6e20\u9053<\/h2>\n<p>\u53ea\u8981\u67d0\u4e2a\u6e20\u9053\u7684\u914d\u7f6e\u8282\u5b58\u5728\uff0c\u5b83\u5c31\u4f1a\u81ea\u52a8\u542f\u52a8\uff08\u9664\u975e\u8bbe\u7f6e\u4e86 <code>enabled: false<\/code>\uff09\u3002<\/p>\n<h3>\u79c1\u4fe1\u548c\u7fa4\u7ec4\u8bbf\u95ee<\/h3>\n<p>\u6240\u6709\u6e20\u9053\u90fd\u652f\u6301\u79c1\u4fe1\u7b56\u7565\u548c\u7fa4\u7ec4\u7b56\u7565\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>DM policy<\/th>\n<th>Behavior<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>pairing<\/code>\uff08\u9ed8\u8ba4\uff09<\/td>\n<td>\u672a\u77e5\u53d1\u9001\u8005\u4f1a\u6536\u5230\u4e00\u6b21\u6027\u914d\u5bf9\u7801\uff1b\u6240\u6709\u8005\u5fc5\u987b\u6279\u51c6<\/td>\n<\/tr>\n<tr>\n<td><code>allowlist<\/code><\/td>\n<td>\u4ec5 <code>allowFrom<\/code> \u4e2d\u7684\u53d1\u9001\u8005\uff08\u6216\u5df2\u914d\u5bf9\u7684\u5141\u8bb8\u5217\u8868\u5b58\u50a8\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>open<\/code><\/td>\n<td>\u5141\u8bb8\u6240\u6709\u5165\u7ad9\u79c1\u4fe1\uff08\u8981\u6c42 <code>allowFrom: [\"*\"]<\/code>\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>disabled<\/code><\/td>\n<td>\u5ffd\u7565\u6240\u6709\u5165\u7ad9\u79c1\u4fe1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th>Group policy<\/th>\n<th>Behavior<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>allowlist<\/code>\uff08\u9ed8\u8ba4\uff09<\/td>\n<td>\u4ec5\u5141\u8bb8\u5339\u914d\u5df2\u914d\u7f6e allowlist \u7684\u7fa4\u7ec4<\/td>\n<\/tr>\n<tr>\n<td><code>open<\/code><\/td>\n<td>\u7ed5\u8fc7\u7fa4\u7ec4 allowlist\uff08\u4ecd\u4f1a\u5e94\u7528\u63d0\u53ca\u95e8\u63a7\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>disabled<\/code><\/td>\n<td>\u963b\u6b62\u6240\u6709\u7fa4\u7ec4\/\u623f\u95f4\u6d88\u606f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n  <code>channels.defaults.groupPolicy<\/code> \u4f1a\u5728\u67d0\u4e2a\u63d0\u4f9b\u5546\u7684 <code>groupPolicy<\/code> \u672a\u8bbe\u7f6e\u65f6\u4f5c\u4e3a\u9ed8\u8ba4\u503c\u3002<br \/>\n  \u914d\u5bf9\u7801\u4f1a\u5728 1 \u5c0f\u65f6\u540e\u8fc7\u671f\u3002\u5f85\u5904\u7406\u7684\u79c1\u4fe1\u914d\u5bf9\u8bf7\u6c42\u6bcf\u4e2a\u6e20\u9053\u6700\u591a <strong>3 \u4e2a<\/strong>\u3002<br \/>\n  \u5982\u679c\u67d0\u4e2a\u63d0\u4f9b\u5546\u914d\u7f6e\u5757\u5b8c\u5168\u7f3a\u5931\uff08<code>channels.&lt;provider&gt;<\/code> \u4e0d\u5b58\u5728\uff09\uff0c\u8fd0\u884c\u65f6\u7fa4\u7ec4\u7b56\u7565\u4f1a\u56de\u9000\u5230 <code>allowlist<\/code>\uff08\u9ed8\u8ba4\u62d2\u7edd\uff09\uff0c\u5e76\u5728\u542f\u52a8\u65f6\u53d1\u51fa\u8b66\u544a\u3002<br \/>\n<\/\u8bf4\u660e><\/p>\n<h3>\u6e20\u9053\u6a21\u578b\u8986\u76d6<\/h3>\n<p>\u4f7f\u7528 <code>channels.modelByChannel<\/code> \u53ef\u5c06\u7279\u5b9a\u6e20\u9053 ID \u56fa\u5b9a\u5230\u67d0\u4e2a\u6a21\u578b\u3002\u503c\u63a5\u53d7 <code>provider\/model<\/code> \u6216\u5df2\u914d\u7f6e\u7684\u6a21\u578b\u522b\u540d\u3002\u5f53\u4f1a\u8bdd\u5c1a\u672a\u5b58\u5728\u6a21\u578b\u8986\u76d6\u65f6\uff08\u4f8b\u5982\u901a\u8fc7 <code>\/model<\/code> \u8bbe\u7f6e\uff09\uff0c\u624d\u4f1a\u5e94\u7528\u6e20\u9053\u6620\u5c04\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  \u6e20\u9053s: {<br \/>\n    modelByChannel: {<br \/>\n      discord: {<br \/>\n        &#8220;123456789012345678&#8221;: &#8220;anthropic\/claude-opus-4-6&#8221;,<br \/>\n      },<br \/>\n      slack: {<br \/>\n        C1234567890: &#8220;openai\/gpt-4.1&#8221;,<br \/>\n      },<br \/>\n      telegram: {<br \/>\n        &#8220;-1001234567890&#8221;: &#8220;openai\/gpt-4.1-mini&#8221;,<br \/>\n        &#8220;-1001234567890:topic:99&#8221;: &#8220;anthropic\/claude-sonnet-4-6&#8221;,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n### \u6e20\u9053\u9ed8\u8ba4\u503c\u548c\u5fc3\u8df3\n\n\u4f7f\u7528 `channels.defaults` \u4e3a\u591a\u4e2a\u63d0\u4f9b\u5546\u5171\u4eab\u7fa4\u7ec4\u7b56\u7565\u548c\u5fc3\u8df3\u884c\u4e3a\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    defaults: {\n      groupPolicy: &quot;allowlist&quot;, \/\/ open | allowlist | disabled\n      heartbeat: {\n        showOk: false,\n        showAlerts: true,\n        useIndicator: true,\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li><code>channels.defaults.groupPolicy<\/code>\uff1a\u5f53\u63d0\u4f9b\u5546\u7ea7 <code>groupPolicy<\/code> \u672a\u8bbe\u7f6e\u65f6\u4f7f\u7528\u7684\u56de\u9000\u7fa4\u7ec4\u7b56\u7565\u3002<\/li>\n<li><code>channels.defaults.heartbeat.showOk<\/code>\uff1a\u5728\u5fc3\u8df3\u8f93\u51fa\u4e2d\u5305\u542b\u5065\u5eb7\u7684\u6e20\u9053\u72b6\u6001\u3002<\/li>\n<li><code>channels.defaults.heartbeat.showAlerts<\/code>\uff1a\u5728\u5fc3\u8df3\u8f93\u51fa\u4e2d\u5305\u542b\u964d\u7ea7\/\u9519\u8bef\u72b6\u6001\u3002<\/li>\n<li><code>channels.defaults.heartbeat.useIndicator<\/code>\uff1a\u4ee5\u7d27\u51d1\u7684\u6307\u793a\u5668\u6837\u5f0f\u6e32\u67d3\u5fc3\u8df3\u8f93\u51fa\u3002<\/li>\n<\/ul>\n<h3>WhatsApp<\/h3>\n<p>WhatsApp \u901a\u8fc7 Gateway \u7f51\u5173 \u7f51\u5173\u7684 Web \u6e20\u9053\uff08Baileys Web\uff09\u8fd0\u884c\u3002\u5f53\u5b58\u5728\u5df2\u5173\u8054\u7684\u4f1a\u8bdd\u65f6\uff0c\u5b83\u4f1a\u81ea\u52a8\u542f\u52a8\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  \u6e20\u9053s: {<br \/>\n    whatsapp: {<br \/>\n      dmPolicy: &#8220;pairing&#8221;, \/\/ pairing | allowlist | open | disabled<br \/>\n      allowFrom: [&#8220;+15555550123&#8221;, &#8220;+447700900123&#8221;],<br \/>\n      textChunkLimit: 4000,<br \/>\n      chunkMode: &#8220;length&#8221;, \/\/ length | newline<br \/>\n      mediaMaxMb: 50,<br \/>\n      sendReadReceipts: true, \/\/ \u84dd\u8272\u53cc\u52fe\uff08\u81ea\u804a\u6a21\u5f0f\u4e0b\u4e3a false\uff09<br \/>\n      groups: {<br \/>\n        &#8220;*&#8221;: { requireMention: true },<br \/>\n      },<br \/>\n      groupPolicy: &#8220;allowlist&#8221;,<br \/>\n      groupAllowFrom: [&#8220;+15551234567&#8221;],<br \/>\n    },<br \/>\n  },<br \/>\n  web: {<br \/>\n    enabled: true,<br \/>\n    heartbeatSeconds: 60,<br \/>\n    reconnect: {<br \/>\n      initialMs: 2000,<br \/>\n      maxMs: 120000,<br \/>\n      factor: 1.4,<br \/>\n      jitter: 0.2,<br \/>\n      maxAttempts: 0,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n&lt;Accordion title=&quot;\u591a\u8d26\u6237 WhatsApp&quot;&gt;\n  ```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n  {\n    channels: {\n      whatsapp: {\n        accounts: {\n          default: {},\n          personal: {},\n          biz: {\n            \/\/ authDir: &quot;~\/.openclaw\/credentials\/whatsapp\/biz&quot;,\n          },\n        },\n      },\n    },\n  }\n  ```\n\n  * \u51fa\u7ad9\u547d\u4ee4\u9ed8\u8ba4\u4f7f\u7528\u8d26\u6237 `default`\uff08\u82e5\u5b58\u5728\uff09\uff1b\u5426\u5219\u4f7f\u7528\u7b2c\u4e00\u4e2a\u5df2\u914d\u7f6e\u7684\u8d26\u6237 ID\uff08\u6392\u5e8f\u540e\uff09\u3002\n  * \u53ef\u9009\u7684 `channels.whatsapp.defaultAccount` \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\uff0c\u8986\u76d6\u8be5\u56de\u9000\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002\n  * \u65e7\u7248\u5355\u8d26\u6237 Baileys \u8ba4\u8bc1\u76ee\u5f55\u4f1a\u7531 `openclaw doctor` \u8fc1\u79fb\u5230 `whatsapp\/default`\u3002\n  * \u6309\u8d26\u6237\u8986\u76d6\uff1a`channels.whatsapp.accounts.&lt;id&gt;.sendReadReceipts`\u3001`channels.whatsapp.accounts.&lt;id&gt;.dmPolicy`\u3001`channels.whatsapp.accounts.&lt;id&gt;.allowFrom`\u3002\n&lt;\/Accordion&gt;\n\n### Telegram\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    telegram: {\n      enabled: true,\n      botToken: &quot;your-bot-token&quot;,\n      dmPolicy: &quot;pairing&quot;,\n      allowFrom: [&quot;tg:123456789&quot;],\n      groups: {\n        &quot;*&quot;: { requireMention: true },\n        &quot;-1001234567890&quot;: {\n          allowFrom: [&quot;@admin&quot;],\n          systemPrompt: &quot;Keep answers brief.&quot;,\n          topics: {\n            &quot;99&quot;: {\n              requireMention: false,\n              skills: [&quot;search&quot;],\n              systemPrompt: &quot;Stay on topic.&quot;,\n            },\n          },\n        },\n      },\n      customCommands: [\n        { command: &quot;backup&quot;, description: &quot;Git backup&quot; },\n        { command: &quot;generate&quot;, description: &quot;Create an image&quot; },\n      ],\n      historyLimit: 50,\n      replyToMode: &quot;first&quot;, \/\/ off | first | all\n      linkPreview: true,\n      streaming: &quot;partial&quot;, \/\/ off | partial | block | progress\uff08\u9ed8\u8ba4\uff1aoff\uff09\n      actions: { reactions: true, sendMessage: true },\n      reactionNotifications: &quot;own&quot;, \/\/ off | own | all\n      mediaMaxMb: 100,\n      retry: {\n        attempts: 3,\n        minDelayMs: 400,\n        maxDelayMs: 30000,\n        jitter: 0.1,\n      },\n      network: {\n        autoSelectFamily: true,\n        dnsResultOrder: &quot;ipv4first&quot;,\n      },\n      proxy: &quot;socks5:\/\/localhost:9050&quot;,\n      webhookUrl: &quot;https:\/\/example.com\/telegram-webhook&quot;,\n      webhookSecret: &quot;secret&quot;,\n      webhookPath: &quot;\/telegram-webhook&quot;,\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u673a\u5668\u4eba\u4ee4\u724c\uff1a<code>channels.telegram.botToken<\/code> \u6216 <code>channels.telegram.tokenFile<\/code>\uff08\u4ec5\u5e38\u89c4\u6587\u4ef6\uff1b\u62d2\u7edd\u7b26\u53f7\u94fe\u63a5\uff09\uff0c\u9ed8\u8ba4\u8d26\u6237\u8fd8\u53ef\u56de\u9000\u5230 <code>TELEGRAM_BOT_TOKEN<\/code>\u3002<\/li>\n<li>\u53ef\u9009\u7684 <code>channels.telegram.defaultAccount<\/code> \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002<\/li>\n<li>\u5728\u591a\u8d26\u6237\u8bbe\u7f6e\uff082 \u4e2a\u53ca\u4ee5\u4e0a\u8d26\u6237 ID\uff09\u4e2d\uff0c\u8bf7\u8bbe\u7f6e\u663e\u5f0f\u9ed8\u8ba4\u503c\uff08<code>channels.telegram.defaultAccount<\/code> \u6216 <code>channels.telegram.accounts.default<\/code>\uff09\uff0c\u4ee5\u907f\u514d\u56de\u9000\u8def\u7531\uff1b\u5982\u679c\u7f3a\u5931\u6216\u65e0\u6548\uff0c<code>openclaw doctor<\/code> \u4f1a\u53d1\u51fa\u8b66\u544a\u3002<\/li>\n<li><code>configWrites: false<\/code> \u4f1a\u963b\u6b62 Telegram \u53d1\u8d77\u7684\u914d\u7f6e\u5199\u5165\uff08\u8d85\u7ea7\u7fa4\u7ec4 ID \u8fc1\u79fb\u3001<code>\/config set|unset<\/code>\uff09\u3002<\/li>\n<li>\u9876\u5c42 <code>bindings[]<\/code> \u4e2d <code>type: \"acp\"<\/code> \u7684\u6761\u76ee\u4f1a\u4e3a\u8bba\u575b\u8bdd\u9898\u914d\u7f6e\u6301\u4e45\u5316 ACP \u7ed1\u5b9a\uff08\u5728 <code>match.peer.id<\/code> \u4e2d\u4f7f\u7528\u89c4\u8303\u5f62\u5f0f <code>chatId:topic:topicId<\/code>\uff09\u3002\u5b57\u6bb5\u8bed\u4e49\u4e0e <a href=\"\/tools\/acp-agents#\u6e20\u9053-specific-settings\">ACP Agents<\/a> \u5171\u4eab\u3002<\/li>\n<li>Telegram \u6d41\u5f0f\u9884\u89c8\u4f7f\u7528 <code>sendMessage<\/code> + <code>editMessageText<\/code>\uff08\u9002\u7528\u4e8e\u79c1\u804a\u548c\u7fa4\u804a\uff09\u3002<\/li>\n<li>\u91cd\u8bd5\u7b56\u7565\uff1a\u53c2\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=102\">Retry policy<\/a>\u3002<\/li>\n<\/ul>\n<h3>Discord<\/h3>\n<p><code>``json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n{<br \/>\n  channels: {<br \/>\n    discord: {<br \/>\n      enabled: true,<br \/>\n      token: \"your-bot-token\",<br \/>\n      mediaMaxMb: 8,<br \/>\n      allowBots: false,<br \/>\n      actions: {<br \/>\n        reactions: true,<br \/>\n        stickers: true,<br \/>\n        polls: true,<br \/>\n        permissions: true,<br \/>\n        messages: true,<br \/>\n        threads: true,<br \/>\n        pins: true,<br \/>\n        search: true,<br \/>\n        memberInfo: true,<br \/>\n        roleInfo: true,<br \/>\n        roles: false,<br \/>\n        channelInfo: true,<br \/>\n        voiceStatus: true,<br \/>\n        events: true,<br \/>\n        moderation: false,<br \/>\n      },<br \/>\n      replyToMode: \"off\", \/\/ off | first | all<br \/>\n      dmPolicy: \"pairing\",<br \/>\n      allowFrom: [\"1234567890\", \"123456789012345678\"],<br \/>\n      dm: { enabled: true, groupEnabled: false, groupChannels: [\"openclaw-dm\"] },<br \/>\n      guilds: {<br \/>\n        \"123456789012345678\": {<br \/>\n          slug: \"friends-of-openclaw\",<br \/>\n          requireMention: false,<br \/>\n          ignoreOtherMentions: true,<br \/>\n          reactionNotifications: \"own\",<br \/>\n          users: [\"987654321098765432\"],<br \/>\n          channels: {<br \/>\n            general: { allow: true },<br \/>\n            help: {<br \/>\n              allow: true,<br \/>\n              requireMention: true,<br \/>\n              users: [\"987654321098765432\"],<br \/>\n              skills: [\"docs\"],<br \/>\n              systemPrompt: \"Short answers only.\",<br \/>\n            },<br \/>\n          },<br \/>\n        },<br \/>\n      },<br \/>\n      historyLimit: 20,<br \/>\n      textChunkLimit: 2000,<br \/>\n      chunkMode: \"length\", \/\/ length | newline<br \/>\n      streaming: \"off\", \/\/ off | partial | block | progress\uff08\u5728 Discord \u4e0a progress \u6620\u5c04\u4e3a partial\uff09<br \/>\n      maxLinesPerMessage: 17,<br \/>\n      ui: {<br \/>\n        components: {<br \/>\n          accentColor: \"#5865F2\",<br \/>\n        },<br \/>\n      },<br \/>\n      threadBindings: {<br \/>\n        enabled: true,<br \/>\n        idleHours: 24,<br \/>\n        maxAgeHours: 0,<br \/>\n        spawnSubagentSessions: false, \/\/ \u4e3a<\/code>sessions_spawn({ thread: true })` \u9009\u62e9\u6027\u542f\u7528<br \/>\n      },<br \/>\n      voice: {<br \/>\n        enabled: true,<br \/>\n        autoJoin: [<br \/>\n          {<br \/>\n            guildId: &#8220;123456789012345678&#8221;,<br \/>\n            \u6e20\u9053Id: &#8220;234567890123456789&#8221;,<br \/>\n          },<br \/>\n        ],<br \/>\n        daveEncryption: true,<br \/>\n        decryptionFailureTolerance: 24,<br \/>\n        tts: {<br \/>\n          provider: &#8220;openai&#8221;,<br \/>\n          openai: { voice: &#8220;alloy&#8221; },<br \/>\n        },<br \/>\n      },<br \/>\n      retry: {<br \/>\n        attempts: 3,<br \/>\n        minDelayMs: 500,<br \/>\n        maxDelayMs: 30000,<br \/>\n        jitter: 0.1,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u4ee4\u724c\uff1a`channels.discord.token`\uff0c\u9ed8\u8ba4\u8d26\u6237\u8fd8\u53ef\u56de\u9000\u5230 `DISCORD_BOT_TOKEN`\u3002\n* \u663e\u5f0f\u63d0\u4f9b Discord `token` \u7684\u76f4\u63a5\u51fa\u7ad9\u8c03\u7528\u4f1a\u4f7f\u7528\u8be5\u4ee4\u724c\uff1b\u8d26\u6237\u91cd\u8bd5\/\u7b56\u7565\u8bbe\u7f6e\u4ecd\u6765\u81ea\u5f53\u524d\u6d3b\u52a8\u8fd0\u884c\u65f6\u5feb\u7167\u4e2d\u7684\u6240\u9009\u8d26\u6237\u3002\n* \u53ef\u9009\u7684 `channels.discord.defaultAccount` \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002\n* \u5bf9\u6295\u9012\u76ee\u6807\u8bf7\u4f7f\u7528 `user:&lt;id&gt;`\uff08\u79c1\u4fe1\uff09\u6216 `channel:&lt;id&gt;`\uff08\u670d\u52a1\u5668\u9891\u9053\uff09\uff1b\u88f8\u6570\u5b57 ID \u4f1a\u88ab\u62d2\u7edd\u3002\n* \u670d\u52a1\u5668 slug \u4e3a\u5c0f\u5199\u4e14\u7a7a\u683c\u66ff\u6362\u4e3a `-`\uff1b\u9891\u9053\u952e\u4f7f\u7528 slug \u5316\u540d\u79f0\uff08\u4e0d\u542b `#`\uff09\u3002\u4f18\u5148\u4f7f\u7528 guild ID\u3002\n* \u9ed8\u8ba4\u4f1a\u5ffd\u7565\u673a\u5668\u4eba\u81ea\u5df1\u53d1\u51fa\u7684\u6d88\u606f\u3002`allowBots: true` \u53ef\u542f\u7528\uff1b\u4f7f\u7528 `allowBots: &quot;mentions&quot;` \u53ef\u4ec5\u63a5\u53d7\u63d0\u53ca\u8be5\u673a\u5668\u4eba\u7684\u673a\u5668\u4eba\u6d88\u606f\uff08\u4ecd\u4f1a\u8fc7\u6ee4\u81ea\u5df1\u7684\u6d88\u606f\uff09\u3002\n* `channels.discord.guilds.&lt;id&gt;.ignoreOtherMentions`\uff08\u53ca\u9891\u9053\u7ea7\u8986\u76d6\uff09\u4f1a\u4e22\u5f03\u90a3\u4e9b\u63d0\u53ca\u4e86\u5176\u4ed6\u7528\u6237\u6216\u89d2\u8272\u4f46\u672a\u63d0\u53ca\u673a\u5668\u4eba\u7684\u6d88\u606f\uff08\u4e0d\u542b @everyone\/@here\uff09\u3002\n* `maxLinesPerMessage`\uff08\u9ed8\u8ba4 17\uff09\u4f1a\u5728\u6d88\u606f\u8fc7\u9ad8\u65f6\u62c6\u5206\uff0c\u5373\u4fbf\u672a\u8d85\u8fc7 2000 \u4e2a\u5b57\u7b26\u3002\n* `channels.discord.threadBindings` \u63a7\u5236 Discord \u7ebf\u7a0b\u7ed1\u5b9a\u8def\u7531\uff1a\n  * `enabled`\uff1a\u7ebf\u7a0b\u7ed1\u5b9a\u4f1a\u8bdd\u529f\u80fd\u7684 Discord \u8986\u76d6\uff08`\/focus`\u3001`\/unfocus`\u3001`\/agents`\u3001`\/session idle`\u3001`\/session max-age` \u4ee5\u53ca\u7ed1\u5b9a\u540e\u7684\u6295\u9012\/\u8def\u7531\uff09\n  * `idleHours`\uff1a\u4e0d\u6d3b\u52a8\u81ea\u52a8\u53d6\u6d88\u805a\u7126\u7684 Discord \u8986\u76d6\u503c\uff08\u5c0f\u65f6\uff0c`0` \u8868\u793a\u7981\u7528\uff09\n  * `maxAgeHours`\uff1a\u786c\u6027\u6700\u5927\u5e74\u9f84\u7684 Discord \u8986\u76d6\u503c\uff08\u5c0f\u65f6\uff0c`0` \u8868\u793a\u7981\u7528\uff09\n  * `spawnSubagentSessions`\uff1a\u4e3a `sessions_spawn({ thread: true })` \u81ea\u52a8\u521b\u5efa\/\u7ed1\u5b9a\u7ebf\u7a0b\u7684\u9009\u62e9\u6027\u5f00\u5173\n* \u9876\u5c42 `bindings[]` \u4e2d `type: &quot;acp&quot;` \u7684\u6761\u76ee\u4f1a\u4e3a\u9891\u9053\u548c\u7ebf\u7a0b\u914d\u7f6e\u6301\u4e45\u5316 ACP \u7ed1\u5b9a\uff08\u5728 `match.peer.id` \u4e2d\u4f7f\u7528\u9891\u9053\/\u7ebf\u7a0b ID\uff09\u3002\u5b57\u6bb5\u8bed\u4e49\u4e0e [ACP Agents](\/tools\/acp-agents#channel-specific-settings) \u5171\u4eab\u3002\n* `channels.discord.ui.components.accentColor` \u8bbe\u7f6e Discord components v2 \u5bb9\u5668\u7684\u5f3a\u8c03\u8272\u3002\n* `channels.discord.voice` \u542f\u7528 Discord \u8bed\u97f3\u9891\u9053\u5bf9\u8bdd\uff0c\u4ee5\u53ca\u53ef\u9009\u7684\u81ea\u52a8\u52a0\u5165 + TTS \u8986\u76d6\u3002\n* `channels.discord.voice.daveEncryption` \u548c `channels.discord.voice.decryptionFailureTolerance` \u4f1a\u900f\u4f20\u7ed9 `@discordjs\/voice` \u7684 DAVE \u9009\u9879\uff08\u9ed8\u8ba4\u5206\u522b\u4e3a `true` \u548c `24`\uff09\u3002\n* \u5728\u91cd\u590d\u89e3\u5bc6\u5931\u8d25\u540e\uff0cOpenClaw \u8fd8\u4f1a\u5c1d\u8bd5\u901a\u8fc7\u79bb\u5f00\/\u91cd\u65b0\u52a0\u5165\u8bed\u97f3\u4f1a\u8bdd\u6765\u6062\u590d\u8bed\u97f3\u63a5\u6536\u3002\n* `channels.discord.streaming` \u662f\u89c4\u8303\u7684\u6d41\u5f0f\u6a21\u5f0f\u952e\u3002\u65e7\u7248 `streamMode` \u548c\u5e03\u5c14\u578b `streaming` \u503c\u4f1a\u81ea\u52a8\u8fc1\u79fb\u3002\n* `channels.discord.autoPresence` \u5c06\u8fd0\u884c\u65f6\u53ef\u7528\u6027\u6620\u5c04\u4e3a\u673a\u5668\u4eba\u72b6\u6001\uff08\u5065\u5eb7 =&gt; online\uff0c\u964d\u7ea7 =&gt; idle\uff0c\u8017\u5c3d =&gt; dnd\uff09\uff0c\u5e76\u5141\u8bb8\u53ef\u9009\u7684\u72b6\u6001\u6587\u672c\u8986\u76d6\u3002\n* `channels.discord.dangerouslyAllowNameMatching` \u4f1a\u91cd\u65b0\u542f\u7528\u53ef\u53d8\u540d\u79f0\/tag \u5339\u914d\uff08\u7d27\u6025\u517c\u5bb9\u6a21\u5f0f\uff09\u3002\n\n**\u53cd\u5e94\u901a\u77e5\u6a21\u5f0f\uff1a**`off`\uff08\u65e0\uff09\u3001`own`\uff08\u673a\u5668\u4eba\u7684\u6d88\u606f\uff0c\u9ed8\u8ba4\uff09\u3001`all`\uff08\u6240\u6709\u6d88\u606f\uff09\u3001`allowlist`\uff08`guilds.&lt;id&gt;.users` \u4e2d\u6240\u6709\u6d88\u606f\uff09\u3002\n\n### Google Chat\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    googlechat: {\n      enabled: true,\n      serviceAccountFile: &quot;\/path\/to\/service-account.json&quot;,\n      audienceType: &quot;app-url&quot;, \/\/ app-url | project-number\n      audience: &quot;https:\/\/gateway.example.com\/googlechat&quot;,\n      webhookPath: &quot;\/googlechat&quot;,\n      botUser: &quot;users\/1234567890&quot;,\n      dm: {\n        enabled: true,\n        policy: &quot;pairing&quot;,\n        allowFrom: [&quot;users\/1234567890&quot;],\n      },\n      groupPolicy: &quot;allowlist&quot;,\n      groups: {\n        &quot;spaces\/AAAA&quot;: { allow: true, requireMention: true },\n      },\n      actions: { reactions: true },\n      typingIndicator: &quot;message&quot;,\n      mediaMaxMb: 20,\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u670d\u52a1\u8d26\u6237 JSON\uff1a\u652f\u6301\u5185\u8054\uff08<code>serviceAccount<\/code>\uff09\u6216\u57fa\u4e8e\u6587\u4ef6\uff08<code>serviceAccountFile<\/code>\uff09\u3002<\/li>\n<li>\u4e5f\u652f\u6301\u670d\u52a1\u8d26\u6237 SecretRef\uff08<code>serviceAccountRef<\/code>\uff09\u3002<\/li>\n<li>\u73af\u5883\u53d8\u91cf\u56de\u9000\uff1a<code>GOOGLE_CHAT_SERVICE_ACCOUNT<\/code> \u6216 <code>GOOGLE_CHAT_SERVICE_ACCOUNT_FILE<\/code>\u3002<\/li>\n<li>\u5bf9\u6295\u9012\u76ee\u6807\u4f7f\u7528 <code>spaces\/&lt;spaceId&gt;<\/code> \u6216 <code>users\/&lt;userId&gt;<\/code>\u3002<\/li>\n<li><code>channels.googlechat.dangerouslyAllowNameMatching<\/code> \u4f1a\u91cd\u65b0\u542f\u7528\u53ef\u53d8\u7535\u5b50\u90ae\u4ef6\u4e3b\u4f53\u5339\u914d\uff08\u7d27\u6025\u517c\u5bb9\u6a21\u5f0f\uff09\u3002<\/li>\n<\/ul>\n<h3>Slack<\/h3>\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  \u6e20\u9053s: {<br \/>\n    slack: {<br \/>\n      enabled: true,<br \/>\n      botToken: &#8220;xoxb-&#8230;&#8221;,<br \/>\n      appToken: &#8220;xapp-&#8230;&#8221;,<br \/>\n      dmPolicy: &#8220;pairing&#8221;,<br \/>\n      allowFrom: [&#8220;U123&#8221;, &#8220;U456&#8221;, &#8220;*&#8221;],<br \/>\n      dm: { enabled: true, groupEnabled: false, groupChannels: [&#8220;G123&#8221;] },<br \/>\n      \u6e20\u9053s: {<br \/>\n        C123: { allow: true, requireMention: true, allowBots: false },<br \/>\n        &#8220;#general&#8221;: {<br \/>\n          allow: true,<br \/>\n          requireMention: true,<br \/>\n          allowBots: false,<br \/>\n          users: [&#8220;U123&#8221;],<br \/>\n          skills: [&#8220;docs&#8221;],<br \/>\n          systemPrompt: &#8220;Short answers only.&#8221;,<br \/>\n        },<br \/>\n      },<br \/>\n      historyLimit: 50,<br \/>\n      allowBots: false,<br \/>\n      reactionNotifications: &#8220;own&#8221;,<br \/>\n      reactionAllowlist: [&#8220;U123&#8221;],<br \/>\n      replyToMode: &#8220;off&#8221;, \/\/ off | first | all<br \/>\n      thread: {<br \/>\n        historyScope: &#8220;thread&#8221;, \/\/ thread | \u6e20\u9053<br \/>\n        inheritParent: false,<br \/>\n      },<br \/>\n      actions: {<br \/>\n        reactions: true,<br \/>\n        messages: true,<br \/>\n        pins: true,<br \/>\n        memberInfo: true,<br \/>\n        emojiList: true,<br \/>\n      },<br \/>\n      slashCommand: {<br \/>\n        enabled: true,<br \/>\n        name: &#8220;openclaw&#8221;,<br \/>\n        sessionPrefix: &#8220;slack:slash&#8221;,<br \/>\n        ephemeral: true,<br \/>\n      },<br \/>\n      typingReaction: &#8220;hourglass_flowing_sand&#8221;,<br \/>\n      textChunkLimit: 4000,<br \/>\n      chunkMode: &#8220;length&#8221;,<br \/>\n      streaming: &#8220;partial&#8221;, \/\/ off | partial | block | progress\uff08\u9884\u89c8\u6a21\u5f0f\uff09<br \/>\n      nativeStreaming: true, \/\/ \u5f53 streaming=partial \u65f6\u4f7f\u7528 Slack \u539f\u751f\u6d41\u5f0f API<br \/>\n      mediaMaxMb: 20,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* **Socket mode** \u9700\u8981\u540c\u65f6\u63d0\u4f9b `botToken` \u548c `appToken`\uff08\u9ed8\u8ba4\u8d26\u6237\u73af\u5883\u53d8\u91cf\u56de\u9000\u4e3a `SLACK_BOT_TOKEN` + `SLACK_APP_TOKEN`\uff09\u3002\n* **HTTP mode** \u9700\u8981 `botToken`\uff0c\u5916\u52a0 `signingSecret`\uff08\u6839\u7ea7\u6216\u6309\u8d26\u6237\uff09\u3002\n* `configWrites: false` \u4f1a\u963b\u6b62 Slack \u53d1\u8d77\u7684\u914d\u7f6e\u5199\u5165\u3002\n* \u53ef\u9009\u7684 `channels.slack.defaultAccount` \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002\n* `channels.slack.streaming` \u662f\u89c4\u8303\u7684\u6d41\u5f0f\u6a21\u5f0f\u952e\u3002\u65e7\u7248 `streamMode` \u548c\u5e03\u5c14\u578b `streaming` \u503c\u4f1a\u81ea\u52a8\u8fc1\u79fb\u3002\n* \u5bf9\u6295\u9012\u76ee\u6807\u4f7f\u7528 `user:&lt;id&gt;`\uff08\u79c1\u4fe1\uff09\u6216 `channel:&lt;id&gt;`\uff08\u9891\u9053\uff09\u3002\n\n**\u53cd\u5e94\u901a\u77e5\u6a21\u5f0f\uff1a**`off`\u3001`own`\uff08\u9ed8\u8ba4\uff09\u3001`all`\u3001`allowlist`\uff08\u6765\u81ea `reactionAllowlist`\uff09\u3002\n\n**\u7ebf\u7a0b\u4f1a\u8bdd\u9694\u79bb\uff1a**`thread.historyScope` \u53ef\u8bbe\u4e3a\u6309\u7ebf\u7a0b\uff08\u9ed8\u8ba4\uff09\u6216\u5728\u9891\u9053\u5185\u5171\u4eab\u3002`thread.inheritParent` \u4f1a\u5c06\u7236\u9891\u9053\u8bb0\u5f55\u590d\u5236\u5230\u65b0\u7ebf\u7a0b\u3002\n\n* `typingReaction` \u4f1a\u5728\u56de\u590d\u8fd0\u884c\u671f\u95f4\uff0c\u4e3a\u5165\u7ad9 Slack \u6d88\u606f\u6dfb\u52a0\u4e00\u4e2a\u4e34\u65f6\u53cd\u5e94\uff0c\u5e76\u5728\u5b8c\u6210\u540e\u79fb\u9664\u3002\u8bf7\u4f7f\u7528 Slack emoji \u77ed\u4ee3\u7801\uff0c\u4f8b\u5982 `&quot;hourglass_flowing_sand&quot;`\u3002\n\n| Action group | Default | Notes        |\n| ------------ | ------- | ------------ |\n| reactions    | \u5df2\u542f\u7528     | \u6dfb\u52a0\u53cd\u5e94 + \u5217\u51fa\u53cd\u5e94  |\n| messages     | \u5df2\u542f\u7528     | \u8bfb\u53d6\/\u53d1\u9001\/\u7f16\u8f91\/\u5220\u9664  |\n| pins         | \u5df2\u542f\u7528     | \u7f6e\u9876\/\u53d6\u6d88\u7f6e\u9876\/\u5217\u51fa   |\n| memberInfo   | \u5df2\u542f\u7528     | \u6210\u5458\u4fe1\u606f         |\n| emojiList    | \u5df2\u542f\u7528     | \u81ea\u5b9a\u4e49 emoji \u5217\u8868 |\n\n### Mattermost\n\nMattermost \u4ee5\u63d2\u4ef6\u5f62\u5f0f\u63d0\u4f9b\uff1a`openclaw plugins install @openclaw\/mattermost`\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    mattermost: {\n      enabled: true,\n      botToken: &quot;mm-token&quot;,\n      baseUrl: &quot;https:\/\/chat.example.com&quot;,\n      dmPolicy: &quot;pairing&quot;,\n      chatmode: &quot;oncall&quot;, \/\/ oncall | onmessage | onchar\n      oncharPrefixes: [&quot;&gt;&quot;, &quot;!&quot;],\n      commands: {\n        native: true, \/\/ \u9009\u62e9\u6027\u542f\u7528\n        nativeSkills: true,\n        callbackPath: &quot;\/api\/channels\/mattermost\/command&quot;,\n        \/\/ \u4e3a\u53cd\u5411\u4ee3\u7406\/\u516c\u5171\u90e8\u7f72\u63d0\u4f9b\u53ef\u9009\u7684\u663e\u5f0f URL\n        callbackUrl: &quot;https:\/\/gateway.example.com\/api\/channels\/mattermost\/command&quot;,\n      },\n      textChunkLimit: 4000,\n      chunkMode: &quot;length&quot;,\n    },\n  },\n}\n<\/code><\/pre>\n<p>\u804a\u5929\u6a21\u5f0f\uff1a<code>oncall<\/code>\uff08\u5728 @ \u63d0\u53ca\u65f6\u56de\u590d\uff0c\u9ed8\u8ba4\uff09\u3001<code>onmessage<\/code>\uff08\u6bcf\u6761\u6d88\u606f\u90fd\u56de\u590d\uff09\u3001<code>onchar<\/code>\uff08\u4ee5\u89e6\u53d1\u524d\u7f00\u5f00\u5934\u7684\u6d88\u606f\uff09\u3002<\/p>\n<p>\u542f\u7528 Mattermost \u539f\u751f\u547d\u4ee4\u65f6\uff1a<\/p>\n<ul>\n<li><code>commands.callbackPath<\/code> \u5fc5\u987b\u662f\u8def\u5f84\uff08\u4f8b\u5982 <code>\/api\/channels\/mattermost\/command<\/code>\uff09\uff0c\u4e0d\u80fd\u662f\u5b8c\u6574 URL\u3002<\/li>\n<li><code>commands.callbackUrl<\/code> \u5fc5\u987b\u89e3\u6790\u5230 OpenClaw Gateway \u7f51\u5173 \u7f51\u5173\u7aef\u70b9\uff0c\u5e76\u4e14 Mattermost \u670d\u52a1\u5668\u53ef\u4ee5\u8bbf\u95ee\u5b83\u3002<\/li>\n<li>\u5bf9\u4e8e\u79c1\u6709\/tailnet\/\u5185\u7f51\u56de\u8c03\u4e3b\u673a\uff0cMattermost \u53ef\u80fd\u8981\u6c42<br \/>\n  <code>ServiceSettings.AllowedUntrustedInternalConnections<\/code> \u5305\u542b\u8be5\u56de\u8c03\u4e3b\u673a\/\u57df\u540d\u3002<br \/>\n  \u8bf7\u4f7f\u7528\u4e3b\u673a\/\u57df\u540d\u503c\uff0c\u800c\u4e0d\u662f\u5b8c\u6574 URL\u3002<\/li>\n<li><code>channels.mattermost.configWrites<\/code>\uff1a\u5141\u8bb8\u6216\u62d2\u7edd Mattermost \u53d1\u8d77\u7684\u914d\u7f6e\u5199\u5165\u3002<\/li>\n<li><code>channels.mattermost.requireMention<\/code>\uff1a\u5728\u9891\u9053\u4e2d\u56de\u590d\u524d\u8981\u6c42 <code>@mention<\/code>\u3002<\/li>\n<li>\u53ef\u9009\u7684 <code>channels.mattermost.defaultAccount<\/code> \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002<\/li>\n<\/ul>\n<h3>Signal<\/h3>\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  \u6e20\u9053s: {<br \/>\n    signal: {<br \/>\n      enabled: true,<br \/>\n      account: &#8220;+15555550123&#8221;, \/\/ \u53ef\u9009\u8d26\u6237\u7ed1\u5b9a<br \/>\n      dmPolicy: &#8220;pairing&#8221;,<br \/>\n      allowFrom: [&#8220;+15551234567&#8221;, &#8220;uuid:123e4567-e89b-12d3-a456-426614174000&#8221;],<br \/>\n      configWrites: true,<br \/>\n      reactionNotifications: &#8220;own&#8221;, \/\/ off | own | all | allowlist<br \/>\n      reactionAllowlist: [&#8220;+15551234567&#8221;, &#8220;uuid:123e4567-e89b-12d3-a456-426614174000&#8221;],<br \/>\n      historyLimit: 50,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n**\u53cd\u5e94\u901a\u77e5\u6a21\u5f0f\uff1a**`off`\u3001`own`\uff08\u9ed8\u8ba4\uff09\u3001`all`\u3001`allowlist`\uff08\u6765\u81ea `reactionAllowlist`\uff09\u3002\n\n* `channels.signal.account`\uff1a\u5c06\u6e20\u9053\u542f\u52a8\u56fa\u5b9a\u5230\u7279\u5b9a Signal \u8d26\u6237\u8eab\u4efd\u3002\n* `channels.signal.configWrites`\uff1a\u5141\u8bb8\u6216\u62d2\u7edd Signal \u53d1\u8d77\u7684\u914d\u7f6e\u5199\u5165\u3002\n* \u53ef\u9009\u7684 `channels.signal.defaultAccount` \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002\n\n### BlueBubbles\n\nBlueBubbles \u662f\u63a8\u8350\u7684 iMessage \u8def\u5f84\uff08\u7531\u63d2\u4ef6\u652f\u6301\uff0c\u914d\u7f6e\u5728 `channels.bluebubbles` \u4e0b\uff09\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    bluebubbles: {\n      enabled: true,\n      dmPolicy: &quot;pairing&quot;,\n      \/\/ serverUrl\u3001password\u3001webhookPath\u3001\u7fa4\u7ec4\u63a7\u5236\u548c\u9ad8\u7ea7\u64cd\u4f5c\uff1a\n      \/\/ \u89c1 \/channels\/bluebubbles\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u6b64\u5904\u6db5\u76d6\u7684\u6838\u5fc3\u952e\u8def\u5f84\uff1a<code>channels.bluebubbles<\/code>\u3001<code>channels.bluebubbles.dmPolicy<\/code>\u3002<\/li>\n<li>\u53ef\u9009\u7684 <code>channels.bluebubbles.defaultAccount<\/code> \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002<\/li>\n<li>\u5b8c\u6574\u7684 BlueBubbles \u6e20\u9053\u914d\u7f6e\u6587\u6863\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=16\">BlueBubbles<\/a>\u3002<\/li>\n<\/ul>\n<h3>iMessage<\/h3>\n<p>OpenClaw \u4f1a\u542f\u52a8 <code>imsg rpc<\/code>\uff08\u901a\u8fc7 stdio \u7684 JSON-RPC\uff09\u3002\u4e0d\u9700\u8981\u5b88\u62a4\u8fdb\u7a0b\u6216\u7aef\u53e3\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  \u6e20\u9053s: {<br \/>\n    imessage: {<br \/>\n      enabled: true,<br \/>\n      cliPath: &#8220;imsg&#8221;,<br \/>\n      dbPath: &#8220;~\/Library\/Messages\/chat.db&#8221;,<br \/>\n      remoteHost: &#8220;user@\u7f51\u5173-host&#8221;,<br \/>\n      dmPolicy: &#8220;pairing&#8221;,<br \/>\n      allowFrom: [&#8220;+15555550123&#8221;, &#8220;user@example.com&#8221;, &#8220;chat_id:123&#8221;],<br \/>\n      historyLimit: 50,<br \/>\n      includeAttachments: false,<br \/>\n      attachmentRoots: [&#8220;\/Users\/<em>\/Library\/Messages\/Attachments&#8221;],<br \/>\n      remoteAttachmentRoots: [&#8220;\/Users\/<\/em>\/Library\/Messages\/Attachments&#8221;],<br \/>\n      mediaMaxMb: 16,<br \/>\n      service: &#8220;auto&#8221;,<br \/>\n      region: &#8220;US&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u53ef\u9009\u7684 `channels.imessage.defaultAccount` \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002\n\n* \u9700\u8981\u5bf9 Messages DB \u5177\u6709 Full Disk Access\u3002\n\n* \u4f18\u5148\u4f7f\u7528 `chat_id:&lt;id&gt;` \u76ee\u6807\u3002\u4f7f\u7528 `imsg chats --limit 20` \u5217\u51fa\u804a\u5929\u3002\n\n* `cliPath` \u53ef\u4ee5\u6307\u5411 SSH \u5305\u88c5\u5668\uff1b\u8bbe\u7f6e `remoteHost`\uff08`host` \u6216 `user@host`\uff09\u4ee5\u901a\u8fc7 SCP \u83b7\u53d6\u9644\u4ef6\u3002\n\n* `attachmentRoots` \u548c `remoteAttachmentRoots` \u4f1a\u9650\u5236\u5165\u7ad9\u9644\u4ef6\u8def\u5f84\uff08\u9ed8\u8ba4\uff1a`\/Users\/*\/Library\/Messages\/Attachments`\uff09\u3002\n\n* SCP \u4f7f\u7528\u4e25\u683c\u4e3b\u673a\u5bc6\u94a5\u68c0\u67e5\uff0c\u56e0\u6b64\u8bf7\u786e\u4fdd\u4e2d\u7ee7\u4e3b\u673a\u5bc6\u94a5\u5df2\u5b58\u5728\u4e8e `~\/.ssh\/known_hosts`\u3002\n\n* `channels.imessage.configWrites`\uff1a\u5141\u8bb8\u6216\u62d2\u7edd iMessage \u53d1\u8d77\u7684\u914d\u7f6e\u5199\u5165\u3002\n\n&lt;Accordion title=&quot;iMessage SSH \u5305\u88c5\u5668\u793a\u4f8b&quot;&gt;\n  ```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n  #!\/usr\/bin\/env bash\n  exec ssh -T gateway-host imsg &quot;$@&quot;\n  ```\n&lt;\/Accordion&gt;\n\n### Microsoft Teams\n\nMicrosoft Teams \u7531\u6269\u5c55\u652f\u6301\uff0c\u5e76\u914d\u7f6e\u5728 `channels.msteams` \u4e0b\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    msteams: {\n      enabled: true,\n      configWrites: true,\n      \/\/ appId\u3001appPassword\u3001tenantId\u3001webhook\u3001\u56e2\u961f\/\u9891\u9053\u7b56\u7565\uff1a\n      \/\/ \u89c1 \/channels\/msteams\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u6b64\u5904\u6db5\u76d6\u7684\u6838\u5fc3\u952e\u8def\u5f84\uff1a<code>channels.msteams<\/code>\u3001<code>channels.msteams.configWrites<\/code>\u3002<\/li>\n<li>\u5b8c\u6574\u7684 Teams \u914d\u7f6e\uff08\u51ed\u8bc1\u3001webhook\u3001\u79c1\u4fe1\/\u7fa4\u7ec4\u7b56\u7565\u3001\u6309\u56e2\u961f\/\u6309\u9891\u9053\u8986\u76d6\uff09\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=30\">Microsoft Teams<\/a>\u3002<\/li>\n<\/ul>\n<h3>IRC<\/h3>\n<p>IRC \u7531\u6269\u5c55\u652f\u6301\uff0c\u5e76\u914d\u7f6e\u5728 <code>channels.irc<\/code> \u4e0b\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  \u6e20\u9053s: {<br \/>\n    irc: {<br \/>\n      enabled: true,<br \/>\n      dmPolicy: &#8220;pairing&#8221;,<br \/>\n      configWrites: true,<br \/>\n      nickserv: {<br \/>\n        enabled: true,<br \/>\n        service: &#8220;NickServ&#8221;,<br \/>\n        password: &#8220;${IRC_NICKSERV_PASSWORD}&#8221;,<br \/>\n        register: false,<br \/>\n        registerEmail: &#8220;bot@example.com&#8221;,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u6b64\u5904\u6db5\u76d6\u7684\u6838\u5fc3\u952e\u8def\u5f84\uff1a`channels.irc`\u3001`channels.irc.dmPolicy`\u3001`channels.irc.configWrites`\u3001`channels.irc.nickserv.*`\u3002\n* \u53ef\u9009\u7684 `channels.irc.defaultAccount` \u4f1a\u5728\u5176\u4e0e\u67d0\u4e2a\u5df2\u914d\u7f6e\u8d26\u6237 ID \u5339\u914d\u65f6\u8986\u76d6\u9ed8\u8ba4\u8d26\u6237\u9009\u62e9\u3002\n* \u5b8c\u6574\u7684 IRC \u6e20\u9053\u914d\u7f6e\uff08\u4e3b\u673a\/\u7aef\u53e3\/TLS\/\u9891\u9053\/allowlist\/\u63d0\u53ca\u95e8\u63a7\uff09\u89c1 [IRC](\/channels\/irc)\u3002\n\n### \u591a\u8d26\u6237\uff08\u6240\u6709\u6e20\u9053\uff09\n\n\u6309\u6e20\u9053\u8fd0\u884c\u591a\u4e2a\u8d26\u6237\uff08\u6bcf\u4e2a\u8d26\u6237\u6709\u81ea\u5df1\u7684 `accountId`\uff09\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    telegram: {\n      accounts: {\n        default: {\n          name: &quot;Primary bot&quot;,\n          botToken: &quot;123456:ABC...&quot;,\n        },\n        alerts: {\n          name: &quot;Alerts bot&quot;,\n          botToken: &quot;987654:XYZ...&quot;,\n        },\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u7701\u7565 <code>accountId<\/code> \u65f6\u4f7f\u7528 <code>default<\/code>\uff08CLI + \u8def\u7531\uff09\u3002<\/li>\n<li>\u73af\u5883\u53d8\u91cf\u4ee4\u724c\u4ec5\u9002\u7528\u4e8e <strong>default<\/strong> \u8d26\u6237\u3002<\/li>\n<li>\u57fa\u7840\u6e20\u9053\u8bbe\u7f6e\u9002\u7528\u4e8e\u6240\u6709\u8d26\u6237\uff0c\u9664\u975e\u6309\u8d26\u6237\u8986\u76d6\u3002<\/li>\n<li>\u4f7f\u7528 <code>bindings[].match.accountId<\/code> \u5c06\u6bcf\u4e2a\u8d26\u6237\u8def\u7531\u5230\u4e0d\u540c\u667a\u80fd\u4f53\u3002<\/li>\n<li>\u5982\u679c\u4f60\u901a\u8fc7 <code>openclaw channels add<\/code>\uff08\u6216\u6e20\u9053\u65b0\u624b\u5f15\u5bfc\uff09\u6dfb\u52a0\u4e86\u4e00\u4e2a\u975e\u9ed8\u8ba4\u8d26\u6237\uff0c\u800c\u5f53\u524d\u4ecd\u662f\u5355\u8d26\u6237\u9876\u5c42\u6e20\u9053\u914d\u7f6e\uff0cOpenClaw \u4f1a\u5148\u5c06\u5e26\u8d26\u6237\u4f5c\u7528\u57df\u7684\u9876\u5c42\u5355\u8d26\u6237\u503c\u79fb\u52a8\u5230 <code>channels.&lt;channel&gt;.accounts.default<\/code>\uff0c\u4ee5\u4fbf\u539f\u59cb\u8d26\u6237\u7ee7\u7eed\u5de5\u4f5c\u3002<\/li>\n<li>\u73b0\u6709\u4ec5\u6e20\u9053\u7ed1\u5b9a\uff08\u65e0 <code>accountId<\/code>\uff09\u4ecd\u4f1a\u5339\u914d\u9ed8\u8ba4\u8d26\u6237\uff1b\u8d26\u6237\u4f5c\u7528\u57df\u7ed1\u5b9a\u4ecd\u662f\u53ef\u9009\u7684\u3002<\/li>\n<li>\u5f53\u5b58\u5728\u547d\u540d\u8d26\u6237\u4f46\u7f3a\u5c11 <code>default<\/code> \u65f6\uff0c<code>openclaw doctor --fix<\/code> \u4e5f\u4f1a\u901a\u8fc7\u5c06\u5e26\u8d26\u6237\u4f5c\u7528\u57df\u7684\u9876\u5c42\u5355\u8d26\u6237\u503c\u79fb\u52a8\u5230 <code>accounts.default<\/code> \u6765\u4fee\u590d\u6df7\u5408\u5f62\u72b6\u3002<\/li>\n<\/ul>\n<h3>\u5176\u4ed6\u6269\u5c55\u6e20\u9053<\/h3>\n<p>\u8bb8\u591a\u6269\u5c55\u6e20\u9053\u90fd\u914d\u7f6e\u4e3a <code>channels.&lt;id&gt;<\/code>\uff0c\u5e76\u5728\u5176\u4e13\u5c5e\u6e20\u9053\u9875\u9762\u4e2d\u8bb0\u5f55\uff08\u4f8b\u5982 Feishu\u3001Matrix\u3001LINE\u3001Nostr\u3001Zalo\u3001Nextcloud Talk\u3001Synology Chat \u548c Twitch\uff09\u3002<br \/>\n\u67e5\u770b\u5b8c\u6574\u6e20\u9053\u7d22\u5f15\uff1a<a href=\"https:\/\/pa.yingzhi8.cn\/?p=757\">Channels<\/a>\u3002<\/p>\n<h3>\u7fa4\u804a\u63d0\u53ca\u95e8\u63a7<\/h3>\n<p>\u7fa4\u6d88\u606f\u9ed8\u8ba4<strong>\u8981\u6c42\u63d0\u53ca<\/strong>\uff08\u5143\u6570\u636e\u63d0\u53ca\u6216\u5b89\u5168\u6b63\u5219\u6a21\u5f0f\uff09\u3002\u9002\u7528\u4e8e WhatsApp\u3001Telegram\u3001Discord\u3001Google Chat \u548c iMessage \u7fa4\u804a\u3002<\/p>\n<p><strong>\u63d0\u53ca\u7c7b\u578b\uff1a<\/strong><\/p>\n<ul>\n<li><strong>\u5143\u6570\u636e\u63d0\u53ca<\/strong>\uff1a\u5e73\u53f0\u539f\u751f @ \u63d0\u53ca\u3002\u5728 WhatsApp \u81ea\u804a\u6a21\u5f0f\u4e2d\u4f1a\u88ab\u5ffd\u7565\u3002<\/li>\n<li><strong>\u6587\u672c\u6a21\u5f0f<\/strong>\uff1a\u4f4d\u4e8e <code>agents.list[].groupChat.mentionPatterns<\/code> \u4e2d\u7684\u5b89\u5168\u6b63\u5219\u6a21\u5f0f\u3002\u65e0\u6548\u6a21\u5f0f\u548c\u4e0d\u5b89\u5168\u7684\u5d4c\u5957\u91cd\u590d\u4f1a\u88ab\u5ffd\u7565\u3002<\/li>\n<li>\u53ea\u6709\u5728\u53ef\u4ee5\u68c0\u6d4b\u63d0\u53ca\u7684\u60c5\u51b5\u4e0b\uff08\u539f\u751f\u63d0\u53ca\u6216\u81f3\u5c11\u4e00\u4e2a\u6a21\u5f0f\uff09\uff0c\u624d\u4f1a\u5f3a\u5236\u6267\u884c\u63d0\u53ca\u95e8\u63a7\u3002<\/li>\n<\/ul>\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  messages: {<br \/>\n    groupChat: { historyLimit: 50 },<br \/>\n  },<br \/>\n  agents: {<br \/>\n    list: [{ id: &#8220;main&#8221;, groupChat: { mentionPatterns: [&#8220;@openclaw&#8221;, &#8220;openclaw&#8221;] } }],<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n`messages.groupChat.historyLimit` \u8bbe\u7f6e\u5168\u5c40\u9ed8\u8ba4\u503c\u3002\u6e20\u9053\u53ef\u901a\u8fc7 `channels.&lt;channel&gt;.historyLimit`\uff08\u6216\u6309\u8d26\u6237\uff09\u8986\u76d6\u3002\u8bbe\u4e3a `0` \u53ef\u7981\u7528\u3002\n\n#### \u79c1\u4fe1\u5386\u53f2\u9650\u5236\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    telegram: {\n      dmHistoryLimit: 30,\n      dms: {\n        &quot;123456789&quot;: { historyLimit: 50 },\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<p>\u89e3\u6790\u987a\u5e8f\uff1a\u6309\u79c1\u4fe1\u8986\u76d6 \u2192 \u63d0\u4f9b\u5546\u9ed8\u8ba4\u503c \u2192 \u65e0\u9650\u5236\uff08\u5168\u90e8\u4fdd\u7559\uff09\u3002<\/p>\n<p>\u652f\u6301\uff1a<code>telegram<\/code>\u3001<code>whatsapp<\/code>\u3001<code>discord<\/code>\u3001<code>slack<\/code>\u3001<code>signal<\/code>\u3001<code>imessage<\/code>\u3001<code>msteams<\/code>\u3002<\/p>\n<h4>\u81ea\u804a\u6a21\u5f0f<\/h4>\n<p>\u5c06\u4f60\u81ea\u5df1\u7684\u53f7\u7801\u5305\u542b\u5728 <code>allowFrom<\/code> \u4e2d\u53ef\u542f\u7528\u81ea\u804a\u6a21\u5f0f\uff08\u5ffd\u7565\u539f\u751f @ \u63d0\u53ca\uff0c\u4ec5\u54cd\u5e94\u6587\u672c\u6a21\u5f0f\uff09\uff1a<\/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  \u6e20\u9053s: {<br \/>\n    whatsapp: {<br \/>\n      allowFrom: [&#8220;+15555550123&#8221;],<br \/>\n      groups: { &#8220;*&#8221;: { requireMention: true } },<br \/>\n    },<br \/>\n  },<br \/>\n  agents: {<br \/>\n    list: [<br \/>\n      {<br \/>\n        id: &#8220;main&#8221;,<br \/>\n        groupChat: { mentionPatterns: [&#8220;reisponde&#8221;, &#8220;@openclaw&#8221;] },<br \/>\n      },<br \/>\n    ],<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n### \u547d\u4ee4\uff08\u804a\u5929\u547d\u4ee4\u5904\u7406\uff09\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  commands: {\n    native: &quot;auto&quot;, \/\/ \u5728\u652f\u6301\u65f6\u6ce8\u518c\u539f\u751f\u547d\u4ee4\n    text: true, \/\/ \u89e3\u6790\u804a\u5929\u6d88\u606f\u4e2d\u7684 \/commands\n    bash: false, \/\/ \u5141\u8bb8 !\uff08\u522b\u540d\uff1a\/bash\uff09\n    bashForegroundMs: 2000,\n    config: false, \/\/ \u5141\u8bb8 \/config\n    debug: false, \/\/ \u5141\u8bb8 \/debug\n    restart: false, \/\/ \u5141\u8bb8 \/restart + gateway restart \u5de5\u5177\n    allowFrom: {\n      &quot;*&quot;: [&quot;user1&quot;],\n      discord: [&quot;user:123&quot;],\n    },\n    useAccessGroups: true,\n  },\n}\n<\/code><\/pre>\n<p>\n  * \u6587\u672c\u547d\u4ee4\u5fc5\u987b\u662f\u4ee5 <code>\/<\/code> \u5f00\u5934\u7684<strong>\u72ec\u7acb<\/strong>\u6d88\u606f\u3002<br \/>\n  * <code>native: \"auto\"<\/code> \u4f1a\u4e3a Discord\/Telegram \u6253\u5f00\u539f\u751f\u547d\u4ee4\uff0c\u800c\u8ba9 Slack \u4fdd\u6301\u5173\u95ed\u3002<br \/>\n  * \u53ef\u6309\u6e20\u9053\u8986\u76d6\uff1a<code>channels.discord.commands.native<\/code>\uff08\u5e03\u5c14\u503c\u6216 <code>\"auto\"<\/code>\uff09\u3002<code>false<\/code> \u4f1a\u6e05\u9664\u5148\u524d\u5df2\u6ce8\u518c\u7684\u547d\u4ee4\u3002<br \/>\n  * <code>channels.telegram.customCommands<\/code> \u53ef\u6dfb\u52a0\u989d\u5916\u7684 Telegram \u673a\u5668\u4eba\u83dc\u5355\u9879\u3002<br \/>\n  * <code>bash: true<\/code> \u4f1a\u4e3a\u4e3b\u673a shell \u542f\u7528 <code>! &lt;cmd&gt;<\/code>\u3002\u8981\u6c42 <code>tools.elevated.enabled<\/code> \u5df2\u542f\u7528\uff0c\u4e14\u53d1\u9001\u8005\u5728 <code>tools.elevated.allowFrom.&lt;channel&gt;<\/code> \u4e2d\u3002<br \/>\n  * <code>config: true<\/code> \u542f\u7528 <code>\/config<\/code>\uff08\u8bfb\u53d6\/\u5199\u5165 <code>openclaw.json<\/code>\uff09\u3002\u5bf9\u4e8e \u7f51\u5173 <code>chat.send<\/code> \u5ba2\u6237\u7aef\uff0c\u6301\u4e45\u5316\u7684 <code>\/config set|unset<\/code> \u5199\u5165\u8fd8\u8981\u6c42 <code>operator.admin<\/code>\uff1b\u53ea\u8bfb\u7684 <code>\/config show<\/code> \u5bf9\u666e\u901a\u5199\u4f5c\u7528\u57df operator \u5ba2\u6237\u7aef\u4ecd\u7136\u53ef\u7528\u3002<br \/>\n  * <code>channels.&lt;provider&gt;.configWrites<\/code> \u6309\u6e20\u9053\u63a7\u5236\u914d\u7f6e\u53d8\u66f4\uff08\u9ed8\u8ba4\uff1atrue\uff09\u3002<br \/>\n  * \u5bf9\u591a\u8d26\u6237\u6e20\u9053\uff0c<code>channels.&lt;provider&gt;.accounts.&lt;id&gt;.configWrites<\/code> \u4e5f\u4f1a\u63a7\u5236\u9488\u5bf9\u8be5\u8d26\u6237\u7684\u5199\u5165\uff08\u4f8b\u5982 <code>\/allowlist --config --account &lt;id&gt;<\/code> \u6216 <code>\/config set channels.&lt;provider&gt;.accounts.&lt;id&gt;...<\/code>\uff09\u3002<br \/>\n  * <code>allowFrom<\/code> \u662f\u6309\u63d0\u4f9b\u5546\u914d\u7f6e\u7684\u3002\u8bbe\u7f6e\u540e\uff0c\u5b83\u5c06\u6210\u4e3a<strong>\u552f\u4e00<\/strong>\u7684\u6388\u6743\u6765\u6e90\uff08\u6e20\u9053 allowlist\/\u914d\u5bf9\u548c <code>useAccessGroups<\/code> \u90fd\u4f1a\u88ab\u5ffd\u7565\uff09\u3002<br \/>\n  * \u5f53 <code>allowFrom<\/code> \u672a\u8bbe\u7f6e\u65f6\uff0c<code>useAccessGroups: false<\/code> \u5141\u8bb8\u547d\u4ee4\u7ed5\u8fc7\u8bbf\u95ee\u7ec4\u7b56\u7565\u3002\n<\/p>\n<hr \/>\n<h2>\u667a\u80fd\u4f53\u9ed8\u8ba4\u503c<\/h2>\n<h3><code>agents.defaults.workspace<\/code><\/h3>\n<p>\u9ed8\u8ba4\u503c\uff1a<code>~\/.openclaw\/workspace<\/code>\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  agents: { defaults: { workspace: &#8220;~\/.openclaw\/workspace&#8221; } },<br \/>\n}<\/p>\n<pre><code>\n### `agents.defaults.repoRoot`\n\n\u53ef\u9009\u7684\u4ed3\u5e93\u6839\u76ee\u5f55\uff0c\u4f1a\u663e\u793a\u5728\u7cfb\u7edf\u63d0\u793a\u7684 Runtime \u884c\u4e2d\u3002\u5982\u679c\u672a\u8bbe\u7f6e\uff0cOpenClaw \u4f1a\u4ece\u5de5\u4f5c\u533a\u5411\u4e0a\u904d\u5386\u81ea\u52a8\u68c0\u6d4b\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: { defaults: { repoRoot: &quot;~\/Projects\/openclaw&quot; } },\n}\n<\/code><\/pre>\n<h3><code>agents.defaults.skipBootstrap<\/code><\/h3>\n<p>\u7981\u7528\u81ea\u52a8\u521b\u5efa\u5de5\u4f5c\u533a\u5f15\u5bfc\u6587\u4ef6\uff08<code>AGENTS.md<\/code>\u3001<code>SOUL.md<\/code>\u3001<code>TOOLS.md<\/code>\u3001<code>IDENTITY.md<\/code>\u3001<code>USER.md<\/code>\u3001<code>HEARTBEAT.md<\/code>\u3001<code>BOOTSTRAP.md<\/code>\uff09\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  agents: { defaults: { skipBootstrap: true } },<br \/>\n}<\/p>\n<pre><code>\n### `agents.defaults.bootstrapMaxChars`\n\n\u5355\u4e2a\u5de5\u4f5c\u533a\u5f15\u5bfc\u6587\u4ef6\u5728\u622a\u65ad\u524d\u7684\u6700\u5927\u5b57\u7b26\u6570\u3002\u9ed8\u8ba4\uff1a`20000`\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: { defaults: { bootstrapMaxChars: 20000 } },\n}\n<\/code><\/pre>\n<h3><code>agents.defaults.bootstrapTotalMaxChars<\/code><\/h3>\n<p>\u6240\u6709\u5de5\u4f5c\u533a\u5f15\u5bfc\u6587\u4ef6\u6ce8\u5165\u65f6\u7684\u6700\u5927\u603b\u5b57\u7b26\u6570\u3002\u9ed8\u8ba4\uff1a<code>150000<\/code>\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  agents: { defaults: { bootstrapTotalMaxChars: 150000 } },<br \/>\n}<\/p>\n<pre><code>\n### `agents.defaults.bootstrapPromptTruncationWarning`\n\n\u63a7\u5236\u5f15\u5bfc\u4e0a\u4e0b\u6587\u88ab\u622a\u65ad\u65f6\uff0c\u5bf9\u667a\u80fd\u4f53\u53ef\u89c1\u7684\u8b66\u544a\u6587\u672c\u3002\n\u9ed8\u8ba4\uff1a`&quot;once&quot;`\u3002\n\n* `&quot;off&quot;`\uff1a\u7edd\u4e0d\u5411\u7cfb\u7edf\u63d0\u793a\u6ce8\u5165\u8b66\u544a\u6587\u672c\u3002\n* `&quot;once&quot;`\uff1a\u5bf9\u6bcf\u4e2a\u552f\u4e00\u7684\u622a\u65ad\u7b7e\u540d\u4ec5\u6ce8\u5165\u4e00\u6b21\u8b66\u544a\uff08\u63a8\u8350\uff09\u3002\n* `&quot;always&quot;`\uff1a\u53ea\u8981\u5b58\u5728\u622a\u65ad\uff0c\u5c31\u5728\u6bcf\u6b21\u8fd0\u884c\u65f6\u6ce8\u5165\u8b66\u544a\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: { defaults: { bootstrapPromptTruncationWarning: &quot;once&quot; } }, \/\/ off | once | always\n}\n<\/code><\/pre>\n<h3><code>agents.defaults.imageMaxDimensionPx<\/code><\/h3>\n<p>\u5728\u8c03\u7528\u63d0\u4f9b\u5546\u4e4b\u524d\uff0c\u8bb0\u5f55\/\u5de5\u5177\u56fe\u50cf\u5757\u4e2d\u6700\u957f\u8fb9\u7684\u6700\u5927\u50cf\u7d20\u5c3a\u5bf8\u3002<br \/>\n\u9ed8\u8ba4\uff1a<code>1200<\/code>\u3002<\/p>\n<p>\u8f83\u4f4e\u7684\u503c\u901a\u5e38\u4f1a\u964d\u4f4e\u89c6\u89c9 token \u7528\u91cf\u4ee5\u53ca\u622a\u56fe\u5bc6\u96c6\u578b\u8fd0\u884c\u7684\u8bf7\u6c42\u8d1f\u8f7d\u5927\u5c0f\u3002<br \/>\n\u8f83\u9ad8\u7684\u503c\u53ef\u4fdd\u7559\u66f4\u591a\u89c6\u89c9\u7ec6\u8282\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  agents: { defaults: { imageMaxDimensionPx: 1200 } },<br \/>\n}<\/p>\n<pre><code>\n### `agents.defaults.userTimezone`\n\n\u7cfb\u7edf\u63d0\u793a\u4e0a\u4e0b\u6587\u4f7f\u7528\u7684\u65f6\u533a\uff08\u4e0d\u662f\u6d88\u606f\u65f6\u95f4\u6233\uff09\u3002\u56de\u9000\u5230\u4e3b\u673a\u65f6\u533a\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: { defaults: { userTimezone: &quot;America\/Chicago&quot; } },\n}\n<\/code><\/pre>\n<h3><code>agents.defaults.timeFormat<\/code><\/h3>\n<p>\u7cfb\u7edf\u63d0\u793a\u4e2d\u7684\u65f6\u95f4\u683c\u5f0f\u3002\u9ed8\u8ba4\uff1a<code>auto<\/code>\uff08\u64cd\u4f5c\u7cfb\u7edf\u504f\u597d\uff09\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  agents: { defaults: { timeFormat: &#8220;auto&#8221; } }, \/\/ auto | 12 | 24<br \/>\n}<\/p>\n<pre><code>\n### `agents.defaults.model`\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: {\n    defaults: {\n      models: {\n        &quot;anthropic\/claude-opus-4-6&quot;: { alias: &quot;opus&quot; },\n        &quot;minimax\/MiniMax-M2.5&quot;: { alias: &quot;minimax&quot; },\n      },\n      model: {\n        primary: &quot;anthropic\/claude-opus-4-6&quot;,\n        fallbacks: [&quot;minimax\/MiniMax-M2.5&quot;],\n      },\n      imageModel: {\n        primary: &quot;openrouter\/qwen\/qwen-2.5-vl-72b-instruct:free&quot;,\n        fallbacks: [&quot;openrouter\/google\/gemini-2.0-flash-vision:free&quot;],\n      },\n      pdfModel: {\n        primary: &quot;anthropic\/claude-opus-4-6&quot;,\n        fallbacks: [&quot;openai\/gpt-5-mini&quot;],\n      },\n      pdfMaxBytesMb: 10,\n      pdfMaxPages: 20,\n      thinkingDefault: &quot;low&quot;,\n      verboseDefault: &quot;off&quot;,\n      elevatedDefault: &quot;on&quot;,\n      timeoutSeconds: 600,\n      mediaMaxMb: 5,\n      contextTokens: 200000,\n      maxConcurrent: 3,\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li><code>model<\/code>\uff1a\u63a5\u53d7\u5b57\u7b26\u4e32\uff08<code>\"provider\/model\"<\/code>\uff09\u6216\u5bf9\u8c61\uff08<code>{ primary, fallbacks }<\/code>\uff09\u3002<\/li>\n<li>\u5b57\u7b26\u4e32\u5f62\u5f0f\u53ea\u8bbe\u7f6e\u4e3b\u6a21\u578b\u3002<\/li>\n<li>\u5bf9\u8c61\u5f62\u5f0f\u8bbe\u7f6e\u4e3b\u6a21\u578b\u4ee5\u53ca\u6309\u987a\u5e8f\u6392\u5217\u7684\u6545\u969c\u5207\u6362\u6a21\u578b\u3002<\/li>\n<li><code>imageModel<\/code>\uff1a\u63a5\u53d7\u5b57\u7b26\u4e32\uff08<code>\"provider\/model\"<\/code>\uff09\u6216\u5bf9\u8c61\uff08<code>{ primary, fallbacks }<\/code>\uff09\u3002<\/li>\n<li>\u7531 <code>image<\/code> \u5de5\u5177\u8def\u5f84\u4f5c\u4e3a\u5176\u89c6\u89c9\u6a21\u578b\u914d\u7f6e\u4f7f\u7528\u3002<\/li>\n<li>\u5f53\u6240\u9009\/\u9ed8\u8ba4\u6a21\u578b\u65e0\u6cd5\u63a5\u53d7\u56fe\u50cf\u8f93\u5165\u65f6\uff0c\u4e5f\u7528\u4f5c\u56de\u9000\u8def\u7531\u3002<\/li>\n<li><code>pdfModel<\/code>\uff1a\u63a5\u53d7\u5b57\u7b26\u4e32\uff08<code>\"provider\/model\"<\/code>\uff09\u6216\u5bf9\u8c61\uff08<code>{ primary, fallbacks }<\/code>\uff09\u3002<\/li>\n<li>\u7531 <code>pdf<\/code> \u5de5\u5177\u7528\u4e8e\u6a21\u578b\u8def\u7531\u3002<\/li>\n<li>\u5982\u679c\u7701\u7565\uff0cPDF \u5de5\u5177\u4f1a\u56de\u9000\u5230 <code>imageModel<\/code>\uff0c\u518d\u56de\u9000\u5230\u63d0\u4f9b\u5546\u7684\u5c3d\u529b\u9ed8\u8ba4\u503c\u3002<\/li>\n<li><code>pdfMaxBytesMb<\/code>\uff1a<code>pdf<\/code> \u5de5\u5177\u5728\u8c03\u7528\u65f6\u672a\u4f20\u5165 <code>maxBytesMb<\/code> \u65f6\u4f7f\u7528\u7684\u9ed8\u8ba4 PDF \u5927\u5c0f\u9650\u5236\u3002<\/li>\n<li><code>pdfMaxPages<\/code>\uff1a<code>pdf<\/code> \u5de5\u5177\u5728\u63d0\u53d6\u56de\u9000\u6a21\u5f0f\u4e0b\u8003\u8651\u7684\u9ed8\u8ba4\u6700\u5927\u9875\u6570\u3002<\/li>\n<li><code>model.primary<\/code>\uff1a\u683c\u5f0f\u4e3a <code>provider\/model<\/code>\uff08\u4f8b\u5982 <code>anthropic\/claude-opus-4-6<\/code>\uff09\u3002\u5982\u679c\u7701\u7565 provider\uff0cOpenClaw \u4f1a\u5047\u5b9a\u4e3a <code>anthropic<\/code>\uff08\u5df2\u5f03\u7528\uff09\u3002<\/li>\n<li><code>models<\/code>\uff1a\u4e3a <code>\/model<\/code> \u914d\u7f6e\u7684\u6a21\u578b\u76ee\u5f55\u548c allowlist\u3002\u6bcf\u9879\u53ef\u5305\u542b <code>alias<\/code>\uff08\u5feb\u6377\u65b9\u5f0f\uff09\u548c <code>params<\/code>\uff08\u63d0\u4f9b\u5546\u7279\u5b9a\u53c2\u6570\uff0c\u4f8b\u5982 <code>temperature<\/code>\u3001<code>maxTokens<\/code>\u3001<code>cacheRetention<\/code>\u3001<code>context1m<\/code>\uff09\u3002<\/li>\n<li><code>params<\/code> \u5408\u5e76\u4f18\u5148\u7ea7\uff08\u914d\u7f6e\uff09\uff1a<code>agents.defaults.models[\"provider\/model\"].params<\/code> \u4e3a\u57fa\u7840\uff0c\u7136\u540e\u7531 <code>agents.list[].params<\/code>\uff08\u5339\u914d\u7684\u667a\u80fd\u4f53 ID\uff09\u6309\u952e\u8986\u76d6\u3002<\/li>\n<li>\u4f1a\u4fee\u6539\u8fd9\u4e9b\u5b57\u6bb5\u7684\u914d\u7f6e\u5199\u5165\u5668\uff08\u4f8b\u5982 <code>\/models set<\/code>\u3001<code>\/models set-image<\/code> \u4ee5\u53ca\u6545\u969c\u5207\u6362\u589e\u5220\u547d\u4ee4\uff09\u4f1a\u4fdd\u5b58\u4e3a\u89c4\u8303\u7684\u5bf9\u8c61\u5f62\u5f0f\uff0c\u5e76\u5c3d\u53ef\u80fd\u4fdd\u7559\u73b0\u6709\u6545\u969c\u5207\u6362\u5217\u8868\u3002<\/li>\n<li><code>maxConcurrent<\/code>\uff1a\u4f1a\u8bdd\u4e4b\u95f4\u5e76\u884c\u7684\u667a\u80fd\u4f53\u8fd0\u884c\u6700\u5927\u6570\uff08\u6bcf\u4e2a\u4f1a\u8bdd\u672c\u8eab\u4ecd\u662f\u4e32\u884c\uff09\u3002\u9ed8\u8ba4\uff1a1\u3002<\/li>\n<\/ul>\n<p><strong>\u5185\u7f6e\u522b\u540d\u7b80\u5199<\/strong>\uff08\u4ec5\u5f53\u6a21\u578b\u4f4d\u4e8e <code>agents.defaults.models<\/code> \u4e2d\u65f6\u9002\u7528\uff09\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>Alias<\/th>\n<th>Model<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>opus<\/code><\/td>\n<td><code>anthropic\/claude-opus-4-6<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>sonnet<\/code><\/td>\n<td><code>anthropic\/claude-sonnet-4-6<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>gpt<\/code><\/td>\n<td><code>openai\/gpt-5.4<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>gpt-mini<\/code><\/td>\n<td><code>openai\/gpt-5-mini<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>gemini<\/code><\/td>\n<td><code>google\/gemini-3.1-pro-preview<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>gemini-flash<\/code><\/td>\n<td><code>google\/gemini-3-flash-preview<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>gemini-flash-lite<\/code><\/td>\n<td><code>google\/gemini-3.1-flash-lite-preview<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4f60\u914d\u7f6e\u7684\u522b\u540d\u59cb\u7ec8\u4f18\u5148\u4e8e\u9ed8\u8ba4\u503c\u3002<\/p>\n<p>Z.AI \u7684 GLM-4.x \u6a21\u578b\u4f1a\u81ea\u52a8\u542f\u7528 thinking \u6a21\u5f0f\uff0c\u9664\u975e\u4f60\u8bbe\u7f6e <code>--thinking off<\/code>\uff0c\u6216\u81ea\u884c\u5b9a\u4e49 <code>agents.defaults.models[\"zai\/&lt;model&gt;\"].params.thinking<\/code>\u3002<br \/>\nZ.AI \u6a21\u578b\u9ed8\u8ba4\u542f\u7528 <code>tool_stream<\/code> \u4ee5\u652f\u6301\u5de5\u5177\u8c03\u7528\u6d41\u5f0f\u4f20\u8f93\u3002\u5c06 <code>agents.defaults.models[\"zai\/&lt;model&gt;\"].params.tool_stream<\/code> \u8bbe\u4e3a <code>false<\/code> \u53ef\u7981\u7528\u3002<br \/>\nAnthropic Claude 4.6 \u6a21\u578b\u5728\u672a\u663e\u5f0f\u8bbe\u7f6e thinking \u7ea7\u522b\u65f6\uff0c\u9ed8\u8ba4\u4f7f\u7528 <code>adaptive<\/code> thinking\u3002<\/p>\n<h3><code>agents.defaults.cliBackends<\/code><\/h3>\n<p>\u6587\u672c\u4e13\u7528\u56de\u9000\u8fd0\u884c\uff08\u65e0\u5de5\u5177\u8c03\u7528\uff09\u7684\u53ef\u9009 CLI \u540e\u7aef\u3002\u5f53 API \u63d0\u4f9b\u5546\u5931\u8d25\u65f6\uff0c\u53ef\u4f5c\u4e3a\u5907\u4efd\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  agents: {<br \/>\n    defaults: {<br \/>\n      cliBackends: {<br \/>\n        &#8220;claude-cli&#8221;: {<br \/>\n          command: &#8220;\/opt\/homebrew\/bin\/claude&#8221;,<br \/>\n        },<br \/>\n        &#8220;my-cli&#8221;: {<br \/>\n          command: &#8220;my-cli&#8221;,<br \/>\n          args: [&#8220;&#8211;json&#8221;],<br \/>\n          output: &#8220;json&#8221;,<br \/>\n          modelArg: &#8220;&#8211;model&#8221;,<br \/>\n          sessionArg: &#8220;&#8211;session&#8221;,<br \/>\n          sessionMode: &#8220;existing&#8221;,<br \/>\n          systemPromptArg: &#8220;&#8211;system&#8221;,<br \/>\n          systemPromptWhen: &#8220;first&#8221;,<br \/>\n          imageArg: &#8220;&#8211;image&#8221;,<br \/>\n          imageMode: &#8220;repeat&#8221;,<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* CLI \u540e\u7aef\u4ee5\u6587\u672c\u4e3a\u4e3b\uff1b\u5de5\u5177\u59cb\u7ec8\u7981\u7528\u3002\n* \u8bbe\u7f6e\u4e86 `sessionArg` \u65f6\u652f\u6301\u4f1a\u8bdd\u3002\n* \u5f53 `imageArg` \u63a5\u53d7\u6587\u4ef6\u8def\u5f84\u65f6\uff0c\u652f\u6301\u56fe\u50cf\u900f\u4f20\u3002\n\n### `agents.defaults.heartbeat`\n\n\u5468\u671f\u6027\u5fc3\u8df3\u8fd0\u884c\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: {\n    defaults: {\n      heartbeat: {\n        every: &quot;30m&quot;, \/\/ 0m \u8868\u793a\u7981\u7528\n        model: &quot;openai\/gpt-5.2-mini&quot;,\n        includeReasoning: false,\n        lightContext: false, \/\/ \u9ed8\u8ba4\uff1afalse\uff1btrue \u4ec5\u4fdd\u7559\u5de5\u4f5c\u533a\u5f15\u5bfc\u6587\u4ef6\u4e2d\u7684 HEARTBEAT.md\n        isolatedSession: false, \/\/ \u9ed8\u8ba4\uff1afalse\uff1btrue \u8868\u793a\u6bcf\u6b21\u5fc3\u8df3\u90fd\u5728\u5168\u65b0\u4f1a\u8bdd\u4e2d\u8fd0\u884c\uff08\u65e0\u5bf9\u8bdd\u5386\u53f2\uff09\n        session: &quot;main&quot;,\n        to: &quot;+15555550123&quot;,\n        directPolicy: &quot;allow&quot;, \/\/ allow\uff08\u9ed8\u8ba4\uff09| block\n        target: &quot;none&quot;, \/\/ \u9ed8\u8ba4\uff1anone | \u53ef\u9009\uff1alast | whatsapp | telegram | discord | ...\n        prompt: &quot;Read HEARTBEAT.md if it exists...&quot;,\n        ackMaxChars: 300,\n        suppressToolErrorWarnings: false,\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li><code>every<\/code>\uff1a\u65f6\u957f\u5b57\u7b26\u4e32\uff08ms\/s\/m\/h\uff09\u3002\u9ed8\u8ba4\uff1a<code>30m<\/code>\u3002<\/li>\n<li><code>suppressToolErrorWarnings<\/code>\uff1a\u4e3a true \u65f6\uff0c\u5728\u5fc3\u8df3\u8fd0\u884c\u671f\u95f4\u6291\u5236\u5de5\u5177\u9519\u8bef\u8b66\u544a\u8d1f\u8f7d\u3002<\/li>\n<li><code>directPolicy<\/code>\uff1a\u76f4\u63a5\/\u79c1\u4fe1\u6295\u9012\u7b56\u7565\u3002<code>allow<\/code>\uff08\u9ed8\u8ba4\uff09\u5141\u8bb8\u76f4\u63a5\u76ee\u6807\u6295\u9012\u3002<code>block<\/code> \u4f1a\u6291\u5236\u76f4\u63a5\u76ee\u6807\u6295\u9012\uff0c\u5e76\u53d1\u51fa <code>reason=dm-blocked<\/code>\u3002<\/li>\n<li><code>lightContext<\/code>\uff1a\u4e3a true \u65f6\uff0c\u5fc3\u8df3\u8fd0\u884c\u4f7f\u7528\u8f7b\u91cf\u5f15\u5bfc\u4e0a\u4e0b\u6587\uff0c\u5e76\u4e14\u53ea\u4fdd\u7559\u5de5\u4f5c\u533a\u5f15\u5bfc\u6587\u4ef6\u4e2d\u7684 <code>HEARTBEAT.md<\/code>\u3002<\/li>\n<li><code>isolatedSession<\/code>\uff1a\u4e3a true \u65f6\uff0c\u6bcf\u6b21\u5fc3\u8df3\u90fd\u4f1a\u5728\u65e0\u5148\u524d\u5bf9\u8bdd\u5386\u53f2\u7684\u5168\u65b0\u4f1a\u8bdd\u4e2d\u8fd0\u884c\u3002\u4e0e cron <code>sessionTarget: \"isolated\"<\/code> \u4f7f\u7528\u76f8\u540c\u7684\u9694\u79bb\u6a21\u5f0f\u3002\u53ef\u5c06\u6bcf\u6b21\u5fc3\u8df3\u7684 token \u6210\u672c\u4ece\u7ea6 100K \u964d\u5230\u7ea6 2-5K\u3002<\/li>\n<li>\u6309\u667a\u80fd\u4f53\u8bbe\u7f6e\uff1a\u4f7f\u7528 <code>agents.list[].heartbeat<\/code>\u3002\u5f53\u4efb\u4e00\u667a\u80fd\u4f53\u5b9a\u4e49\u4e86 <code>heartbeat<\/code> \u65f6\uff0c<strong>\u53ea\u6709\u8fd9\u4e9b\u667a\u80fd\u4f53<\/strong>\u4f1a\u8fd0\u884c\u5fc3\u8df3\u3002<\/li>\n<li>\u5fc3\u8df3\u4f1a\u6267\u884c\u5b8c\u6574\u7684\u667a\u80fd\u4f53\u8f6e\u6b21\u2014\u2014\u95f4\u9694\u8d8a\u77ed\uff0c\u6d88\u8017\u7684 token \u8d8a\u591a\u3002<\/li>\n<\/ul>\n<h3><code>agents.defaults.compaction<\/code><\/h3>\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  agents: {<br \/>\n    defaults: {<br \/>\n      compaction: {<br \/>\n        mode: &#8220;safeguard&#8221;, \/\/ default | safeguard<br \/>\n        timeoutSeconds: 900,<br \/>\n        reserveTokensFloor: 24000,<br \/>\n        identifierPolicy: &#8220;strict&#8221;, \/\/ strict | off | custom<br \/>\n        identifierInstructions: &#8220;Preserve deployment IDs, ticket IDs, and host:port pairs exactly.&#8221;, \/\/ \u5f53 identifierPolicy=custom \u65f6\u4f7f\u7528<br \/>\n        postCompactionSections: [&#8220;Session Startup&#8221;, &#8220;Red Lines&#8221;], \/\/ [] \u8868\u793a\u7981\u7528\u91cd\u65b0\u6ce8\u5165<br \/>\n        model: &#8220;openrouter\/anthropic\/claude-sonnet-4-5&#8221;, \/\/ \u53ef\u9009\uff0c\u4ec5\u7528\u4e8e\u538b\u7f29\u7684\u6a21\u578b\u8986\u76d6<br \/>\n        memoryFlush: {<br \/>\n          enabled: true,<br \/>\n          softThresholdTokens: 6000,<br \/>\n          systemPrompt: &#8220;Session nearing compaction. Store durable memories now.&#8221;,<br \/>\n          prompt: &#8220;Write any lasting notes to memory\/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.&#8221;,<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `mode`\uff1a`default` \u6216 `safeguard`\uff08\u7528\u4e8e\u957f\u5386\u53f2\u7684\u5206\u5757\u6458\u8981\uff09\u3002\u89c1 [Compaction](\/concepts\/compaction)\u3002\n* `timeoutSeconds`\uff1aOpenClaw \u4e2d\u6b62\u524d\uff0c\u5355\u6b21\u538b\u7f29\u64cd\u4f5c\u5141\u8bb8\u7684\u6700\u5927\u79d2\u6570\u3002\u9ed8\u8ba4\uff1a`900`\u3002\n* `identifierPolicy`\uff1a`strict`\uff08\u9ed8\u8ba4\uff09\u3001`off` \u6216 `custom`\u3002`strict` \u4f1a\u5728\u538b\u7f29\u6458\u8981\u65f6\u9884\u7f6e\u5185\u7f6e\u7684\u4e0d\u900f\u660e\u6807\u8bc6\u7b26\u4fdd\u7559\u6307\u5bfc\u3002\n* `identifierInstructions`\uff1a\u5f53 `identifierPolicy=custom` \u65f6\u4f7f\u7528\u7684\u53ef\u9009\u81ea\u5b9a\u4e49\u6807\u8bc6\u7b26\u4fdd\u7559\u6587\u672c\u3002\n* `postCompactionSections`\uff1a\u538b\u7f29\u540e\u91cd\u65b0\u6ce8\u5165\u7684\u53ef\u9009 AGENTS.md H2\/H3 \u8282\u540d\u79f0\u3002\u9ed8\u8ba4\u662f `[&quot;Session Startup&quot;, &quot;Red Lines&quot;]`\uff1b\u8bbe\u4e3a `[]` \u53ef\u7981\u7528\u91cd\u65b0\u6ce8\u5165\u3002\u5f53\u672a\u8bbe\u7f6e\u6216\u663e\u5f0f\u8bbe\u7f6e\u4e3a\u8be5\u9ed8\u8ba4\u7ec4\u5408\u65f6\uff0c\u65e7\u7248 `Every Session`\/`Safety` \u6807\u9898\u4e5f\u4f1a\u4f5c\u4e3a\u517c\u5bb9\u56de\u9000\u88ab\u63a5\u53d7\u3002\n* `model`\uff1a\u4ec5\u7528\u4e8e\u538b\u7f29\u6458\u8981\u7684\u53ef\u9009 `provider\/model-id` \u8986\u76d6\u3002\u5f53\u4e3b\u4f1a\u8bdd\u5e94\u4fdd\u7559\u4e00\u4e2a\u6a21\u578b\uff0c\u4f46\u538b\u7f29\u6458\u8981\u5e94\u5728\u53e6\u4e00\u4e2a\u6a21\u578b\u4e0a\u8fd0\u884c\u65f6\u4f7f\u7528\uff1b\u672a\u8bbe\u7f6e\u65f6\uff0c\u538b\u7f29\u4f1a\u4f7f\u7528\u4f1a\u8bdd\u7684\u4e3b\u6a21\u578b\u3002\n* `memoryFlush`\uff1a\u81ea\u52a8\u538b\u7f29\u524d\u7684\u9759\u9ed8\u667a\u80fd\u4f53\u8f6e\u6b21\uff0c\u7528\u4e8e\u5b58\u50a8\u6301\u4e45\u8bb0\u5fc6\u3002\u5de5\u4f5c\u533a\u4e3a\u53ea\u8bfb\u65f6\u4f1a\u8df3\u8fc7\u3002\n\n### `agents.defaults.contextPruning`\n\n\u5728\u53d1\u9001\u5230 LLM \u4e4b\u524d\uff0c\u4ece\u5185\u5b58\u4e0a\u4e0b\u6587\u4e2d\u88c1\u526a**\u65e7\u7684\u5de5\u5177\u7ed3\u679c**\u3002**\u4e0d\u4f1a**\u4fee\u6539\u78c1\u76d8\u4e0a\u7684\u4f1a\u8bdd\u5386\u53f2\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: {\n    defaults: {\n      contextPruning: {\n        mode: &quot;cache-ttl&quot;, \/\/ off | cache-ttl\n        ttl: &quot;1h&quot;, \/\/ \u65f6\u957f\uff08ms\/s\/m\/h\uff09\uff0c\u9ed8\u8ba4\u5355\u4f4d\uff1a\u5206\u949f\n        keepLastAssistants: 3,\n        softTrimRatio: 0.3,\n        hardClearRatio: 0.5,\n        minPrunableToolChars: 50000,\n        softTrim: { maxChars: 4000, headChars: 1500, tailChars: 1500 },\n        hardClear: { enabled: true, placeholder: &quot;[Old tool result content cleared]&quot; },\n        tools: { deny: [&quot;browser&quot;, &quot;canvas&quot;] },\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<p>\n  * <code>mode: \"cache-ttl\"<\/code> \u542f\u7528\u88c1\u526a\u8fc7\u7a0b\u3002<br \/>\n  * <code>ttl<\/code> \u63a7\u5236\u5728\u4e0a\u6b21\u7f13\u5b58\u89e6\u78b0\u540e\uff0c\u591a\u4e45\u624d\u80fd\u518d\u6b21\u8fd0\u884c\u88c1\u526a\u3002<br \/>\n  * \u88c1\u526a\u4f1a\u5148\u5bf9\u8fc7\u5927\u7684\u5de5\u5177\u7ed3\u679c\u8fdb\u884c\u8f6f\u88c1\u526a\uff0c\u5982\u4ecd\u6709\u9700\u8981\uff0c\u518d\u5bf9\u66f4\u65e7\u7684\u5de5\u5177\u7ed3\u679c\u6267\u884c\u786c\u6e05\u9664\u3002<\/p>\n<p><strong>\u8f6f\u88c1\u526a<\/strong>\u4fdd\u7559\u5f00\u5934\u548c\u7ed3\u5c3e\uff0c\u5e76\u5728\u4e2d\u95f4\u63d2\u5165 <code>...<\/code>\u3002<\/p>\n<p><strong>\u786c\u6e05\u9664<\/strong>\u7528\u5360\u4f4d\u7b26\u66ff\u6362\u6574\u4e2a\u5de5\u5177\u7ed3\u679c\u3002<\/p>\n<p>\u8bf4\u660e\uff1a<\/p>\n<ul>\n<li>\u56fe\u50cf\u5757\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u88c1\u526a\/\u6e05\u9664\u3002<\/li>\n<li>\u6bd4\u4f8b\u662f\u57fa\u4e8e\u5b57\u7b26\u7684\uff08\u8fd1\u4f3c\uff09\uff0c\u4e0d\u662f\u7cbe\u786e token \u6570\u3002<\/li>\n<li>\u5982\u679c assistant \u6d88\u606f\u5c11\u4e8e <code>keepLastAssistants<\/code>\uff0c\u5219\u8df3\u8fc7\u88c1\u526a\u3002\n<\/li>\n<\/ul>\n<p>\u884c\u4e3a\u7ec6\u8282\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=104\">Session Pruning<\/a>\u3002<\/p>\n<h3>\u5206\u5757\u6d41\u5f0f\u4f20\u8f93<\/h3>\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  agents: {<br \/>\n    defaults: {<br \/>\n      blockStreamingDefault: &#8220;off&#8221;, \/\/ on | off<br \/>\n      blockStreamingBreak: &#8220;text_end&#8221;, \/\/ text_end | message_end<br \/>\n      blockStreamingChunk: { minChars: 800, maxChars: 1200 },<br \/>\n      blockStreamingCoalesce: { idleMs: 1000 },<br \/>\n      humanDelay: { mode: &#8220;natural&#8221; }, \/\/ off | natural | custom\uff08\u4f7f\u7528 minMs\/maxMs\uff09<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u975e Telegram \u6e20\u9053\u9700\u8981\u663e\u5f0f\u8bbe\u7f6e `*.blockStreaming: true` \u624d\u4f1a\u542f\u7528\u5206\u5757\u56de\u590d\u3002\n* \u6e20\u9053\u8986\u76d6\uff1a`channels.&lt;channel&gt;.blockStreamingCoalesce`\uff08\u4ee5\u53ca\u6309\u8d26\u6237\u53d8\u4f53\uff09\u3002Signal\/Slack\/Discord\/Google Chat \u9ed8\u8ba4 `minChars: 1500`\u3002\n* `humanDelay`\uff1a\u5206\u5757\u56de\u590d\u4e4b\u95f4\u7684\u968f\u673a\u6682\u505c\u3002`natural` = 800\u20132500 ms\u3002\u6309\u667a\u80fd\u4f53\u8986\u76d6\uff1a`agents.list[].humanDelay`\u3002\n\n\u884c\u4e3a\u548c\u5206\u5757\u7ec6\u8282\u89c1 [Streaming](\/concepts\/streaming)\u3002\n\n### \u8f93\u5165\u6307\u793a\u5668\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: {\n    defaults: {\n      typingMode: &quot;instant&quot;, \/\/ never | instant | thinking | message\n      typingIntervalSeconds: 6,\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u9ed8\u8ba4\u503c\uff1a\u79c1\u804a\/\u88ab\u63d0\u53ca\u65f6\u4e3a <code>instant<\/code>\uff0c\u672a\u63d0\u53ca\u7684\u7fa4\u804a\u4e2d\u4e3a <code>message<\/code>\u3002<\/li>\n<li>\u6309\u4f1a\u8bdd\u8986\u76d6\uff1a<code>session.typingMode<\/code>\u3001<code>session.typingIntervalSeconds<\/code>\u3002<\/li>\n<\/ul>\n<p>\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=110\">Typing Indicators<\/a>\u3002<\/p>\n<h3><code>agents.defaults.sandbox<\/code><\/h3>\n<p>\u5d4c\u5165\u5f0f\u667a\u80fd\u4f53\u7684\u53ef\u9009\u6c99\u7bb1\u9694\u79bb\u3002\u5b8c\u6574\u6307\u5357\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=140\">\u6c99\u7bb1\u9694\u79bb<\/a>\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  agents: {<br \/>\n    defaults: {<br \/>\n      sandbox: {<br \/>\n        mode: &#8220;non-main&#8221;, \/\/ off | non-main | all<br \/>\n        backend: &#8220;docker&#8221;, \/\/ docker | ssh | openshell<br \/>\n        scope: &#8220;agent&#8221;, \/\/ session | agent | shared<br \/>\n        workspaceAccess: &#8220;none&#8221;, \/\/ none | ro | rw<br \/>\n        workspaceRoot: &#8220;~\/.openclaw\/sandboxes&#8221;,<br \/>\n        docker: {<br \/>\n          image: &#8220;openclaw-sandbox:bookworm-slim&#8221;,<br \/>\n          containerPrefix: &#8220;openclaw-sbx-&#8220;,<br \/>\n          workdir: &#8220;\/workspace&#8221;,<br \/>\n          readOnlyRoot: true,<br \/>\n          tmpfs: [&#8220;\/tmp&#8221;, &#8220;\/var\/tmp&#8221;, &#8220;\/run&#8221;],<br \/>\n          network: &#8220;none&#8221;,<br \/>\n          user: &#8220;1000:1000&#8221;,<br \/>\n          capDrop: [&#8220;ALL&#8221;],<br \/>\n          env: { LANG: &#8220;C.UTF-8&#8221; },<br \/>\n          setupCommand: &#8220;apt-get update &amp;&amp; apt-get install -y git curl jq&#8221;,<br \/>\n          pidsLimit: 256,<br \/>\n          memory: &#8220;1g&#8221;,<br \/>\n          memorySwap: &#8220;2g&#8221;,<br \/>\n          cpus: 1,<br \/>\n          ulimits: {<br \/>\n            nofile: { soft: 1024, hard: 2048 },<br \/>\n            nproc: 256,<br \/>\n          },<br \/>\n          seccompProfile: &#8220;\/path\/to\/seccomp.json&#8221;,<br \/>\n          apparmorProfile: &#8220;openclaw-sandbox&#8221;,<br \/>\n          dns: [&#8220;1.1.1.1&#8221;, &#8220;8.8.8.8&#8221;],<br \/>\n          extraHosts: [&#8220;internal.service:10.0.0.5&#8221;],<br \/>\n          binds: [&#8220;\/home\/user\/source:\/source:rw&#8221;],<br \/>\n        },<br \/>\n        ssh: {<br \/>\n          target: &#8220;user@\u7f51\u5173-host:22&#8221;,<br \/>\n          command: &#8220;ssh&#8221;,<br \/>\n          workspaceRoot: &#8220;\/tmp\/openclaw-sandboxes&#8221;,<br \/>\n          strictHostKeyChecking: true,<br \/>\n          updateHostKeys: true,<br \/>\n          identityFile: &#8220;~\/.ssh\/id_ed25519&#8221;,<br \/>\n          certificateFile: &#8220;~\/.ssh\/id_ed25519-cert.pub&#8221;,<br \/>\n          knownHostsFile: &#8220;~\/.ssh\/known_hosts&#8221;,<br \/>\n          \/\/ \u4e5f\u652f\u6301 SecretRef \/ \u5185\u8054\u5185\u5bb9\uff1a<br \/>\n          \/\/ identityData: { source: &#8220;env&#8221;, provider: &#8220;default&#8221;, id: &#8220;SSH_IDENTITY&#8221; },<br \/>\n          \/\/ certificateData: { source: &#8220;env&#8221;, provider: &#8220;default&#8221;, id: &#8220;SSH_CERTIFICATE&#8221; },<br \/>\n          \/\/ knownHostsData: { source: &#8220;env&#8221;, provider: &#8220;default&#8221;, id: &#8220;SSH_KNOWN_HOSTS&#8221; },<br \/>\n        },<br \/>\n        browser: {<br \/>\n          enabled: false,<br \/>\n          image: &#8220;openclaw-sandbox-browser:bookworm-slim&#8221;,<br \/>\n          network: &#8220;openclaw-sandbox-browser&#8221;,<br \/>\n          cdpPort: 9222,<br \/>\n          cdpSourceRange: &#8220;172.21.0.1\/32&#8221;,<br \/>\n          vncPort: 5900,<br \/>\n          noVncPort: 6080,<br \/>\n          headless: false,<br \/>\n          enableNoVnc: true,<br \/>\n          allowHostControl: false,<br \/>\n          autoStart: true,<br \/>\n          autoStartTimeoutMs: 12000,<br \/>\n        },<br \/>\n        prune: {<br \/>\n          idleHours: 24,<br \/>\n          maxAgeDays: 7,<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n  tools: {<br \/>\n    sandbox: {<br \/>\n      tools: {<br \/>\n        allow: [<br \/>\n          &#8220;exec&#8221;,<br \/>\n          &#8220;process&#8221;,<br \/>\n          &#8220;read&#8221;,<br \/>\n          &#8220;write&#8221;,<br \/>\n          &#8220;edit&#8221;,<br \/>\n          &#8220;apply_patch&#8221;,<br \/>\n          &#8220;sessions_list&#8221;,<br \/>\n          &#8220;sessions_history&#8221;,<br \/>\n          &#8220;sessions_send&#8221;,<br \/>\n          &#8220;sessions_spawn&#8221;,<br \/>\n          &#8220;session_status&#8221;,<br \/>\n        ],<br \/>\n        deny: [&#8220;browser&#8221;, &#8220;canvas&#8221;, &#8220;nodes&#8221;, &#8220;cron&#8221;, &#8220;discord&#8221;, &#8220;\u7f51\u5173&#8221;],<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n&lt;Accordion title=&quot;\u6c99\u7bb1\u8be6\u60c5&quot;&gt;\n  **\u540e\u7aef\uff1a**\n\n  * `docker`\uff1a\u672c\u5730 Docker \u8fd0\u884c\u65f6\uff08\u9ed8\u8ba4\uff09\n  * `ssh`\uff1a\u901a\u7528\u7684 SSH \u8fdc\u7a0b\u8fd0\u884c\u65f6\n  * `openshell`\uff1aOpenShell \u8fd0\u884c\u65f6\n\n  \u9009\u62e9 `backend: &quot;openshell&quot;` \u65f6\uff0c\u8fd0\u884c\u65f6\u7279\u5b9a\u8bbe\u7f6e\u4f1a\u79fb\u52a8\u5230\n  `plugins.entries.openshell.config`\u3002\n\n  **SSH \u540e\u7aef\u914d\u7f6e\uff1a**\n\n  * `target`\uff1a`user@host[:port]` \u5f62\u5f0f\u7684 SSH \u76ee\u6807\n  * `command`\uff1aSSH \u5ba2\u6237\u7aef\u547d\u4ee4\uff08\u9ed8\u8ba4\uff1a`ssh`\uff09\n  * `workspaceRoot`\uff1a\u6309\u4f5c\u7528\u57df\u5de5\u4f5c\u533a\u4f7f\u7528\u7684\u8fdc\u7a0b\u7edd\u5bf9\u6839\u76ee\u5f55\n  * `identityFile` \/ `certificateFile` \/ `knownHostsFile`\uff1a\u4f20\u9012\u7ed9 OpenSSH \u7684\u73b0\u6709\u672c\u5730\u6587\u4ef6\n  * `identityData` \/ `certificateData` \/ `knownHostsData`\uff1a\u5185\u8054\u5185\u5bb9\u6216 SecretRef\uff0cOpenClaw \u4f1a\u5728\u8fd0\u884c\u65f6\u5c06\u5176\u7269\u5316\u4e3a\u4e34\u65f6\u6587\u4ef6\n  * `strictHostKeyChecking` \/ `updateHostKeys`\uff1aOpenSSH \u4e3b\u673a\u5bc6\u94a5\u7b56\u7565\u5f00\u5173\n\n  **SSH \u8ba4\u8bc1\u4f18\u5148\u7ea7\uff1a**\n\n  * `identityData` \u4f18\u5148\u4e8e `identityFile`\n  * `certificateData` \u4f18\u5148\u4e8e `certificateFile`\n  * `knownHostsData` \u4f18\u5148\u4e8e `knownHostsFile`\n  * \u7531 SecretRef \u652f\u6301\u7684 `*Data` \u503c\u4f1a\u5728\u6c99\u7bb1\u4f1a\u8bdd\u542f\u52a8\u524d\uff0c\u4ece\u6d3b\u52a8 secrets \u8fd0\u884c\u65f6\u5feb\u7167\u4e2d\u89e3\u6790\n\n  **SSH \u540e\u7aef\u884c\u4e3a\uff1a**\n\n  * \u5728\u521b\u5efa\u6216\u91cd\u5efa\u540e\uff0c\u5bf9\u8fdc\u7a0b\u5de5\u4f5c\u533a\u8fdb\u884c\u4e00\u6b21\u79cd\u5b50\u521d\u59cb\u5316\n  * \u4e4b\u540e\u4fdd\u6301\u8fdc\u7a0b SSH \u5de5\u4f5c\u533a\u4e3a\u89c4\u8303\u526f\u672c\n  * \u901a\u8fc7 SSH \u8def\u7531 `exec`\u3001\u6587\u4ef6\u5de5\u5177\u548c\u5a92\u4f53\u8def\u5f84\n  * \u4e0d\u4f1a\u81ea\u52a8\u5c06\u8fdc\u7a0b\u66f4\u6539\u540c\u6b65\u56de\u4e3b\u673a\n  * \u4e0d\u652f\u6301\u6c99\u7bb1\u6d4f\u89c8\u5668\u5bb9\u5668\n\n  **\u5de5\u4f5c\u533a\u8bbf\u95ee\uff1a**\n\n  * `none`\uff1a\u4f4d\u4e8e `~\/.openclaw\/sandboxes` \u4e0b\u7684\u6309\u4f5c\u7528\u57df\u5212\u5206\u7684\u6c99\u7bb1\u5de5\u4f5c\u533a\n  * `ro`\uff1a\u6c99\u7bb1\u5de5\u4f5c\u533a\u4f4d\u4e8e `\/workspace`\uff0c\u667a\u80fd\u4f53\u5de5\u4f5c\u533a\u4ee5\u53ea\u8bfb\u65b9\u5f0f\u6302\u8f7d\u5230 `\/agent`\n  * `rw`\uff1a\u667a\u80fd\u4f53\u5de5\u4f5c\u533a\u4ee5\u8bfb\u5199\u65b9\u5f0f\u6302\u8f7d\u5230 `\/workspace`\n\n  **\u4f5c\u7528\u57df\uff1a**\n\n  * `session`\uff1a\u6bcf\u4e2a\u4f1a\u8bdd\u4e00\u4e2a\u5bb9\u5668 + \u5de5\u4f5c\u533a\n  * `agent`\uff1a\u6bcf\u4e2a\u667a\u80fd\u4f53\u4e00\u4e2a\u5bb9\u5668 + \u5de5\u4f5c\u533a\uff08\u9ed8\u8ba4\uff09\n  * `shared`\uff1a\u5171\u4eab\u5bb9\u5668\u548c\u5de5\u4f5c\u533a\uff08\u65e0\u8de8\u4f1a\u8bdd\u9694\u79bb\uff09\n\n  **OpenShell \u63d2\u4ef6\u914d\u7f6e\uff1a**\n\n  ```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n  {\n    plugins: {\n      entries: {\n        openshell: {\n          enabled: true,\n          config: {\n            mode: &quot;mirror&quot;, \/\/ mirror | remote\n            from: &quot;openclaw&quot;,\n            remoteWorkspaceDir: &quot;\/sandbox&quot;,\n            remoteAgentWorkspaceDir: &quot;\/agent&quot;,\n            gateway: &quot;lab&quot;, \/\/ \u53ef\u9009\n            gatewayEndpoint: &quot;https:\/\/lab.example&quot;, \/\/ \u53ef\u9009\n            policy: &quot;strict&quot;, \/\/ \u53ef\u9009\u7684 OpenShell policy id\n            providers: [&quot;openai&quot;], \/\/ \u53ef\u9009\n            autoProviders: true,\n            timeoutSeconds: 120,\n          },\n        },\n      },\n    },\n  }\n  ```\n\n  **OpenShell \u6a21\u5f0f\uff1a**\n\n  * `mirror`\uff1a\u6267\u884c\u524d\u4ece\u672c\u5730\u4e3a\u8fdc\u7a0b\u690d\u5165\u79cd\u5b50\uff0c\u6267\u884c\u540e\u540c\u6b65\u56de\u672c\u5730\uff1b\u672c\u5730\u5de5\u4f5c\u533a\u4fdd\u6301\u4e3a\u89c4\u8303\u526f\u672c\n  * `remote`\uff1a\u5728\u521b\u5efa\u6c99\u7bb1\u65f6\u53ea\u4e3a\u8fdc\u7a0b\u690d\u5165\u4e00\u6b21\u79cd\u5b50\uff0c\u4e4b\u540e\u4fdd\u6301\u8fdc\u7a0b\u5de5\u4f5c\u533a\u4e3a\u89c4\u8303\u526f\u672c\n\n  \u5728 `remote` \u6a21\u5f0f\u4e0b\uff0c\u5728 OpenClaw \u5916\u90e8\u5bf9\u4e3b\u673a\u672c\u5730\u6240\u505a\u7684\u7f16\u8f91\uff0c\u4e0d\u4f1a\u5728\u79cd\u5b50\u6b65\u9aa4\u540e\u81ea\u52a8\u540c\u6b65\u8fdb\u6c99\u7bb1\u3002\n  \u4f20\u8f93\u5c42\u662f\u901a\u8fc7 SSH \u8fdb\u5165 OpenShell \u6c99\u7bb1\uff0c\u4f46\u63d2\u4ef6\u62e5\u6709\u6c99\u7bb1\u751f\u547d\u5468\u671f\u4ee5\u53ca\u53ef\u9009\u7684\u955c\u50cf\u540c\u6b65\u3002\n\n  **`setupCommand`** \u4f1a\u5728\u5bb9\u5668\u521b\u5efa\u540e\u8fd0\u884c\u4e00\u6b21\uff08\u901a\u8fc7 `sh -lc`\uff09\u3002\u9700\u8981\u7f51\u7edc\u51fa\u53e3\u3001\u53ef\u5199\u6839\u6587\u4ef6\u7cfb\u7edf\u4ee5\u53ca root \u7528\u6237\u3002\n\n  **\u5bb9\u5668\u9ed8\u8ba4\u4f7f\u7528 `network: &quot;none&quot;`** \u2014\u2014\u5982\u679c\u667a\u80fd\u4f53\u9700\u8981\u51fa\u7ad9\u8bbf\u95ee\uff0c\u8bf7\u8bbe\u4e3a `&quot;bridge&quot;`\uff08\u6216\u81ea\u5b9a\u4e49 bridge \u7f51\u7edc\uff09\u3002\n  \u9ed8\u8ba4\u4f1a\u963b\u6b62 `&quot;host&quot;`\u3002\u9664\u975e\u4f60\u663e\u5f0f\u8bbe\u7f6e\n  `sandbox.docker.dangerouslyAllowContainerNamespaceJoin: true`\uff08\u7d27\u6025\u6a21\u5f0f\uff09\uff0c\u5426\u5219\u9ed8\u8ba4\u4e5f\u4f1a\u963b\u6b62 `&quot;container:&lt;id&gt;&quot;`\u3002\n\n  **\u5165\u7ad9\u9644\u4ef6** \u4f1a\u6682\u5b58\u5230\u6d3b\u52a8\u5de5\u4f5c\u533a\u4e2d\u7684 `media\/inbound\/*`\u3002\n\n  **`docker.binds`** \u4f1a\u6302\u8f7d\u989d\u5916\u7684\u4e3b\u673a\u76ee\u5f55\uff1b\u5168\u5c40\u548c\u6309\u667a\u80fd\u4f53\u7684 binds \u4f1a\u5408\u5e76\u3002\n\n  **\u6c99\u7bb1\u6d4f\u89c8\u5668**\uff08`sandbox.browser.enabled`\uff09\uff1a\u5bb9\u5668\u4e2d\u7684 Chromium + CDP\u3002noVNC URL \u4f1a\u6ce8\u5165\u7cfb\u7edf\u63d0\u793a\u4e2d\u3002\u4e0d\u8981\u6c42\u5728 `openclaw.json` \u4e2d\u542f\u7528 `browser.enabled`\u3002\n  noVNC \u89c2\u5bdf\u8005\u8bbf\u95ee\u9ed8\u8ba4\u4f7f\u7528 VNC \u8eab\u4efd\u9a8c\u8bc1\uff0cOpenClaw \u4f1a\u53d1\u51fa\u4e00\u4e2a\u77ed\u671f\u6709\u6548\u7684 token URL\uff08\u800c\u4e0d\u662f\u5728\u5171\u4eab URL \u4e2d\u66b4\u9732\u5bc6\u7801\uff09\u3002\n\n  * `allowHostControl: false`\uff08\u9ed8\u8ba4\uff09\u4f1a\u963b\u6b62\u6c99\u7bb1\u4f1a\u8bdd\u6307\u5411\u4e3b\u673a\u6d4f\u89c8\u5668\u3002\n  * `network` \u9ed8\u8ba4\u4e3a `openclaw-sandbox-browser`\uff08\u4e13\u7528 bridge \u7f51\u7edc\uff09\u3002\u4ec5\u5f53\u4f60\u660e\u786e\u9700\u8981\u5168\u5c40 bridge \u8fde\u63a5\u65f6\uff0c\u624d\u8bbe\u4e3a `bridge`\u3002\n  * `cdpSourceRange` \u53ef\u9009\u5730\u5c06\u5bb9\u5668\u8fb9\u7f18\u7684 CDP \u5165\u7ad9\u9650\u5236\u4e3a\u67d0\u4e2a CIDR \u8303\u56f4\uff08\u4f8b\u5982 `172.21.0.1\/32`\uff09\u3002\n  * `sandbox.browser.binds` \u4ec5\u5c06\u989d\u5916\u4e3b\u673a\u76ee\u5f55\u6302\u8f7d\u5230\u6c99\u7bb1\u6d4f\u89c8\u5668\u5bb9\u5668\u4e2d\u3002\u8bbe\u7f6e\u540e\uff08\u5305\u62ec `[]`\uff09\uff0c\u5b83\u4f1a\u66ff\u6362\u6d4f\u89c8\u5668\u5bb9\u5668\u7684 `docker.binds`\u3002\n  * \u542f\u52a8\u9ed8\u8ba4\u503c\u5b9a\u4e49\u4e8e `scripts\/sandbox-browser-entrypoint.sh` \u4e2d\uff0c\u5e76\u9488\u5bf9\u5bb9\u5668\u4e3b\u673a\u8fdb\u884c\u4e86\u8c03\u4f18\uff1a\n    * `--remote-debugging-address=127.0.0.1`\n    * `--remote-debugging-port=&lt;derived from OPENCLAW_BROWSER_CDP_PORT&gt;`\n    * `--user-data-dir=${HOME}\/.chrome`\n    * `--no-first-run`\n    * `--no-default-browser-check`\n    * `--disable-3d-apis`\n    * `--disable-gpu`\n    * `--disable-software-rasterizer`\n    * `--disable-dev-shm-usage`\n    * `--disable-background-networking`\n    * `--disable-features=TranslateUI`\n    * `--disable-breakpad`\n    * `--disable-crash-reporter`\n    * `--renderer-process-limit=2`\n    * `--no-zygote`\n    * `--metrics-recording-only`\n    * `--disable-extensions`\uff08\u9ed8\u8ba4\u542f\u7528\uff09\n    * `--disable-3d-apis`\u3001`--disable-software-rasterizer` \u548c `--disable-gpu`\n      \u9ed8\u8ba4\u542f\u7528\uff0c\u5982\u679c WebGL\/3D \u4f7f\u7528\u573a\u666f\u9700\u8981\uff0c\u53ef\u901a\u8fc7\n      `OPENCLAW_BROWSER_DISABLE_GRAPHICS_FLAGS=0` \u7981\u7528\u8fd9\u4e9b\u6807\u5fd7\u3002\n    * `OPENCLAW_BROWSER_DISABLE_EXTENSIONS=0` \u4f1a\u91cd\u65b0\u542f\u7528\u6269\u5c55\uff0c\u5982\u679c\u4f60\u7684\u5de5\u4f5c\u6d41\n      \u4f9d\u8d56\u5b83\u4eec\u3002\n    * `--renderer-process-limit=2` \u53ef\u901a\u8fc7\n      `OPENCLAW_BROWSER_RENDERER_PROCESS_LIMIT=&lt;N&gt;` \u66f4\u6539\uff1b\u8bbe\u4e3a `0` \u5c06\u4f7f\u7528 Chromium \u7684\n      \u9ed8\u8ba4\u8fdb\u7a0b\u4e0a\u9650\u3002\n    * \u82e5\u542f\u7528\u4e86 `noSandbox`\uff0c\u8fd8\u4f1a\u989d\u5916\u52a0\u4e0a `--no-sandbox` \u548c `--disable-setuid-sandbox`\u3002\n    * \u9ed8\u8ba4\u503c\u662f\u5bb9\u5668\u955c\u50cf\u7684\u57fa\u7ebf\uff1b\u82e5\u8981\u66f4\u6539\u5bb9\u5668\u9ed8\u8ba4\u503c\uff0c\u8bf7\u4f7f\u7528\u81ea\u5b9a\u4e49\u6d4f\u89c8\u5668\u955c\u50cf\u53ca\u81ea\u5b9a\u4e49\n      entrypoint\u3002\n&lt;\/Accordion&gt;\n\n\u6d4f\u89c8\u5668\u6c99\u7bb1\u9694\u79bb\u548c `sandbox.docker.binds` \u5f53\u524d\u4ec5\u652f\u6301 Docker\u3002\n\n\u6784\u5efa\u955c\u50cf\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nscripts\/sandbox-setup.sh           # \u4e3b\u6c99\u7bb1\u955c\u50cf\nscripts\/sandbox-browser-setup.sh   # \u53ef\u9009\u7684\u6d4f\u89c8\u5668\u955c\u50cf\n<\/code><\/pre>\n<h3><code>agents.list<\/code>\uff08\u6309\u667a\u80fd\u4f53\u8986\u76d6\uff09<\/h3>\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  agents: {<br \/>\n    list: [<br \/>\n      {<br \/>\n        id: &#8220;main&#8221;,<br \/>\n        default: true,<br \/>\n        name: &#8220;Main Agent&#8221;,<br \/>\n        workspace: &#8220;~\/.openclaw\/workspace&#8221;,<br \/>\n        agentDir: &#8220;~\/.openclaw\/agents\/main\/agent&#8221;,<br \/>\n        model: &#8220;anthropic\/claude-opus-4-6&#8221;, \/\/ \u6216 { primary, fallbacks }<br \/>\n        params: { cacheRetention: &#8220;none&#8221; }, \/\/ \u6309\u952e\u8986\u76d6\u5339\u914d\u7684 defaults.models params<br \/>\n        identity: {<br \/>\n          name: &#8220;Samantha&#8221;,<br \/>\n          theme: &#8220;helpful sloth&#8221;,<br \/>\n          emoji: &#8220;\ud83e\udda5&#8221;,<br \/>\n          avatar: &#8220;avatars\/samantha.png&#8221;,<br \/>\n        },<br \/>\n        groupChat: { mentionPatterns: [&#8220;@openclaw&#8221;] },<br \/>\n        sandbox: { mode: &#8220;off&#8221; },<br \/>\n        runtime: {<br \/>\n          type: &#8220;acp&#8221;,<br \/>\n          acp: {<br \/>\n            agent: &#8220;codex&#8221;,<br \/>\n            backend: &#8220;acpx&#8221;,<br \/>\n            mode: &#8220;persistent&#8221;,<br \/>\n            cwd: &#8220;\/workspace\/openclaw&#8221;,<br \/>\n          },<br \/>\n        },<br \/>\n        subagents: { allowAgents: [&#8220;*&#8221;] },<br \/>\n        tools: {<br \/>\n          profile: &#8220;coding&#8221;,<br \/>\n          allow: [&#8220;browser&#8221;],<br \/>\n          deny: [&#8220;canvas&#8221;],<br \/>\n          elevated: { enabled: true },<br \/>\n        },<br \/>\n      },<br \/>\n    ],<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `id`\uff1a\u7a33\u5b9a\u7684\u667a\u80fd\u4f53 ID\uff08\u5fc5\u586b\uff09\u3002\n* `default`\uff1a\u82e5\u8bbe\u7f6e\u4e86\u591a\u4e2a\uff0c\u5219\u7b2c\u4e00\u4e2a\u751f\u6548\uff08\u4f1a\u8bb0\u5f55\u8b66\u544a\uff09\u3002\u82e5\u4e00\u4e2a\u90fd\u672a\u8bbe\uff0c\u5219\u5217\u8868\u7b2c\u4e00\u9879\u4e3a\u9ed8\u8ba4\u3002\n* `model`\uff1a\u5b57\u7b26\u4e32\u5f62\u5f0f\u53ea\u8986\u76d6 `primary`\uff1b\u5bf9\u8c61\u5f62\u5f0f `{ primary, fallbacks }` \u540c\u65f6\u8986\u76d6\u4e24\u8005\uff08`[]` \u4f1a\u7981\u7528\u5168\u5c40\u6545\u969c\u5207\u6362\uff09\u3002\u4ec5\u8986\u76d6 `primary` \u7684 Cron \u4f5c\u4e1a\u4ecd\u4f1a\u7ee7\u627f\u9ed8\u8ba4\u6545\u969c\u5207\u6362\uff0c\u9664\u975e\u4f60\u8bbe\u7f6e `fallbacks: []`\u3002\n* `params`\uff1a\u6309\u667a\u80fd\u4f53\u7684\u6d41\u53c2\u6570\uff0c\u4f1a\u5408\u5e76\u5230 `agents.defaults.models` \u4e2d\u6240\u9009\u6a21\u578b\u6761\u76ee\u4e4b\u4e0a\u3002\u7528\u4e8e\u4e3a\u667a\u80fd\u4f53\u6dfb\u52a0\u7279\u5b9a\u8986\u76d6\uff0c\u4f8b\u5982 `cacheRetention`\u3001`temperature` \u6216 `maxTokens`\uff0c\u800c\u65e0\u9700\u590d\u5236\u6574\u4e2a\u6a21\u578b\u76ee\u5f55\u3002\n* `runtime`\uff1a\u53ef\u9009\u7684\u6309\u667a\u80fd\u4f53\u8fd0\u884c\u65f6\u63cf\u8ff0\u7b26\u3002\u5f53\u667a\u80fd\u4f53\u5e94\u9ed8\u8ba4\u4f7f\u7528 ACP harness \u4f1a\u8bdd\u65f6\uff0c\u53ef\u4f7f\u7528 `type: &quot;acp&quot;`\uff0c\u5e76\u5728 `runtime.acp` \u4e2d\u8bbe\u7f6e\u9ed8\u8ba4\u503c\uff08`agent`\u3001`backend`\u3001`mode`\u3001`cwd`\uff09\u3002\n* `identity.avatar`\uff1a\u5de5\u4f5c\u533a\u76f8\u5bf9\u8def\u5f84\u3001`http(s)` URL \u6216 `data:` URI\u3002\n* `identity` \u4f1a\u6d3e\u751f\u9ed8\u8ba4\u503c\uff1a\u4ece `emoji` \u6d3e\u751f `ackReaction`\uff0c\u4ece `name`\/`emoji` \u6d3e\u751f `mentionPatterns`\u3002\n* `subagents.allowAgents`\uff1a`sessions_spawn` \u7684\u667a\u80fd\u4f53 ID allowlist\uff08`[&quot;*&quot;]` = \u4efb\u610f\uff1b\u9ed8\u8ba4\uff1a\u4ec5\u540c\u4e00\u667a\u80fd\u4f53\uff09\u3002\n* \u6c99\u7bb1\u7ee7\u627f\u4fdd\u62a4\uff1a\u82e5\u8bf7\u6c42\u65b9\u4f1a\u8bdd\u5904\u4e8e\u6c99\u7bb1\u4e2d\uff0c`sessions_spawn` \u4f1a\u62d2\u7edd\u90a3\u4e9b\u5c06\u4ee5\u975e\u6c99\u7bb1\u65b9\u5f0f\u8fd0\u884c\u7684\u76ee\u6807\u3002\n\n***\n\n## \u591a\u667a\u80fd\u4f53\u8def\u7531\n\n\u5728\u4e00\u4e2a Gateway \u7f51\u5173\u4e2d\u8fd0\u884c\u591a\u4e2a\u9694\u79bb\u7684\u667a\u80fd\u4f53\u3002\u89c1 [Multi-Agent](\/concepts\/multi-agent)\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: {\n    list: [\n      { id: &quot;home&quot;, default: true, workspace: &quot;~\/.openclaw\/workspace-home&quot; },\n      { id: &quot;work&quot;, workspace: &quot;~\/.openclaw\/workspace-work&quot; },\n    ],\n  },\n  bindings: [\n    { agentId: &quot;home&quot;, match: { channel: &quot;whatsapp&quot;, accountId: &quot;personal&quot; } },\n    { agentId: &quot;work&quot;, match: { channel: &quot;whatsapp&quot;, accountId: &quot;biz&quot; } },\n  ],\n}\n<\/code><\/pre>\n<h3>\u7ed1\u5b9a\u5339\u914d\u5b57\u6bb5<\/h3>\n<ul>\n<li><code>type<\/code>\uff08\u53ef\u9009\uff09\uff1a\u666e\u901a\u8def\u7531\u4f7f\u7528 <code>route<\/code>\uff08\u7f3a\u5931\u65f6\u9ed8\u8ba4\u4e3a route\uff09\uff0c\u6301\u4e45\u5316 ACP \u5bf9\u8bdd\u7ed1\u5b9a\u4f7f\u7528 <code>acp<\/code>\u3002<\/li>\n<li><code>match.channel<\/code>\uff08\u5fc5\u586b\uff09<\/li>\n<li><code>match.accountId<\/code>\uff08\u53ef\u9009\uff1b<code>*<\/code> = \u4efb\u610f\u8d26\u6237\uff1b\u7701\u7565 = \u9ed8\u8ba4\u8d26\u6237\uff09<\/li>\n<li><code>match.peer<\/code>\uff08\u53ef\u9009\uff1b<code>{ kind: direct|group|channel, id }<\/code>\uff09<\/li>\n<li><code>match.guildId<\/code> \/ <code>match.teamId<\/code>\uff08\u53ef\u9009\uff1b\u6e20\u9053\u7279\u5b9a\uff09<\/li>\n<li><code>acp<\/code>\uff08\u53ef\u9009\uff1b\u4ec5\u7528\u4e8e <code>type: \"acp\"<\/code>\uff09\uff1a<code>{ mode, label, cwd, backend }<\/code><\/li>\n<\/ul>\n<p><strong>\u786e\u5b9a\u6027\u5339\u914d\u987a\u5e8f\uff1a<\/strong><\/p>\n<ol>\n<li><code>match.peer<\/code><\/li>\n<li><code>match.guildId<\/code><\/li>\n<li><code>match.teamId<\/code><\/li>\n<li><code>match.accountId<\/code>\uff08\u7cbe\u786e\u5339\u914d\uff0c\u65e0 peer\/guild\/team\uff09<\/li>\n<li><code>match.accountId: \"*\"<\/code>\uff08\u5168\u6e20\u9053\uff09<\/li>\n<li>\u9ed8\u8ba4\u667a\u80fd\u4f53<\/li>\n<\/ol>\n<p>\u5728\u6bcf\u4e00\u5c42\u5185\uff0c\u7b2c\u4e00\u4e2a\u5339\u914d\u7684 <code>bindings<\/code> \u6761\u76ee\u80dc\u51fa\u3002<\/p>\n<p>\u5bf9\u4e8e <code>type: \"acp\"<\/code> \u6761\u76ee\uff0cOpenClaw \u4f1a\u6309\u7cbe\u786e\u5bf9\u8bdd\u8eab\u4efd\uff08<code>match.channel<\/code> + account + <code>match.peer.id<\/code>\uff09\u89e3\u6790\uff0c\u4e0d\u4f7f\u7528\u4e0a\u8ff0 route \u7ed1\u5b9a\u5c42\u7ea7\u987a\u5e8f\u3002<\/p>\n<h3>\u6309\u667a\u80fd\u4f53\u7684\u8bbf\u95ee\u914d\u7f6e<\/h3>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    agents: {<br \/>\n      list: [<br \/>\n        {<br \/>\n          id: \"personal\",<br \/>\n          workspace: \"~\/.openclaw\/workspace-personal\",<br \/>\n          sandbox: { mode: \"off\" },<br \/>\n        },<br \/>\n      ],<br \/>\n    },<br \/>\n  }<\/code>\n<\/p>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    agents: {<br \/>\n      list: [<br \/>\n        {<br \/>\n          id: \"family\",<br \/>\n          workspace: \"~\/.openclaw\/workspace-family\",<br \/>\n          sandbox: { mode: \"all\", scope: \"agent\", workspaceAccess: \"ro\" },<br \/>\n          tools: {<br \/>\n            allow: [<br \/>\n              \"read\",<br \/>\n              \"sessions_list\",<br \/>\n              \"sessions_history\",<br \/>\n              \"sessions_send\",<br \/>\n              \"sessions_spawn\",<br \/>\n              \"session_status\",<br \/>\n            ],<br \/>\n            deny: [\"write\", \"edit\", \"apply_patch\", \"exec\", \"process\", \"browser\"],<br \/>\n          },<br \/>\n        },<br \/>\n      ],<br \/>\n    },<br \/>\n  }<\/code>\n<\/p>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    agents: {<br \/>\n      list: [<br \/>\n        {<br \/>\n          id: \"public\",<br \/>\n          workspace: \"~\/.openclaw\/workspace-public\",<br \/>\n          sandbox: { mode: \"all\", scope: \"agent\", workspaceAccess: \"none\" },<br \/>\n          tools: {<br \/>\n            allow: [<br \/>\n              \"sessions_list\",<br \/>\n              \"sessions_history\",<br \/>\n              \"sessions_send\",<br \/>\n              \"sessions_spawn\",<br \/>\n              \"session_status\",<br \/>\n              \"whatsapp\",<br \/>\n              \"telegram\",<br \/>\n              \"slack\",<br \/>\n              \"discord\",<br \/>\n              \"gateway\",<br \/>\n            ],<br \/>\n            deny: [<br \/>\n              \"read\",<br \/>\n              \"write\",<br \/>\n              \"edit\",<br \/>\n              \"apply_patch\",<br \/>\n              \"exec\",<br \/>\n              \"process\",<br \/>\n              \"browser\",<br \/>\n              \"canvas\",<br \/>\n              \"nodes\",<br \/>\n              \"cron\",<br \/>\n              \"gateway\",<br \/>\n              \"image\",<br \/>\n            ],<br \/>\n          },<br \/>\n        },<br \/>\n      ],<br \/>\n    },<br \/>\n  }<\/code>\n<\/p>\n<p>\u4f18\u5148\u7ea7\u7ec6\u8282\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=288\">Multi-Agent Sandbox &amp; Tools<\/a>\u3002<\/p>\n<hr \/>\n<h2>\u4f1a\u8bdd<\/h2>\n<p><code>``json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n{<br \/>\n  session: {<br \/>\n    scope: \"per-sender\",<br \/>\n    dmScope: \"main\", \/\/ main | per-peer | per-channel-peer | per-account-channel-peer<br \/>\n    identityLinks: {<br \/>\n      alice: [\"telegram:123456789\", \"discord:987654321012345678\"],<br \/>\n    },<br \/>\n    reset: {<br \/>\n      mode: \"daily\", \/\/ daily | idle<br \/>\n      atHour: 4,<br \/>\n      idleMinutes: 60,<br \/>\n    },<br \/>\n    resetByType: {<br \/>\n      thread: { mode: \"daily\", atHour: 4 },<br \/>\n      direct: { mode: \"idle\", idleMinutes: 240 },<br \/>\n      group: { mode: \"idle\", idleMinutes: 120 },<br \/>\n    },<br \/>\n    resetTriggers: [\"\/new\", \"\/reset\"],<br \/>\n    store: \"~\/.openclaw\/agents\/{agentId}\/sessions\/sessions.json\",<br \/>\n    parentForkMaxTokens: 100000, \/\/ \u8d85\u8fc7\u6b64 token \u6570\u5219\u8df3\u8fc7\u7236\u7ebf\u7a0b fork\uff080 \u8868\u793a\u7981\u7528\uff09<br \/>\n    maintenance: {<br \/>\n      mode: \"warn\", \/\/ warn | enforce<br \/>\n      pruneAfter: \"30d\",<br \/>\n      maxEntries: 500,<br \/>\n      rotateBytes: \"10mb\",<br \/>\n      resetArchiveRetention: \"30d\", \/\/ \u65f6\u957f\u6216 false<br \/>\n      maxDiskBytes: \"500mb\", \/\/ \u53ef\u9009\u786c\u9884\u7b97<br \/>\n      highWaterBytes: \"400mb\", \/\/ \u53ef\u9009\u6e05\u7406\u76ee\u6807<br \/>\n    },<br \/>\n    threadBindings: {<br \/>\n      enabled: true,<br \/>\n      idleHours: 24, \/\/ \u9ed8\u8ba4\u4e0d\u6d3b\u52a8\u81ea\u52a8\u53d6\u6d88\u805a\u7126\u65f6\u957f\uff08\u5c0f\u65f6\uff0c<\/code>0<code>\u8868\u793a\u7981\u7528\uff09<br \/>\n      maxAgeHours: 0, \/\/ \u9ed8\u8ba4\u786c\u6027\u6700\u5927\u5e74\u9f84\uff08\u5c0f\u65f6\uff0c<\/code>0` \u8868\u793a\u7981\u7528\uff09<br \/>\n    },<br \/>\n    mainKey: &#8220;main&#8221;, \/\/ \u65e7\u5b57\u6bb5\uff08\u8fd0\u884c\u65f6\u59cb\u7ec8\u4f7f\u7528 &#8220;main&#8221;\uff09<br \/>\n    agentToAgent: { maxPingPongTurns: 5 },<br \/>\n    sendPolicy: {<br \/>\n      rules: [{ action: &#8220;deny&#8221;, match: { \u6e20\u9053: &#8220;discord&#8221;, chatType: &#8220;group&#8221; } }],<br \/>\n      default: &#8220;allow&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n&lt;Accordion title=&quot;\u4f1a\u8bdd\u5b57\u6bb5\u8be6\u60c5&quot;&gt;\n  * **`dmScope`**\uff1a\u79c1\u4fe1\u5982\u4f55\u5206\u7ec4\u3002\n    * `main`\uff1a\u6240\u6709\u79c1\u4fe1\u5171\u4eab\u4e3b\u4f1a\u8bdd\u3002\n    * `per-peer`\uff1a\u6309\u53d1\u9001\u8005 ID \u8de8\u6e20\u9053\u9694\u79bb\u3002\n    * `per-channel-peer`\uff1a\u6309\u6e20\u9053 + \u53d1\u9001\u8005\u9694\u79bb\uff08\u63a8\u8350\u7528\u4e8e\u591a\u7528\u6237\u6536\u4ef6\u7bb1\uff09\u3002\n    * `per-account-channel-peer`\uff1a\u6309\u8d26\u6237 + \u6e20\u9053 + \u53d1\u9001\u8005\u9694\u79bb\uff08\u63a8\u8350\u7528\u4e8e\u591a\u8d26\u6237\uff09\u3002\n  * **`identityLinks`**\uff1a\u5c06\u89c4\u8303 ID \u6620\u5c04\u5230\u5e26\u63d0\u4f9b\u5546\u524d\u7f00\u7684 peer\uff0c\u7528\u4e8e\u8de8\u6e20\u9053\u5171\u4eab\u4f1a\u8bdd\u3002\n  * **`reset`**\uff1a\u4e3b\u91cd\u7f6e\u7b56\u7565\u3002`daily` \u4f1a\u5728\u672c\u5730\u65f6\u95f4 `atHour` \u91cd\u7f6e\uff1b`idle` \u4f1a\u5728 `idleMinutes` \u540e\u91cd\u7f6e\u3002\u5982\u679c\u4e24\u8005\u90fd\u914d\u7f6e\uff0c\u8c01\u5148\u5230\u671f\u8c01\u751f\u6548\u3002\n  * **`resetByType`**\uff1a\u6309\u7c7b\u578b\u8986\u76d6\uff08`direct`\u3001`group`\u3001`thread`\uff09\u3002\u65e7\u7248 `dm` \u4ecd\u63a5\u53d7\u4e3a `direct` \u7684\u522b\u540d\u3002\n  * **`parentForkMaxTokens`**\uff1a\u521b\u5efa\u5206\u53c9\u7ebf\u7a0b\u4f1a\u8bdd\u65f6\uff0c\u7236\u4f1a\u8bdd\u5141\u8bb8\u7684\u6700\u5927 `totalTokens`\uff08\u9ed8\u8ba4 `100000`\uff09\u3002\n    * \u5982\u679c\u7236\u4f1a\u8bdd `totalTokens` \u9ad8\u4e8e\u8be5\u503c\uff0cOpenClaw \u4f1a\u542f\u52a8\u4e00\u4e2a\u65b0\u7684\u7ebf\u7a0b\u4f1a\u8bdd\uff0c\u800c\u4e0d\u662f\u7ee7\u627f\u7236\u4f1a\u8bdd\u7684\u8bb0\u5f55\u5386\u53f2\u3002\n    * \u8bbe\u4e3a `0` \u53ef\u7981\u7528\u6b64\u4fdd\u62a4\uff0c\u5e76\u59cb\u7ec8\u5141\u8bb8\u7236\u4f1a\u8bdd\u5206\u53c9\u3002\n  * **`mainKey`**\uff1a\u65e7\u5b57\u6bb5\u3002\u8fd0\u884c\u65f6\u73b0\u5728\u59cb\u7ec8\u4e3a\u4e3b\u76f4\u804a\u6876\u4f7f\u7528 `&quot;main&quot;`\u3002\n  * **`sendPolicy`**\uff1a\u53ef\u6309 `channel`\u3001`chatType`\uff08`direct|group|channel`\uff0c\u65e7\u7248 `dm` \u4ecd\u4e3a\u522b\u540d\uff09\u3001`keyPrefix` \u6216 `rawKeyPrefix` \u5339\u914d\u3002\u7b2c\u4e00\u4e2a deny \u751f\u6548\u3002\n  * **`maintenance`**\uff1a\u4f1a\u8bdd\u5b58\u50a8\u6e05\u7406 + \u4fdd\u7559\u63a7\u5236\u3002\n    * `mode`\uff1a`warn` \u4ec5\u53d1\u51fa\u8b66\u544a\uff1b`enforce` \u5e94\u7528\u6e05\u7406\u3002\n    * `pruneAfter`\uff1a\u8fc7\u671f\u6761\u76ee\u7684\u5e74\u9f84\u9608\u503c\uff08\u9ed8\u8ba4 `30d`\uff09\u3002\n    * `maxEntries`\uff1a`sessions.json` \u4e2d\u7684\u6700\u5927\u6761\u76ee\u6570\uff08\u9ed8\u8ba4 `500`\uff09\u3002\n    * `rotateBytes`\uff1a\u5f53 `sessions.json` \u8d85\u8fc7\u6b64\u5927\u5c0f\u65f6\u8f6e\u8f6c\uff08\u9ed8\u8ba4 `10mb`\uff09\u3002\n    * `resetArchiveRetention`\uff1a`*.reset.&lt;timestamp&gt;` \u4f1a\u8bdd\u8bb0\u5f55\u5f52\u6863\u7684\u4fdd\u7559\u671f\u9650\u3002\u9ed8\u8ba4\u8ddf\u968f `pruneAfter`\uff1b\u8bbe\u4e3a `false` \u53ef\u7981\u7528\u3002\n    * `maxDiskBytes`\uff1a\u53ef\u9009\u7684\u4f1a\u8bdd\u76ee\u5f55\u78c1\u76d8\u9884\u7b97\u3002\u5728 `warn` \u6a21\u5f0f\u4e0b\u4f1a\u8bb0\u5f55\u8b66\u544a\uff1b\u5728 `enforce` \u6a21\u5f0f\u4e0b\u4f1a\u4f18\u5148\u5220\u9664\u6700\u65e7\u7684\u5de5\u4ef6\/\u4f1a\u8bdd\u3002\n    * `highWaterBytes`\uff1a\u9884\u7b97\u6e05\u7406\u540e\u7684\u53ef\u9009\u76ee\u6807\u503c\u3002\u9ed8\u8ba4\u662f `maxDiskBytes` \u7684 `80%`\u3002\n  * **`threadBindings`**\uff1a\u7ebf\u7a0b\u7ed1\u5b9a\u4f1a\u8bdd\u529f\u80fd\u7684\u5168\u5c40\u9ed8\u8ba4\u503c\u3002\n    * `enabled`\uff1a\u4e3b\u9ed8\u8ba4\u5f00\u5173\uff08\u63d0\u4f9b\u5546\u53ef\u8986\u76d6\uff1bDiscord \u4f7f\u7528 `channels.discord.threadBindings.enabled`\uff09\n    * `idleHours`\uff1a\u9ed8\u8ba4\u4e0d\u6d3b\u52a8\u81ea\u52a8\u53d6\u6d88\u805a\u7126\u65f6\u957f\uff08\u5c0f\u65f6\uff0c`0` \u8868\u793a\u7981\u7528\uff1b\u63d0\u4f9b\u5546\u53ef\u8986\u76d6\uff09\n    * `maxAgeHours`\uff1a\u9ed8\u8ba4\u786c\u6027\u6700\u5927\u5e74\u9f84\uff08\u5c0f\u65f6\uff0c`0` \u8868\u793a\u7981\u7528\uff1b\u63d0\u4f9b\u5546\u53ef\u8986\u76d6\uff09\n&lt;\/Accordion&gt;\n\n***\n\n## \u6d88\u606f\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  messages: {\n    responsePrefix: &quot;\ud83e\udd9e&quot;, \/\/ \u6216 &quot;auto&quot;\n    ackReaction: &quot;\ud83d\udc40&quot;,\n    ackReactionScope: &quot;group-mentions&quot;, \/\/ group-mentions | group-all | direct | all\n    removeAckAfterReply: false,\n    queue: {\n      mode: &quot;collect&quot;, \/\/ steer | followup | collect | steer-backlog | steer+backlog | queue | interrupt\n      debounceMs: 1000,\n      cap: 20,\n      drop: &quot;summarize&quot;, \/\/ old | new | summarize\n      byChannel: {\n        whatsapp: &quot;collect&quot;,\n        telegram: &quot;collect&quot;,\n      },\n    },\n    inbound: {\n      debounceMs: 2000, \/\/ 0 \u8868\u793a\u7981\u7528\n      byChannel: {\n        whatsapp: 5000,\n        slack: 1500,\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<h3>\u56de\u590d\u524d\u7f00<\/h3>\n<p>\u6309\u6e20\u9053\/\u6309\u8d26\u6237\u8986\u76d6\uff1a<code>channels.&lt;channel&gt;.responsePrefix<\/code>\u3001<code>channels.&lt;channel&gt;.accounts.&lt;id&gt;.responsePrefix<\/code>\u3002<\/p>\n<p>\u89e3\u6790\u987a\u5e8f\uff08\u6700\u5177\u4f53\u8005\u4f18\u5148\uff09\uff1a\u8d26\u6237 \u2192 \u6e20\u9053 \u2192 \u5168\u5c40\u3002<code>\"\"<\/code> \u4f1a\u7981\u7528\u5e76\u505c\u6b62\u7ea7\u8054\u3002<code>\"auto\"<\/code> \u4f1a\u6d3e\u751f\u4e3a <code>[{identity.name}]<\/code>\u3002<\/p>\n<p><strong>\u6a21\u677f\u53d8\u91cf\uff1a<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Variable<\/th>\n<th>Description<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>{model}<\/code><\/td>\n<td>\u77ed\u6a21\u578b\u540d<\/td>\n<td><code>claude-opus-4-6<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>{modelFull}<\/code><\/td>\n<td>\u5b8c\u6574\u6a21\u578b\u6807\u8bc6\u7b26<\/td>\n<td><code>anthropic\/claude-opus-4-6<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>{provider}<\/code><\/td>\n<td>\u63d0\u4f9b\u5546\u540d\u79f0<\/td>\n<td><code>anthropic<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>{thinkingLevel}<\/code><\/td>\n<td>\u5f53\u524d thinking \u7ea7\u522b<\/td>\n<td><code>high<\/code>\u3001<code>low<\/code>\u3001<code>off<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>{identity.name}<\/code><\/td>\n<td>\u667a\u80fd\u4f53\u8eab\u4efd\u540d\u79f0<\/td>\n<td>\uff08\u4e0e <code>\"auto\"<\/code> \u76f8\u540c\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u53d8\u91cf\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u3002<code>{think}<\/code> \u662f <code>{thinkingLevel}<\/code> \u7684\u522b\u540d\u3002<\/p>\n<h3>\u786e\u8ba4\u53cd\u5e94<\/h3>\n<ul>\n<li>\u9ed8\u8ba4\u53d6\u6d3b\u52a8\u667a\u80fd\u4f53\u7684 <code>identity.emoji<\/code>\uff0c\u5426\u5219\u4e3a <code>\"\ud83d\udc40\"<\/code>\u3002\u8bbe\u4e3a <code>\"\"<\/code> \u53ef\u7981\u7528\u3002<\/li>\n<li>\u6309\u6e20\u9053\u8986\u76d6\uff1a<code>channels.&lt;channel&gt;.ackReaction<\/code>\u3001<code>channels.&lt;channel&gt;.accounts.&lt;id&gt;.ackReaction<\/code>\u3002<\/li>\n<li>\u89e3\u6790\u987a\u5e8f\uff1a\u8d26\u6237 \u2192 \u6e20\u9053 \u2192 <code>messages.ackReaction<\/code> \u2192 identity \u56de\u9000\u3002<\/li>\n<li>\u4f5c\u7528\u57df\uff1a<code>group-mentions<\/code>\uff08\u9ed8\u8ba4\uff09\u3001<code>group-all<\/code>\u3001<code>direct<\/code>\u3001<code>all<\/code>\u3002<\/li>\n<li><code>removeAckAfterReply<\/code>\uff1a\u56de\u590d\u540e\u79fb\u9664\u786e\u8ba4\u53cd\u5e94\uff08\u4ec5 Slack\/Discord\/Telegram\/Google Chat\uff09\u3002<\/li>\n<\/ul>\n<h3>\u5165\u7ad9\u9632\u6296<\/h3>\n<p>\u5c06\u540c\u4e00\u53d1\u9001\u8005\u5feb\u901f\u8fde\u7eed\u53d1\u9001\u7684\u7eaf\u6587\u672c\u6d88\u606f\u5408\u5e76\u4e3a\u4e00\u6b21\u667a\u80fd\u4f53\u8f6e\u6b21\u3002\u5a92\u4f53\/\u9644\u4ef6\u4f1a\u7acb\u5373\u51b2\u5237\u3002\u63a7\u5236\u547d\u4ee4\u4f1a\u7ed5\u8fc7\u9632\u6296\u3002<\/p>\n<h3>TTS\uff08\u6587\u672c\u8f6c\u8bed\u97f3\uff09<\/h3>\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  messages: {<br \/>\n    tts: {<br \/>\n      auto: &#8220;always&#8221;, \/\/ off | always | inbound | tagged<br \/>\n      mode: &#8220;final&#8221;, \/\/ final | all<br \/>\n      provider: &#8220;elevenlabs&#8221;,<br \/>\n      summaryModel: &#8220;openai\/gpt-4.1-mini&#8221;,<br \/>\n      modelOverrides: { enabled: true },<br \/>\n      maxTextLength: 4000,<br \/>\n      timeoutMs: 30000,<br \/>\n      prefsPath: &#8220;~\/.openclaw\/settings\/tts.json&#8221;,<br \/>\n      elevenlabs: {<br \/>\n        apiKey: &#8220;elevenlabs_api_key&#8221;,<br \/>\n        baseUrl: &#8220;https:\/\/api.elevenlabs.io&#8221;,<br \/>\n        voiceId: &#8220;voice_id&#8221;,<br \/>\n        modelId: &#8220;eleven_multilingual_v2&#8221;,<br \/>\n        seed: 42,<br \/>\n        applyTextNormalization: &#8220;auto&#8221;,<br \/>\n        languageCode: &#8220;en&#8221;,<br \/>\n        voiceSettings: {<br \/>\n          stability: 0.5,<br \/>\n          similarityBoost: 0.75,<br \/>\n          style: 0.0,<br \/>\n          useSpeakerBoost: true,<br \/>\n          speed: 1.0,<br \/>\n        },<br \/>\n      },<br \/>\n      openai: {<br \/>\n        apiKey: &#8220;openai_api_key&#8221;,<br \/>\n        baseUrl: &#8220;https:\/\/api.openai.com\/v1&#8221;,<br \/>\n        model: &#8220;gpt-4o-mini-tts&#8221;,<br \/>\n        voice: &#8220;alloy&#8221;,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `auto` \u63a7\u5236\u81ea\u52a8 TTS\u3002`\/tts off|always|inbound|tagged` \u53ef\u6309\u4f1a\u8bdd\u8986\u76d6\u3002\n* `summaryModel` \u4f1a\u8986\u76d6 `agents.defaults.model.primary` \u7528\u4e8e\u81ea\u52a8\u6458\u8981\u3002\n* `modelOverrides` \u9ed8\u8ba4\u542f\u7528\uff1b`modelOverrides.allowProvider` \u9ed8\u8ba4\u662f `false`\uff08\u9700\u663e\u5f0f\u9009\u62e9\u542f\u7528\uff09\u3002\n* API \u5bc6\u94a5\u56de\u9000\u5230 `ELEVENLABS_API_KEY`\/`XI_API_KEY` \u548c `OPENAI_API_KEY`\u3002\n* `openai.baseUrl` \u4f1a\u8986\u76d6 OpenAI TTS \u7aef\u70b9\u3002\u89e3\u6790\u987a\u5e8f\u662f\u914d\u7f6e\u3001\u7136\u540e `OPENAI_TTS_BASE_URL`\u3001\u518d\u7136\u540e `https:\/\/api.openai.com\/v1`\u3002\n* \u5f53 `openai.baseUrl` \u6307\u5411\u975e OpenAI \u7aef\u70b9\u65f6\uff0cOpenClaw \u4f1a\u5c06\u5176\u89c6\u4e3a\u517c\u5bb9 OpenAI \u7684 TTS \u670d\u52a1\u5668\uff0c\u5e76\u653e\u5bbd\u6a21\u578b\/\u8bed\u97f3\u6821\u9a8c\u3002\n\n***\n\n## Talk\n\nTalk \u6a21\u5f0f\u7684\u9ed8\u8ba4\u503c\uff08macOS\/iOS\/Android\uff09\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  talk: {\n    voiceId: &quot;elevenlabs_voice_id&quot;,\n    voiceAliases: {\n      Clawd: &quot;EXAVITQu4vr4xnSDxMaL&quot;,\n      Roger: &quot;CwhRBWXzGAHq8TQ4Fs17&quot;,\n    },\n    modelId: &quot;eleven_v3&quot;,\n    outputFormat: &quot;mp3_44100_128&quot;,\n    apiKey: &quot;elevenlabs_api_key&quot;,\n    silenceTimeoutMs: 1500,\n    interruptOnSpeech: true,\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u8bed\u97f3 ID \u4f1a\u56de\u9000\u5230 <code>ELEVENLABS_VOICE_ID<\/code> \u6216 <code>SAG_VOICE_ID<\/code>\u3002<\/li>\n<li><code>apiKey<\/code> \u548c <code>providers.*.apiKey<\/code> \u63a5\u53d7\u660e\u6587\u5b57\u7b26\u4e32\u6216 SecretRef \u5bf9\u8c61\u3002<\/li>\n<li>\u4ec5\u5728\u672a\u914d\u7f6e Talk API key \u65f6\uff0c\u624d\u4f1a\u56de\u9000\u5230 <code>ELEVENLABS_API_KEY<\/code>\u3002<\/li>\n<li><code>voiceAliases<\/code> \u8ba9 Talk \u6307\u4ee4\u53ef\u4ee5\u4f7f\u7528\u53cb\u597d\u7684\u540d\u79f0\u3002<\/li>\n<li><code>silenceTimeoutMs<\/code> \u63a7\u5236 Talk \u6a21\u5f0f\u5728\u7528\u6237\u505c\u6b62\u8bf4\u8bdd\u540e\u7b49\u5f85\u591a\u4e45\u624d\u53d1\u9001\u8f6c\u5f55\u3002\u672a\u8bbe\u7f6e\u65f6\u4f7f\u7528\u5e73\u53f0\u9ed8\u8ba4\u6682\u505c\u7a97\u53e3\uff08<code>macOS \u548c Android \u4e0a\u4e3a 700 ms\uff0ciOS \u4e0a\u4e3a 900 ms<\/code>\uff09\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u5de5\u5177<\/h2>\n<h3>\u5de5\u5177\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p><code>tools.profile<\/code> \u4f1a\u5728 <code>tools.allow<\/code>\/<code>tools.deny<\/code> \u4e4b\u524d\u8bbe\u7f6e\u57fa\u7840 allowlist\uff1a<\/p>\n<p>\u672c\u5730\u65b0\u624b\u5f15\u5bfc\u4f1a\u5728\u672a\u8bbe\u7f6e\u65f6\uff0c\u628a\u65b0\u7684\u672c\u5730\u914d\u7f6e\u9ed8\u8ba4\u8bbe\u4e3a <code>tools.profile: \"coding\"<\/code>\uff08\u73b0\u6709\u663e\u5f0f\u914d\u7f6e\u6587\u4ef6\u4f1a\u4fdd\u7559\uff09\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>Profile<\/th>\n<th>Includes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>minimal<\/code><\/td>\n<td>\u4ec5 <code>session_status<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>coding<\/code><\/td>\n<td><code>group:fs<\/code>\u3001<code>group:runtime<\/code>\u3001<code>group:sessions<\/code>\u3001<code>group:memory<\/code>\u3001<code>image<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>messaging<\/code><\/td>\n<td><code>group:messaging<\/code>\u3001<code>sessions_list<\/code>\u3001<code>sessions_history<\/code>\u3001<code>sessions_send<\/code>\u3001<code>session_status<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>full<\/code><\/td>\n<td>\u4e0d\u9650\u5236\uff08\u7b49\u540c\u4e8e\u672a\u8bbe\u7f6e\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5de5\u5177\u7ec4<\/h3>\n<table>\n<thead>\n<tr>\n<th>Group<\/th>\n<th>Tools<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>group:runtime<\/code><\/td>\n<td><code>exec<\/code>\u3001<code>process<\/code>\uff08<code>bash<\/code> \u53ef\u4f5c\u4e3a <code>exec<\/code> \u7684\u522b\u540d\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>group:fs<\/code><\/td>\n<td><code>read<\/code>\u3001<code>write<\/code>\u3001<code>edit<\/code>\u3001<code>apply_patch<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:sessions<\/code><\/td>\n<td><code>sessions_list<\/code>\u3001<code>sessions_history<\/code>\u3001<code>sessions_send<\/code>\u3001<code>sessions_spawn<\/code>\u3001<code>session_status<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:memory<\/code><\/td>\n<td><code>memory_search<\/code>\u3001<code>memory_get<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:web<\/code><\/td>\n<td><code>web_search<\/code>\u3001<code>web_fetch<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:ui<\/code><\/td>\n<td><code>browser<\/code>\u3001<code>canvas<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:automation<\/code><\/td>\n<td><code>cron<\/code>\u3001<code>gateway<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:messaging<\/code><\/td>\n<td><code>message<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:nodes<\/code><\/td>\n<td><code>nodes<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>group:openclaw<\/code><\/td>\n<td>\u6240\u6709\u5185\u7f6e\u5de5\u5177\uff08\u4e0d\u542b\u63d0\u4f9b\u5546\u63d2\u4ef6\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><code>tools.allow<\/code> \/ <code>tools.deny<\/code><\/h3>\n<p>\u5168\u5c40\u5de5\u5177 allow\/deny \u7b56\u7565\uff08deny \u4f18\u5148\uff09\u3002\u4e0d\u533a\u5206\u5927\u5c0f\u5199\uff0c\u652f\u6301 <code>*<\/code> \u901a\u914d\u7b26\u3002\u5373\u4f7f Docker \u6c99\u7bb1\u5173\u95ed\uff0c\u4e5f\u4f1a\u5e94\u7528\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  tools: { deny: [&#8220;browser&#8221;, &#8220;canvas&#8221;] },<br \/>\n}<\/p>\n<pre><code>\n### `tools.byProvider`\n\n\u8fdb\u4e00\u6b65\u9650\u5236\u7279\u5b9a\u63d0\u4f9b\u5546\u6216\u6a21\u578b\u7684\u5de5\u5177\u3002\u987a\u5e8f\uff1a\u57fa\u7840\u914d\u7f6e\u6587\u4ef6 \u2192 \u63d0\u4f9b\u5546\u914d\u7f6e\u6587\u4ef6 \u2192 allow\/deny\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  tools: {\n    profile: &quot;coding&quot;,\n    byProvider: {\n      &quot;google-antigravity&quot;: { profile: &quot;minimal&quot; },\n      &quot;openai\/gpt-5.2&quot;: { allow: [&quot;group:fs&quot;, &quot;sessions_list&quot;] },\n    },\n  },\n}\n<\/code><\/pre>\n<h3><code>tools.elevated<\/code><\/h3>\n<p>\u63a7\u5236\u63d0\u5347\u6743\u9650\uff08\u4e3b\u673a\uff09<code>exec<\/code> \u8bbf\u95ee\uff1a<\/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  tools: {<br \/>\n    elevated: {<br \/>\n      enabled: true,<br \/>\n      allowFrom: {<br \/>\n        whatsapp: [&#8220;+15555550123&#8221;],<br \/>\n        discord: [&#8220;1234567890123&#8221;, &#8220;987654321098765432&#8221;],<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u6309\u667a\u80fd\u4f53\u8986\u76d6\uff08`agents.list[].tools.elevated`\uff09\u53ea\u80fd\u8fdb\u4e00\u6b65\u6536\u7d27\u9650\u5236\u3002\n* `\/elevated on|off|ask|full` \u4f1a\u6309\u4f1a\u8bdd\u4fdd\u5b58\u72b6\u6001\uff1b\u5185\u8054\u6307\u4ee4\u4ec5\u4f5c\u7528\u4e8e\u5355\u6761\u6d88\u606f\u3002\n* \u63d0\u5347\u6743\u9650\u7684 `exec` \u4f1a\u5728\u4e3b\u673a\u4e0a\u8fd0\u884c\uff0c\u5e76\u7ed5\u8fc7\u6c99\u7bb1\u9694\u79bb\u3002\n\n### `tools.exec`\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  tools: {\n    exec: {\n      backgroundMs: 10000,\n      timeoutSec: 1800,\n      cleanupMs: 1800000,\n      notifyOnExit: true,\n      notifyOnExitEmptySuccess: false,\n      applyPatch: {\n        enabled: false,\n        allowModels: [&quot;gpt-5.2&quot;],\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<h3><code>tools.loopDetection<\/code><\/h3>\n<p>\u5de5\u5177\u5faa\u73af\u5b89\u5168\u68c0\u67e5<strong>\u9ed8\u8ba4\u7981\u7528<\/strong>\u3002\u8bbe\u7f6e <code>enabled: true<\/code> \u53ef\u542f\u7528\u68c0\u6d4b\u3002<br \/>\n\u53ef\u5728\u5168\u5c40 <code>tools.loopDetection<\/code> \u4e2d\u5b9a\u4e49\u8bbe\u7f6e\uff0c\u5e76\u5728 <code>agents.list[].tools.loopDetection<\/code> \u4e2d\u6309\u667a\u80fd\u4f53\u8986\u76d6\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  tools: {<br \/>\n    loopDetection: {<br \/>\n      enabled: true,<br \/>\n      historySize: 30,<br \/>\n      warningThreshold: 10,<br \/>\n      criticalThreshold: 20,<br \/>\n      globalCircuitBreakerThreshold: 30,<br \/>\n      detectors: {<br \/>\n        genericRepeat: true,<br \/>\n        knownPollNoProgress: true,<br \/>\n        pingPong: true,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `historySize`\uff1a\u4e3a\u5faa\u73af\u5206\u6790\u4fdd\u7559\u7684\u6700\u5927\u5de5\u5177\u8c03\u7528\u5386\u53f2\u3002\n* `warningThreshold`\uff1a\u7528\u4e8e\u53d1\u51fa\u8b66\u544a\u7684\u91cd\u590d\u65e0\u8fdb\u5c55\u6a21\u5f0f\u9608\u503c\u3002\n* `criticalThreshold`\uff1a\u7528\u4e8e\u963b\u6b62\u4e25\u91cd\u5faa\u73af\u7684\u66f4\u9ad8\u91cd\u590d\u9608\u503c\u3002\n* `globalCircuitBreakerThreshold`\uff1a\u5bf9\u4efb\u4f55\u65e0\u8fdb\u5c55\u8fd0\u884c\u7684\u786c\u6027\u505c\u6b62\u9608\u503c\u3002\n* `detectors.genericRepeat`\uff1a\u5bf9\u91cd\u590d\u7684\u76f8\u540c\u5de5\u5177\/\u76f8\u540c\u53c2\u6570\u8c03\u7528\u53d1\u51fa\u8b66\u544a\u3002\n* `detectors.knownPollNoProgress`\uff1a\u5bf9\u5df2\u77e5\u8f6e\u8be2\u5de5\u5177\uff08`process.poll`\u3001`command_status` \u7b49\uff09\u7684\u65e0\u8fdb\u5c55\u60c5\u51b5\u53d1\u51fa\u8b66\u544a\/\u963b\u6b62\u3002\n* `detectors.pingPong`\uff1a\u5bf9\u4ea4\u66ff\u51fa\u73b0\u7684\u65e0\u8fdb\u5c55\u6210\u5bf9\u6a21\u5f0f\u53d1\u51fa\u8b66\u544a\/\u963b\u6b62\u3002\n* \u5982\u679c `warningThreshold &gt;= criticalThreshold` \u6216 `criticalThreshold &gt;= globalCircuitBreakerThreshold`\uff0c\u6821\u9a8c\u4f1a\u5931\u8d25\u3002\n\n### `tools.web`\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  tools: {\n    web: {\n      search: {\n        enabled: true,\n        apiKey: &quot;brave_api_key&quot;, \/\/ \u6216 BRAVE_API_KEY \u73af\u5883\u53d8\u91cf\n        maxResults: 5,\n        timeoutSeconds: 30,\n        cacheTtlMinutes: 15,\n      },\n      fetch: {\n        enabled: true,\n        maxChars: 50000,\n        maxCharsCap: 50000,\n        timeoutSeconds: 30,\n        cacheTtlMinutes: 15,\n        userAgent: &quot;custom-ua&quot;,\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<h3><code>tools.media<\/code><\/h3>\n<p>\u914d\u7f6e\u5165\u7ad9\u5a92\u4f53\u7406\u89e3\uff08\u56fe\u50cf\/\u97f3\u9891\/\u89c6\u9891\uff09\uff1a<\/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  tools: {<br \/>\n    media: {<br \/>\n      concurrency: 2,<br \/>\n      audio: {<br \/>\n        enabled: true,<br \/>\n        maxBytes: 20971520,<br \/>\n        scope: {<br \/>\n          default: &#8220;deny&#8221;,<br \/>\n          rules: [{ action: &#8220;allow&#8221;, match: { chatType: &#8220;direct&#8221; } }],<br \/>\n        },<br \/>\n        models: [<br \/>\n          { provider: &#8220;openai&#8221;, model: &#8220;gpt-4o-mini-transcribe&#8221; },<br \/>\n          { type: &#8220;cli&#8221;, command: &#8220;whisper&#8221;, args: [&#8220;&#8211;model&#8221;, &#8220;base&#8221;, &#8220;{{MediaPath}}&#8221;] },<br \/>\n        ],<br \/>\n      },<br \/>\n      video: {<br \/>\n        enabled: true,<br \/>\n        maxBytes: 52428800,<br \/>\n        models: [{ provider: &#8220;google&#8221;, model: &#8220;gemini-3-flash-preview&#8221; }],<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n&lt;Accordion title=&quot;\u5a92\u4f53\u6a21\u578b\u6761\u76ee\u5b57\u6bb5&quot;&gt;\n  **\u63d0\u4f9b\u5546\u6761\u76ee**\uff08`type: &quot;provider&quot;` \u6216\u7701\u7565\uff09\uff1a\n\n  * `provider`\uff1aAPI \u63d0\u4f9b\u5546 ID\uff08`openai`\u3001`anthropic`\u3001`google`\/`gemini`\u3001`groq` \u7b49\uff09\n  * `model`\uff1a\u6a21\u578b ID \u8986\u76d6\n  * `profile` \/ `preferredProfile`\uff1a`auth-profiles.json` \u914d\u7f6e\u6587\u4ef6\u9009\u62e9\n\n  **CLI \u6761\u76ee**\uff08`type: &quot;cli&quot;`\uff09\uff1a\n\n  * `command`\uff1a\u8981\u8fd0\u884c\u7684\u53ef\u6267\u884c\u6587\u4ef6\n  * `args`\uff1a\u6a21\u677f\u5316\u53c2\u6570\uff08\u652f\u6301 `{{MediaPath}}`\u3001`{{Prompt}}`\u3001`{{MaxChars}}` \u7b49\uff09\n\n  **\u901a\u7528\u5b57\u6bb5\uff1a**\n\n  * `capabilities`\uff1a\u53ef\u9009\u5217\u8868\uff08`image`\u3001`audio`\u3001`video`\uff09\u3002\u9ed8\u8ba4\u503c\uff1a`openai`\/`anthropic`\/`minimax` \u2192 \u56fe\u50cf\uff0c`google` \u2192 \u56fe\u50cf+\u97f3\u9891+\u89c6\u9891\uff0c`groq` \u2192 \u97f3\u9891\u3002\n  * `prompt`\u3001`maxChars`\u3001`maxBytes`\u3001`timeoutSeconds`\u3001`language`\uff1a\u6309\u6761\u76ee\u8986\u76d6\u3002\n  * \u5931\u8d25\u65f6\u4f1a\u56de\u9000\u5230\u4e0b\u4e00\u4e2a\u6761\u76ee\u3002\n\n  \u63d0\u4f9b\u5546\u8ba4\u8bc1\u9075\u5faa\u6807\u51c6\u987a\u5e8f\uff1a`auth-profiles.json` \u2192 \u73af\u5883\u53d8\u91cf \u2192 `models.providers.*.apiKey`\u3002\n&lt;\/Accordion&gt;\n\n### `tools.agentToAgent`\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  tools: {\n    agentToAgent: {\n      enabled: false,\n      allow: [&quot;home&quot;, &quot;work&quot;],\n    },\n  },\n}\n<\/code><\/pre>\n<h3><code>tools.sessions<\/code><\/h3>\n<p>\u63a7\u5236\u4f1a\u8bdd\u5de5\u5177\uff08<code>sessions_list<\/code>\u3001<code>sessions_history<\/code>\u3001<code>sessions_send<\/code>\uff09\u53ef\u4ee5\u5b9a\u4f4d\u54ea\u4e9b\u4f1a\u8bdd\u3002<\/p>\n<p>\u9ed8\u8ba4\u503c\uff1a<code>tree<\/code>\uff08\u5f53\u524d\u4f1a\u8bdd + \u7531\u5176\u6d3e\u751f\u7684\u4f1a\u8bdd\uff0c\u4f8b\u5982\u5b50\u667a\u80fd\u4f53\uff09\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  tools: {<br \/>\n    sessions: {<br \/>\n      \/\/ &#8220;self&#8221; | &#8220;tree&#8221; | &#8220;agent&#8221; | &#8220;all&#8221;<br \/>\n      visibility: &#8220;tree&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u8bf4\u660e\uff1a\n\n* `self`\uff1a\u4ec5\u5f53\u524d\u4f1a\u8bdd\u952e\u3002\n* `tree`\uff1a\u5f53\u524d\u4f1a\u8bdd + \u7531\u5f53\u524d\u4f1a\u8bdd\u6d3e\u751f\u7684\u4f1a\u8bdd\uff08\u5b50\u667a\u80fd\u4f53\uff09\u3002\n* `agent`\uff1a\u5c5e\u4e8e\u5f53\u524d\u667a\u80fd\u4f53 ID \u7684\u4efb\u610f\u4f1a\u8bdd\uff08\u5982\u679c\u4f60\u5728\u76f8\u540c\u667a\u80fd\u4f53 ID \u4e0b\u8fd0\u884c\u6309\u53d1\u9001\u8005\u5212\u5206\u7684\u4f1a\u8bdd\uff0c\u53ef\u80fd\u5305\u542b\u5176\u4ed6\u7528\u6237\uff09\u3002\n* `all`\uff1a\u4efb\u610f\u4f1a\u8bdd\u3002\u8de8\u667a\u80fd\u4f53\u5b9a\u4f4d\u4ecd\u9700\u8981 `tools.agentToAgent`\u3002\n* \u6c99\u7bb1\u94b3\u5236\uff1a\u5f53\u5f53\u524d\u4f1a\u8bdd\u5904\u4e8e\u6c99\u7bb1\u4e2d\u4e14 `agents.defaults.sandbox.sessionToolsVisibility=&quot;spawned&quot;` \u65f6\uff0c\u5373\u4f7f `tools.sessions.visibility=&quot;all&quot;`\uff0c\u53ef\u89c1\u6027\u4e5f\u4f1a\u88ab\u5f3a\u5236\u4e3a `tree`\u3002\n\n### `tools.sessions_spawn`\n\n\u63a7\u5236 `sessions_spawn` \u7684\u5185\u8054\u9644\u4ef6\u652f\u6301\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  tools: {\n    sessions_spawn: {\n      attachments: {\n        enabled: false, \/\/ \u9009\u62e9\u6027\u542f\u7528\uff1a\u8bbe\u4e3a true \u4ee5\u5141\u8bb8\u5185\u8054\u6587\u4ef6\u9644\u4ef6\n        maxTotalBytes: 5242880, \/\/ \u6240\u6709\u6587\u4ef6\u5408\u8ba1 5 MB\n        maxFiles: 50,\n        maxFileBytes: 1048576, \/\/ \u6bcf\u4e2a\u6587\u4ef6 1 MB\n        retainOnSessionKeep: false, \/\/ \u5f53 cleanup=&quot;keep&quot; \u65f6\u4fdd\u7559\u9644\u4ef6\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<p>\u8bf4\u660e\uff1a<\/p>\n<ul>\n<li>\u4ec5 <code>runtime: \"subagent\"<\/code> \u652f\u6301\u9644\u4ef6\u3002ACP \u8fd0\u884c\u65f6\u4f1a\u62d2\u7edd\u5b83\u4eec\u3002<\/li>\n<li>\u6587\u4ef6\u4f1a\u88ab\u7269\u5316\u5230\u5b50\u5de5\u4f5c\u533a\u4e2d\u7684 <code>.openclaw\/attachments\/&lt;uuid&gt;\/<\/code>\uff0c\u5e76\u9644\u5e26\u4e00\u4e2a <code>.manifest.json<\/code>\u3002<\/li>\n<li>\u9644\u4ef6\u5185\u5bb9\u4f1a\u81ea\u52a8\u4ece\u4f1a\u8bdd\u8bb0\u5f55\u6301\u4e45\u5316\u4e2d\u8131\u654f\u3002<\/li>\n<li>Base64 \u8f93\u5165\u4f1a\u901a\u8fc7\u4e25\u683c\u7684\u5b57\u6bcd\u8868\/\u586b\u5145\u68c0\u67e5\u548c\u89e3\u7801\u524d\u5927\u5c0f\u4fdd\u62a4\u8fdb\u884c\u6821\u9a8c\u3002<\/li>\n<li>\u6587\u4ef6\u6743\u9650\u4e3a\u76ee\u5f55 <code>0700<\/code>\u3001\u6587\u4ef6 <code>0600<\/code>\u3002<\/li>\n<li>\u6e05\u7406\u9075\u5faa <code>cleanup<\/code> \u7b56\u7565\uff1a<code>delete<\/code> \u603b\u4f1a\u5220\u9664\u9644\u4ef6\uff1b<code>keep<\/code> \u4ec5\u5728 <code>retainOnSessionKeep: true<\/code> \u65f6\u4fdd\u7559\u3002<\/li>\n<\/ul>\n<h3><code>tools.subagents<\/code><\/h3>\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  agents: {<br \/>\n    defaults: {<br \/>\n      subagents: {<br \/>\n        model: &#8220;minimax\/MiniMax-M2.5&#8221;,<br \/>\n        maxConcurrent: 1,<br \/>\n        runTimeoutSeconds: 900,<br \/>\n        archiveAfterMinutes: 60,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `model`\uff1a\u6d3e\u751f\u5b50\u667a\u80fd\u4f53\u7684\u9ed8\u8ba4\u6a21\u578b\u3002\u5982\u679c\u7701\u7565\uff0c\u5b50\u667a\u80fd\u4f53\u4f1a\u7ee7\u627f\u8c03\u7528\u65b9\u7684\u6a21\u578b\u3002\n* `runTimeoutSeconds`\uff1a\u5f53\u5de5\u5177\u8c03\u7528\u7701\u7565 `runTimeoutSeconds` \u65f6\uff0c`sessions_spawn` \u4f7f\u7528\u7684\u9ed8\u8ba4\u8d85\u65f6\uff08\u79d2\uff09\u3002`0` \u8868\u793a\u65e0\u8d85\u65f6\u3002\n* \u6bcf\u4e2a\u5b50\u667a\u80fd\u4f53\u7684\u5de5\u5177\u7b56\u7565\uff1a`tools.subagents.tools.allow` \/ `tools.subagents.tools.deny`\u3002\n\n***\n\n## \u81ea\u5b9a\u4e49\u63d0\u4f9b\u5546\u548c base URL\n\nOpenClaw \u4f7f\u7528 pi-coding-agent \u6a21\u578b\u76ee\u5f55\u3002\u53ef\u901a\u8fc7\u914d\u7f6e\u4e2d\u7684 `models.providers` \u6216 `~\/.openclaw\/agents\/&lt;agentId&gt;\/agent\/models.json` \u6dfb\u52a0\u81ea\u5b9a\u4e49\u63d0\u4f9b\u5546\u3002\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  models: {\n    mode: &quot;merge&quot;, \/\/ merge\uff08\u9ed8\u8ba4\uff09| replace\n    providers: {\n      &quot;custom-proxy&quot;: {\n        baseUrl: &quot;http:\/\/localhost:4000\/v1&quot;,\n        apiKey: &quot;LITELLM_KEY&quot;,\n        api: &quot;openai-completions&quot;, \/\/ openai-completions | openai-responses | anthropic-messages | google-generative-ai\n        models: [\n          {\n            id: &quot;llama-3.1-8b&quot;,\n            name: &quot;Llama 3.1 8B&quot;,\n            reasoning: false,\n            input: [&quot;text&quot;],\n            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n            contextWindow: 128000,\n            maxTokens: 32000,\n          },\n        ],\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u5bf9\u81ea\u5b9a\u4e49\u8ba4\u8bc1\u9700\u6c42\u53ef\u4f7f\u7528 <code>authHeader: true<\/code> + <code>headers<\/code>\u3002<\/li>\n<li>\u4f7f\u7528 <code>OPENCLAW_AGENT_DIR<\/code>\uff08\u6216 <code>PI_CODING_AGENT_DIR<\/code>\uff09\u8986\u76d6\u667a\u80fd\u4f53\u914d\u7f6e\u6839\u76ee\u5f55\u3002<\/li>\n<li>\u5bf9\u5339\u914d\u7684 provider ID\uff0c\u5408\u5e76\u4f18\u5148\u7ea7\u5982\u4e0b\uff1a<\/li>\n<li>\u975e\u7a7a\u7684\u667a\u80fd\u4f53 <code>models.json<\/code> <code>baseUrl<\/code> \u4f18\u5148\u3002<\/li>\n<li>\u975e\u7a7a\u7684\u667a\u80fd\u4f53 <code>apiKey<\/code> \u4ec5\u5728\u8be5\u63d0\u4f9b\u5546\u672a\u7531\u5f53\u524d\u914d\u7f6e\/auth-profile \u4e0a\u4e0b\u6587\u4e2d\u7684 SecretRef \u7ba1\u7406\u65f6\u4f18\u5148\u3002<\/li>\n<li>\u7531 SecretRef \u7ba1\u7406\u7684\u63d0\u4f9b\u5546 <code>apiKey<\/code> \u4f1a\u4ece\u6e90\u6807\u8bb0\uff08\u73af\u5883\u53d8\u91cf\u5f15\u7528\u4e3a <code>ENV_VAR_NAME<\/code>\uff0cfile\/exec \u5f15\u7528\u4e3a <code>secretref-managed<\/code>\uff09\u5237\u65b0\uff0c\u800c\u4e0d\u662f\u6301\u4e45\u5316\u5df2\u89e3\u6790\u7684\u5bc6\u94a5\u3002<\/li>\n<li>\u7531 SecretRef \u7ba1\u7406\u7684\u63d0\u4f9b\u5546 header \u503c\u4f1a\u4ece\u6e90\u6807\u8bb0\u5237\u65b0\uff08\u73af\u5883\u53d8\u91cf\u5f15\u7528\u4e3a <code>secretref-env:ENV_VAR_NAME<\/code>\uff0cfile\/exec \u5f15\u7528\u4e3a <code>secretref-managed<\/code>\uff09\u3002<\/li>\n<li>\u4e3a\u7a7a\u6216\u7f3a\u5931\u7684\u667a\u80fd\u4f53 <code>apiKey<\/code>\/<code>baseUrl<\/code> \u4f1a\u56de\u9000\u5230\u914d\u7f6e\u4e2d\u7684 <code>models.providers<\/code>\u3002<\/li>\n<li>\u5339\u914d\u6a21\u578b\u7684 <code>contextWindow<\/code>\/<code>maxTokens<\/code> \u4f1a\u5728\u663e\u5f0f\u914d\u7f6e\u503c\u4e0e\u9690\u5f0f\u76ee\u5f55\u503c\u4e4b\u95f4\u53d6\u8f83\u5927\u8005\u3002<\/li>\n<li>\u5f53\u4f60\u5e0c\u671b\u914d\u7f6e\u5b8c\u5168\u91cd\u5199 <code>models.json<\/code> \u65f6\uff0c\u8bf7\u4f7f\u7528 <code>models.mode: \"replace\"<\/code>\u3002<\/li>\n<li>\u6807\u8bb0\u6301\u4e45\u5316\u4ee5\u6e90\u4e3a\u51c6\uff1a\u5199\u5165\u7684\u6807\u8bb0\u6765\u81ea\u6d3b\u52a8\u6e90\u914d\u7f6e\u5feb\u7167\uff08\u89e3\u6790\u524d\uff09\uff0c\u800c\u4e0d\u662f\u89e3\u6790\u540e\u7684\u8fd0\u884c\u65f6\u5bc6\u94a5\u503c\u3002<\/li>\n<\/ul>\n<h3>\u63d0\u4f9b\u5546\u5b57\u6bb5\u8be6\u60c5<\/h3>\n<ul>\n<li><code>models.mode<\/code>\uff1a\u63d0\u4f9b\u5546\u76ee\u5f55\u884c\u4e3a\uff08<code>merge<\/code> \u6216 <code>replace<\/code>\uff09\u3002<\/li>\n<li><code>models.providers<\/code>\uff1a\u4ee5\u63d0\u4f9b\u5546 ID \u4e3a\u952e\u7684\u81ea\u5b9a\u4e49\u63d0\u4f9b\u5546\u6620\u5c04\u3002<\/li>\n<li><code>models.providers.*.api<\/code>\uff1a\u8bf7\u6c42\u9002\u914d\u5668\uff08<code>openai-completions<\/code>\u3001<code>openai-responses<\/code>\u3001<code>anthropic-messages<\/code>\u3001<code>google-generative-ai<\/code> \u7b49\uff09\u3002<\/li>\n<li><code>models.providers.*.apiKey<\/code>\uff1a\u63d0\u4f9b\u5546\u51ed\u8bc1\uff08\u4f18\u5148\u4f7f\u7528 SecretRef\/\u73af\u5883\u53d8\u91cf\u66ff\u6362\uff09\u3002<\/li>\n<li><code>models.providers.*.auth<\/code>\uff1a\u8ba4\u8bc1\u7b56\u7565\uff08<code>api-key<\/code>\u3001<code>token<\/code>\u3001<code>oauth<\/code>\u3001<code>aws-sdk<\/code>\uff09\u3002<\/li>\n<li><code>models.providers.*.injectNumCtxForOpenAICompat<\/code>\uff1a\u5bf9 Ollama + <code>openai-completions<\/code>\uff0c\u5c06 <code>options.num_ctx<\/code> \u6ce8\u5165\u8bf7\u6c42\uff08\u9ed8\u8ba4\uff1a<code>true<\/code>\uff09\u3002<\/li>\n<li><code>models.providers.*.authHeader<\/code>\uff1a\u5728\u9700\u8981\u65f6\u5f3a\u5236\u901a\u8fc7 <code>Authorization<\/code> \u5934\u4f20\u8f93\u51ed\u8bc1\u3002<\/li>\n<li><code>models.providers.*.baseUrl<\/code>\uff1a\u4e0a\u6e38 API base URL\u3002<\/li>\n<li><code>models.providers.*.headers<\/code>\uff1a\u7528\u4e8e\u4ee3\u7406\/\u79df\u6237\u8def\u7531\u7684\u989d\u5916\u9759\u6001 header\u3002<\/li>\n<li><code>models.providers.*.models<\/code>\uff1a\u663e\u5f0f\u7684\u63d0\u4f9b\u5546\u6a21\u578b\u76ee\u5f55\u6761\u76ee\u3002<\/li>\n<li><code>models.providers.*.models.*.compat.supportsDeveloperRole<\/code>\uff1a\u53ef\u9009\u7684\u517c\u5bb9\u6027\u63d0\u793a\u3002\u5bf9 <code>api: \"openai-completions\"<\/code> \u4e14\u975e\u7a7a\u3001\u975e\u539f\u751f <code>baseUrl<\/code>\uff08\u4e3b\u673a\u4e0d\u662f <code>api.openai.com<\/code>\uff09\u7684\u60c5\u51b5\uff0cOpenClaw \u4f1a\u5728\u8fd0\u884c\u65f6\u5c06\u5176\u5f3a\u5236\u8bbe\u4e3a <code>false<\/code>\u3002\u7a7a\u6216\u7701\u7565\u7684 <code>baseUrl<\/code> \u4f1a\u4fdd\u7559\u9ed8\u8ba4 OpenAI \u884c\u4e3a\u3002<\/li>\n<li><code>models.bedrockDiscovery<\/code>\uff1aBedrock \u81ea\u52a8\u53d1\u73b0\u8bbe\u7f6e\u6839\u3002<\/li>\n<li><code>models.bedrockDiscovery.enabled<\/code>\uff1a\u5f00\u542f\/\u5173\u95ed\u53d1\u73b0\u8f6e\u8be2\u3002<\/li>\n<li><code>models.bedrockDiscovery.region<\/code>\uff1a\u53d1\u73b0\u4f7f\u7528\u7684 AWS \u533a\u57df\u3002<\/li>\n<li><code>models.bedrockDiscovery.providerFilter<\/code>\uff1a\u7528\u4e8e\u5b9a\u5411\u53d1\u73b0\u7684\u53ef\u9009 provider-id \u8fc7\u6ee4\u5668\u3002<\/li>\n<li><code>models.bedrockDiscovery.refreshInterval<\/code>\uff1a\u53d1\u73b0\u5237\u65b0\u7684\u8f6e\u8be2\u95f4\u9694\u3002<\/li>\n<li><code>models.bedrockDiscovery.defaultContextWindow<\/code>\uff1a\u53d1\u73b0\u6a21\u578b\u7684\u56de\u9000\u4e0a\u4e0b\u6587\u7a97\u53e3\u3002<\/li>\n<li><code>models.bedrockDiscovery.defaultMaxTokens<\/code>\uff1a\u53d1\u73b0\u6a21\u578b\u7684\u56de\u9000\u6700\u5927\u8f93\u51fa token \u6570\u3002<\/li>\n<\/ul>\n<h3>\u63d0\u4f9b\u5546\u793a\u4f8b<\/h3>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    env: { CEREBRAS_API_KEY: \"sk-...\" },<br \/>\n    agents: {<br \/>\n      defaults: {<br \/>\n        model: {<br \/>\n          primary: \"cerebras\/zai-glm-4.7\",<br \/>\n          fallbacks: [\"cerebras\/zai-glm-4.6\"],<br \/>\n        },<br \/>\n        models: {<br \/>\n          \"cerebras\/zai-glm-4.7\": { alias: \"GLM 4.7 (Cerebras)\" },<br \/>\n          \"cerebras\/zai-glm-4.6\": { alias: \"GLM 4.6 (Cerebras)\" },<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n    models: {<br \/>\n      mode: \"merge\",<br \/>\n      providers: {<br \/>\n        cerebras: {<br \/>\n          baseUrl: \"https:\/\/api.cerebras.ai\/v1\",<br \/>\n          apiKey: \"${CEREBRAS_API_KEY}\",<br \/>\n          api: \"openai-completions\",<br \/>\n          models: [<br \/>\n            { id: \"zai-glm-4.7\", name: \"GLM 4.7 (Cerebras)\" },<br \/>\n            { id: \"zai-glm-4.6\", name: \"GLM 4.6 (Cerebras)\" },<br \/>\n          ],<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  }<\/code><\/p>\n<p>\u5bf9 Cerebras \u4f7f\u7528 <code>cerebras\/zai-glm-4.7<\/code>\uff1b\u5bf9 Z.AI \u76f4\u8fde\u4f7f\u7528 <code>zai\/glm-4.7<\/code>\u3002\n<\/p>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    agents: {<br \/>\n      defaults: {<br \/>\n        model: { primary: \"opencode\/claude-opus-4-6\" },<br \/>\n        models: { \"opencode\/claude-opus-4-6\": { alias: \"Opus\" } },<br \/>\n      },<br \/>\n    },<br \/>\n  }<\/code><\/p>\n<p>\u8bbe\u7f6e <code>OPENCODE_API_KEY<\/code>\uff08\u6216 <code>OPENCODE_ZEN_API_KEY<\/code>\uff09\u3002Zen \u76ee\u5f55\u4f7f\u7528 <code>opencode\/...<\/code> \u5f15\u7528\uff0cGo \u76ee\u5f55\u4f7f\u7528 <code>opencode-go\/...<\/code> \u5f15\u7528\u3002\u5feb\u6377\u65b9\u5f0f\uff1a<code>openclaw onboard --auth-choice opencode-zen<\/code> \u6216 <code>openclaw onboard --auth-choice opencode-go<\/code>\u3002\n<\/p>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    agents: {<br \/>\n      defaults: {<br \/>\n        model: { primary: \"zai\/glm-4.7\" },<br \/>\n        models: { \"zai\/glm-4.7\": {} },<br \/>\n      },<br \/>\n    },<br \/>\n  }<\/code><\/p>\n<p>\u8bbe\u7f6e <code>ZAI_API_KEY<\/code>\u3002<code>z.ai\/*<\/code> \u548c <code>z-ai\/*<\/code> \u90fd\u662f\u53ef\u63a5\u53d7\u7684\u522b\u540d\u3002\u5feb\u6377\u65b9\u5f0f\uff1a<code>openclaw onboard --auth-choice zai-api-key<\/code>\u3002<\/p>\n<ul>\n<li>\u901a\u7528\u7aef\u70b9\uff1a<code>https:\/\/api.z.ai\/api\/paas\/v4<\/code><\/li>\n<li>\u7f16\u7801\u7aef\u70b9\uff08\u9ed8\u8ba4\uff09\uff1a<code>https:\/\/api.z.ai\/api\/coding\/paas\/v4<\/code><\/li>\n<li>\u5bf9\u4e8e\u901a\u7528\u7aef\u70b9\uff0c\u8bf7\u5b9a\u4e49\u4e00\u4e2a\u5e26\u6709 base URL \u8986\u76d6\u7684\u81ea\u5b9a\u4e49\u63d0\u4f9b\u5546\u3002\n<\/li>\n<\/ul>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    env: { MOONSHOT_API_KEY: \"sk-...\" },<br \/>\n    agents: {<br \/>\n      defaults: {<br \/>\n        model: { primary: \"moonshot\/kimi-k2.5\" },<br \/>\n        models: { \"moonshot\/kimi-k2.5\": { alias: \"Kimi K2.5\" } },<br \/>\n      },<br \/>\n    },<br \/>\n    models: {<br \/>\n      mode: \"merge\",<br \/>\n      providers: {<br \/>\n        moonshot: {<br \/>\n          baseUrl: \"https:\/\/api.moonshot.ai\/v1\",<br \/>\n          apiKey: \"${MOONSHOT_API_KEY}\",<br \/>\n          api: \"openai-completions\",<br \/>\n          models: [<br \/>\n            {<br \/>\n              id: \"kimi-k2.5\",<br \/>\n              name: \"Kimi K2.5\",<br \/>\n              reasoning: false,<br \/>\n              input: [\"text\"],<br \/>\n              cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },<br \/>\n              contextWindow: 256000,<br \/>\n              maxTokens: 8192,<br \/>\n            },<br \/>\n          ],<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  }<\/code><\/p>\n<p>\u4e2d\u56fd\u7aef\u70b9\u53ef\u4f7f\u7528\uff1a<code>baseUrl: \"https:\/\/api.moonshot.cn\/v1\"<\/code> \u6216 <code>openclaw onboard --auth-choice moonshot-api-key-cn<\/code>\u3002\n<\/p>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    env: { KIMI_API_KEY: \"sk-...\" },<br \/>\n    agents: {<br \/>\n      defaults: {<br \/>\n        model: { primary: \"kimi-coding\/k2p5\" },<br \/>\n        models: { \"kimi-coding\/k2p5\": { alias: \"Kimi K2.5\" } },<br \/>\n      },<br \/>\n    },<br \/>\n  }<\/code><\/p>\n<p>\u517c\u5bb9 Anthropic \u7684\u5185\u7f6e\u63d0\u4f9b\u5546\u3002\u5feb\u6377\u65b9\u5f0f\uff1a<code>openclaw onboard --auth-choice kimi-code-api-key<\/code>\u3002\n<\/p>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    env: { SYNTHETIC_API_KEY: \"sk-...\" },<br \/>\n    agents: {<br \/>\n      defaults: {<br \/>\n        model: { primary: \"synthetic\/hf:MiniMaxAI\/MiniMax-M2.5\" },<br \/>\n        models: { \"synthetic\/hf:MiniMaxAI\/MiniMax-M2.5\": { alias: \"MiniMax M2.5\" } },<br \/>\n      },<br \/>\n    },<br \/>\n    models: {<br \/>\n      mode: \"merge\",<br \/>\n      providers: {<br \/>\n        synthetic: {<br \/>\n          baseUrl: \"https:\/\/api.synthetic.new\/anthropic\",<br \/>\n          apiKey: \"${SYNTHETIC_API_KEY}\",<br \/>\n          api: \"anthropic-messages\",<br \/>\n          models: [<br \/>\n            {<br \/>\n              id: \"hf:MiniMaxAI\/MiniMax-M2.5\",<br \/>\n              name: \"MiniMax M2.5\",<br \/>\n              reasoning: true,<br \/>\n              input: [\"text\"],<br \/>\n              cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },<br \/>\n              contextWindow: 192000,<br \/>\n              maxTokens: 65536,<br \/>\n            },<br \/>\n          ],<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  }<\/code><\/p>\n<p>Base URL \u4e0d\u5e94\u5305\u542b <code>\/v1<\/code>\uff08Anthropic \u5ba2\u6237\u7aef\u4f1a\u8ffd\u52a0\u5b83\uff09\u3002\u5feb\u6377\u65b9\u5f0f\uff1a<code>openclaw onboard --auth-choice synthetic-api-key<\/code>\u3002\n<\/p>\n<p>\n  <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    agents: {<br \/>\n      defaults: {<br \/>\n        model: { primary: \"minimax\/MiniMax-M2.5\" },<br \/>\n        models: {<br \/>\n          \"minimax\/MiniMax-M2.5\": { alias: \"Minimax\" },<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n    models: {<br \/>\n      mode: \"merge\",<br \/>\n      providers: {<br \/>\n        minimax: {<br \/>\n          baseUrl: \"https:\/\/api.minimax.io\/anthropic\",<br \/>\n          apiKey: \"${MINIMAX_API_KEY}\",<br \/>\n          api: \"anthropic-messages\",<br \/>\n          models: [<br \/>\n            {<br \/>\n              id: \"MiniMax-M2.5\",<br \/>\n              name: \"MiniMax M2.5\",<br \/>\n              reasoning: true,<br \/>\n              input: [\"text\"],<br \/>\n              cost: { input: 15, output: 60, cacheRead: 2, cacheWrite: 10 },<br \/>\n              contextWindow: 200000,<br \/>\n              maxTokens: 8192,<br \/>\n            },<br \/>\n          ],<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  }<\/code><\/p>\n<p>\u8bbe\u7f6e <code>MINIMAX_API_KEY<\/code>\u3002\u5feb\u6377\u65b9\u5f0f\uff1a<code>openclaw onboard --auth-choice minimax-api<\/code>\u3002\n<\/p>\n<p>\n  \u53c2\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=129\">Local Models<\/a>\u3002\u7b80\u800c\u8a00\u4e4b\uff1a\u5728\u5f3a\u52b2\u786c\u4ef6\u4e0a\u901a\u8fc7 LM Studio Responses API \u8fd0\u884c MiniMax M2.5\uff1b\u5e76\u4fdd\u7559\u6258\u7ba1\u6a21\u578b\u5408\u5e76\uff0c\u4ee5\u4fbf\u6545\u969c\u5207\u6362\u3002\n<\/p>\n<hr \/>\n<h2>Skills<\/h2>\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  skills: {<br \/>\n    allowBundled: [&#8220;gemini&#8221;, &#8220;peekaboo&#8221;],<br \/>\n    load: {<br \/>\n      extraDirs: [&#8220;~\/Projects\/agent-scripts\/skills&#8221;],<br \/>\n    },<br \/>\n    install: {<br \/>\n      preferBrew: true,<br \/>\n      nodeManager: &#8220;npm&#8221;, \/\/ npm | pnpm | yarn<br \/>\n    },<br \/>\n    entries: {<br \/>\n      &#8220;nano-banana-pro&#8221;: {<br \/>\n        apiKey: { source: &#8220;env&#8221;, provider: &#8220;default&#8221;, id: &#8220;GEMINI_API_KEY&#8221; }, \/\/ \u6216\u660e\u6587\u5b57\u7b26\u4e32<br \/>\n        env: { GEMINI_API_KEY: &#8220;GEMINI_KEY_HERE&#8221; },<br \/>\n      },<br \/>\n      peekaboo: { enabled: true },<br \/>\n      sag: { enabled: false },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `allowBundled`\uff1a\u4ec5\u9488\u5bf9\u6346\u7ed1 Skills \u7684\u53ef\u9009 allowlist\uff08\u6258\u7ba1\/\u5de5\u4f5c\u533a Skills \u4e0d\u53d7\u5f71\u54cd\uff09\u3002\n* `entries.&lt;skillKey&gt;.enabled: false`\uff1a\u5373\u4f7f\u67d0\u4e2a\u6280\u80fd\u5df2\u6346\u7ed1\/\u5df2\u5b89\u88c5\uff0c\u4e5f\u4f1a\u7981\u7528\u5b83\u3002\n* `entries.&lt;skillKey&gt;.apiKey`\uff1a\u9488\u5bf9\u58f0\u660e\u4e3b\u73af\u5883\u53d8\u91cf\u7684\u6280\u80fd\u63d0\u4f9b\u7684\u4fbf\u6377\u5b57\u6bb5\uff08\u660e\u6587\u5b57\u7b26\u4e32\u6216 SecretRef \u5bf9\u8c61\uff09\u3002\n\n***\n\n## \u63d2\u4ef6\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  plugins: {\n    enabled: true,\n    allow: [&quot;voice-call&quot;],\n    deny: [],\n    load: {\n      paths: [&quot;~\/Projects\/oss\/voice-call-extension&quot;],\n    },\n    entries: {\n      &quot;voice-call&quot;: {\n        enabled: true,\n        hooks: {\n          allowPromptInjection: false,\n        },\n        config: { provider: &quot;twilio&quot; },\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u4ece <code>~\/.openclaw\/extensions<\/code>\u3001<code>&lt;workspace&gt;\/.openclaw\/extensions<\/code> \u4ee5\u53ca <code>plugins.load.paths<\/code> \u52a0\u8f7d\u3002<\/li>\n<li>\u8bbe\u5907\u53d1\u73b0\u540c\u65f6\u63a5\u53d7\u539f\u751f OpenClaw \u63d2\u4ef6\u3001\u517c\u5bb9\u7684 Codex bundle \u548c Claude bundle\uff0c\u5305\u62ec\u65e0 manifest \u7684 Claude \u9ed8\u8ba4\u5e03\u5c40 bundle\u3002<\/li>\n<li><strong>\u914d\u7f6e\u66f4\u6539\u9700\u8981\u91cd\u542f Gateway \u7f51\u5173 \u7f51\u5173\u3002<\/strong><\/li>\n<li><code>allow<\/code>\uff1a\u53ef\u9009 allowlist\uff08\u4ec5\u52a0\u8f7d\u5217\u51fa\u7684\u63d2\u4ef6\uff09\u3002<code>deny<\/code> \u4f18\u5148\u3002<\/li>\n<li><code>plugins.entries.&lt;id&gt;.apiKey<\/code>\uff1a\u63d2\u4ef6\u7ea7 API key \u4fbf\u6377\u5b57\u6bb5\uff08\u63d2\u4ef6\u652f\u6301\u65f6\uff09\u3002<\/li>\n<li><code>plugins.entries.&lt;id&gt;.env<\/code>\uff1a\u63d2\u4ef6\u4f5c\u7528\u57df\u73af\u5883\u53d8\u91cf\u6620\u5c04\u3002<\/li>\n<li><code>plugins.entries.&lt;id&gt;.hooks.allowPromptInjection<\/code>\uff1a\u4e3a <code>false<\/code> \u65f6\uff0c\u6838\u5fc3\u4f1a\u963b\u6b62 <code>before_prompt_build<\/code>\uff0c\u5e76\u5ffd\u7565\u65e7\u7248 <code>before_agent_start<\/code> \u4e2d\u4f1a\u4fee\u6539 prompt \u7684\u5b57\u6bb5\uff0c\u540c\u65f6\u4fdd\u7559\u65e7\u7248 <code>modelOverride<\/code> \u548c <code>providerOverride<\/code>\u3002\u9002\u7528\u4e8e\u539f\u751f\u63d2\u4ef6 hook \u4ee5\u53ca\u53d7\u652f\u6301 bundle \u63d0\u4f9b\u7684 hook \u76ee\u5f55\u3002<\/li>\n<li><code>plugins.entries.&lt;id&gt;.config<\/code>\uff1a\u63d2\u4ef6\u5b9a\u4e49\u7684\u914d\u7f6e\u5bf9\u8c61\uff08\u5982\u6709\u53ef\u7528\u539f\u751f OpenClaw \u63d2\u4ef6 schema\uff0c\u5219\u4f1a\u6821\u9a8c\uff09\u3002<\/li>\n<li>\u5df2\u542f\u7528\u7684 Claude bundle \u63d2\u4ef6\u4e5f\u53ef\u4ee5\u4ece <code>settings.json<\/code> \u63d0\u4f9b\u5d4c\u5165\u5f0f Pi \u9ed8\u8ba4\u503c\uff1bOpenClaw \u4f1a\u5c06\u5176\u4f5c\u4e3a\u51c0\u5316\u540e\u7684\u667a\u80fd\u4f53\u8bbe\u7f6e\u5e94\u7528\uff0c\u800c\u4e0d\u662f\u4f5c\u4e3a\u539f\u59cb OpenClaw \u914d\u7f6e\u8865\u4e01\u3002<\/li>\n<li><code>plugins.slots.memory<\/code>\uff1a\u9009\u62e9\u6d3b\u52a8\u8bb0\u5fc6\u63d2\u4ef6 ID\uff0c\u6216\u8bbe\u4e3a <code>\"none\"<\/code> \u4ee5\u7981\u7528\u8bb0\u5fc6\u63d2\u4ef6\u3002<\/li>\n<li><code>plugins.slots.contextEngine<\/code>\uff1a\u9009\u62e9\u6d3b\u52a8\u4e0a\u4e0b\u6587\u5f15\u64ce\u63d2\u4ef6 ID\uff1b\u9ed8\u8ba4\u662f <code>\"legacy\"<\/code>\uff0c\u9664\u975e\u4f60\u5b89\u88c5\u5e76\u9009\u62e9\u4e86\u5176\u4ed6\u5f15\u64ce\u3002<\/li>\n<li><code>plugins.installs<\/code>\uff1a\u7531 CLI \u7ba1\u7406\u7684\u5b89\u88c5\u5143\u6570\u636e\uff0c\u4f9b <code>openclaw plugins update<\/code> \u4f7f\u7528\u3002<\/li>\n<li>\u5305\u62ec <code>source<\/code>\u3001<code>spec<\/code>\u3001<code>sourcePath<\/code>\u3001<code>installPath<\/code>\u3001<code>version<\/code>\u3001<code>resolvedName<\/code>\u3001<code>resolvedVersion<\/code>\u3001<code>resolvedSpec<\/code>\u3001<code>integrity<\/code>\u3001<code>shasum<\/code>\u3001<code>resolvedAt<\/code>\u3001<code>installedAt<\/code>\u3002<\/li>\n<li>\u8bf7\u5c06 <code>plugins.installs.*<\/code> \u89c6\u4e3a\u6258\u7ba1\u72b6\u6001\uff1b\u4f18\u5148\u4f7f\u7528 CLI \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u624b\u52a8\u7f16\u8f91\u3002<\/li>\n<\/ul>\n<p>\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=289\">Plugins<\/a>\u3002<\/p>\n<hr \/>\n<h2>\u6d4f\u89c8\u5668<\/h2>\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  browser: {<br \/>\n    enabled: true,<br \/>\n    evaluateEnabled: true,<br \/>\n    defaultProfile: &#8220;user&#8221;,<br \/>\n    ssrfPolicy: {<br \/>\n      dangerouslyAllowPrivateNetwork: true, \/\/ \u9ed8\u8ba4\u53ef\u4fe1\u7f51\u7edc\u6a21\u5f0f<br \/>\n      \/\/ allowPrivateNetwork: true, \/\/ \u65e7\u522b\u540d<br \/>\n      \/\/ hostnameAllowlist: [&#8220;*.example.com&#8221;, &#8220;example.com&#8221;],<br \/>\n      \/\/ allowedHostnames: [&#8220;localhost&#8221;],<br \/>\n    },<br \/>\n    profiles: {<br \/>\n      openclaw: { cdpPort: 18800, color: &#8220;#FF4500&#8221; },<br \/>\n      work: { cdpPort: 18801, color: &#8220;#0066CC&#8221; },<br \/>\n      remote: { cdpUrl: &#8220;http:\/\/10.0.0.42:9222&#8221;, color: &#8220;#00AA00&#8221; },<br \/>\n    },<br \/>\n    color: &#8220;#FF4500&#8221;,<br \/>\n    \/\/ headless: false,<br \/>\n    \/\/ noSandbox: false,<br \/>\n    \/\/ extraArgs: [],<br \/>\n    \/\/ relayBindHost: &#8220;0.0.0.0&#8221;, \/\/ \u4ec5\u5728\u6269\u5c55 relay \u9700\u8981\u8de8\u547d\u540d\u7a7a\u95f4\u53ef\u8fbe\u65f6\uff08\u4f8b\u5982 WSL2\uff09<br \/>\n    \/\/ executablePath: &#8220;\/Applications\/Brave Browser.app\/Contents\/MacOS\/Brave Browser&#8221;,<br \/>\n    \/\/ attachOnly: false,<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `evaluateEnabled: false` \u4f1a\u7981\u7528 `act:evaluate` \u548c `wait --fn`\u3002\n* `ssrfPolicy.dangerouslyAllowPrivateNetwork` \u5728\u672a\u8bbe\u7f6e\u65f6\u9ed8\u8ba4\u4e3a `true`\uff08\u53ef\u4fe1\u7f51\u7edc\u6a21\u578b\uff09\u3002\n* \u82e5\u8981\u542f\u7528\u4e25\u683c\u7684\u4ec5\u516c\u5171\u7f51\u7edc\u6d4f\u89c8\u5bfc\u822a\uff0c\u8bf7\u8bbe\u7f6e `ssrfPolicy.dangerouslyAllowPrivateNetwork: false`\u3002\n* \u5728\u4e25\u683c\u6a21\u5f0f\u4e0b\uff0c\u8fdc\u7a0b CDP \u914d\u7f6e\u6587\u4ef6\u7aef\u70b9\uff08`profiles.*.cdpUrl`\uff09\u5728\u53ef\u8fbe\u6027\/\u53d1\u73b0\u68c0\u67e5\u671f\u95f4\u4e5f\u53d7\u76f8\u540c\u7684\u79c1\u6709\u7f51\u7edc\u963b\u6b62\u89c4\u5219\u9650\u5236\u3002\n* `ssrfPolicy.allowPrivateNetwork` \u4ecd\u652f\u6301\u4f5c\u4e3a\u65e7\u522b\u540d\u3002\n* \u5728\u4e25\u683c\u6a21\u5f0f\u4e0b\uff0c\u53ef\u4f7f\u7528 `ssrfPolicy.hostnameAllowlist` \u548c `ssrfPolicy.allowedHostnames` \u663e\u5f0f\u653e\u884c\u4f8b\u5916\u3002\n* \u8fdc\u7a0b\u914d\u7f6e\u6587\u4ef6\u4e3a\u4ec5\u9644\u52a0\u6a21\u5f0f\uff08\u7981\u6b62\u542f\u52a8\/\u505c\u6b62\/\u91cd\u7f6e\uff09\u3002\n* \u81ea\u52a8\u68c0\u6d4b\u987a\u5e8f\uff1a\u9ed8\u8ba4\u6d4f\u89c8\u5668\u5982\u679c\u662f\u57fa\u4e8e Chromium \u2192 Chrome \u2192 Brave \u2192 Edge \u2192 Chromium \u2192 Chrome Canary\u3002\n* \u63a7\u5236\u670d\u52a1\uff1a\u4ec5 loopback\uff08\u7aef\u53e3\u7531 `gateway.port` \u6d3e\u751f\uff0c\u9ed8\u8ba4 `18791`\uff09\u3002\n* `extraArgs` \u4f1a\u5411\u672c\u5730 Chromium \u542f\u52a8\u8ffd\u52a0\u989d\u5916\u6807\u5fd7\uff08\u4f8b\u5982\n  `--disable-gpu`\u3001\u7a97\u53e3\u5927\u5c0f\u8bbe\u7f6e\u6216\u8c03\u8bd5\u6807\u5fd7\uff09\u3002\n* `relayBindHost` \u66f4\u6539 Chrome \u6269\u5c55 relay \u7684\u76d1\u542c\u5730\u5740\u3002\u82e5\u53ea\u9700 loopback \u8bbf\u95ee\u8bf7\u4fdd\u6301\u672a\u8bbe\u7f6e\uff1b\u4ec5\u5f53 relay \u5fc5\u987b\u8de8\u547d\u540d\u7a7a\u95f4\u8fb9\u754c\u53ef\u8fbe\uff08\u4f8b\u5982 WSL2\uff09\u4e14\u4e3b\u673a\u7f51\u7edc\u5df2\u53d7\u4fe1\u4efb\u65f6\uff0c\u624d\u663e\u5f0f\u8bbe\u7f6e\u4e3a\u975e loopback \u5730\u5740\uff0c\u4f8b\u5982 `0.0.0.0`\u3002\n\n***\n\n## UI\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  ui: {\n    seamColor: &quot;#FF4500&quot;,\n    assistant: {\n      name: &quot;OpenClaw&quot;,\n      avatar: &quot;CB&quot;, \/\/ emoji\u3001\u77ed\u6587\u672c\u3001\u56fe\u7247 URL \u6216 data URI\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li><code>seamColor<\/code>\uff1a\u539f\u751f\u5e94\u7528 UI \u5916\u89c2\u7684\u5f3a\u8c03\u8272\uff08Talk \u6a21\u5f0f\u6c14\u6ce1\u7740\u8272\u7b49\uff09\u3002<\/li>\n<li><code>assistant<\/code>\uff1aControl UI \u8eab\u4efd\u8986\u76d6\u3002\u56de\u9000\u5230\u6d3b\u52a8\u667a\u80fd\u4f53\u8eab\u4efd\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>Gateway \u7f51\u5173 \u7f51\u5173<\/h2>\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  \u7f51\u5173: {<br \/>\n    mode: &#8220;local&#8221;, \/\/ local | remote<br \/>\n    port: 18789,<br \/>\n    bind: &#8220;loopback&#8221;,<br \/>\n    auth: {<br \/>\n      mode: &#8220;token&#8221;, \/\/ none | token | password | trusted-proxy<br \/>\n      token: &#8220;your-token&#8221;,<br \/>\n      \/\/ password: &#8220;your-password&#8221;, \/\/ \u6216 OPENCLAW_GATEWAY_PASSWORD<br \/>\n      \/\/ trustedProxy: { userHeader: &#8220;x-forwarded-user&#8221; }, \/\/ \u7528\u4e8e mode=trusted-proxy\uff1b\u89c1 \/\u7f51\u5173\/trusted-proxy-auth<br \/>\n      allowTailscale: true,<br \/>\n      rateLimit: {<br \/>\n        maxAttempts: 10,<br \/>\n        windowMs: 60000,<br \/>\n        lockoutMs: 300000,<br \/>\n        exemptLoopback: true,<br \/>\n      },<br \/>\n    },<br \/>\n    tailscale: {<br \/>\n      mode: &#8220;off&#8221;, \/\/ off | serve | funnel<br \/>\n      resetOnExit: false,<br \/>\n    },<br \/>\n    controlUi: {<br \/>\n      enabled: true,<br \/>\n      basePath: &#8220;\/openclaw&#8221;,<br \/>\n      \/\/ root: &#8220;dist\/control-ui&#8221;,<br \/>\n      \/\/ allowedOrigins: [&#8220;https:\/\/control.example.com&#8221;], \/\/ \u975e loopback Control UI \u5fc5\u9700<br \/>\n      \/\/ dangerouslyAllowHostHeaderOriginFallback: false, \/\/ \u5371\u9669\u7684 Host-header origin \u56de\u9000\u6a21\u5f0f<br \/>\n      \/\/ allowInsecureAuth: false,<br \/>\n      \/\/ dangerouslyDisableDeviceAuth: false,<br \/>\n    },<br \/>\n    remote: {<br \/>\n      url: &#8220;ws:\/\/\u7f51\u5173.tailnet:18789&#8221;,<br \/>\n      transport: &#8220;ssh&#8221;, \/\/ ssh | direct<br \/>\n      token: &#8220;your-token&#8221;,<br \/>\n      \/\/ password: &#8220;your-password&#8221;,<br \/>\n    },<br \/>\n    trustedProxies: [&#8220;10.0.0.1&#8221;],<br \/>\n    \/\/ \u53ef\u9009\u3002\u9ed8\u8ba4 false\u3002<br \/>\n    allowRealIpFallback: false,<br \/>\n    tools: {<br \/>\n      \/\/ \u989d\u5916\u7684 \/tools\/invoke HTTP deny<br \/>\n      deny: [&#8220;browser&#8221;],<br \/>\n      \/\/ \u4ece\u9ed8\u8ba4 HTTP deny \u5217\u8868\u4e2d\u79fb\u9664\u5de5\u5177<br \/>\n      allow: [&#8220;\u7f51\u5173&#8221;],<br \/>\n    },<br \/>\n    push: {<br \/>\n      apns: {<br \/>\n        relay: {<br \/>\n          baseUrl: &#8220;https:\/\/relay.example.com&#8221;,<br \/>\n          timeoutMs: 10000,<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n&lt;Accordion title=&quot;Gateway \u7f51\u5173\u5b57\u6bb5\u8be6\u60c5&quot;&gt;\n  * `mode`\uff1a`local`\uff08\u8fd0\u884c\u7f51\u5173\uff09\u6216 `remote`\uff08\u8fde\u63a5\u8fdc\u7a0b\u7f51\u5173\uff09\u3002\u9664\u975e\u4e3a `local`\uff0c\u5426\u5219 Gateway \u7f51\u5173\u62d2\u7edd\u542f\u52a8\u3002\n  * `port`\uff1a\u7528\u4e8e WS + HTTP \u7684\u5355\u4e00\u590d\u7528\u7aef\u53e3\u3002\u4f18\u5148\u7ea7\uff1a`--port` &gt; `OPENCLAW_GATEWAY_PORT` &gt; `gateway.port` &gt; `18789`\u3002\n  * `bind`\uff1a`auto`\u3001`loopback`\uff08\u9ed8\u8ba4\uff09\u3001`lan`\uff08`0.0.0.0`\uff09\u3001`tailnet`\uff08\u4ec5 Tailscale IP\uff09\u6216 `custom`\u3002\n  * **\u65e7\u7248 bind \u522b\u540d**\uff1a\u8bf7\u5728 `gateway.bind` \u4e2d\u4f7f\u7528 bind \u6a21\u5f0f\u503c\uff08`auto`\u3001`loopback`\u3001`lan`\u3001`tailnet`\u3001`custom`\uff09\uff0c\u4e0d\u8981\u4f7f\u7528\u4e3b\u673a\u522b\u540d\uff08`0.0.0.0`\u3001`127.0.0.1`\u3001`localhost`\u3001`::`\u3001`::1`\uff09\u3002\n  * **Docker \u8bf4\u660e**\uff1a\u9ed8\u8ba4\u7684 `loopback` bind \u5728\u5bb9\u5668\u5185\u76d1\u542c `127.0.0.1`\u3002\u5728 Docker bridge \u7f51\u7edc\uff08`-p 18789:18789`\uff09\u4e0b\uff0c\u6d41\u91cf\u4ece `eth0` \u8fdb\u5165\uff0c\u56e0\u6b64\u7f51\u5173\u4e0d\u53ef\u8fbe\u3002\u8bf7\u4f7f\u7528 `--network host`\uff0c\u6216\u8bbe\u7f6e `bind: &quot;lan&quot;`\uff08\u6216 `bind: &quot;custom&quot;` \u5e76\u914d\u5408 `customBindHost: &quot;0.0.0.0&quot;`\uff09\u4ee5\u76d1\u542c\u6240\u6709\u63a5\u53e3\u3002\n  * **\u8ba4\u8bc1**\uff1a\u9ed8\u8ba4\u8981\u6c42\u8ba4\u8bc1\u3002\u975e loopback bind \u9700\u8981\u5171\u4eab token\/password\u3002\u65b0\u624b\u5f15\u5bfc\u9ed8\u8ba4\u4f1a\u751f\u6210\u4e00\u4e2a token\u3002\n  * \u5982\u679c\u540c\u65f6\u914d\u7f6e\u4e86 `gateway.auth.token` \u548c `gateway.auth.password`\uff08\u5305\u62ec SecretRef\uff09\uff0c\u8bf7\u663e\u5f0f\u8bbe\u7f6e `gateway.auth.mode` \u4e3a `token` \u6216 `password`\u3002\u5982\u679c\u4e24\u8005\u90fd\u5df2\u914d\u7f6e\u4f46 mode \u672a\u8bbe\u7f6e\uff0c\u542f\u52a8\u548c\u670d\u52a1\u5b89\u88c5\/\u4fee\u590d\u6d41\u7a0b\u90fd\u4f1a\u5931\u8d25\u3002\n  * `gateway.auth.mode: &quot;none&quot;`\uff1a\u663e\u5f0f\u65e0\u8ba4\u8bc1\u6a21\u5f0f\u3002\u4ec5\u7528\u4e8e\u53d7\u4fe1\u4efb\u7684\u672c\u5730 local loopback \u8bbe\u7f6e\uff1b\u65b0\u624b\u5f15\u5bfc\u63d0\u793a\u4e2d\u6545\u610f\u4e0d\u63d0\u4f9b\u6b64\u9009\u9879\u3002\n  * `gateway.auth.mode: &quot;trusted-proxy&quot;`\uff1a\u5c06\u8ba4\u8bc1\u59d4\u6258\u7ed9\u5177\u5907\u8eab\u4efd\u611f\u77e5\u80fd\u529b\u7684\u53cd\u5411\u4ee3\u7406\uff0c\u5e76\u4fe1\u4efb\u6765\u81ea `gateway.trustedProxies` \u7684\u8eab\u4efd\u5934\uff08\u89c1 [Trusted Proxy Auth](\/gateway\/trusted-proxy-auth)\uff09\u3002\n  * `gateway.auth.allowTailscale`\uff1a\u4e3a `true` \u65f6\uff0cTailscale Serve \u8eab\u4efd\u5934\u53ef\u6ee1\u8db3 Control UI\/WebSocket \u8ba4\u8bc1\uff08\u901a\u8fc7 `tailscale whois` \u9a8c\u8bc1\uff09\uff1bHTTP API \u7aef\u70b9\u4ecd\u8981\u6c42 token\/password \u8ba4\u8bc1\u3002\u8fd9\u79cd\u65e0 token \u6d41\u7a0b\u5047\u5b9a\u7f51\u5173\u4e3b\u673a\u662f\u53d7\u4fe1\u4efb\u7684\u3002\u5f53 `tailscale.mode = &quot;serve&quot;` \u65f6\u9ed8\u8ba4\u503c\u4e3a `true`\u3002\n  * `gateway.auth.rateLimit`\uff1a\u53ef\u9009\u7684\u8ba4\u8bc1\u5931\u8d25\u9650\u6d41\u5668\u3002\u6309\u5ba2\u6237\u7aef IP \u548c\u8ba4\u8bc1\u8303\u56f4\u751f\u6548\uff08\u5171\u4eab\u5bc6\u94a5\u548c\u8bbe\u5907 token \u5206\u522b\u8ddf\u8e2a\uff09\u3002\u88ab\u963b\u6b62\u7684\u5c1d\u8bd5\u8fd4\u56de `429` + `Retry-After`\u3002\n    * `gateway.auth.rateLimit.exemptLoopback` \u9ed8\u8ba4\u503c\u4e3a `true`\uff1b\u5f53\u4f60\u6709\u610f\u5e0c\u671b localhost \u6d41\u91cf\u4e5f\u53d7\u9650\u6d41\u65f6\uff08\u7528\u4e8e\u6d4b\u8bd5\u8bbe\u7f6e\u6216\u4e25\u683c\u4ee3\u7406\u90e8\u7f72\uff09\uff0c\u8bf7\u8bbe\u4e3a `false`\u3002\n  * \u6765\u81ea\u6d4f\u89c8\u5668 origin \u7684 WS \u8ba4\u8bc1\u5c1d\u8bd5\u59cb\u7ec8\u4f1a\u5728\u7981\u7528 loopback \u8c41\u514d\u7684\u60c5\u51b5\u4e0b\u9650\u6d41\uff08\u4f5c\u4e3a\u5bf9\u57fa\u4e8e\u6d4f\u89c8\u5668\u7684 localhost \u66b4\u529b\u7834\u89e3\u7684\u7eb5\u6df1\u9632\u5fa1\uff09\u3002\n  * `tailscale.mode`\uff1a`serve`\uff08\u4ec5 tailnet\uff0cloopback bind\uff09\u6216 `funnel`\uff08\u516c\u5f00\uff0c\u9700\u8981\u8ba4\u8bc1\uff09\u3002\n  * `controlUi.allowedOrigins`\uff1a\u7528\u4e8e Gateway \u7f51\u5173 WebSocket \u8fde\u63a5\u7684\u663e\u5f0f\u6d4f\u89c8\u5668 origin allowlist\u3002\u5f53\u6d4f\u89c8\u5668\u5ba2\u6237\u7aef\u9884\u671f\u6765\u81ea\u975e loopback origin \u65f6\u5fc5\u987b\u8bbe\u7f6e\u3002\n  * `controlUi.dangerouslyAllowHostHeaderOriginFallback`\uff1a\u5371\u9669\u6a21\u5f0f\uff0c\u4e3a\u90a3\u4e9b\u523b\u610f\u4f9d\u8d56 Host-header origin \u7b56\u7565\u7684\u90e8\u7f72\u542f\u7528 Host-header origin \u56de\u9000\u3002\n  * `remote.transport`\uff1a`ssh`\uff08\u9ed8\u8ba4\uff09\u6216 `direct`\uff08ws\/wss\uff09\u3002\u5bf9\u4e8e `direct`\uff0c`remote.url` \u5fc5\u987b\u662f `ws:\/\/` \u6216 `wss:\/\/`\u3002\n  * `OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1`\uff1a\u5ba2\u6237\u7aef\u4fa7\u7684\u7d27\u6025\u8986\u76d6\uff0c\u5141\u8bb8\u5bf9\u53d7\u4fe1\u4efb\u7684\u79c1\u6709\u7f51\u7edc IP \u4f7f\u7528\u660e\u6587 `ws:\/\/`\uff1b\u9ed8\u8ba4\u4ecd\u53ea\u5141\u8bb8 loopback \u4f7f\u7528\u660e\u6587\u3002\n  * `gateway.remote.token` \/ `.password` \u662f\u8fdc\u7a0b\u5ba2\u6237\u7aef\u51ed\u8bc1\u5b57\u6bb5\u3002\u5b83\u4eec\u672c\u8eab\u4e0d\u4f1a\u914d\u7f6e\u7f51\u5173\u8ba4\u8bc1\u3002\n  * `gateway.push.apns.relay.baseUrl`\uff1a\u5b98\u65b9\/TestFlight iOS \u7248\u672c\u5728\u5c06\u57fa\u4e8e relay \u7684\u6ce8\u518c\u53d1\u5e03\u5230\u7f51\u5173\u540e\uff0c\u4f9b\u7f51\u5173\u4f7f\u7528\u7684\u5916\u90e8 APNs relay \u57fa\u7840 HTTPS URL\u3002\u8be5 URL \u5fc5\u987b\u4e0e\u7f16\u8bd1\u8fdb iOS \u6784\u5efa\u4e2d\u7684 relay URL \u4e00\u81f4\u3002\n  * `gateway.push.apns.relay.timeoutMs`\uff1a\u7f51\u5173\u5230 relay \u7684\u53d1\u9001\u8d85\u65f6\uff08\u6beb\u79d2\uff09\u3002\u9ed8\u8ba4\u503c\u4e3a `10000`\u3002\n  * \u57fa\u4e8e relay \u7684\u6ce8\u518c\u4f1a\u88ab\u59d4\u6d3e\u7ed9\u4e00\u4e2a\u7279\u5b9a\u7f51\u5173\u8eab\u4efd\u3002\u914d\u5bf9\u7684 iOS \u5e94\u7528\u4f1a\u83b7\u53d6 `gateway.identity.get`\uff0c\u5c06\u8be5\u8eab\u4efd\u5305\u542b\u5230 relay \u6ce8\u518c\u4e2d\uff0c\u5e76\u5c06\u5e26\u6ce8\u518c\u4f5c\u7528\u57df\u7684\u53d1\u9001\u6388\u6743\u8f6c\u53d1\u7ed9\u7f51\u5173\u3002\u5176\u4ed6\u7f51\u5173\u4e0d\u80fd\u590d\u7528\u8be5\u5df2\u5b58\u50a8\u6ce8\u518c\u3002\n  * `OPENCLAW_APNS_RELAY_BASE_URL` \/ `OPENCLAW_APNS_RELAY_TIMEOUT_MS`\uff1a\u7528\u4e8e\u8986\u76d6\u4e0a\u8ff0 relay \u914d\u7f6e\u7684\u4e34\u65f6\u73af\u5883\u53d8\u91cf\u3002\n  * `OPENCLAW_APNS_RELAY_ALLOW_HTTP=true`\uff1a\u4ec5\u5f00\u53d1\u7528\u7684\u9003\u751f\u53e3\uff0c\u7528\u4e8e loopback HTTP relay URL\u3002\u751f\u4ea7 relay URL \u5e94\u4fdd\u6301\u4e3a HTTPS\u3002\n  * `gateway.channelHealthCheckMinutes`\uff1a\u6e20\u9053\u5065\u5eb7\u68c0\u67e5\u76d1\u89c6\u95f4\u9694\uff08\u5206\u949f\uff09\u3002\u8bbe\u4e3a `0` \u53ef\u5168\u5c40\u7981\u7528\u5065\u5eb7\u68c0\u67e5\u91cd\u542f\u3002\u9ed8\u8ba4\uff1a`5`\u3002\n  * `gateway.channelStaleEventThresholdMinutes`\uff1a\u9648\u65e7 socket \u9608\u503c\uff08\u5206\u949f\uff09\u3002\u8bf7\u4fdd\u6301\u5176\u5927\u4e8e\u6216\u7b49\u4e8e `gateway.channelHealthCheckMinutes`\u3002\u9ed8\u8ba4\uff1a`30`\u3002\n  * `gateway.channelMaxRestartsPerHour`\uff1a\u6eda\u52a8\u4e00\u5c0f\u65f6\u5185\uff0c\u6bcf\u4e2a\u6e20\u9053\/\u8d26\u6237\u5141\u8bb8\u7684\u6700\u5927\u5065\u5eb7\u68c0\u67e5\u91cd\u542f\u6b21\u6570\u3002\u9ed8\u8ba4\uff1a`10`\u3002\n  * `channels.&lt;provider&gt;.healthMonitor.enabled`\uff1a\u6309\u6e20\u9053\u9009\u62e9\u9000\u51fa\u5065\u5eb7\u68c0\u67e5\u91cd\u542f\uff0c\u540c\u65f6\u4fdd\u7559\u5168\u5c40\u76d1\u89c6\u5668\u5f00\u542f\u3002\n  * `channels.&lt;provider&gt;.accounts.&lt;accountId&gt;.healthMonitor.enabled`\uff1a\u591a\u8d26\u6237\u6e20\u9053\u7684\u6309\u8d26\u6237\u8986\u76d6\u3002\u8bbe\u7f6e\u540e\uff0c\u5b83\u4f18\u5148\u4e8e\u6e20\u9053\u7ea7\u8986\u76d6\u3002\n  * \u4ec5\u5f53 `gateway.auth.*` \u672a\u8bbe\u7f6e\u65f6\uff0c\u672c\u5730 Gateway \u7f51\u5173\u8c03\u7528\u8def\u5f84\u624d\u53ef\u56de\u9000\u5230 `gateway.remote.*`\u3002\n  * \u5982\u679c `gateway.auth.token` \/ `gateway.auth.password` \u901a\u8fc7 SecretRef \u663e\u5f0f\u914d\u7f6e\u4f46\u65e0\u6cd5\u89e3\u6790\uff0c\u89e3\u6790\u4f1a\u4ee5\u9ed8\u8ba4\u62d2\u7edd\u65b9\u5f0f\u5931\u8d25\uff08\u4e0d\u4f1a\u7528 remote \u56de\u9000\u63a9\u76d6\uff09\u3002\n  * `trustedProxies`\uff1a\u7ec8\u6b62 TLS \u7684\u53cd\u5411\u4ee3\u7406 IP\u3002\u4ec5\u5217\u51fa\u4f60\u63a7\u5236\u7684\u4ee3\u7406\u3002\n  * `allowRealIpFallback`\uff1a\u4e3a `true` \u65f6\uff0c\u5f53\u7f3a\u5931 `X-Forwarded-For` \u65f6\uff0cGateway \u7f51\u5173\u63a5\u53d7 `X-Real-IP`\u3002\u9ed8\u8ba4\u4e3a `false`\uff0c\u4ee5\u5b9e\u73b0\u9ed8\u8ba4\u62d2\u7edd\u884c\u4e3a\u3002\n  * `gateway.tools.deny`\uff1a\u5bf9 HTTP `POST \/tools\/invoke` \u989d\u5916\u963b\u6b62\u7684\u5de5\u5177\u540d\uff08\u6269\u5c55\u9ed8\u8ba4 deny \u5217\u8868\uff09\u3002\n  * `gateway.tools.allow`\uff1a\u4ece\u9ed8\u8ba4 HTTP deny \u5217\u8868\u4e2d\u79fb\u9664\u5de5\u5177\u540d\u3002\n&lt;\/Accordion&gt;\n\n### \u517c\u5bb9 OpenAI \u7684\u7aef\u70b9\n\n* Chat Completions\uff1a\u9ed8\u8ba4\u7981\u7528\u3002\u901a\u8fc7 `gateway.http.endpoints.chatCompletions.enabled: true` \u542f\u7528\u3002\n* Responses API\uff1a`gateway.http.endpoints.responses.enabled`\u3002\n* Responses URL \u8f93\u5165\u52a0\u56fa\uff1a\n  * `gateway.http.endpoints.responses.maxUrlParts`\n  * `gateway.http.endpoints.responses.files.urlAllowlist`\n  * `gateway.http.endpoints.responses.images.urlAllowlist`\n* \u53ef\u9009\u7684\u54cd\u5e94\u52a0\u56fa header\uff1a\n  * `gateway.http.securityHeaders.strictTransportSecurity`\uff08\u4ec5\u5bf9\u4f60\u63a7\u5236\u7684 HTTPS origin \u8bbe\u7f6e\uff1b\u89c1 [Trusted Proxy Auth](\/gateway\/trusted-proxy-auth#tls-termination-and-hsts)\uff09\n\n### \u591a\u5b9e\u4f8b\u9694\u79bb\n\n\u4f7f\u7528\u4e0d\u540c\u7aef\u53e3\u548c\u72b6\u6001\u76ee\u5f55\uff0c\u5728\u4e00\u53f0\u4e3b\u673a\u4e0a\u8fd0\u884c\u591a\u4e2a\u7f51\u5173\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nOPENCLAW_CONFIG_PATH=~\/.openclaw\/a.json \nOPENCLAW_STATE_DIR=~\/.openclaw-a \nopenclaw gateway --port 19001\n<\/code><\/pre>\n<p>\u4fbf\u6377\u6807\u5fd7\uff1a<code>--dev<\/code>\uff08\u4f7f\u7528 <code>~\/.openclaw-dev<\/code> + \u7aef\u53e3 <code>19001<\/code>\uff09\u3001<code>--profile &lt;name&gt;<\/code>\uff08\u4f7f\u7528 <code>~\/.openclaw-&lt;name&gt;<\/code>\uff09\u3002<\/p>\n<p>\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=131\">Multiple Gateway \u7f51\u5173s<\/a>\u3002<\/p>\n<hr \/>\n<h2>Hooks<\/h2>\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  hooks: {<br \/>\n    enabled: true,<br \/>\n    token: &#8220;shared-secret&#8221;,<br \/>\n    path: &#8220;\/hooks&#8221;,<br \/>\n    maxBodyBytes: 262144,<br \/>\n    defaultSessionKey: &#8220;hook:ingress&#8221;,<br \/>\n    allowRequestSessionKey: false,<br \/>\n    allowedSessionKeyPrefixes: [&#8220;hook:&#8221;],<br \/>\n    allowedAgentIds: [&#8220;hooks&#8221;, &#8220;main&#8221;],<br \/>\n    presets: [&#8220;gmail&#8221;],<br \/>\n    transformsDir: &#8220;~\/.openclaw\/hooks\/transforms&#8221;,<br \/>\n    mappings: [<br \/>\n      {<br \/>\n        match: { path: &#8220;gmail&#8221; },<br \/>\n        action: &#8220;agent&#8221;,<br \/>\n        agentId: &#8220;hooks&#8221;,<br \/>\n        wakeMode: &#8220;now&#8221;,<br \/>\n        name: &#8220;Gmail&#8221;,<br \/>\n        sessionKey: &#8220;hook:gmail:{{messages[0].id}}&#8221;,<br \/>\n        messageTemplate: &#8220;From: {{messages[0].from}}nSubject: {{messages[0].subject}}n{{messages[0].snippet}}&#8221;,<br \/>\n        deliver: true,<br \/>\n        \u6e20\u9053: &#8220;last&#8221;,<br \/>\n        model: &#8220;openai\/gpt-5.2-mini&#8221;,<br \/>\n      },<br \/>\n    ],<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u8ba4\u8bc1\uff1a`Authorization: Bearer &lt;token&gt;` \u6216 `x-openclaw-token: &lt;token&gt;`\u3002\n\n**\u7aef\u70b9\uff1a**\n\n* `POST \/hooks\/wake` \u2192 `{ text, mode?: &quot;now&quot;|&quot;next-heartbeat&quot; }`\n* `POST \/hooks\/agent` \u2192 `{ message, name?, agentId?, sessionKey?, wakeMode?, deliver?, channel?, to?, model?, thinking?, timeoutSeconds? }`\n  * \u4ec5\u5f53 `hooks.allowRequestSessionKey=true`\uff08\u9ed8\u8ba4\uff1a`false`\uff09\u65f6\uff0c\u624d\u63a5\u53d7\u8bf7\u6c42\u8d1f\u8f7d\u4e2d\u7684 `sessionKey`\u3002\n* `POST \/hooks\/&lt;name&gt;` \u2192 \u901a\u8fc7 `hooks.mappings` \u89e3\u6790\n\n&lt;Accordion title=&quot;\u6620\u5c04\u8be6\u60c5&quot;&gt;\n  - `match.path` \u5339\u914d `\/hooks` \u4e4b\u540e\u7684\u5b50\u8def\u5f84\uff08\u4f8b\u5982 `\/hooks\/gmail` \u2192 `gmail`\uff09\u3002\n  - `match.source` \u5339\u914d\u901a\u7528\u8def\u5f84\u4e2d\u7684\u67d0\u4e2a\u8d1f\u8f7d\u5b57\u6bb5\u3002\n  - \u50cf `{{messages[0].subject}}` \u8fd9\u6837\u7684\u6a21\u677f\u4f1a\u4ece\u8d1f\u8f7d\u4e2d\u8bfb\u53d6\u3002\n  - `transform` \u53ef\u6307\u5411\u8fd4\u56de hook \u64cd\u4f5c\u7684 JS\/TS \u6a21\u5757\u3002\n    * `transform.module` \u5fc5\u987b\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u5e76\u4e14\u59cb\u7ec8\u4f4d\u4e8e `hooks.transformsDir` \u5185\uff08\u7edd\u5bf9\u8def\u5f84\u548c\u8def\u5f84\u7a7f\u8d8a\u4f1a\u88ab\u62d2\u7edd\uff09\u3002\n  - `agentId` \u4f1a\u8def\u7531\u5230\u6307\u5b9a\u667a\u80fd\u4f53\uff1b\u672a\u77e5 ID \u4f1a\u56de\u9000\u5230\u9ed8\u8ba4\u503c\u3002\n  - `allowedAgentIds`\uff1a\u9650\u5236\u663e\u5f0f\u8def\u7531\uff08`*` \u6216\u7701\u7565 = \u5141\u8bb8\u5168\u90e8\uff0c`[]` = \u5168\u90e8\u62d2\u7edd\uff09\u3002\n  - `defaultSessionKey`\uff1a\u53ef\u9009\u7684\u56fa\u5b9a\u4f1a\u8bdd\u952e\uff0c\u7528\u4e8e\u672a\u663e\u5f0f\u63d0\u4f9b `sessionKey` \u7684 hook \u667a\u80fd\u4f53\u8fd0\u884c\u3002\n  - `allowRequestSessionKey`\uff1a\u5141\u8bb8 `\/hooks\/agent` \u8c03\u7528\u65b9\u8bbe\u7f6e `sessionKey`\uff08\u9ed8\u8ba4\uff1a`false`\uff09\u3002\n  - `allowedSessionKeyPrefixes`\uff1a\u9488\u5bf9\u663e\u5f0f `sessionKey` \u503c\uff08\u8bf7\u6c42 + \u6620\u5c04\uff09\u7684\u53ef\u9009\u524d\u7f00 allowlist\uff0c\u4f8b\u5982 `[&quot;hook:&quot;]`\u3002\n  - `deliver: true` \u4f1a\u5c06\u6700\u7ec8\u56de\u590d\u53d1\u9001\u5230\u67d0\u4e2a\u6e20\u9053\uff1b`channel` \u9ed8\u8ba4\u4e3a `last`\u3002\n  - `model` \u4f1a\u8986\u76d6\u6b64\u6b21 hook \u8fd0\u884c\u7684 LLM\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\u6a21\u578b\u76ee\u5f55\uff0c\u5219\u5fc5\u987b\u662f\u5141\u8bb8\u7684\u6a21\u578b\uff09\u3002\n&lt;\/Accordion&gt;\n\n### Gmail \u96c6\u6210\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  hooks: {\n    gmail: {\n      account: &quot;openclaw@gmail.com&quot;,\n      topic: &quot;projects\/&lt;project-id&gt;\/topics\/gog-gmail-watch&quot;,\n      subscription: &quot;gog-gmail-watch-push&quot;,\n      pushToken: &quot;shared-push-token&quot;,\n      hookUrl: &quot;http:\/\/127.0.0.1:18789\/hooks\/gmail&quot;,\n      includeBody: true,\n      maxBytes: 20000,\n      renewEveryMinutes: 720,\n      serve: { bind: &quot;127.0.0.1&quot;, port: 8788, path: &quot;\/&quot; },\n      tailscale: { mode: &quot;funnel&quot;, path: &quot;\/gmail-pubsub&quot; },\n      model: &quot;openrouter\/meta-llama\/llama-3.3-70b-instruct:free&quot;,\n      thinking: &quot;off&quot;,\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u914d\u7f6e\u540e\uff0cGateway \u7f51\u5173 \u7f51\u5173\u4f1a\u5728\u542f\u52a8\u65f6\u81ea\u52a8\u542f\u52a8 <code>gog gmail watch serve<\/code>\u3002\u8bbe\u7f6e <code>OPENCLAW_SKIP_GMAIL_WATCHER=1<\/code> \u53ef\u7981\u7528\u3002<\/li>\n<li>\u4e0d\u8981\u4e0e Gateway \u7f51\u5173 \u7f51\u5173\u540c\u65f6\u5355\u72ec\u8fd0\u884c <code>gog gmail watch serve<\/code>\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>Canvas host<\/h2>\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  canvasHost: {<br \/>\n    root: &#8220;~\/.openclaw\/workspace\/canvas&#8221;,<br \/>\n    liveReload: true,<br \/>\n    \/\/ enabled: false, \/\/ \u6216 OPENCLAW_SKIP_CANVAS_HOST=1<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u5728 Gateway \u7f51\u5173\u7aef\u53e3\u4e0b\uff0c\u901a\u8fc7 HTTP \u63d0\u4f9b\u53ef\u7531\u667a\u80fd\u4f53\u7f16\u8f91\u7684 HTML\/CSS\/JS \u548c A2UI\uff1a\n  * `http:\/\/&lt;gateway-host&gt;:&lt;gateway.port&gt;\/__openclaw__\/canvas\/`\n  * `http:\/\/&lt;gateway-host&gt;:&lt;gateway.port&gt;\/__openclaw__\/a2ui\/`\n* \u4ec5\u9650\u672c\u5730\uff1a\u4fdd\u6301 `gateway.bind: &quot;loopback&quot;`\uff08\u9ed8\u8ba4\uff09\u3002\n* \u975e loopback bind\uff1acanvas \u8def\u7531\u9700\u8981 Gateway \u7f51\u5173\u8ba4\u8bc1\uff08token\/password\/trusted-proxy\uff09\uff0c\u4e0e\u5176\u4ed6 Gateway \u7f51\u5173 HTTP \u754c\u9762\u4e00\u81f4\u3002\n* Node WebView \u901a\u5e38\u4e0d\u4f1a\u53d1\u9001\u8ba4\u8bc1\u5934\uff1b\u5728\u67d0\u4e2a\u8282\u70b9\u5b8c\u6210\u914d\u5bf9\u5e76\u8fde\u63a5\u540e\uff0cGateway \u7f51\u5173\u4f1a\u4e3a canvas\/A2UI \u8bbf\u95ee\u901a\u544a\u5e26\u8282\u70b9\u4f5c\u7528\u57df\u7684 capability URL\u3002\n* Capability URL \u7ed1\u5b9a\u5230\u6d3b\u52a8\u8282\u70b9 WS \u4f1a\u8bdd\uff0c\u5e76\u4e14\u5f88\u5feb\u8fc7\u671f\u3002\u4e0d\u4f7f\u7528\u57fa\u4e8e IP \u7684\u56de\u9000\u3002\n* \u4f1a\u5411\u6240\u670d\u52a1\u7684 HTML \u4e2d\u6ce8\u5165 live-reload \u5ba2\u6237\u7aef\u3002\n* \u7a7a\u76ee\u5f55\u65f6\u4f1a\u81ea\u52a8\u521b\u5efa\u8d77\u59cb `index.html`\u3002\n* \u4e5f\u4f1a\u5728 `\/__openclaw__\/a2ui\/` \u63d0\u4f9b A2UI\u3002\n* \u66f4\u6539\u9700\u8981\u91cd\u542f Gateway \u7f51\u5173\u3002\n* \u5bf9\u4e8e\u5927\u578b\u76ee\u5f55\u6216 `EMFILE` \u9519\u8bef\uff0c\u8bf7\u7981\u7528 live reload\u3002\n\n***\n\n## \u8bbe\u5907\u53d1\u73b0\n\n### mDNS\uff08Bonjour\uff09\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  discovery: {\n    mdns: {\n      mode: &quot;minimal&quot;, \/\/ minimal | full | off\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li><code>minimal<\/code>\uff08\u9ed8\u8ba4\uff09\uff1a\u4ece TXT \u8bb0\u5f55\u4e2d\u7701\u7565 <code>cliPath<\/code> + <code>sshPort<\/code>\u3002<\/li>\n<li><code>full<\/code>\uff1a\u5305\u542b <code>cliPath<\/code> + <code>sshPort<\/code>\u3002<\/li>\n<li>\u4e3b\u673a\u540d\u9ed8\u8ba4\u4e3a <code>openclaw<\/code>\u3002\u53ef\u4f7f\u7528 <code>OPENCLAW_MDNS_HOSTNAME<\/code> \u8986\u76d6\u3002<\/li>\n<\/ul>\n<h3>\u5e7f\u57df\uff08DNS-SD\uff09<\/h3>\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  discovery: {<br \/>\n    wideArea: { enabled: true },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u5728 `~\/.openclaw\/dns\/` \u4e0b\u5199\u5165\u4e00\u4e2a\u5355\u64ad DNS-SD \u533a\u57df\u3002\u5bf9\u4e8e\u8de8\u7f51\u7edc\u8bbe\u5907\u53d1\u73b0\uff0c\u53ef\u4e0e DNS \u670d\u52a1\u5668\uff08\u63a8\u8350 CoreDNS\uff09+ Tailscale split DNS \u642d\u914d\u4f7f\u7528\u3002\n\n\u8bbe\u7f6e\uff1a`openclaw dns setup --apply`\u3002\n\n***\n\n## \u73af\u5883\n\n### `env`\uff08\u5185\u8054\u73af\u5883\u53d8\u91cf\uff09\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  env: {\n    OPENROUTER_API_KEY: &quot;sk-or-...&quot;,\n    vars: {\n      GROQ_API_KEY: &quot;gsk-...&quot;,\n    },\n    shellEnv: {\n      enabled: true,\n      timeoutMs: 15000,\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u4ec5\u5f53\u8fdb\u7a0b\u73af\u5883\u4e2d\u7f3a\u5c11\u8be5\u952e\u65f6\uff0c\u624d\u4f1a\u5e94\u7528\u5185\u8054\u73af\u5883\u53d8\u91cf\u3002<\/li>\n<li><code>.env<\/code> \u6587\u4ef6\uff1a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55 <code>.env<\/code> + <code>~\/.openclaw\/.env<\/code>\uff08\u4e24\u8005\u90fd\u4e0d\u4f1a\u8986\u76d6\u73b0\u6709\u53d8\u91cf\uff09\u3002<\/li>\n<li><code>shellEnv<\/code>\uff1a\u4ece\u4f60\u7684\u767b\u5f55 shell \u914d\u7f6e\u6587\u4ef6\u5bfc\u5165\u7f3a\u5931\u7684\u9884\u671f\u952e\u540d\u3002<\/li>\n<li>\u5b8c\u6574\u4f18\u5148\u7ea7\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=146\">Environment<\/a>\u3002<\/li>\n<\/ul>\n<h3>\u73af\u5883\u53d8\u91cf\u66ff\u6362<\/h3>\n<p>\u53ef\u5728\u4efb\u610f\u914d\u7f6e\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528 <code>${VAR_NAME}<\/code> \u5f15\u7528\u73af\u5883\u53d8\u91cf\uff1a<\/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  \u7f51\u5173: {<br \/>\n    auth: { token: &#8220;${OPENCLAW_GATEWAY_TOKEN}&#8221; },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u4ec5\u5339\u914d\u5927\u5199\u540d\u79f0\uff1a`[A-Z_][A-Z0-9_]*`\u3002\n* \u7f3a\u5931\/\u4e3a\u7a7a\u7684\u53d8\u91cf\u4f1a\u5728\u914d\u7f6e\u52a0\u8f7d\u65f6\u629b\u51fa\u9519\u8bef\u3002\n* \u4f7f\u7528 `$${VAR}` \u53ef\u8f6c\u4e49\u4e3a\u5b57\u9762\u91cf `${VAR}`\u3002\n* \u9002\u7528\u4e8e `$include`\u3002\n\n***\n\n## \u5bc6\u94a5\n\nSecret refs \u662f\u589e\u91cf\u80fd\u529b\uff1a\u660e\u6587\u503c\u4ecd\u7136\u53ef\u7528\u3002\n\n### `SecretRef`\n\n\u4f7f\u7528\u4ee5\u4e0b\u5bf9\u8c61\u5f62\u5f0f\u4e4b\u4e00\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{ source: &quot;env&quot; | &quot;file&quot; | &quot;exec&quot;, provider: &quot;default&quot;, id: &quot;...&quot; }\n<\/code><\/pre>\n<p>\u6821\u9a8c\uff1a<\/p>\n<ul>\n<li><code>provider<\/code> \u6a21\u5f0f\uff1a<code>^[a-z][a-z0-9_-]{0,63}$<\/code><\/li>\n<li><code>source: \"env\"<\/code> \u7684 id \u6a21\u5f0f\uff1a<code>^[A-Z][A-Z0-9_]{0,127}$<\/code><\/li>\n<li><code>source: \"file\"<\/code> \u7684 id\uff1a\u7edd\u5bf9 JSON pointer\uff08\u4f8b\u5982 <code>\"\/providers\/openai\/apiKey\"<\/code>\uff09<\/li>\n<li><code>source: \"exec\"<\/code> \u7684 id \u6a21\u5f0f\uff1a<code>^[A-Za-z0-9][A-Za-z0-9._:\/-]{0,255}$<\/code><\/li>\n<li><code>source: \"exec\"<\/code> \u7684 id \u4e0d\u80fd\u5305\u542b\u4ee5\u659c\u6760\u5206\u9694\u7684 <code>.<\/code> \u6216 <code>..<\/code> \u8def\u5f84\u6bb5\uff08\u4f8b\u5982 <code>a\/..\/b<\/code> \u4f1a\u88ab\u62d2\u7edd\uff09<\/li>\n<\/ul>\n<h3>\u652f\u6301\u7684\u51ed\u8bc1\u8868\u9762<\/h3>\n<ul>\n<li>\u89c4\u8303\u77e9\u9635\uff1a<a href=\"https:\/\/pa.yingzhi8.cn\/?p=635\">SecretRef Credential Surface<\/a><\/li>\n<li><code>secrets apply<\/code> \u4f1a\u5b9a\u4f4d\u53d7\u652f\u6301\u7684 <code>openclaw.json<\/code> \u51ed\u8bc1\u8def\u5f84\u3002<\/li>\n<li><code>auth-profiles.json<\/code> \u4e2d\u7684 ref \u4e5f\u5305\u542b\u5728\u8fd0\u884c\u65f6\u89e3\u6790\u548c\u5ba1\u8ba1\u8986\u76d6\u8303\u56f4\u5185\u3002<\/li>\n<\/ul>\n<h3>Secret providers \u914d\u7f6e<\/h3>\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  secrets: {<br \/>\n    providers: {<br \/>\n      default: { source: &#8220;env&#8221; }, \/\/ \u53ef\u9009\u7684\u663e\u5f0f\u73af\u5883\u53d8\u91cf\u63d0\u4f9b\u5546<br \/>\n      filemain: {<br \/>\n        source: &#8220;file&#8221;,<br \/>\n        path: &#8220;~\/.openclaw\/secrets.json&#8221;,<br \/>\n        mode: &#8220;json&#8221;,<br \/>\n        timeoutMs: 5000,<br \/>\n      },<br \/>\n      vault: {<br \/>\n        source: &#8220;exec&#8221;,<br \/>\n        command: &#8220;\/usr\/local\/bin\/openclaw-vault-resolver&#8221;,<br \/>\n        passEnv: [&#8220;PATH&#8221;, &#8220;VAULT_ADDR&#8221;],<br \/>\n      },<br \/>\n    },<br \/>\n    defaults: {<br \/>\n      env: &#8220;default&#8221;,<br \/>\n      file: &#8220;filemain&#8221;,<br \/>\n      exec: &#8220;vault&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u8bf4\u660e\uff1a\n\n* `file` \u63d0\u4f9b\u5546\u652f\u6301 `mode: &quot;json&quot;` \u548c `mode: &quot;singleValue&quot;`\uff08\u5728 singleValue \u6a21\u5f0f\u4e0b\uff0c`id` \u5fc5\u987b\u662f `&quot;value&quot;`\uff09\u3002\n* `exec` \u63d0\u4f9b\u5546\u8981\u6c42\u7edd\u5bf9 `command` \u8def\u5f84\uff0c\u5e76\u901a\u8fc7 stdin\/stdout \u4f7f\u7528\u534f\u8bae\u8d1f\u8f7d\u3002\n* \u9ed8\u8ba4\u4f1a\u62d2\u7edd\u7b26\u53f7\u94fe\u63a5\u547d\u4ee4\u8def\u5f84\u3002\u8bbe\u7f6e `allowSymlinkCommand: true` \u53ef\u5141\u8bb8\u7b26\u53f7\u94fe\u63a5\u8def\u5f84\uff0c\u540c\u65f6\u6821\u9a8c\u89e3\u6790\u540e\u7684\u76ee\u6807\u8def\u5f84\u3002\n* \u5982\u679c\u914d\u7f6e\u4e86 `trustedDirs`\uff0c\u5219\u53d7\u4fe1\u4efb\u76ee\u5f55\u68c0\u67e5\u4f1a\u5e94\u7528\u5230\u89e3\u6790\u540e\u7684\u76ee\u6807\u8def\u5f84\u3002\n* `exec` \u5b50\u8fdb\u7a0b\u73af\u5883\u9ed8\u8ba4\u6700\u5c0f\u5316\uff1b\u8bf7\u901a\u8fc7 `passEnv` \u663e\u5f0f\u4f20\u9012\u6240\u9700\u53d8\u91cf\u3002\n* Secret refs \u4f1a\u5728\u6fc0\u6d3b\u65f6\u89e3\u6790\u4e3a\u5185\u5b58\u5feb\u7167\uff0c\u4e4b\u540e\u8bf7\u6c42\u8def\u5f84\u53ea\u8bfb\u53d6\u8be5\u5feb\u7167\u3002\n* \u6fc0\u6d3b\u671f\u95f4\u4f1a\u5e94\u7528\u6d3b\u52a8\u8868\u9762\u8fc7\u6ee4\uff1a\u5df2\u542f\u7528\u8868\u9762\u4e0a\u7684\u672a\u89e3\u6790 ref \u4f1a\u5bfc\u81f4\u542f\u52a8\/\u91cd\u8f7d\u5931\u8d25\uff0c\u800c\u975e\u6d3b\u52a8\u8868\u9762\u4f1a\u88ab\u8df3\u8fc7\u5e76\u8bb0\u5f55\u8bca\u65ad\u4fe1\u606f\u3002\n\n***\n\n## \u8ba4\u8bc1\u5b58\u50a8\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  auth: {\n    profiles: {\n      &quot;anthropic:me@example.com&quot;: { provider: &quot;anthropic&quot;, mode: &quot;oauth&quot;, email: &quot;me@example.com&quot; },\n      &quot;anthropic:work&quot;: { provider: &quot;anthropic&quot;, mode: &quot;api_key&quot; },\n    },\n    order: {\n      anthropic: [&quot;anthropic:me@example.com&quot;, &quot;anthropic:work&quot;],\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li>\u6bcf\u4e2a\u667a\u80fd\u4f53\u7684\u914d\u7f6e\u6587\u4ef6\u5b58\u50a8\u5728 <code>&lt;agentDir&gt;\/auth-profiles.json<\/code>\u3002<\/li>\n<li><code>auth-profiles.json<\/code> \u652f\u6301\u503c\u7ea7 ref\uff08<code>api_key<\/code> \u4f7f\u7528 <code>keyRef<\/code>\uff0c<code>token<\/code> \u4f7f\u7528 <code>tokenRef<\/code>\uff09\u3002<\/li>\n<li>\u9759\u6001\u8fd0\u884c\u65f6\u51ed\u8bc1\u6765\u81ea\u5185\u5b58\u4e2d\u7684\u5df2\u89e3\u6790\u5feb\u7167\uff1b\u53d1\u73b0\u65e7\u7248\u9759\u6001 <code>auth.json<\/code> \u6761\u76ee\u65f6\u4f1a\u8fdb\u884c\u6e05\u7406\u3002<\/li>\n<li>\u65e7\u7248 OAuth \u4f1a\u4ece <code>~\/.openclaw\/credentials\/oauth.json<\/code> \u5bfc\u5165\u3002<\/li>\n<li>\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=99\">OAuth<\/a>\u3002<\/li>\n<li>Secrets \u8fd0\u884c\u65f6\u884c\u4e3a\u4ee5\u53ca <code>audit\/configure\/apply<\/code> \u5de5\u5177\uff1a\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=611\">Secrets Management<\/a>\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u65e5\u5fd7<\/h2>\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  logging: {<br \/>\n    level: &#8220;info&#8221;,<br \/>\n    file: &#8220;\/tmp\/openclaw\/openclaw.log&#8221;,<br \/>\n    consoleLevel: &#8220;info&#8221;,<br \/>\n    consoleStyle: &#8220;pretty&#8221;, \/\/ pretty | compact | json<br \/>\n    redactSensitive: &#8220;tools&#8221;, \/\/ off | tools<br \/>\n    redactPatterns: [&#8220;bTOKENbs<em>[=:]s<\/em>([&#8220;&#8216;]?)([^s&#8221;&#8216;]+)1&#8221;],<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* \u9ed8\u8ba4\u65e5\u5fd7\u6587\u4ef6\uff1a`\/tmp\/openclaw\/openclaw-YYYY-MM-DD.log`\u3002\n* \u8bbe\u7f6e `logging.file` \u4ee5\u83b7\u5f97\u7a33\u5b9a\u8def\u5f84\u3002\n* \u4f7f\u7528 `--verbose` \u65f6\uff0c`consoleLevel` \u4f1a\u63d0\u5347\u4e3a `debug`\u3002\n\n***\n\n## CLI\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  cli: {\n    banner: {\n      taglineMode: &quot;off&quot;, \/\/ random | default | off\n    },\n  },\n}\n<\/code><\/pre>\n<ul>\n<li><code>cli.banner.taglineMode<\/code> \u63a7\u5236\u6a2a\u5e45\u6807\u8bed\u6837\u5f0f\uff1a<\/li>\n<li><code>\"random\"<\/code>\uff08\u9ed8\u8ba4\uff09\uff1a\u8f6e\u6362\u7684\u6709\u8da3\/\u5b63\u8282\u6027\u6807\u8bed\u3002<\/li>\n<li><code>\"default\"<\/code>\uff1a\u56fa\u5b9a\u7684\u4e2d\u6027\u6807\u8bed\uff08<code>All your chats, one OpenClaw.<\/code>\uff09\u3002<\/li>\n<li><code>\"off\"<\/code>\uff1a\u4e0d\u663e\u793a\u6807\u8bed\u6587\u672c\uff08\u4ecd\u663e\u793a\u6a2a\u5e45\u6807\u9898\/\u7248\u672c\uff09\u3002<\/li>\n<li>\u82e5\u8981\u9690\u85cf\u6574\u4e2a\u6a2a\u5e45\uff08\u800c\u4e0d\u4ec5\u662f\u6807\u8bed\uff09\uff0c\u8bf7\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf <code>OPENCLAW_HIDE_BANNER=1<\/code>\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u5411\u5bfc<\/h2>\n<p>\u7531 CLI \u5411\u5bfc\uff08<code>onboard<\/code>\u3001<code>configure<\/code>\u3001<code>doctor<\/code>\uff09\u5199\u5165\u7684\u5143\u6570\u636e\uff1a<\/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  wizard: {<br \/>\n    lastRunAt: &#8220;2026-01-01T00:00:00.000Z&#8221;,<br \/>\n    lastRunVersion: &#8220;2026.1.4&#8221;,<br \/>\n    lastRunCommit: &#8220;abc1234&#8221;,<br \/>\n    lastRunCommand: &#8220;configure&#8221;,<br \/>\n    lastRunMode: &#8220;local&#8221;,<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n***\n\n## \u8eab\u4efd\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: {\n    list: [\n      {\n        id: &quot;main&quot;,\n        identity: {\n          name: &quot;Samantha&quot;,\n          theme: &quot;helpful sloth&quot;,\n          emoji: &quot;\ud83e\udda5&quot;,\n          avatar: &quot;avatars\/samantha.png&quot;,\n        },\n      },\n    ],\n  },\n}\n<\/code><\/pre>\n<p>\u7531 macOS \u65b0\u624b\u5f15\u5bfc\u52a9\u624b\u5199\u5165\u3002\u4f1a\u6d3e\u751f\u9ed8\u8ba4\u503c\uff1a<\/p>\n<ul>\n<li>\u4ece <code>identity.emoji<\/code> \u6d3e\u751f <code>messages.ackReaction<\/code>\uff08\u56de\u9000\u4e3a \ud83d\udc40\uff09<\/li>\n<li>\u4ece <code>identity.name<\/code>\/<code>identity.emoji<\/code> \u6d3e\u751f <code>mentionPatterns<\/code><\/li>\n<li><code>avatar<\/code> \u63a5\u53d7\uff1a\u5de5\u4f5c\u533a\u76f8\u5bf9\u8def\u5f84\u3001<code>http(s)<\/code> URL \u6216 <code>data:<\/code> URI<\/li>\n<\/ul>\n<hr \/>\n<h2>Bridge\uff08\u65e7\u7248\uff0c\u5df2\u79fb\u9664\uff09<\/h2>\n<p>\u5f53\u524d\u7248\u672c\u4e0d\u518d\u5305\u542b TCP bridge\u3002\u8282\u70b9\u901a\u8fc7 Gateway \u7f51\u5173 \u7f51\u5173 WebSocket \u8fde\u63a5\u3002<code>bridge.*<\/code> \u952e\u5df2\u4e0d\u518d\u5c5e\u4e8e\u914d\u7f6e schema \u7684\u4e00\u90e8\u5206\uff08\u5728\u79fb\u9664\u524d\u6821\u9a8c\u4f1a\u5931\u8d25\uff1b<code>openclaw doctor --fix<\/code> \u53ef\u6e05\u9664\u672a\u77e5\u952e\uff09\u3002<\/p>\n<p>\n  <code>json  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  {<br \/>\n    \"bridge\": {<br \/>\n      \"enabled\": true,<br \/>\n      \"port\": 18790,<br \/>\n      \"bind\": \"tailnet\",<br \/>\n      \"tls\": {<br \/>\n        \"enabled\": true,<br \/>\n        \"autoGenerate\": true<br \/>\n      }<br \/>\n    }<br \/>\n  }<\/code>\n<\/p>\n<hr \/>\n<h2>Cron<\/h2>\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  cron: {<br \/>\n    enabled: true,<br \/>\n    maxConcurrentRuns: 2,<br \/>\n    webhook: &#8220;https:\/\/example.invalid\/legacy&#8221;, \/\/ \u65e7\u7248\u56de\u9000\uff0c\u4ec5\u7528\u4e8e\u5df2\u5b58\u50a8\u7684 notify:true \u4f5c\u4e1a<br \/>\n    webhookToken: &#8220;replace-with-dedicated-token&#8221;, \/\/ \u53ef\u9009\uff0c\u7528\u4e8e\u51fa\u7ad9 webhook \u8ba4\u8bc1\u7684 bearer token<br \/>\n    sessionRetention: &#8220;24h&#8221;, \/\/ \u65f6\u957f\u5b57\u7b26\u4e32\u6216 false<br \/>\n    runLog: {<br \/>\n      maxBytes: &#8220;2mb&#8221;, \/\/ \u9ed8\u8ba4 2_000_000 \u5b57\u8282<br \/>\n      keepLines: 2000, \/\/ \u9ed8\u8ba4 2000<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n* `sessionRetention`\uff1a\u5df2\u5b8c\u6210\u7684\u9694\u79bb Cron \u8fd0\u884c\u4f1a\u8bdd\u5728\u4ece `sessions.json` \u6e05\u7406\u524d\u4fdd\u7559\u591a\u4e45\u3002\u4e5f\u63a7\u5236\u5df2\u5f52\u6863\u3001\u5df2\u5220\u9664\u7684 Cron \u8bb0\u5f55\u6e05\u7406\u3002\u9ed8\u8ba4\uff1a`24h`\uff1b\u8bbe\u4e3a `false` \u53ef\u7981\u7528\u3002\n* `runLog.maxBytes`\uff1a\u6bcf\u4e2a\u8fd0\u884c\u65e5\u5fd7\u6587\u4ef6\uff08`cron\/runs\/&lt;jobId&gt;.jsonl`\uff09\u5728\u6e05\u7406\u524d\u7684\u6700\u5927\u5927\u5c0f\u3002\u9ed8\u8ba4\uff1a`2_000_000` \u5b57\u8282\u3002\n* `runLog.keepLines`\uff1a\u89e6\u53d1\u8fd0\u884c\u65e5\u5fd7\u6e05\u7406\u65f6\u4fdd\u7559\u7684\u6700\u65b0\u884c\u6570\u3002\u9ed8\u8ba4\uff1a`2000`\u3002\n* `webhookToken`\uff1a\u7528\u4e8e Cron webhook POST \u6295\u9012\uff08`delivery.mode = &quot;webhook&quot;`\uff09\u7684 bearer token\uff1b\u82e5\u7701\u7565\u5219\u4e0d\u53d1\u9001\u8ba4\u8bc1\u5934\u3002\n* `webhook`\uff1a\u5df2\u5f03\u7528\u7684\u65e7\u7248\u56de\u9000 webhook URL\uff08http\/https\uff09\uff0c\u4ec5\u7528\u4e8e\u4ecd\u7136\u5177\u6709 `notify: true` \u7684\u5df2\u5b58\u50a8\u4f5c\u4e1a\u3002\n\n\u89c1 [Cron Jobs](\/automation\/cron-jobs)\u3002\n\n***\n\n## \u5a92\u4f53\u6a21\u578b\u6a21\u677f\u53d8\u91cf\n\n\u4f1a\u5728 `tools.media.models[].args` \u4e2d\u5c55\u5f00\u7684\u6a21\u677f\u5360\u4f4d\u7b26\uff1a\n\n| Variable           | Description                        |\n| ------------------ | ---------------------------------- |\n| `{{Body}}`         | \u5b8c\u6574\u5165\u7ad9\u6d88\u606f\u6b63\u6587                           |\n| `{{RawBody}}`      | \u539f\u59cb\u6b63\u6587\uff08\u65e0\u5386\u53f2\/\u53d1\u9001\u8005\u5305\u88c5\uff09                    |\n| `{{BodyStripped}}` | \u53bb\u9664\u7fa4\u7ec4\u63d0\u53ca\u540e\u7684\u6b63\u6587                         |\n| `{{From}}`         | \u53d1\u9001\u8005\u6807\u8bc6\u7b26                             |\n| `{{To}}`           | \u76ee\u6807\u6807\u8bc6\u7b26                              |\n| `{{MessageSid}}`   | \u6e20\u9053\u6d88\u606f ID                            |\n| `{{SessionId}}`    | \u5f53\u524d\u4f1a\u8bdd UUID                          |\n| `{{IsNewSession}}` | \u65b0\u5efa\u4f1a\u8bdd\u65f6\u4e3a `&quot;true&quot;`                    |\n| `{{MediaUrl}}`     | \u5165\u7ad9\u5a92\u4f53\u4f2a URL                          |\n| `{{MediaPath}}`    | \u672c\u5730\u5a92\u4f53\u8def\u5f84                             |\n| `{{MediaType}}`    | \u5a92\u4f53\u7c7b\u578b\uff08image\/audio\/document\/\u2026\uff09       |\n| `{{Transcript}}`   | \u97f3\u9891\u8f6c\u5f55                               |\n| `{{Prompt}}`       | \u4e3a CLI \u6761\u76ee\u89e3\u6790\u540e\u7684\u5a92\u4f53\u63d0\u793a                   |\n| `{{MaxChars}}`     | \u4e3a CLI \u6761\u76ee\u89e3\u6790\u540e\u7684\u6700\u5927\u8f93\u51fa\u5b57\u7b26\u6570                |\n| `{{ChatType}}`     | `&quot;direct&quot;` \u6216 `&quot;group&quot;`             |\n| `{{GroupSubject}}` | \u7fa4\u7ec4\u4e3b\u9898\uff08\u5c3d\u529b\u800c\u4e3a\uff09                         |\n| `{{GroupMembers}}` | \u7fa4\u7ec4\u6210\u5458\u9884\u89c8\uff08\u5c3d\u529b\u800c\u4e3a\uff09                       |\n| `{{SenderName}}`   | \u53d1\u9001\u8005\u663e\u793a\u540d\uff08\u5c3d\u529b\u800c\u4e3a\uff09                       |\n| `{{SenderE164}}`   | \u53d1\u9001\u8005\u7535\u8bdd\u53f7\u7801\uff08\u5c3d\u529b\u800c\u4e3a\uff09                      |\n| `{{Provider}}`     | \u63d0\u4f9b\u5546\u63d0\u793a\uff08whatsapp\u3001telegram\u3001discord \u7b49\uff09 |\n\n***\n\n## \u914d\u7f6e includes\uff08`$include`\uff09\n\n\u5c06\u914d\u7f6e\u62c6\u5206\u4e3a\u591a\u4e2a\u6587\u4ef6\uff1a\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  gateway: { port: 18789 },\n  agents: { $include: &quot;.\/agents.json5&quot; },\n  broadcast: {\n    $include: [&quot;.\/clients\/mueller.json5&quot;, &quot;.\/clients\/schmidt.json5&quot;],\n  },\n}\n<\/code><\/pre>\n<p><strong>\u5408\u5e76\u884c\u4e3a\uff1a<\/strong><\/p>\n<ul>\n<li>\u5355\u4e2a\u6587\u4ef6\uff1a\u66ff\u6362\u5305\u542b\u5b83\u7684\u5bf9\u8c61\u3002<\/li>\n<li>\u6587\u4ef6\u6570\u7ec4\uff1a\u6309\u987a\u5e8f\u6df1\u5ea6\u5408\u5e76\uff08\u540e\u8005\u8986\u76d6\u524d\u8005\uff09\u3002<\/li>\n<li>\u540c\u7ea7\u952e\uff1a\u5728 include \u4e4b\u540e\u518d\u5408\u5e76\uff08\u8986\u76d6\u88ab\u5305\u542b\u7684\u503c\uff09\u3002<\/li>\n<li>\u5d4c\u5957 include\uff1a\u6700\u591a 10 \u5c42\u3002<\/li>\n<li>\u8def\u5f84\uff1a\u76f8\u5bf9\u4e8e\u5305\u542b\u5b83\u7684\u6587\u4ef6\u89e3\u6790\uff0c\u4f46\u5fc5\u987b\u4fdd\u6301\u5728\u9876\u5c42\u914d\u7f6e\u76ee\u5f55\uff08<code>openclaw.json<\/code> \u7684 <code>dirname<\/code>\uff09\u5185\u3002\u53ea\u6709\u5728\u6700\u7ec8\u89e3\u6790\u7ed3\u679c\u4ecd\u4f4d\u4e8e\u8be5\u8fb9\u754c\u5185\u65f6\uff0c\u624d\u5141\u8bb8\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\/<code>..\/<\/code> \u5f62\u5f0f\u3002<\/li>\n<li>\u9519\u8bef\uff1a\u7f3a\u5931\u6587\u4ef6\u3001\u89e3\u6790\u9519\u8bef\u548c\u5faa\u73af include \u90fd\u4f1a\u7ed9\u51fa\u6e05\u6670\u9519\u8bef\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<hr \/>\n<p><em>\u76f8\u5173\u5185\u5bb9\uff1a<a href=\"https:\/\/pa.yingzhi8.cn\/?p=120\">\u914d\u7f6e\u8bf4\u660e<\/a> \u00b7 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=121\">\u914d\u7f6e\u8bf4\u660e Examples<\/a> \u00b7 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=124\">Doctor<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Complete field-by-field reference for ~\/.openclaw\/openc [&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-122","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/122","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=122"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":835,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/122\/revisions\/835"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}