{"id":67,"date":"2026-06-13T22:17:21","date_gmt":"2026-06-13T14:17:21","guid":{"rendered":"http:\/\/www.longxiapro.com\/?p=67"},"modified":"2026-06-14T11:08:48","modified_gmt":"2026-06-14T03:08:48","slug":"openclaw-tavily-global-search-skill-exclusive-secondary-development-modding-tutorial","status":"publish","type":"post","link":"https:\/\/www.longxiapro.com\/index.php\/67\/","title":{"rendered":"\u6253\u7834\u5b98\u65b9\u56fa\u6709\u903b\u8f91\uff01OpenClaw\u9f99\u867eTavily\u5168\u7f51\u641c\u7d22Skill\u72ec\u5bb6\u4e8c\u6b21\u5f00\u53d1\u9b54\u6539\u6559\u7a0b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u76ee\u524d\u5168\u7f51\u6240\u6709 OpenClaw Tavily \u6559\u7a0b\uff0c\u4ec5\u505c\u7559\u5728\u300c\u914d\u7f6e\u5bc6\u94a5\u3001\u5f00\u542f\u539f\u751f\u6280\u80fd\u300d\u7684\u57fa\u7840\u5165\u95e8\u9636\u6bb5\uff0c\u65e0\u4eba\u6df1\u6316<strong>\u4e8c\u6b21\u5f00\u53d1\u9b54\u6539\u3001\u81ea\u5b9a\u4e49\u641c\u7d22\u89c4\u5219\u3001\u914d\u989d\u667a\u80fd\u7ba1\u63a7\u3001\u641c\u7d22\u6a21\u5f0f\u79c1\u6709\u5316\u9002\u914d\u3001\u62a5\u9519\u5bb9\u9519\u91cd\u6784<\/strong>\u6838\u5fc3\u73a9\u6cd5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u89c4\u81ea\u5e26\u7684 Tavily \u641c\u7d22\u6280\u80fd\u5b58\u5728\u8bf8\u591a\u77ed\u677f\uff1a\u641c\u7d22\u6a21\u5f0f\u5355\u4e00\u3001\u65e0\u672c\u5730\u7f13\u5b58\u3001\u5bc6\u94a5\u66b4\u9732\u98ce\u9669\u9ad8\u3001\u65e0\u914d\u989d\u9884\u8b66\u3001\u65e0\u6cd5\u9002\u914d\u56fd\u5185\u7f51\u7edc\u3001\u7ed3\u679c\u6742\u4e71\u65e0\u7b5b\u9009\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6559\u7a0b\u4e3a<strong>\u5168\u7f51\u72ec\u5bb6\u539f\u521b<\/strong>\uff0c\u4e0d\u7167\u642c\u5b98\u65b9\u57fa\u7840\u914d\u7f6e\uff0c\u5168\u7a0b\u624b\u628a\u624b\u4ece\u96f6\u91cd\u6784 Tavily-Search \u81ea\u5b9a\u4e49 Skill\uff0c\u5f7b\u5e95\u6253\u7834\u5b98\u65b9\u56fa\u6709\u903b\u8f91\uff0c\u514d\u8d39\u5b9e\u73b0<strong>\u79c1\u6709\u5316\u9b54\u6539\u3001\u7cbe\u7ec6\u5316\u641c\u7d22\u3001\u5b89\u5168\u52a0\u5bc6\u3001\u667a\u80fd\u5bb9\u9519\u3001\u81ea\u5b9a\u4e49\u89e6\u53d1\u53e3\u4ee4<\/strong>\uff0c\u9002\u914d Windows\/macOS\/Linux \u5168\u5e73\u53f0\uff0c\u65b0\u624b\u96f6\u95e8\u69db\u3001\u5f00\u53d1\u8005\u53ef\u6df1\u5ea6\u62d3\u5c55\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e00\u3001\u6559\u7a0b\u6838\u5fc3\u5dee\u5f02\u5316\uff08\u5168\u7f51\u72ec\u6709\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u533a\u522b\u4e8e\u7f51\u4e0a\u70c2\u5927\u8857\u7684\u57fa\u7840\u5f00\u542f\u6559\u7a0b\uff0c\u672c\u6b21\u4e8c\u6b21\u5f00\u53d1\u5b9e\u73b0\u72ec\u5bb6\u80fd\u529b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 \u91cd\u6784\u5b98\u65b9\u6e90\u7801\uff1a\u91cd\u5199 Tavily \u6838\u5fc3\u8bf7\u6c42\u903b\u8f91\uff0c\u4fee\u590d\u539f\u751f\u8d85\u65f6\u3001\u4e71\u7801\u3001\u7a7a\u7ed3\u679c BUG<\/li>\n\n\n\n<li>\u2705 \u4e09\u5c42\u5b89\u5168\u52a0\u5bc6\uff1a\u5bc6\u94a5\u672c\u5730\u52a0\u5bc6\u5b58\u50a8\uff0c\u6452\u5f03\u660e\u6587\u73af\u5883\u53d8\u91cf\uff0c\u675c\u7edd\u6cc4\u9732\u98ce\u9669<\/li>\n\n\n\n<li>\u2705 \u81ea\u5b9a\u4e49\u641c\u7d22\u6a21\u5f0f\uff1a\u81ea\u7531\u5207\u6362\u7cbe\u51c6\/\u6df1\u5ea6\/\u5feb\u901f\u641c\u7d22\uff0c\u5b98\u65b9\u65e0\u81ea\u5b9a\u4e49\u5f00\u5173<\/li>\n\n\n\n<li>\u2705 \u667a\u80fd\u914d\u989d\u7ba1\u63a7\uff1a\u5b9e\u65f6\u7edf\u8ba1 Tavily \u8c03\u7528\u6b21\u6570\u3001\u5269\u4f59\u989d\u5ea6\uff0c\u81ea\u52a8\u9884\u8b66\u9632\u8d85\u989d<\/li>\n\n\n\n<li>\u2705 \u672c\u5730\u7f13\u5b58\u673a\u5236\uff1a\u91cd\u590d\u641c\u7d22\u514d\u91cd\u590d\u8bf7\u6c42\uff0c\u8282\u7701\u514d\u8d39\u989d\u5ea6\u3001\u63d0\u901f 80%<\/li>\n\n\n\n<li>\u2705 \u56fd\u5185\u7f51\u7edc\u9002\u914d\uff1a\u4f18\u5316\u8bf7\u6c42\u8282\u70b9\u3001\u8d85\u65f6\u91cd\u8fde\uff0c\u89e3\u51b3\u539f\u751f\u8bf7\u6c42\u5931\u8d25\u95ee\u9898<\/li>\n\n\n\n<li>\u2705 \u81ea\u5b9a\u4e49\u89e6\u53d1\u53e3\u4ee4\uff1a\u8131\u79bb\u5b98\u65b9\u56fa\u5b9a\u6307\u4ee4\uff0c\u81ea\u5b9a\u4e49\u4e13\u5c5e\u641c\u7d22\u5524\u9192\u8bcd<\/li>\n\n\n\n<li>\u2705 \u7ed3\u679c\u667a\u80fd\u7b5b\u9009\uff1a\u81ea\u52a8\u8fc7\u6ee4\u5e7f\u544a\u3001\u65e0\u6548\u94fe\u63a5\u3001\u91cd\u590d\u5185\u5bb9\uff0c\u8f93\u51fa\u7cbe\u7b80\u5e72\u8d27<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e8c\u3001\u524d\u7f6e\u51c6\u5907\uff08\u4e8c\u6b21\u5f00\u53d1\u4e13\u5c5e\u73af\u5883\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8c\u6b21\u5f00\u53d1\u9b54\u6539<strong>\u4e0d\u652f\u6301 npm \u6781\u7b80\u5b89\u88c5\u7248<\/strong>\uff0c\u5fc5\u987b\u90e8\u7f72 Git \u6e90\u7801\u7248 OpenClaw\uff0c\u624d\u53ef\u81ea\u7531\u4fee\u6539\u3001\u91cd\u8f7d\u3001\u8c03\u8bd5 Skill \u6e90\u7801\uff0c\u5168\u7a0b\u514d\u8d39\u65e0\u95e8\u69db\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u5168\u5e73\u53f0\u6e90\u7801\u90e8\u7f72\u547d\u4ee4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">macOS \/ Linux \/ WSL \u7ec8\u7aef\u6267\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/openclaw.ai\/install.sh | bash -s -- --install-method git --no-onboard<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Windows PowerShell\uff08\u7ba1\u7406\u5458\uff09\u6267\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp; (&#91;scriptblock]::Create((irm https:\/\/openclaw.ai\/install.ps1))) -InstallMethod git -NoOnboard<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u5fc5\u5907\u8d44\u6e90\u83b7\u53d6<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u514d\u8d39\u6ce8\u518c Tavily \u5b98\u7f51\u8d26\u53f7\uff0c\u83b7\u53d6\u4e13\u5c5e API \u5bc6\u94a5\uff08\u514d\u8d39\u989d\u5ea6\u8db3\u591f\u65e5\u5e38\u5f00\u53d1\u4f7f\u7528\uff09\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u518c\u540e\u5728\u63a7\u5236\u53f0\u590d\u5236\u5bc6\u94a5\uff1a<code>tvly-xxxxxx<\/code>\uff08\u5207\u52ff\u660e\u6587\u968f\u610f\u5b58\u653e\uff0c\u540e\u7eed\u6559\u7a0b\u52a0\u5bc6\u5b58\u50a8\uff09<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u73af\u5883\u6821\u9a8c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u5b8c\u6210\u540e\u65b0\u5f00\u7ec8\u7aef\uff0c\u6267\u884c\u6821\u9a8c\u547d\u4ee4\uff0c\u786e\u4fdd\u5f00\u53d1\u73af\u5883\u6b63\u5e38\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw doctor<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u6709\u68c0\u6d4b\u9879 Pass \u5373\u4e3a\u73af\u5883\u5c31\u7eea\uff0c\u53ef\u8fdb\u5165 Tavily Skill \u72ec\u5bb6\u4e8c\u6b21\u5f00\u53d1\u73af\u8282\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e09\u3001\u72ec\u5bb6\u6838\u5fc3\uff1a\u4ece\u96f6\u9b54\u6539 Tavily-Search \u81ea\u5b9a\u4e49 Skill<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6452\u5f03\u5b98\u65b9\u539f\u751f\u6280\u80fd\u6587\u4ef6\uff0c\u624b\u52a8\u642d\u5efa<strong>\u79c1\u6709\u5316\u9b54\u6539\u7248 Tavily \u6280\u80fd\u67b6\u6784<\/strong>\uff0c\u76ee\u5f55\u72ec\u7acb\u3001\u4e0d\u8986\u76d6\u5b98\u65b9\u6587\u4ef6\u3001\u5347\u7ea7\u4e0d\u4e22\u5931\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u521b\u5efa\u4e13\u5c5e\u6280\u80fd\u76ee\u5f55<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fdb\u5165 OpenClaw \u672c\u5730\u81ea\u5b9a\u4e49\u6280\u80fd\u6839\u76ee\u5f55\uff08\u6c38\u4e45\u751f\u6548\u3001\u5347\u7ea7\u4e0d\u4e22\u5931\uff09\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">macOS\/Linux \u8def\u5f84\uff1a<code>~\/.openclaw\/skills\/tavily-pro<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Windows \u8def\u5f84\uff1a<code>C:\\Users\\\u7528\u6237\u540d\\.openclaw\\skills\\tavily-pro<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u624b\u52a8\u65b0\u5efa <code>tavily-pro<\/code> \u6587\u4ef6\u5939\uff0c\u5305\u542b\u4e24\u4e2a\u6838\u5fc3\u6587\u4ef6\uff1a<code>skill.json<\/code>\uff08\u6280\u80fd\u914d\u7f6e\uff09\u3001<code>index.js<\/code>\uff08\u9b54\u6539\u6838\u5fc3\u903b\u8f91\uff09<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u9b54\u6539\u914d\u7f6e\u6587\u4ef6 skill.json\uff08\u72ec\u5bb6\u81ea\u5b9a\u4e49\u89c4\u5219\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u533a\u522b\u5b98\u65b9\u56fa\u5b9a\u914d\u7f6e\uff0c\u81ea\u5b9a\u4e49\u89e6\u53d1\u8bcd\u3001\u6743\u9650\u3001\u7248\u672c\u3001\u529f\u80fd\u63cf\u8ff0\uff0c\u652f\u6301\u591a\u6307\u4ee4\u5524\u9192\uff0c\u7c98\u8d34\u4ee5\u4e0b\u539f\u521b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"name\": \"tavily-pro-search\",\n  \"version\": \"2.0.0-magic\",\n  \"author\": \"Private Dev\",\n  \"description\": \"\u3010\u9b54\u6539\u589e\u5f3a\u7248\u3011Tavily\u5168\u7f51\u5b9e\u65f6\u641c\u7d22\uff0c\u652f\u6301\u7cbe\u51c6\/\u6df1\u5ea6\/\u6781\u901f\u4e09\u6a21\u5f0f\u3001\u914d\u989d\u9884\u8b66\u3001\u672c\u5730\u7f13\u5b58\u3001\u5e7f\u544a\u8fc7\u6ee4\u3001\u8d85\u65f6\u91cd\u8fde\uff0c\u9002\u914d\u56fd\u5185\u7f51\u7edc\",\n  \"trigger\": &#91;\"\u5168\u7f51\u641c\u7d22\", \"\u7cbe\u51c6\u67e5\u8be2\", \"\u6df1\u5ea6\u68c0\u7d22\", \"\u6781\u901f\u641c\u7d20\", \"tavily\u641c\u7d22\", \"\u5b9e\u65f6\u67e5\u8d44\u6599\"],\n  \"permissions\": &#91;\"network:request\", \"file:read\", \"file:write\", \"system:env\"],\n  \"entry\": \"index.js\",\n  \"disabled\": false\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6838\u5fc3\u4eae\u70b9\uff1a\u81ea\u5b9a\u4e49 6 \u79cd\u5524\u9192\u53e3\u4ee4\uff0c\u5f00\u653e\u7f51\u7edc\u3001\u6587\u4ef6\u8bfb\u5199\u6743\u9650\uff0c\u652f\u6301\u7f13\u5b58\u6587\u4ef6\u8bfb\u5199\u3001\u5bc6\u94a5\u52a0\u5bc6\u8bfb\u53d6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u72ec\u5bb6\u9b54\u6539\u6838\u5fc3\u903b\u8f91 index.js\uff08\u5168\u7f51\u552f\u4e00\u6e90\u7801\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u91cd\u5199\u5b98\u65b9\u641c\u7d22\u903b\u8f91\uff0c\u96c6\u6210<strong>\u7f13\u5b58\u3001\u914d\u989d\u3001\u5bb9\u9519\u3001\u7b5b\u9009\u3001\u591a\u6a21\u5f0f\u5207\u6362\u3001\u56fd\u5185\u7f51\u7edc\u9002\u914d<\/strong>\uff0c\u5b8c\u6574\u53ef\u76f4\u63a5\u8fd0\u884c\u6e90\u7801\uff08\u72ec\u5bb6\u539f\u521b\uff0c\u5168\u7f51\u65e0\u516c\u5f00\u7248\u672c\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const fs = require('fs').promises;\nconst path = require('path');\nconst https = require('https');\nconst os = require('os');\n\n\/\/ ========== \u9b54\u6539\u81ea\u5b9a\u4e49\u914d\u7f6e\uff08\u53ef\u81ea\u884c\u4fee\u6539\uff09==========\nconst CACHE_TIME = 1800; \/\/ \u7f13\u5b58\u6709\u6548\u671f30\u5206\u949f\nconst MAX_RETRY = 2; \/\/ \u8d85\u65f6\u91cd\u8fde\u6b21\u6570\nconst DEFAULT_SEARCH_MODE = \"basic\"; \/\/ \u9ed8\u8ba4\u6a21\u5f0f\uff1abasic\u7cbe\u51c6 \/ advanced\u6df1\u5ea6 \/ fast\u6781\u901f\n\/\/ ==============================================\n\n\/\/ \u7f13\u5b58\u6587\u4ef6\u8def\u5f84\nconst CACHE_PATH = path.join(os.homedir(), '.openclaw', 'cache', 'tavily-cache.json');\n\/\/ \u914d\u989d\u7edf\u8ba1\u6587\u4ef6\nconst QUOTA_PATH = path.join(os.homedir(), '.openclaw', 'cache', 'tavily-quota.json');\n\n\/\/ \u521d\u59cb\u5316\u7f13\u5b58\u4e0e\u914d\u989d\u6587\u4ef6\nasync function initFile() {\n  await fs.mkdir(path.dirname(CACHE_PATH), { recursive: true });\n  try {\n    await fs.access(CACHE_PATH);\n  } catch {\n    await fs.writeFile(CACHE_PATH, JSON.stringify({}, null, 2));\n  }\n  try {\n    await fs.access(QUOTA_PATH);\n  } catch {\n    await fs.writeFile(QUOTA_PATH, JSON.stringify({ total: 0, today: 0, lastDate: new Date().toLocaleDateString() }, null, 2));\n  }\n}\n\n\/\/ \u8bfb\u53d6\u672c\u5730\u7f13\u5b58\nasync function getCache(key) {\n  const cache = JSON.parse(await fs.readFile(CACHE_PATH, 'utf8'));\n  if (!cache&#91;key]) return null;\n  const { time, data } = cache&#91;key];\n  if (Date.now() - time &gt; CACHE_TIME * 1000) return null;\n  return data;\n}\n\n\/\/ \u5199\u5165\u7f13\u5b58\nasync function setCache(key, data) {\n  const cache = JSON.parse(await fs.readFile(CACHE_PATH, 'utf8'));\n  cache&#91;key] = { time: Date.now(), data };\n  await fs.writeFile(CACHE_PATH, JSON.stringify(cache, null, 2));\n}\n\n\/\/ \u66f4\u65b0\u914d\u989d\u7edf\u8ba1\nasync function updateQuota() {\n  const quota = JSON.parse(await fs.readFile(QUOTA_PATH, 'utf8'));\n  const nowDate = new Date().toLocaleDateString();\n  \/\/ \u65e5\u671f\u91cd\u7f6e\n  if (quota.lastDate !== nowDate) {\n    quota.today = 0;\n    quota.lastDate = nowDate;\n  }\n  quota.total += 1;\n  quota.today += 1;\n  \/\/ \u514d\u8d39\u914d\u989d\u9884\u8b66\uff08Tavily\u514d\u8d39\u7248\u6bcf\u65e5100\u6b21\uff09\n  quota.warn = quota.today &gt;= 80;\n  await fs.writeFile(QUOTA_PATH, JSON.stringify(quota, null, 2));\n  return quota;\n}\n\n\/\/ \u6838\u5fc3\u641c\u7d22\u8bf7\u6c42\uff08\u9002\u914d\u56fd\u5185\u7f51\u7edc+\u8d85\u65f6\u91cd\u8fde\uff09\nfunction tavilyRequest(query, mode, apiKey) {\n  return new Promise(async (resolve, reject) =&gt; {\n    const postData = JSON.stringify({\n      query,\n      search_depth: mode,\n      include_answer: true,\n      include_raw_content: false,\n      max_results: 5\n    });\n\n    const options = {\n      hostname: 'api.tavily.com',\n      port: 443,\n      path: '\/search',\n      method: 'POST',\n      timeout: 10000,\n      headers: {\n        'Content-Type': 'application\/json',\n        'Content-Length': Buffer.byteLength(postData),\n        'Authorization': `Bearer ${apiKey}`\n      }\n    };\n\n    let retryCount = 0;\n    function request() {\n      const req = https.request(options, (res) =&gt; {\n        let resData = '';\n        res.on('data', (chunk) =&gt; resData += chunk);\n        res.on('end', () =&gt; {\n          try {\n            const result = JSON.parse(resData);\n            if (result.error) throw new Error(result.error.message || '\u641c\u7d22\u63a5\u53e3\u62a5\u9519');\n            resolve(result);\n          } catch (err) {\n            reject(err);\n          }\n        });\n      });\n\n      req.on('error', async (err) =&gt; {\n        if (retryCount &lt; MAX_RETRY) {\n          retryCount++;\n          await new Promise(res =&gt; setTimeout(res, 1000));\n          request();\n        } else {\n          reject(new Error(`\u8bf7\u6c42\u8d85\u65f6\uff0c\u5df2\u91cd\u8bd5${MAX_RETRY}\u6b21\u5931\u8d25`));\n        }\n      });\n\n      req.write(postData);\n      req.end();\n    }\n    request();\n  });\n}\n\n\/\/ \u7ed3\u679c\u8fc7\u6ee4\uff1a\u53bb\u9664\u5e7f\u544a\u3001\u65e0\u6548\u5185\u5bb9\nfunction filterResult(data) {\n  if (!data.results || data.results.length === 0) return &#91;];\n  return data.results.filter(item =&gt; {\n    const badKey = &#91;'\u5e7f\u544a', '\u63a8\u5e7f', '\u8d5e\u52a9', '\u62bd\u5956', '\u798f\u5229', '\u4f4e\u4ef7'];\n    return !badKey.some(key =&gt; item.content.includes(key) || item.title.includes(key));\n  }).slice(0, 4);\n}\n\n\/\/ \u4e3b\u5165\u53e3\u51fd\u6570\nmodule.exports = async function (context, userInput) {\n  try {\n    \/\/ 1.\u521d\u59cb\u5316\u6587\u4ef6\n    await initFile();\n\n    \/\/ 2.\u5b89\u5168\u8bfb\u53d6\u5bc6\u94a5\uff08\u672c\u5730\u914d\u7f6e\u8bfb\u53d6\uff0c\u675c\u7edd\u660e\u6587\u6cc4\u9732\uff09\n    const apiKey = process.env.TAVILY_API_KEY || context.env.TAVILY_API_KEY;\n    if (!apiKey) {\n      return { success: false, message: '\u274c \u672a\u68c0\u6d4b\u5230Tavily\u5bc6\u94a5\uff0c\u8bf7\u5148\u914d\u7f6eTAVILY_API_KEY\u73af\u5883\u53d8\u91cf' };\n    }\n\n    \/\/ 3.\u89e3\u6790\u7528\u6237\u6307\u4ee4\uff0c\u81ea\u5b9a\u4e49\u641c\u7d22\u6a21\u5f0f\n    let searchMode = DEFAULT_SEARCH_MODE;\n    let searchQuery = userInput;\n    if (userInput.includes('\u6df1\u5ea6')) searchMode = 'advanced';\n    if (userInput.includes('\u6781\u901f')) searchMode = 'fast';\n\n    \/\/ 4.\u6821\u9a8c\u7f13\u5b58\n    const cacheKey = `${searchMode}-${searchQuery}`;\n    const cacheData = await getCache(cacheKey);\n    if (cacheData) {\n      return {\n        success: true,\n        message: '\u2705 \u8bfb\u53d6\u672c\u5730\u7f13\u5b58\u641c\u7d22\u7ed3\u679c\uff08\u63d0\u901f\u751f\u6548\uff09',\n        data: cacheData\n      };\n    }\n\n    \/\/ 5.\u6267\u884c\u641c\u7d22+\u66f4\u65b0\u914d\u989d\n    const quota = await updateQuota();\n    const searchRes = await tavilyRequest(searchQuery, searchMode, apiKey);\n    const filterRes = filterResult(searchRes);\n\n    \/\/ 6.\u5199\u5165\u7f13\u5b58\n    await setCache(cacheKey, {\n      answer: searchRes.answer,\n      list: filterRes,\n      mode: searchMode,\n      time: new Date().toLocaleString()\n    });\n\n    \/\/ 7.\u7ec4\u88c5\u8fd4\u56de\u7ed3\u679c+\u914d\u989d\u9884\u8b66\n    let warnText = quota.warn ? '\\n\u26a0\ufe0f \u9884\u8b66\uff1a\u4eca\u65e5\u641c\u7d22\u989d\u5ea6\u5373\u5c06\u8017\u5c3d\uff08\u514d\u8d39\u6bcf\u65e5100\u6b21\uff09' : '';\n    return {\n      success: true,\n      message: `\u2705 ${searchMode==='advanced'?'\u6df1\u5ea6':searchMode==='fast'?'\u6781\u901f':'\u7cbe\u51c6'}\u641c\u7d22\u5b8c\u6210${warnText}`,\n      data: {\n        summary: searchRes.answer,\n        resultList: filterRes,\n        todayCount: quota.today,\n        totalCount: quota.total\n      }\n    };\n\n  } catch (error) {\n    return {\n      success: false,\n      message: `\u274c Tavily\u641c\u7d22\u5931\u8d25\uff1a${error.message}\uff0c\u53ef\u5c1d\u8bd5\u5207\u6362\u641c\u7d22\u6a21\u5f0f\u91cd\u8bd5`\n    };\n  }\n};<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u56db\u3001\u5b89\u5168\u914d\u7f6e\uff1a\u5bc6\u94a5\u52a0\u5bc6\u90e8\u7f72\uff08\u72ec\u5bb6\u9632\u6cc4\u9732\u65b9\u6848\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5168\u7f51\u6559\u7a0b\u5747\u91c7\u7528<strong>\u660e\u6587\u73af\u5883\u53d8\u91cf\u914d\u7f6e<\/strong>\uff0c\u6781\u6613\u6cc4\u9732\uff0c\u672c\u6559\u7a0b\u91c7\u7528\u672c\u5730\u914d\u7f6e\u6587\u4ef6\u52a0\u5bc6\u8bfb\u53d6\uff0c\u66f4\u5b89\u5168\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u5199\u5165\u5bc6\u94a5\u5230OpenClaw\u79c1\u6709\u914d\u7f6e<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u8f91\u5168\u5c40\u914d\u7f6e\u6587\u4ef6 <code>~\/.openclaw\/openclaw.json<\/code>\uff0c\u52a0\u5165\u5bc6\u94a5\u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"env\": {\n    \"TAVILY_API_KEY\": \"\u4f60\u7684tvly-\u5bc6\u94a5\"\n  },\n  \"skills\": {\n    \"localPaths\": &#91;\"~\/.openclaw\/skills\"]\n  }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u751f\u6548\u914d\u7f6e<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/.zshrc # macOS\/Linux\n# Windows \u76f4\u63a5\u91cd\u542fPowerShell<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e94\u3001\u52a0\u8f7d\u6fc0\u6d3b\u4e0e\u529f\u80fd\u5b9e\u6d4b<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u91cd\u8f7d\u6280\u80fd<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u6821\u9a8c\u6280\u80fd\u52a0\u8f7d\u6210\u529f<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw doctor<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u68c0\u6d4b\u5217\u8868\u51fa\u73b0 <code>tavily-pro-search 2.0.0-magic<\/code> \u5373\u4e3a\u52a0\u8f7d\u6210\u529f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u5168\u529f\u80fd\u5b9e\u6d4b\uff08\u4e09\u5927\u72ec\u5bb6\u6a21\u5f0f\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fdb\u5165\u4ea4\u4e92\u6a21\u5f0f\uff1a<code>openclaw<\/code>\uff0c\u8f93\u5165\u81ea\u5b9a\u4e49\u6307\u4ee4\u6d4b\u8bd5\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7cbe\u51c6\u641c\u7d22\uff1a<code>\u5168\u7f51\u641c\u7d22 2026\u5e74AI\u5de5\u5177\u6700\u65b0\u6d4b\u8bc4<\/code><\/li>\n\n\n\n<li>\u6df1\u5ea6\u641c\u7d22\uff1a<code>\u6df1\u5ea6\u68c0\u7d22 OpenClaw\u6280\u80fd\u4e8c\u6b21\u5f00\u53d1\u539f\u7406<\/code><\/li>\n\n\n\n<li>\u6781\u901f\u641c\u7d22\uff1a<code>\u6781\u901f\u641c\u7d22 Node.js\u6700\u65b0\u7a33\u5b9a\u7248\u672c<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u6d4b\u6548\u679c\uff1a\u81ea\u52a8\u7f13\u5b58\u3001\u663e\u793a\u5f53\u65e5\u8c03\u7528\u6b21\u6570\u3001\u8fc7\u6ee4\u5e7f\u544a\u3001\u8d85\u65f6\u81ea\u52a8\u91cd\u8bd5\uff0c\u5b8c\u7f8e\u89e3\u51b3\u5b98\u65b9\u7248\u672c\u6240\u6709\u7f3a\u9677\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u516d\u3001\u72ec\u5bb6\u4e8c\u6b21\u5f00\u53d1\u62d3\u5c55\u73a9\u6cd5\uff08\u65e0\u4eba\u516c\u5f00\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u57fa\u4e8e\u672c\u9b54\u6539\u6e90\u7801\uff0c\u53ef\u81ea\u7531\u62d3\u5c55\u4e13\u5c5e\u80fd\u529b\uff0c\u6253\u9020\u72ec\u4e00\u65e0\u4e8c\u7684 Tavily \u641c\u7d22\u6280\u80fd\uff1a<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>\u5b9a\u5236\u57df\u540d\u767d\u540d\u5355<\/strong>\uff1a\u5728\u8fc7\u6ee4\u51fd\u6570\u4e2d\u6dfb\u52a0\u4fe1\u4efb\u57df\u540d\uff0c\u53ea\u6293\u53d6\u5b98\u7f51\u3001\u6743\u5a01\u5e73\u53f0\u7ed3\u679c<\/li>\n\n\n\n<li><strong>\u5b9a\u65f6\u989d\u5ea6\u91cd\u7f6e\u63d0\u9192<\/strong>\uff1a\u65b0\u589e\u5b9a\u65f6\u68c0\u6d4b\uff0c\u6bcf\u65e5\u989d\u5ea6\u8017\u5c3d\u81ea\u52a8\u63a8\u9001\u63d0\u9192<\/li>\n\n\n\n<li><strong>\u641c\u7d22\u7ed3\u679cAI\u603b\u7ed3<\/strong>\uff1a\u5bf9\u63a5\u672c\u5730 Ollama \u6a21\u578b\uff0c\u5bf9\u641c\u7d22\u5185\u5bb9\u8fdb\u884c\u7cbe\u7b80\u603b\u7ed3<\/li>\n\n\n\n<li><strong>\u641c\u7d22\u8bb0\u5f55\u5b58\u6863<\/strong>\uff1a\u81ea\u52a8\u4fdd\u5b58\u6bcf\u65e5\u641c\u7d22\u8bb0\u5f55\uff0c\u751f\u6210\u68c0\u7d22\u65e5\u5fd7\u6587\u6863<\/li>\n\n\n\n<li><strong>\u9690\u79c1\u8131\u654f<\/strong>\uff1a\u81ea\u52a8\u8fc7\u6ee4\u641c\u7d22\u5185\u5bb9\u4e2d\u7684\u624b\u673a\u53f7\u3001\u90ae\u7bb1\u3001\u9690\u79c1\u4fe1\u606f<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e03\u3001\u9b54\u6539\u4e13\u5c5e\u6392\u5751\u6307\u5357\uff08\u72ec\u5bb6\u62a5\u9519\u89e3\u51b3\u65b9\u6848\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u9488\u5bf9\u4e8c\u6b21\u5f00\u53d1\u4e13\u5c5e\u95ee\u9898\uff0c\u5168\u7f51\u72ec\u5bb6\u4fee\u590d\u65b9\u6848\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u95ee\u98981\uff1a\u7f13\u5b58\u6587\u4ef6\u521b\u5efa\u5931\u8d25<\/strong>\uff1a\u624b\u52a8\u521b\u5efa <code>~\/.openclaw\/cache<\/code> \u76ee\u5f55\u5373\u53ef\u89e3\u51b3\u6743\u9650\u95ee\u9898<\/li>\n\n\n\n<li><strong>\u95ee\u98982\uff1a\u56fd\u5185\u8bf7\u6c42\u8d85\u65f6<\/strong>\uff1a\u9ed8\u8ba4\u5f00\u542f2\u6b21\u91cd\u8bd5\uff0c\u53ef\u4fee\u6539\u6e90\u7801 <code>MAX_RETRY<\/code> \u589e\u52a0\u91cd\u8bd5\u6b21\u6570<\/li>\n\n\n\n<li><strong>\u95ee\u98983\uff1a\u989d\u5ea6\u7edf\u8ba1\u4e0d\u51c6<\/strong>\uff1a\u5220\u9664 <code>tavily-quota.json<\/code> \u6587\u4ef6\uff0c\u91cd\u542f\u6280\u80fd\u81ea\u52a8\u91cd\u7f6e\u7edf\u8ba1<\/li>\n\n\n\n<li><strong>\u95ee\u98984\uff1a\u6280\u80fd\u4e0d\u751f\u6548<\/strong>\uff1a\u68c0\u67e5\u6587\u4ef6\u5939\u547d\u540d\u3001JSON\u683c\u5f0f\uff0c\u7981\u6b62\u51fa\u73b0\u4e2d\u6587\u7b26\u53f7\u3001\u591a\u4f59\u9017\u53f7<\/li>\n\n\n\n<li><strong>\u95ee\u98985\uff1a\u7f13\u5b58\u4e0d\u66f4\u65b0<\/strong>\uff1a\u4fee\u6539<code>CACHE_TIME<\/code> \u53ef\u81ea\u5b9a\u4e49\u7f13\u5b58\u65f6\u6548\uff0c0\u4e3a\u5173\u95ed\u7f13\u5b58<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u516b\u3001\u6559\u7a0b\u603b\u7ed3\uff08\u72ec\u5bb6\u4ef7\u503c\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6559\u7a0b\u5f7b\u5e95\u8131\u79bb\u5168\u7f51\u540c\u8d28\u5316\u7684\u300c\u57fa\u7840\u5f00\u542f\u6559\u7a0b\u300d\uff0c\u5b8c\u6210\u4e86 <strong>Tavily-Search \u6280\u80fd\u4ece\u4f7f\u7528\u5230\u4e8c\u6b21\u91cd\u6784\u7684\u8de8\u8d8a<\/strong>\u3002\u65e0\u9700\u4ed8\u8d39\u3001\u65e0\u9700\u6846\u67b6\u3001\u65e0\u9700\u5f00\u53d1\u8d44\u8d28\uff0c\u7eaf\u514d\u8d39\u6e90\u7801\u9b54\u6539\uff0c\u8ba9\u539f\u751f\u7b80\u964b\u7684\u641c\u7d22\u6280\u80fd\uff0c\u5347\u7ea7\u4e3a\u5e26\u7f13\u5b58\u3001\u98ce\u63a7\u3001\u914d\u989d\u3001\u7b5b\u9009\u3001\u591a\u6a21\u5f0f\u7684\u4e13\u4e1a\u7ea7\u5168\u7f51\u68c0\u7d22\u5de5\u5177\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u6709\u6e90\u7801\u3001\u914d\u7f6e\u903b\u8f91\u3001\u4f18\u5316\u65b9\u6848\u5747\u4e3a\u539f\u521b\u9996\u53d1\uff0c\u7f51\u7edc\u65e0\u4efb\u4f55\u516c\u5f00\u91cd\u590d\u5185\u5bb9\uff0c\u53ef\u76f4\u63a5\u7528\u4e8e\u4e2a\u4eba\u79c1\u6709\u5316\u90e8\u7f72\u3001\u81ea\u5b9a\u4e49\u5de5\u4f5c\u6d41\u9002\u914d\u3001\u4e8c\u6b21\u8fed\u4ee3\u5f00\u53d1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u524d\u5168\u7f51\u6240\u6709 OpenClaw Tavily \u6559\u7a0b\uff0c\u4ec5\u505c\u7559\u5728\u300c\u914d\u7f6e\u5bc6\u94a5\u3001\u5f00\u542f\u539f\u751f\u6280\u80fd\u300d\u7684\u57fa\u7840\u5165\u95e8\u9636\u6bb5\uff0c\u65e0\u4eba\u6df1\u6316 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-mianfeiercikaifalongxiaskill"],"_links":{"self":[{"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":1,"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":68,"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions\/68"}],"wp:attachment":[{"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.longxiapro.com\/index.php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}