[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-sigoden--llm-functions":3,"similar-sigoden--llm-functions":103},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":15,"owner_avatar_url":16,"owner_bio":15,"owner_company":15,"owner_location":15,"owner_email":17,"owner_twitter":15,"owner_website":15,"owner_url":18,"languages":19,"stars":36,"forks":37,"last_commit_at":38,"license":39,"difficulty_score":40,"env_os":41,"env_gpu":42,"env_ram":42,"env_deps":43,"category_tags":51,"github_topics":56,"view_count":40,"oss_zip_url":15,"oss_zip_packed_at":15,"status":66,"created_at":67,"updated_at":68,"faqs":69,"releases":102},3599,"sigoden\u002Fllm-functions","llm-functions","Easily create LLM tools and agents using plain Bash\u002FJavaScript\u002FPython functions.","llm-functions 是一款让开发者能够轻松构建大语言模型（LLM）工具与智能体的开源项目。它打破了传统集成的高门槛，允许用户直接使用熟悉的 Bash、JavaScript 或 Python 编写普通函数，即可将其转化为 LLM 可调用的强大能力。\n\n该项目主要解决了大模型与现实世界交互的难题。通过利用“函数调用”技术，llm-functions 能让 AI 直接执行系统命令、处理数据或对接各类 API，从而将大模型的对话能力延伸至实际操作层面，实现从“只会聊天”到“能办实事”的跨越。\n\n这款工具特别适合具备一定编程基础的开发者和技术研究人员使用。如果你希望自定义 AI 助手的行为，或者需要将现有脚本快速接入大模型工作流，llm-functions 提供了极佳的解决方案。其独特的技术亮点在于“约定优于配置”的设计理念：只需在代码中添加标准化的注释，项目即可自动解析并生成所需的 JSON 声明文件，无需手动编写复杂的配置。此外，它目前能与 AIChat 命令行工具无缝协作，让用户能迅速搭建起个性化的本地 AI 代理系统，极大地提升了开发效率与灵活性。","# LLM Functions\n\nThis project empowers you to effortlessly build powerful LLM tools and agents using familiar languages like Bash, JavaScript, and Python. \n\nForget complex integrations, **harness the power of [function calling](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)** to connect your LLMs directly to custom code and unlock a world of possibilities. Execute system commands, process data, interact with APIs –  the only limit is your imagination.\n\n**Tools Showcase**\n![llm-function-tool](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_llm-functions_readme_95f360929042.png)\n\n**Agents showcase**\n![llm-function-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_llm-functions_readme_608b37caf677.png)\n\n## Prerequisites\n\nMake sure you have the following tools installed:\n\n- [argc](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fargc): A bash command-line framework and command runner\n- [jq](https:\u002F\u002Fgithub.com\u002Fjqlang\u002Fjq): A JSON processor\n\n## Getting Started with [AIChat](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat)\n\n**Currently, AIChat is the only CLI tool that supports `llm-functions`. We look forward to more tools supporting `llm-functions`.**\n\n### 1. Clone the repository\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\ncd llm-functions\n```\n\n### 2. Build tools and agents\n\n#### I. Create a `.\u002Ftools.txt` file with each tool filename on a new line.\n\n```\nget_current_weather.sh\nexecute_command.sh\n#execute_py_code.py\n``` \n\n\u003Cdetails>\n\u003Csummary>Where is the web_search tool?\u003C\u002Fsummary>\n\u003Cbr>\n\nThe `web_search` tool itself doesn't exist directly, Instead, you can choose from a variety of web search tools.\n\nTo use one as the `web_search` tool, follow these steps:\n\n1. **Choose a Tool:** Available tools include:\n    * `web_search_cohere.sh`\n    * `web_search_perplexity.sh`\n    * `web_search_tavily.sh`\n    * `web_search_vertexai.sh`\n\n2. **Link Your Choice:** Use the `argc` command to link your chosen tool as `web_search`. For example, to use `web_search_perplexity.sh`:\n\n    ```sh\n    $ argc link-web-search web_search_perplexity.sh\n    ```\n\n    This command creates a symbolic link, making `web_search.sh` point to your selected `web_search_perplexity.sh` tool. \n\nNow there is a `web_search.sh` ready to be added to your `.\u002Ftools.txt`.\n\n\u003C\u002Fdetails>\n\n#### II. Create a `.\u002Fagents.txt` file with each agent name on a new line.\n\n```\ncoder\ntodo\n```\n\n#### III. Build `bin` and `functions.json`\n\n```sh\nargc build\n```\n\n#### IV. Ensure that everything is ready (environment variables, Node\u002FPython dependencies, mcp-bridge server)\n\n```sh\nargc check\n```\n\n### 3. Link LLM-functions and AIChat\n\nAIChat expects LLM-functions to be placed in AIChat's **functions_dir** so that AIChat can use the tools and agents that LLM-functions provides.\n\nYou can symlink this repository directory to AIChat's **functions_dir** with:\n\n```sh\nln -s \"$(pwd)\" \"$(aichat --info | sed -n 's\u002F^functions_dir\\s\\+\u002F\u002Fp')\"\n# OR\nargc link-to-aichat\n```\n\nAlternatively, you can tell AIChat where the LLM-functions directory is by using an environment variable:\n\n```sh\nexport AICHAT_FUNCTIONS_DIR=\"$(pwd)\"\n```\n\n### 4. Start using the functions\n\nDone! Now you can use the tools and agents with AIChat.\n\n```sh\naichat --role %functions% what is the weather in Paris?\naichat --agent todo list all my todos\n```\n\n## Writing Your Own Tools\n\nBuilding tools for our platform is remarkably straightforward. You can leverage your existing programming knowledge, as tools are essentially just functions written in your preferred language.\n\nLLM Functions automatically generates the JSON declarations for the tools based on **comments**. Refer to `.\u002Ftools\u002Fdemo_tool.{sh,js,py}` for examples of how to use comments for autogeneration of declarations.\n\n### Bash\n\nCreate a new bashscript in the [.\u002Ftools\u002F](.\u002Ftools\u002F) directory (.e.g. `execute_command.sh`).\n\n```sh\n#!\u002Fusr\u002Fbin\u002Fenv bash\nset -e\n\n# @describe Execute the shell command.\n# @option --command! The command to execute.\n\nmain() {\n    eval \"$argc_command\" >> \"$LLM_OUTPUT\"\n}\n\neval \"$(argc --argc-eval \"$0\" \"$@\")\"\n```\n\n### Javascript\n\nCreate a new javascript in the [.\u002Ftools\u002F](.\u002Ftools\u002F) directory (.e.g. `execute_js_code.js`).\n\n```js\n\u002F**\n * Execute the javascript code in node.js.\n * @typedef {Object} Args\n * @property {string} code - Javascript code to execute, such as `console.log(\"hello world\")`\n * @param {Args} args\n *\u002F\nexports.run = function ({ code }) {\n  eval(code);\n}\n\n```\n\n### Python\n\nCreate a new python script in the [.\u002Ftools\u002F](.\u002Ftools\u002F) directory (e.g. `execute_py_code.py`).\n\n```py\ndef run(code: str):\n    \"\"\"Execute the python code.\n    Args:\n        code: Python code to execute, such as `print(\"hello world\")`\n    \"\"\"\n    exec(code)\n\n```\n\n## Writing Your Own Agents\n\nAgent = Prompt + Tools (Function Calling) + Documents (RAG), which is equivalent to OpenAI's GPTs.\n\nThe agent has the following folder structure:\n```\n└── agents\n    └── myagent\n        ├── functions.json                  # JSON declarations for functions (Auto-generated)\n        ├── index.yaml                      # Agent definition\n        ├── tools.txt                       # Shared tools\n        └── tools.{sh,js,py}                # Agent tools \n```\n\nThe agent definition file (`index.yaml`) defines crucial aspects of your agent:\n\n```yaml\nname: TestAgent                             \ndescription: This is test agent\nversion: 0.1.0\ninstructions: You are a test ai agent to ... \nconversation_starters:\n  - What can you do?\nvariables:\n  - name: foo\n    description: This is a foo\ndocuments:\n  - local-file.txt\n  - local-dir\u002F\n  - https:\u002F\u002Fexample.com\u002Fremote-file.txt\n```\n\nRefer to [.\u002Fagents\u002Fdemo](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Ftree\u002Fmain\u002Fagents\u002Fdemo) for examples of how to implement a agent.\n\n## MCP (Model Context Protocol)\n\n- [mcp\u002Fserver](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Ftree\u002Fmain\u002Fmcp\u002Fserver): Let LLM-Functions tools\u002Fagents be used through the Model Context Protocol. \n- [mcp\u002Fbridge](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Ftree\u002Fmain\u002Fmcp\u002Fbridge): Let external MCP tools be used by LLM-Functions.\n\n## Documents\n\n- [Tool Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002Fdocs\u002Ftool.md)\n- [Agent Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002Fdocs\u002Fagent.md)\n- [Argc Commands](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002Fdocs\u002Fargcfile.md)\n\n## License\n\nThe project is under the MIT License, Refer to the [LICENSE](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002FLICENSE) file for detailed information.\n","# LLM 功能\n\n本项目使您能够使用熟悉的语言（如 Bash、JavaScript 和 Python）轻松构建强大的 LLM 工具和智能体。\n\n无需复杂的集成，**利用 [函数调用](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)** 的强大功能，将您的 LLM 直接连接到自定义代码，开启无限可能。执行系统命令、处理数据、与 API 交互——唯一的限制就是您的想象力。\n\n**工具展示**\n![llm-function-tool](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_llm-functions_readme_95f360929042.png)\n\n**智能体展示**\n![llm-function-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_llm-functions_readme_608b37caf677.png)\n\n## 先决条件\n\n请确保已安装以下工具：\n\n- [argc](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fargc)：一个 Bash 命令行框架和命令运行器\n- [jq](https:\u002F\u002Fgithub.com\u002Fjqlang\u002Fjq)：一个 JSON 处理器\n\n## 使用 [AIChat](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat) 入门\n\n**目前，AIChat 是唯一支持 `llm-functions` 的 CLI 工具。我们期待更多工具能够支持 `llm-functions`。**\n\n### 1. 克隆仓库\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\ncd llm-functions\n```\n\n### 2. 构建工具和智能体\n\n#### I. 创建一个 `.\u002Ftools.txt` 文件，每行写一个工具文件名。\n\n```\nget_current_weather.sh\nexecute_command.sh\n#execute_py_code.py\n``` \n\n\u003Cdetails>\n\u003Csummary>web_search 工具在哪里？\u003C\u002Fsummary>\n\u003Cbr>\n\n`web_search` 工具本身并不存在，您可以从多种网络搜索工具中选择。\n\n要将其用作 `web_search` 工具，请按照以下步骤操作：\n\n1. **选择工具：** 可用的工具包括：\n    * `web_search_cohere.sh`\n    * `web_search_perplexity.sh`\n    * `web_search_tavily.sh`\n    * `web_search_vertexai.sh`\n\n2. **链接所选工具：** 使用 `argc` 命令将您选择的工具链接为 `web_search`。例如，使用 `web_search_perplexity.sh`：\n\n    ```sh\n    $ argc link-web-search web_search_perplexity.sh\n    ```\n\n    此命令会创建一个符号链接，使 `web_search.sh` 指向您选择的 `web_search_perplexity.sh` 工具。\n\n现在，`web_search.sh` 就可以添加到您的 `.\u002Ftools.txt` 中了。\n\n\u003C\u002Fdetails>\n\n#### II. 创建一个 `.\u002Fagents.txt` 文件，每行写一个智能体名称。\n\n```\ncoder\ntodo\n```\n\n#### III. 构建 `bin` 和 `functions.json`\n\n```sh\nargc build\n```\n\n#### IV. 确保一切准备就绪（环境变量、Node\u002FPython 依赖、mcp-bridge 服务器）\n\n```sh\nargc check\n```\n\n### 3. 链接 LLM-functions 和 AIChat\n\nAIChat 期望 LLM-functions 放置在 AIChat 的 **functions_dir** 中，以便 AIChat 能够使用 LLM-functions 提供的工具和智能体。\n\n您可以通过以下命令将此仓库目录软链接到 AIChat 的 **functions_dir**：\n\n```sh\nln -s \"$(pwd)\" \"$(aichat --info | sed -n 's\u002F^functions_dir\\s\\+\u002F\u002Fp')\"\n# 或者\nargc link-to-aichat\n```\n\n或者，您也可以通过设置环境变量来告诉 AIChat LLM-functions 目录的位置：\n\n```sh\nexport AICHAT_FUNCTIONS_DIR=\"$(pwd)\"\n```\n\n### 4. 开始使用这些功能\n\n完成！现在您可以用 AIChat 使用这些工具和智能体。\n\n```sh\naichat --role %functions% 巴黎的天气如何？\naichat --agent todo 列出我所有的待办事项\n```\n\n## 编写您自己的工具\n\n为我们的平台构建工具非常简单。您可以利用现有的编程知识，因为工具本质上只是用您喜欢的语言编写的函数。\n\nLLM Functions 会根据 **注释** 自动为工具生成 JSON 声明。请参考 `.\u002Ftools\u002Fdemo_tool.{sh,js,py}`，了解如何使用注释来自动生成声明。\n\n### Bash\n\n在 [.\u002Ftools\u002F](.\u002Ftools\u002F) 目录下创建一个新的 Bash 脚本（例如 `execute_command.sh`）。\n\n```sh\n#!\u002Fusr\u002Fbin\u002Fenv bash\nset -e\n\n# @describe 执行 Shell 命令。\n# @option --command! 要执行的命令。\n\nmain() {\n    eval \"$argc_command\" >> \"$LLM_OUTPUT\"\n}\n\neval \"$(argc --argc-eval \"$0\" \"$@\")\"\n```\n\n### Javascript\n\n在 [.\u002Ftools\u002F](.\u002Ftools\u002F) 目录下创建一个新的 JavaScript 文件（例如 `execute_js_code.js`）。\n\n```js\n\u002F**\n * 在 Node.js 中执行 JavaScript 代码。\n * @typedef {Object} Args\n * @property {string} code - 要执行的 JavaScript 代码，例如 `console.log(\"hello world\")`\n * @param {Args} args\n *\u002F\nexports.run = function ({ code }) {\n  eval(code);\n}\n```\n\n### Python\n\n在 [.\u002Ftools\u002F](.\u002Ftools\u002F) 目录下创建一个新的 Python 脚本（例如 `execute_py_code.py`）。\n\n```py\ndef run(code: str):\n    \"\"\"执行 Python 代码。\n    Args:\n        code: 要执行的 Python 代码，例如 `print(\"hello world\")`\n    \"\"\"\n    exec(code)\n\n```\n\n## 编写您自己的智能体\n\n智能体 = 提示词 + 工具（函数调用）+ 文档（RAG），这相当于 OpenAI 的 GPTs。\n\n智能体的文件结构如下：\n\n```\n└── agents\n    └── myagent\n        ├── functions.json                  # 函数的 JSON 声明（自动生成）\n        ├── index.yaml                      # 智能体定义\n        ├── tools.txt                       # 共享工具\n        └── tools.{sh,js,py}                # 智能体工具 \n```\n\n智能体定义文件 (`index.yaml`) 定义了您智能体的关键方面：\n\n```yaml\nname: TestAgent                             \ndescription: 这是一个测试智能体\nversion: 0.1.0\ninstructions: 你是一个用于...的测试 AI 智能体\nconversation_starters:\n  - 你能做什么？\nvariables:\n  - name: foo\n    description: 这是一个 foo\ndocuments:\n  - local-file.txt\n  - local-dir\u002F\n  - https:\u002F\u002Fexample.com\u002Fremote-file.txt\n```\n\n有关如何实现智能体的示例，请参阅 [.\u002Fagents\u002Fdemo](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Ftree\u002Fmain\u002Fagents\u002Fdemo)。\n\n## MCP（模型上下文协议）\n\n- [mcp\u002Fserver](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Ftree\u002Fmain\u002Fmcp\u002Fserver)：允许通过模型上下文协议使用 LLM-Functions 的工具\u002F智能体。\n- [mcp\u002Fbridge](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Ftree\u002Fmain\u002Fmcp\u002Fbridge)：允许 LLM-Functions 使用外部 MCP 工具。\n\n## 文档\n\n- [工具指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002Fdocs\u002Ftool.md)\n- [智能体指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002Fdocs\u002Fagent.md)\n- [Argc 命令](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002Fdocs\u002Fargcfile.md)\n\n## 许可证\n\n该项目采用 MIT 许可证。详细信息请参阅 [LICENSE](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fblob\u002Fmain\u002FLICENSE) 文件。","# llm-functions 快速上手指南\n\n`llm-functions` 是一个让你能够使用熟悉的语言（Bash、JavaScript、Python）轻松构建强大 LLM 工具和智能体（Agent）的项目。它利用 **Function Calling** 技术，将大模型直接连接到你的自定义代码，实现执行系统命令、处理数据、调用 API 等功能。\n\n目前，该项目主要配合 **[AIChat](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat)** 命令行工具使用。\n\n## 环境准备\n\n在开始之前，请确保你的系统已安装以下依赖：\n\n1.  **argc**: 一个 Bash 命令行框架和命令运行器。\n    *   安装方式参考：[argc GitHub](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fargc)\n2.  **jq**: 一个强大的 JSON 处理器。\n    *   Ubuntu\u002FDebian: `sudo apt install jq`\n    *   macOS: `brew install jq`\n    *   CentOS\u002FRHEL: `sudo yum install jq`\n3.  **AIChat**: 支持 `llm-functions` 的 CLI 客户端。\n    *   安装方式参考：[AIChat GitHub](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat)\n4.  **运行时环境** (按需):\n    *   若编写 JS 工具，需安装 `Node.js`。\n    *   若编写 Python 工具，需安装 `Python` 及相关依赖。\n\n## 安装步骤\n\n### 1. 克隆项目\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\ncd llm-functions\n```\n\n### 2. 配置工具与智能体\n\n#### 第一步：创建工具列表\n在项目根目录创建 `tools.txt` 文件，每行写入一个你想启用的工具脚本文件名（位于 `.\u002Ftools\u002F` 目录下）。\n\n```text\nget_current_weather.sh\nexecute_command.sh\n#execute_py_code.py\n```\n\n> **关于 Web 搜索工具：**\n> 项目中没有默认的 `web_search.sh`。你需要从现有的搜索工具中选择一个并建立链接。\n> 可选工具：`web_search_cohere.sh`, `web_search_perplexity.sh`, `web_search_tavily.sh`, `web_search_vertexai.sh`。\n>\n> 例如，链接 Perplexity 作为默认搜索工具：\n> ```sh\n> argc link-web-search web_search_perplexity.sh\n> ```\n> 执行后，将 `web_search.sh` 添加到你的 `tools.txt` 中。\n\n#### 第二步：创建智能体列表\n在项目根目录创建 `agents.txt` 文件，每行写入一个你想启用的智能体名称（位于 `.\u002Fagents\u002F` 目录下）。\n\n```text\ncoder\ntodo\n```\n\n#### 第三步：构建项目\n运行以下命令生成 `bin` 目录和 `functions.json` 声明文件：\n\n```sh\nargc build\n```\n\n#### 第四步：环境检查\n运行检查命令，确保环境变量、依赖包及 MCP 桥接服务就绪：\n\n```sh\nargc check\n```\n\n### 3. 关联 AIChat\n\nAIChat 需要知道 `llm-functions` 的位置才能加载工具和智能体。你可以选择以下任一方式：\n\n**方式 A：创建软链接（推荐）**\n将当前目录链接到 AIChat 的默认函数目录：\n\n```sh\nln -s \"$(pwd)\" \"$(aichat --info | sed -n 's\u002F^functions_dir\\s\\+\u002F\u002Fp')\"\n# 或者使用封装好的命令\nargc link-to-aichat\n```\n\n**方式 B：设置环境变量**\n临时或永久导出环境变量指定目录：\n\n```sh\nexport AICHAT_FUNCTIONS_DIR=\"$(pwd)\"\n```\n\n## 基本使用\n\n配置完成后，即可通过 `aichat` 命令调用工具或智能体。\n\n**调用工具示例（查询天气）：**\n```sh\naichat --role %functions% what is the weather in Paris?\n```\n\n**调用智能体示例（管理待办事项）：**\n```sh\naichat --agent todo list all my todos\n```\n\n---\n\n### 进阶：编写自定义工具\n\n你只需在 `.\u002Ftools\u002F` 目录下创建脚本，并通过注释定义参数，系统会自动生成 JSON 声明。\n\n**Bash 示例 (`execute_command.sh`):**\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\nset -e\n\n# @describe Execute the shell command.\n# @option --command! The command to execute.\n\nmain() {\n    eval \"$argc_command\" >> \"$LLM_OUTPUT\"\n}\n\neval \"$(argc --argc-eval \"$0\" \"$@\")\"\n```\n\n**JavaScript 示例 (`execute_js_code.js`):**\n```js\n\u002F**\n * Execute the javascript code in node.js.\n * @typedef {Object} Args\n * @property {string} code - Javascript code to execute, such as `console.log(\"hello world\")`\n * @param {Args} args\n *\u002F\nexports.run = function ({ code }) {\n  eval(code);\n}\n```\n\n**Python 示例 (`execute_py_code.py`):**\n```py\ndef run(code: str):\n    \"\"\"Execute the python code.\n    Args:\n        code: Python code to execute, such as `print(\"hello world\")`\n    \"\"\"\n    exec(code)\n```\n\n### 进阶：编写自定义智能体\n\n智能体由提示词、工具集和文档（RAG）组成。在 `.\u002Fagents\u002F` 下创建文件夹，包含 `index.yaml` 定义文件即可。\n\n**index.yaml 结构示例:**\n```yaml\nname: TestAgent                             \ndescription: This is test agent\nversion: 0.1.0\ninstructions: You are a test ai agent to ... \nconversation_starters:\n  - What can you do?\nvariables:\n  - name: foo\n    description: This is a foo\ndocuments:\n  - local-file.txt\n  - https:\u002F\u002Fexample.com\u002Fremote-file.txt\n```","某后端运维工程师需要频繁通过自然语言查询服务器状态、执行紧急修复脚本并同步任务进度，但受限于传统交互模式，操作效率低下且容易出错。\n\n### 没有 llm-functions 时\n- **操作割裂**：必须在聊天窗口询问信息后，手动复制命令到终端执行，再切回窗口汇报结果，流程繁琐。\n- **开发门槛高**：若想实现自动执行，需编写复杂的 Python\u002FNode.js 中间件来对接 LLM 的 Function Calling 接口，维护成本高。\n- **上下文丢失**：多步操作（如“查日志->重启服务->验证状态”）难以在单一对话中连贯完成，容易遗漏步骤。\n- **工具扩展难**：每新增一个内部 API 或 Shell 脚本，都需要重新修改代码逻辑并部署服务，响应业务需求慢。\n\n### 使用 llm-functions 后\n- **自然语言直连系统**：直接输入“重启 Nginx 并检查端口”，llm-functions 自动解析意图并调用对应的 Bash 脚本执行，无需人工干预。\n- **零样板代码集成**：只需在现有 Shell\u002FPython 脚本顶部添加标准注释，llm-functions 即可自动生成 JSON 声明供大模型调用，复用已有技术栈。\n- **智能代理闭环**：通过定义 `todo` 等 Agent，可连续执行“列出故障 -> 执行修复 -> 记录结果”的复杂工作流，保持上下文完整。\n- **灵活热插拔**：新增监控工具时，仅需将脚本加入 `tools.txt` 并运行 `argc build`，分钟级即可完成能力扩展。\n\nllm-functions 让开发者能用最熟悉的脚本语言，瞬间将大模型升级为能直接操控系统的超级运维助手。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_llm-functions_95f36092.png","sigoden",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsigoden_72f7dbce.png","sigoden@gmail.com","https:\u002F\u002Fgithub.com\u002Fsigoden",[20,24,28,32],{"name":21,"color":22,"percentage":23},"Shell","#89e051",61.6,{"name":25,"color":26,"percentage":27},"JavaScript","#f1e05a",22.2,{"name":29,"color":30,"percentage":31},"Python","#3572A5",13.7,{"name":33,"color":34,"percentage":35},"Awk","#c30e9b",2.5,730,128,"2026-04-04T01:10:10","MIT",2,"Linux, macOS, Windows","未说明",{"notes":44,"python":45,"dependencies":46},"该工具本身不运行大型模型，而是作为中间件连接 LLM 客户端（目前仅支持 AIChat）与自定义脚本。核心依赖为 argc (Bash 框架) 和 jq (JSON 处理器)。用户需自行配置能访问 LLM API 的环境（如 OpenAI Key），并根据编写的工具脚本语言安装相应的运行时（Python 或 Node.js）。","未说明 (需安装 Python 以运行 .py 工具)",[47,48,49,50],"argc","jq","aichat","Node.js (用于 .js 工具)",[52,53,54,55],"图像","语言模型","开发框架","Agent",[57,58,6,59,60,61,62,63,64,65],"function-calling","llm","tool-use","ai-agents","ai-tools","llm-agents","llm-tools","ai","mcp","ready","2026-03-27T02:49:30.150509","2026-04-06T08:40:43.931447",[70,75,79,84,89,94,98],{"id":71,"question_zh":72,"answer_zh":73,"source_url":74},16480,"为什么收到警告'This LLM or client does not support function calling'？","这通常是因为模型配置中缺少 `supports_function_calling: true` 参数。请在你的配置文件（如 config.yaml）中添加该设置。此外，并非所有模型都支持工具调用（例如 Gemma2 就不支持），请确认你使用的模型是否具备此功能。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fissues\u002F92",{"id":76,"question_zh":77,"answer_zh":78,"source_url":74},16481,"运行脚本时提示找不到 'web_search.sh' 或 'coder' 无效怎么办？","如果出现 'no found web_search tool' 警告，请运行命令 `argc link-web-search` 来设置该工具。对于 'invalid agents' 错误，请检查对应的 agent 目录结构是否正确，确保包含必要的 functions.json 和 index.yaml 文件，并确认脚本中引用的路径无误。",{"id":80,"question_zh":81,"answer_zh":82,"source_url":83},16482,"执行 'argc mcp start' 或 'stop' 时卡住很久甚至无限等待怎么办？","这是因为脚本在检测服务器状态时没有设置超时时间。可以通过修改 `scripts\u002Fmcp.sh` 文件中的 `get-server-pid` 函数来解决，给 curl 命令添加超时参数。将原代码：\n`curl -fsSL http:\u002F\u002Flocalhost:$MCP_BRIDGE_PORT\u002Fpid 2>\u002Fdev\u002Fnull || true`\n修改为：\n`curl --connect-timeout 5 --max-time 10 -fsSL http:\u002F\u002Flocalhost:$MCP_BRIDGE_PORT\u002Fpid 2>\u002Fdev\u002Fnull || true`\n这样可以显著减少等待时间。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fissues\u002F202",{"id":85,"question_zh":86,"answer_zh":87,"source_url":88},16483,"Agent 在 Windows 上正常工作但在 MacOS 上失败，可能是什么原因？","这通常与 MacOS 上的 Shell 环境或工具版本有关。建议尝试升级 Bash 或其他相关工具（如 argc, jq 等）。确保使用的是较新版本的 Bash（例如 GNU bash 5.x），因为旧版本可能在参数处理或脚本执行上与 Windows 环境存在差异。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fissues\u002F172",{"id":90,"question_zh":91,"answer_zh":92,"source_url":93},16484,"如何正确配置 MCP Bridge 以便在 Agent 中使用工具？","首先按照官方文档启动 MCP Bridge 服务。启动后，如果仍然找不到工具，请运行调试模式确认连接是否正常。确保 `mcp.json` 配置文件存在于正确的位置，并且桥接服务正在监听预期的端口（默认为 8808）。如果服务未运行，Agent 将无法获取工具列表。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions\u002Fissues\u002F192",{"id":95,"question_zh":96,"answer_zh":97,"source_url":74},16485,"使用 Ollama 本地模型时，为什么有时能调用函数有时却报错？","这可能是因为模型在处理多个参数或复杂查询时生成的参数名称不符合工具定义（例如生成了 `query` 而不是定义的 `location`）。此外，某些模型（如 Gemma2）根本不支持工具调用。建议优先使用已知支持良好的模型（如 llama3.1），并在配置中明确开启 `supports_function_calling: true`。如果涉及多参数查询，可能需要优化 Prompt 或检查工具定义的参数名称是否严格匹配。",{"id":99,"question_zh":100,"answer_zh":101,"source_url":74},16486,"脚本报错找不到 Python 该怎么办？","如果在 WSL 或某些 Linux 环境中脚本无法找到 `python` 命令，可以尝试将脚本中的 `python` 显式修改为 `python3`。这通常是因为系统默认未将 `python` 链接到 `python3`，或者环境变量路径配置问题。",[],[104,113,121,129,137,150],{"id":105,"name":106,"github_repo":107,"description_zh":108,"stars":109,"difficulty_score":110,"last_commit_at":111,"category_tags":112,"status":66},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,3,"2026-04-05T11:01:52",[54,52,55],{"id":114,"name":115,"github_repo":116,"description_zh":117,"stars":118,"difficulty_score":40,"last_commit_at":119,"category_tags":120,"status":66},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 真正成长为懂上",140436,"2026-04-05T23:32:43",[54,55,53],{"id":122,"name":123,"github_repo":124,"description_zh":125,"stars":126,"difficulty_score":40,"last_commit_at":127,"category_tags":128,"status":66},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[54,52,55],{"id":130,"name":131,"github_repo":132,"description_zh":133,"stars":134,"difficulty_score":40,"last_commit_at":135,"category_tags":136,"status":66},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[54,53],{"id":138,"name":139,"github_repo":140,"description_zh":141,"stars":142,"difficulty_score":40,"last_commit_at":143,"category_tags":144,"status":66},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[52,145,146,147,55,148,53,54,149],"数据工具","视频","插件","其他","音频",{"id":151,"name":152,"github_repo":153,"description_zh":154,"stars":155,"difficulty_score":110,"last_commit_at":156,"category_tags":157,"status":66},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[55,52,54,53,148]]