[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-toolkit-ai--toolkit-ai":3,"tool-toolkit-ai--toolkit-ai":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",143909,2,"2026-04-07T11:33:18",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":64,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":76,"owner_website":78,"owner_url":79,"languages":80,"stars":97,"forks":98,"last_commit_at":99,"license":76,"difficulty_score":32,"env_os":100,"env_gpu":101,"env_ram":100,"env_deps":102,"category_tags":108,"github_topics":76,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":109,"updated_at":110,"faqs":111,"releases":112},5070,"toolkit-ai\u002Ftoolkit-ai","toolkit-ai","AI-agents that automatically generate and use Langchain Tools and ChatGPT plugins","Toolkit AI 是一款专为简化 AI 智能体开发而设计的开源工具，它能够根据用户的自然语言描述，自动生成并集成 LangChain 工具及 ChatGPT 插件。在传统开发流程中，构建功能完善的 AI 插件往往需要编写大量样板代码并处理复杂的逻辑验证，这不仅耗时且容易出错。Toolkit AI 通过引入自动化代码生成机制，让开发者只需清晰描述工具的功能需求（例如“将华氏温度转换为摄氏温度”），即可快速获得包含完整输入输出校验、错误处理及核心逻辑的可执行代码，从而大幅降低开发门槛并提升迭代效率。\n\n该工具特别适合希望快速扩展 AI 助手能力的开发者、LangChain 框架使用者以及致力于构建定制化 AI 代理的研究人员。其核心技术亮点在于能够自动解析用户意图，生成符合严格 JSON Schema 规范的代码，并内置了数据验证机制以确保工具运行的稳定性。此外，Toolkit AI 支持 CLI 命令行操作与 npm 包调用，生成的代码可直接嵌入现有项目，甚至具备让 Agent 自动运行并持续优化工具的潜力。无论是想为产品添加特定领域知识，还是希望团队更高效地利用 AI 完成任务，T","Toolkit AI 是一款专为简化 AI 智能体开发而设计的开源工具，它能够根据用户的自然语言描述，自动生成并集成 LangChain 工具及 ChatGPT 插件。在传统开发流程中，构建功能完善的 AI 插件往往需要编写大量样板代码并处理复杂的逻辑验证，这不仅耗时且容易出错。Toolkit AI 通过引入自动化代码生成机制，让开发者只需清晰描述工具的功能需求（例如“将华氏温度转换为摄氏温度”），即可快速获得包含完整输入输出校验、错误处理及核心逻辑的可执行代码，从而大幅降低开发门槛并提升迭代效率。\n\n该工具特别适合希望快速扩展 AI 助手能力的开发者、LangChain 框架使用者以及致力于构建定制化 AI 代理的研究人员。其核心技术亮点在于能够自动解析用户意图，生成符合严格 JSON Schema 规范的代码，并内置了数据验证机制以确保工具运行的稳定性。此外，Toolkit AI 支持 CLI 命令行操作与 npm 包调用，生成的代码可直接嵌入现有项目，甚至具备让 Agent 自动运行并持续优化工具的潜力。无论是想为产品添加特定领域知识，还是希望团队更高效地利用 AI 完成任务，Toolkit AI 都能提供流畅、专业的开发体验。","# 🧰 Toolkit AI\n\nToolkit is an easy way to generate and use AI plugins. Generate code for 🦜 🔗 LangChain plugins by just describing what they should do.\n\nYou can also try out the hosted version at [toolkit.club](https:\u002F\u002Ftoolkit.club)\n\nThis project is brought to you by the team from [Pal](https:\u002F\u002Fwww.heypal.chat) - an easy way to make an AI assistant that knows about your product, and has access to a wide set of tools to help your customers & team get more done.\n\n## Roadmap\n- [x] Generate LangChain tools via the npm package\n- [x] CLI-based usage\n- [x] Agent auto-runs & continually improve the tool\n- [ ] ChatGPT plugin definition & hosting\n\n## Usage\nYou can import this package, and generate a tool from your code. \n\nyarn\n```js\nyarn add @heypal\u002Ftoolkit-ai\n```\n\npnpm\n```js\npnpm add @heypal\u002Ftoolkit-ai\n```\n\n```typescript\nimport Toolkit from '@heypal\u002Ftoolkit-ai';\n\n\u002F\u002F OpenAI API key can optionally be set here, or the underlying model\n\u002F\u002F will use the environment variable OPENAI_API_KEY\nconst toolkit = new Toolkit({\n  openAIApiKey: '',\n});\n\n(async () => {\n  const tool = await toolkit.generateTool({\n    name: 'Temperature Converter',\n    description:\n      'Converts a temperature from Farenheit, Celsius, or Kelvin to any other unit.',\n  });\n\n  console.log(tool.langChainCode);\n})();\n```\n\nWe've also made an easy library you can try out the tools you generate here: \n[hey-pal\u002Flangchain-tools-demo](https:\u002F\u002Fgithub.com\u002Fhey-pal\u002Flangchain-tools-demo)\n\n### Sample Output of Generating a Tool\n\nThe output will be a Tool object, that will include an implementation of the LangchainCode. Below is an example output that was generated for a LangChain tool\n\n\u003Cdetails>\n\u003Csummary>Example LangChain Tool Code Output\u003C\u002Fsummary>\n\n```javascript\nimport { Tool } from 'langchain\u002Fagents';\nimport Ajv from 'ajv';\n\n\u002F\u002F The following is the actual code that will be\n\u002F\u002F run by the tool when it is called\nfunction call({ value, fromUnit, toUnit }) {\n  let convertedValue;\n\n  if (fromUnit === \"Fahrenheit\") {\n    if (toUnit === \"Celsius\") {\n      convertedValue = ((value - 32) * 5) \u002F 9;\n    } else if (toUnit === \"Kelvin\") {\n      convertedValue = ((value - 32) * 5) \u002F 9 + 273.15;\n    } else {\n      convertedValue = value;\n    }\n  } else if (fromUnit === \"Celsius\") {\n    if (toUnit === \"Fahrenheit\") {\n      convertedValue = (value * 9) \u002F 5 + 32;\n    } else if (toUnit === \"Kelvin\") {\n      convertedValue = value + 273.15;\n    } else {\n      convertedValue = value;\n    }\n  } else if (fromUnit === \"Kelvin\") {\n    if (toUnit === \"Fahrenheit\") {\n      convertedValue = ((value - 273.15) * 9) \u002F 5 + 32;\n    } else if (toUnit === \"Celsius\") {\n      convertedValue = value - 273.15;\n    } else {\n      convertedValue = value;\n    }\n  }\n\n  return { convertedValue };\n}\n\n\u002F\u002F This is a class that corresponds to the Langchain tool definition\n\u002F\u002F https:\u002F\u002Fjs.langchain.com\u002Fdocs\u002Fmodules\u002Fagents\u002Ftools\u002F\n\u002F\u002F It validates the input & output against the schemas\n\u002F\u002F and then it calls the tool code\nclass TemperatureConverter extends Tool {\n  name = 'temperature-converter';\n  \n  description = `Converts a temperature from Fahrenheit, Celsius, or Kelvin to any other unit. The action input should adhere to this JSON schema:\n{{\"type\":\"object\",\"properties\":{{\"value\":{{\"type\":\"number\",\"description\":\"The temperature value to be converted.\"}},\"fromUnit\":{{\"type\":\"string\",\"enum\":[\"Fahrenheit\",\"Celsius\",\"Kelvin\"],\"description\":\"The unit of the input temperature value.\"}},\"toUnit\":{{\"type\":\"string\",\"enum\":[\"Fahrenheit\",\"Celsius\",\"Kelvin\"],\"description\":\"The unit to which the temperature value should be converted.\"}}}},\"required\":[\"value\",\"fromUnit\",\"toUnit\"]}}`;\n  \n  ajv = new Ajv();\n\n  inputSchema = {\n    \"type\": \"object\",\n    \"properties\": {\n      \"value\": {\n        \"type\": \"number\",\n        \"description\": \"The temperature value to be converted.\"\n      },\n      \"fromUnit\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"Fahrenheit\",\n          \"Celsius\",\n          \"Kelvin\"\n        ],\n        \"description\": \"The unit of the input temperature value.\"\n      },\n      \"toUnit\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"Fahrenheit\",\n          \"Celsius\",\n          \"Kelvin\"\n        ],\n        \"description\": \"The unit to which the temperature value should be converted.\"\n      }\n    },\n    \"required\": [\n      \"value\",\n      \"fromUnit\",\n      \"toUnit\"\n    ]\n  };\n  \n  outputSchema = {\n    \"type\": \"object\",\n    \"properties\": {\n      \"convertedValue\": {\n        \"type\": \"number\",\n        \"description\": \"The converted temperature value in the desired unit.\"\n      }\n    },\n    \"required\": [\n      \"convertedValue\"\n    ]\n  };\n\n  validate(data, schema) {\n    if (schema) {\n      const validateSchema = this.ajv.compile(schema);\n      if (!validateSchema(data)) {\n        throw new Error(this.ajv.errorsText(validateSchema.errors));\n      }\n    }\n  }\n\n  async _call(arg) {\n    let output;\n    try {\n      const input = JSON.parse(arg);\n      this.validate(input, this.inputSchema);\n      output = await call(input);\n      try {\n        this.validate(output, this.outputSchema);\n      } catch (err) {\n        throw new Error(`${err.message}: ${JSON.stringify(output)}`);\n      }\n    } catch (err) {\n      output = { error: err.message || err };\n    }\n    return JSON.stringify(output);\n  }\n}\n\nexport default TemperatureConverter;\n```\n\u003C\u002Fdetails>\n\n## Toolkit Iterate CLI\n\nIf you'd like to try a longer-running tool generation process that utilizes self-evaluating agents, you can use the `toolkit-iterate` CLI:\n\n1. Ensure [Docker](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002F) is installed on your system\n2. Install this package globally: `npm install -g @heypal\u002Ftoolkit-ai`\n3. Create a JSON file with your partial tool specification, something like:\n```json\n{ \"name\": \"Adder\", \"description\": \"Adds two numbers together\" }\n```\n4. Run the CLI:\n```sh\ntoolkit-iterate -v --inputJson=\u002Fpath\u002Fto\u002Fspec.json --outputJs=\u002Fpath\u002Fto\u002Foutput.js --openAIApiKey=xyz --serpApiKey=xyz\n```\n\nYour API keys can also be read from the environment, using the variables `OPENAI_API_KEY` and `SERP_API_KEY`.\n","# 🧰 AI 工具包\n\nToolkit 是一种简单的方式来生成和使用 AI 插件。只需描述插件的功能，即可生成 🦜 🔗 LangChain 插件的代码。\n\n你也可以在 [toolkit.club](https:\u002F\u002Ftoolkit.club) 上试用托管版本。\n\n本项目由 [Pal](https:\u002F\u002Fwww.heypal.chat) 团队打造——一个轻松创建能够理解你的产品、并可访问多种工具以帮助客户和团队提高效率的 AI 助手的平台。\n\n## 路线图\n- [x] 通过 npm 包生成 LangChain 工具\n- [x] 基于命令行的使用方式\n- [x] 自动运行的代理，并持续优化工具\n- [ ] ChatGPT 插件定义与托管\n\n## 使用方法\n你可以直接引入这个包，并从你的代码中生成工具。\n\nYarn:\n```js\nyarn add @heypal\u002Ftoolkit-ai\n```\n\nPNPM:\n```js\npnpm add @heypal\u002Ftoolkit-ai\n```\n\n```typescript\nimport Toolkit from '@heypal\u002Ftoolkit-ai';\n\n\u002F\u002F OpenAI API 密钥可以在这里选择性地设置，否则底层模型会使用环境变量 OPENAI_API_KEY\nconst toolkit = new Toolkit({\n  openAIApiKey: '',\n});\n\n(async () => {\n  const tool = await toolkit.generateTool({\n    name: '温度转换器',\n    description:\n      '将温度从华氏度、摄氏度或开尔文转换为任何其他单位。',\n  });\n\n  console.log(tool.langChainCode);\n})();\n```\n\n我们还提供了一个简单的库，供你试用在此生成的工具：[hey-pal\u002Flangchain-tools-demo](https:\u002F\u002Fgithub.com\u002Fhey-pal\u002Flangchain-tools-demo)\n\n### 生成工具的示例输出\n\n输出将是一个 Tool 对象，其中包含 LangChain 代码的实现。以下是为 LangChain 工具生成的一个示例：\n\n\u003Cdetails>\n\u003Csummary>LangChain 工具代码示例\u003C\u002Fsummary>\n\n```javascript\nimport { Tool } from 'langchain\u002Fagents';\nimport Ajv from 'ajv';\n\n\u002F\u002F 以下为工具被调用时实际执行的代码\nfunction call({ value, fromUnit, toUnit }) {\n  let convertedValue;\n\n  if (fromUnit === \"Fahrenheit\") {\n    if (toUnit === \"Celsius\") {\n      convertedValue = ((value - 32) * 5) \u002F 9;\n    } else if (toUnit === \"Kelvin\") {\n      convertedValue = ((value - 32) * 5) \u002F 9 + 273.15;\n    } else {\n      convertedValue = value;\n    }\n  } else if (fromUnit === \"Celsius\") {\n    if (toUnit === \"Fahrenheit\") {\n      convertedValue = (value * 9) \u002F 5 + 32;\n    } else if (toUnit === \"Kelvin\") {\n      convertedValue = value + 273.15;\n    } else {\n      convertedValue = value;\n    }\n  } else if (fromUnit === \"Kelvin\") {\n    if (toUnit === \"Fahrenheit\") {\n      convertedValue = ((value - 273.15) * 9) \u002F 5 + 32;\n    } else if (toUnit === \"Celsius\") {\n      convertedValue = value - 273.15;\n    } else {\n      convertedValue = value;\n    }\n  }\n\n  return { convertedValue };\n}\n\n\u002F\u002F 这是一个对应于 LangChain 工具定义的类\n\u002F\u002F https:\u002F\u002Fjs.langchain.com\u002Fdocs\u002Fmodules\u002Fagents\u002Ftools\u002F\n\u002F\u002F 它会根据模式验证输入和输出，然后调用工具代码\nclass TemperatureConverter extends Tool {\n  name = 'temperature-converter';\n  \n  description = `将温度从华氏度、摄氏度或开尔文转换为任何其他单位。操作输入应符合以下 JSON 模式：\n{{\"type\":\"object\",\"properties\":{{\"value\":{{\"type\":\"number\",\"description\":\"需要转换的温度值.\"}},\"fromUnit\":{{\"type\":\"string\",\"enum\":[\"Fahrenheit\",\"Celsius\",\"Kelvin\"],\"description\":\"输入温度的单位.\"}},\"toUnit\":{{\"type\":\"string\",\"enum\":[\"Fahrenheit\",\"Celsius\",\"Kelvin\"],\"description\":\"目标温度的单位.\"}}}},\"required\":[\"value\",\"fromUnit\",\"toUnit\"]}}`;\n  \n  ajv = new Ajv();\n\n  inputSchema = {\n    \"type\": \"object\",\n    \"properties\": {\n      \"value\": {\n        \"type\": \"number\",\n        \"description\": \"需要转换的温度值\"\n      },\n      \"fromUnit\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"Fahrenheit\",\n          \"Celsius\",\n          \"Kelvin\"\n        ],\n        \"description\": \"输入温度的单位\"\n      },\n      \"toUnit\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"Fahrenheit\",\n          \"Celsius\",\n          \"Kelvin\"\n        ],\n        \"description\": \"目标温度的单位\"\n      }\n    },\n    \"required\": [\n      \"value\",\n      \"fromUnit\",\n      \"toUnit\"\n    ]\n  };\n  \n  outputSchema = {\n    \"type\": \"object\",\n    \"properties\": {\n      \"convertedValue\": {\n        \"type\": \"number\",\n        \"description\": \"转换后的温度值，在目标单位下\"\n      }\n    },\n    \"required\": [\n      \"convertedValue\"\n    ]\n  };\n\n  validate(data, schema) {\n    if (schema) {\n      const validateSchema = this.ajv.compile(schema);\n      if (!validateSchema(data)) {\n        throw new Error(this.ajv.errorsText(validateSchema.errors));\n      }\n    }\n  }\n\n  async _call(arg) {\n    let output;\n    try {\n      const input = JSON.parse(arg);\n      this.validate(input, this.inputSchema);\n      output = await call(input);\n      try {\n        this.validate(output, this.outputSchema);\n      } catch (err) {\n        throw new Error(`${err.message}: ${JSON.stringify(output)}`);\n      }\n    } catch (err) {\n      output = { error: err.message || err };\n    }\n    return JSON.stringify(output);\n  }\n}\n\nexport default TemperatureConverter;\n```\n\u003C\u002Fdetails>\n\n## Toolkit Iterate 命令行工具\n\n如果你想尝试一个更长时间运行、利用自我评估代理的工具生成流程，可以使用 `toolkit-iterate` 命令行工具：\n\n1. 确保你的系统已安装 [Docker](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002F)。\n2. 全局安装此包：`npm install -g @heypal\u002Ftoolkit-ai`。\n3. 创建一个包含部分工具规范的 JSON 文件，例如：\n```json\n{ \"name\": \"加法器\", \"description\": \"将两个数字相加\" }\n```\n4. 运行命令行工具：\n```sh\ntoolkit-iterate -v --inputJson=\u002Fpath\u002Fto\u002Fspec.json --outputJs=\u002Fpath\u002Fto\u002Foutput.js --openAIApiKey=xyz --serpApiKey=xyz\n```\n\n你的 API 密钥也可以从环境变量 `OPENAI_API_KEY` 和 `SERP_API_KEY` 中读取。","# Toolkit AI 快速上手指南\n\nToolkit AI 是一个用于生成和使用 AI 插件的便捷工具。只需描述功能需求，它即可自动生成适用于 🦜 🔗 LangChain 的插件代码。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **Node.js**: 建议安装 LTS 版本（支持 npm, yarn, pnpm）。\n*   **Docker** (可选): 仅当您打算使用 `toolkit-iterate` CLI 进行基于代理的自动迭代优化时需要安装。\n*   **API Key**: 需要有效的 OpenAI API Key (`OPENAI_API_KEY`)。若使用迭代模式，可能还需要 SerpApi Key (`SERP_API_KEY`)。\n\n> **提示**：国内开发者如遇网络问题，可配置 `.npmrc` 使用淘宝镜像源加速依赖安装：\n> ```bash\n> npm config set registry https:\u002F\u002Fregistry.npmmirror.com\n> ```\n\n## 安装步骤\n\n您可以选择常用的包管理器将 Toolkit AI 集成到项目中。\n\n**使用 Yarn:**\n```bash\nyarn add @heypal\u002Ftoolkit-ai\n```\n\n**使用 PNPM:**\n```bash\npnpm add @heypal\u002Ftoolkit-ai\n```\n\n**全局安装 (仅用于 CLI 模式):**\n如果您需要使用命令行工具进行自动化迭代生成：\n```bash\nnpm install -g @heypal\u002Ftoolkit-ai\n```\n\n## 基本使用\n\n### 1. 代码生成模式 (推荐)\n\n这是最简单的使用方式。通过引入库并描述工具功能，即可自动生成 LangChain 兼容的代码。\n\n创建一个新的 TypeScript 或 JavaScript 文件（例如 `generate.ts`），填入以下代码：\n\n```typescript\nimport Toolkit from '@heypal\u002Ftoolkit-ai';\n\n\u002F\u002F OpenAI API key 可以在此处设置，或者工具将默认使用环境变量 OPENAI_API_KEY\nconst toolkit = new Toolkit({\n  openAIApiKey: '', \u002F\u002F 在此填入您的 API Key，或留空使用环境变量\n});\n\n(async () => {\n  const tool = await toolkit.generateTool({\n    name: 'Temperature Converter',\n    description:\n      'Converts a temperature from Farenheit, Celsius, or Kelvin to any other unit.',\n  });\n\n  console.log(tool.langChainCode);\n})();\n```\n\n运行该脚本后，控制台将输出完整的 LangChain Tool 类代码，包含输入\u002F输出验证逻辑及核心业务函数，您可以直接将其复制到项目中使用。\n\n### 2. 命令行迭代模式 (高级)\n\n如果您希望利用自评估代理（Agent）来持续改进工具代码，可以使用 `toolkit-iterate` 命令。\n\n1.  **准备配置文件**：创建一个 JSON 文件（如 `spec.json`），定义工具的基本规范：\n    ```json\n    { \"name\": \"Adder\", \"description\": \"Adds two numbers together\" }\n    ```\n\n2.  **执行命令**：\n    ```sh\n    toolkit-iterate -v --inputJson=\u002Fpath\u002Fto\u002Fspec.json --outputJs=\u002Fpath\u002Fto\u002Foutput.js --openAIApiKey=xyz --serpApiKey=xyz\n    ```\n\n    *注：您也可以省略命令行中的 Key 参数，提前在环境变量中设置 `OPENAI_API_KEY` 和 `SERP_API_KEY`。*","某电商平台的后端团队需要为智能客服机器人快速集成“订单物流状态查询”和“库存实时校验”两个自定义功能，以响应用户的自然语言提问。\n\n### 没有 toolkit-ai 时\n- 开发人员需手动编写繁琐的 LangChain Tool 类代码，包括定义输入输出的 JSON Schema、参数校验逻辑及具体的 API 调用函数，耗时且易出错。\n- 每次新增业务工具（如退款进度查询）都要重复造轮子，导致开发周期长，难以跟上产品迭代速度。\n- 缺乏自动化的参数验证机制，若用户输入格式错误，容易导致 Agent 运行崩溃或返回不可控的错误信息。\n- 非 AI 专业的后端工程师需要深入理解 LangChain 框架细节才能完成对接，技术门槛高，协作效率低。\n\n### 使用 toolkit-ai 后\n- 开发者只需用自然语言描述“查询订单物流状态”的功能需求，toolkit-ai 即可自动生成包含完整校验逻辑和执行代码的 LangChain Tool。\n- 新增工具的时间从数小时缩短至几分钟，团队能迅速响应业务变化，即时上线库存预警、促销计算等新能力。\n- 生成的代码内置了严格的 Ajv 参数校验 schema，确保 Agent 在处理用户模糊指令时也能稳定运行，大幅降低运行时错误。\n- 后端人员无需深究 LangChain 底层实现，只需关注业务逻辑描述，让普通开发工程师也能轻松构建高质量的 AI 插件。\n\ntoolkit-ai 通过将自然语言描述直接转化为可执行的标准代码，彻底消除了自定义 AI 工具的开发壁垒，让智能体能力的扩展变得像对话一样简单。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftoolkit-ai_toolkit-ai_28f31612.png","Magnet (Toolkit)","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Ftoolkit-ai_aa8cb1f4.png","Build software with AI",null,"devs@magnet.run","magnet.run","https:\u002F\u002Fgithub.com\u002Ftoolkit-ai",[81,85,89,93],{"name":82,"color":83,"percentage":84},"TypeScript","#3178c6",87.9,{"name":86,"color":87,"percentage":88},"Handlebars","#f7931e",10,{"name":90,"color":91,"percentage":92},"JavaScript","#f1e05a",1.7,{"name":94,"color":95,"percentage":96},"Shell","#89e051",0.4,534,36,"2026-03-30T15:50:46","未说明","不需要",{"notes":103,"python":101,"dependencies":104},"该工具基于 Node.js 运行，需安装 Docker 以使用 toolkit-iterate CLI 功能。主要依赖 OpenAI API（需设置 OPENAI_API_KEY），部分高级功能可能需要 SERP_API_KEY。通过 yarn、pnpm 或 npm 安装，无需 Python 环境或 GPU 支持。",[105,106,107],"@heypal\u002Ftoolkit-ai","langchain","ajv",[35,13,52],"2026-03-27T02:49:30.150509","2026-04-07T22:51:02.624063",[],[]]