[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-go-kratos--blades":3,"tool-go-kratos--blades":62},[4,18,26,36,46,54],{"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 真正成长为懂上",160784,2,"2026-04-19T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":78,"owner_twitter":77,"owner_website":79,"owner_url":80,"languages":81,"stars":90,"forks":91,"last_commit_at":92,"license":93,"difficulty_score":32,"env_os":94,"env_gpu":94,"env_ram":94,"env_deps":95,"category_tags":101,"github_topics":102,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":114,"updated_at":115,"faqs":116,"releases":147},9618,"go-kratos\u002Fblades","blades","Blades is a Go-based multimodal AI Agent framework.","Blades 是一款基于 Go 语言构建的多模态 AI Agent 开发框架，旨在帮助开发者高效打造智能代理应用。它主要解决了在 Go 生态中缺乏灵活、标准化 AI 代理构建方案的痛点，让开发者能够轻松实现多轮对话、思维链推理及结构化输出等复杂功能。\n\n这款工具特别适合熟悉 Go 语言的后端工程师和系统架构师使用。Blades 的最大亮点在于其\"Go 原生”的设计理念：代码风格符合 Go 社区习惯，学习曲线平缓；架构上采用高度解耦的插件化设计，支持自由切换大模型服务商（如 OpenAI）、自定义工具调用及内存管理。此外，它还借鉴了 Kratos 框架的中间件机制，可便捷地集成可观测性监控与安全护栏等功能。通过统一的 Agent 接口，用户能像搭积木一样组合提示词、链条和外部工具，快速构建出逻辑清晰、易于维护的智能系统，是 Go 开发者进入 AI 应用领域的得力助手。","\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fworkflows\u002FGo\u002Fbadge.svg\" alt=\"Build Status\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgo-kratos\u002Fblades\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgo-kratos_blades_readme_ff803135673c.png\" alt=\"GoDoc\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fdeepwiki.com\u002Fgo-kratos\u002Fblades\">\u003Cimg src=\"https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg\" alt=\"DeepWiki\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fgo-kratos\u002Fblades\" alt=\"License\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Blades\nBlades is a multimodal AI Agent framework for the Go language, supporting custom models, tools, memory, middleware, etc. It is suitable for multi-turn conversations, chain-of-thought reasoning, and structured output, among other use cases.\n> The name originates from: The game *God of War*, set against the backdrop of Greek mythology, tells the adventure story of Kratos transforming from a mortal into the God of War and embarking on a god-slaying rampage. The Blades are Kratos's iconic weapons.\n\n## Architecture Design\nBlades leverages the characteristics of the Go language to provide a flexible and efficient AI Agent solution. Its core lies in achieving a high degree of decoupling and extensibility through unified interfaces and pluggable components. The overall architecture is as follows:\n![architecture](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgo-kratos_blades_readme_1a737149b903.png)\n\n- Go Idiomatic: Built entirely according to Go's philosophy, with a code style and user experience that feel familiar to Go developers.\n- Simple to Use: Define AI Agents through concise code declarations, enabling rapid requirement delivery and making complex logic clear, easy to manage, and maintain.\n- Middleware Ecosystem: Drawing inspiration from Kratos's middleware design philosophy, features like Observability and Guardrails can be easily integrated into AI Agents.\n- Highly Extensible: Achieves a high degree of decoupling and extensibility through unified interfaces and pluggable components, facilitating the integration of different LLM models and external tools.\n\n## Core Concepts\nThe Blades framework realizes its powerful functionality and flexibility through a series of carefully designed core components. These components work together to build the intelligent behavior of the Agent:\n\n* Agent: The core unit that executes tasks, capable of invoking models and tools.\n* Prompt: Templated text used for interacting with LLMs, supporting dynamic variable substitution and complex context construction.\n* Chain: Connects multiple Agents or other Chains to form complex workflows.\n* ModelProvider: A pluggable LLM interface, allowing you to easily switch and integrate different language model services (such as OpenAI, etc.).\n* Tool: External capabilities that an Agent can use, such as calling APIs, querying databases, accessing the file system, etc.\n* Memory: Provides short-term or long-term memory capabilities for the Agent, enabling continuous conversation with context.\n* Middleware: Similar to middleware in web frameworks, it enables cross-cutting control over the Agent.\n\n### Agent\n`Agent` is the most core interface in the Blades framework, defining the basic behavior of all executable components. Its design aims to provide a unified execution paradigm. Through the `Run` method, it achieves **decoupling, standardization, and high composability** for various functional modules within the framework. Components like `Agent`, `Chain`, and `ModelProvider` all implement this interface, thereby unifying their execution logic and allowing different components to be flexibly combined like Lego bricks to build complex AI Agents.\n\n```go\n\u002F\u002F Agent represents an autonomous agent that can process invocations and produce a sequence of messages.\ntype Agent interface {\n    Name() string\n    Description() string\n    Run(context.Context, *Invocation) Generator[*Message, error]\n}\n```\n\n### ModelProvider\n`ModelProvider` is the core abstraction layer in the `Blades` framework for interacting with underlying large language models (LLMs). Its design goal is to achieve **decoupling and extensibility** through a unified interface, separating the framework's core logic from the implementation details of specific models (such as OpenAI, DeepSeek, Gemini, etc.). It acts as an adapter, responsible for converting the framework's internal standardized requests into the format required by the model's native API and converting the model's responses back into the framework's standard format, thus enabling developers to easily switch and integrate different LLMs.\n\n```go\ntype ModelProvider interface {\n    \u002F\u002F Generate executes a complete generation request and returns the result all at once. Suitable for scenarios that do not require real-time feedback.\n    Generate(context.Context, *ModelRequest, ...ModelOption) (*ModelResponse, error)\n    \u002F\u002F NewStreaming initiates a streaming request. This method immediately returns a Generator object, allowing the caller to receive the model's generated content step by step. Suitable for building real-time, typewriter-effect conversation applications.\n    NewStreaming(context.Context, *ModelRequest, ...ModelOption) (Generator[*ModelResponse])\n}\n```\n![ModelProvider](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgo-kratos_blades_readme_4fb7d73446c2.png)\n\n### Agent\n`Agent` is the core coordinator in the `Blades` framework. As the top-level `Agent`, it integrates and orchestrates components such as `ModelProvider`, `Tool`, `Memory`, and `Middleware` to understand user intent and execute complex tasks. Its design allows configuration via flexible `Option` functions, thereby driving the behavior and capabilities of intelligent applications and fulfilling core responsibilities like task orchestration, context management, and instruction following.\n\n### Flow\n`flow` is used to build complex workflows and multi-step reasoning. Its design philosophy involves orchestrating multiple `Agent` components to achieve data and control flow transfer, where the output of one `Agent` can serve as the input for the next. This mechanism enables developers to flexibly combine components to build highly customized AI workflows, realizing multi-step reasoning and complex data processing. It is key to implementing complex decision-making processes for Agents.\n\n### Tool\n`Tool` is a key component for extending AI Agent capabilities, representing external functions or services that an Agent can invoke. Its design aims to empower the Agent to interact with the real world, performing specific actions or obtaining external information. Through a clear `InputSchema`, it guides the LLM to generate correct invocation parameters, and executes the actual logic via its internal `Handle` function, thereby encapsulating various external APIs, database queries, etc., into a form that the Agent can understand and invoke.\n\n### Memory\nThe `Memory` component endows AI Agents with memory capabilities, providing a universal interface for storing and retrieving conversation messages, ensuring that Agents maintain context and coherence across multiple conversation turns. Its design supports managing messages by session ID and can be configured with message count limits to balance the breadth of memory against system resource consumption. The framework provides an `InMemory` implementation and also encourages developers to extend it to persistent storage or more complex memory strategies.\n\n```go\ntype Memory interface {\n    AddMemory(context.Context, *Memory) error\n    SaveSession(context.Context, blades.Session) error\n    SearchMemory(context.Context, string) ([]*Memory, error)\t\n}\n```\n\n### Middleware\n`Middleware` is a powerful mechanism for implementing cross-cutting concerns (such as logging, monitoring, authentication, rate limiting). Its design allows injecting additional behaviors into the execution flow of a `Runner` without modifying the `Runner`'s core logic. It operates in a function chain form resembling an \"onion model,\" providing highly flexible flow control and feature enhancement, thereby achieving decoupling between non-core business logic and core functionality.\n\n## 💡 Quick Start\n\n### Usage Example (Chat Agent)\n\nThe following is a simple chat Agent example demonstrating how to use the OpenAI `ModelProvider` to build a basic conversational application:\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n    \"os\"\n\n    \"github.com\u002Fgo-kratos\u002Fblades\"\n    \"github.com\u002Fgo-kratos\u002Fblades\u002Fcontrib\u002Fopenai\"\n)\n\nfunc main() {\n    \u002F\u002F Configure OpenAI API key and base URL using environment variables:\n    model := openai.NewModel(\"gpt-5\", openai.Config{\n        APIKey: os.Getenv(\"OPENAI_API_KEY\"),\n    })\n    agent := blades.NewAgent(\n        \"Blades Agent\",\n        blades.WithModel(model),\n        blades.WithInstruction(\"You are a helpful assistant that provides detailed and accurate information.\"),\n    )\n    \u002F\u002F Create a Prompt with user message\n    input := blades.UserMessage(\"What is the capital of France?\")\n    \u002F\u002F Run the Agent with the Prompt\n    runner := blades.NewRunner(agent)\n    output, err := runner.Run(context.Background(), input)\n    if err != nil {\n        log.Fatal(err)\n    }\n    \u002F\u002F Print the agent's response\n    log.Println(output.Text())\n}\n```\n\n### Skills\n\n`Agent` supports skill injection via `WithSkills(...)`, and skills can be loaded from a directory or `embed.FS`.\nFor the skill package format and metadata rules, see [Agent Skill specification](https:\u002F\u002Fagentskills.io\u002Fspecification).\n\n```go\npackage main\n\nimport (\n    \"embed\"\n\n    \"github.com\u002Fgo-kratos\u002Fblades\"\n    \"github.com\u002Fgo-kratos\u002Fblades\u002Fskills\"\n)\n\n\u002F\u002Fgo:embed example-skill\u002F*\nvar skillFS embed.FS\n\nfunc createAgent(model blades.ModelProvider) (blades.Agent, error) {\n    \u002F\u002F Directory-based loading:\n    skillsFromDir, err := skills.NewFromDir(\".\u002Fskills\")\n    if err != nil {\n        return nil, err\n    }\n    \u002F\u002F Embedded loading:\n    skillsFromEmbed, err := skills.NewFromEmbed(skillFS)\n    if err != nil {\n        return nil, err\n    }\n    allSkills := append(skillsFromDir, skillsFromEmbed...)\n    return blades.NewAgent(\n        \"SkillsAgent\",\n        blades.WithModel(model),\n        blades.WithSkills(allSkills...),\n    )\n}\n```\n\nFor more examples, please refer to the [examples](.\u002Fexamples) directory.\n\n## 🤝 Contribution & Community\nThe project is currently in its early stages, and we are iterating continuously and rapidly. We sincerely invite all Go developers and AI enthusiasts to visit our GitHub repository and experience the joy of development that Blades brings firsthand.\n\nWelcome to give the project a ⭐️ Star, explore more usage examples in the `examples` directory, or directly start building your first Go LLM application!\n\nWe look forward to any feedback, suggestions, and contributions from you to jointly promote the prosperity of the Go AI ecosystem.\n\n\n## 📄 License\n\nBlades is licensed under the MIT License. For details, please see the [LICENSE](LICENSE) file.\n","\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fworkflows\u002FGo\u002Fbadge.svg\" alt=\"构建状态\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgo-kratos\u002Fblades\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgo-kratos_blades_readme_ff803135673c.png\" alt=\"GoDoc\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fdeepwiki.com\u002Fgo-kratos\u002Fblades\">\u003Cimg src=\"https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg\" alt=\"DeepWiki\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fgo-kratos\u002Fblades\" alt=\"许可证\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Blades\nBlades 是一个面向 Go 语言的多模态 AI Agent 框架，支持自定义模型、工具、记忆、中间件等。它适用于多轮对话、思维链推理以及结构化输出等多种场景。\n> 名称由来：游戏《战神》以希腊神话为背景，讲述了克拉托斯从凡人蜕变为战神并展开弑神之旅的冒险故事。而“双刀”正是克拉托斯标志性的武器。\n\n## 架构设计\nBlades 充分利用 Go 语言的特点，提供了一套灵活高效的 AI Agent 解决方案。其核心在于通过统一的接口和可插拔组件实现高度解耦与扩展性。整体架构如下：\n![architecture](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgo-kratos_blades_readme_1a737149b903.png)\n\n- Go 风格：完全遵循 Go 的设计理念构建，代码风格和使用体验对 Go 开发者来说十分熟悉。\n- 简单易用：通过简洁的代码声明即可定义 AI Agent，快速满足需求，使复杂逻辑清晰易懂、易于管理和维护。\n- 中间件生态：借鉴 Kratos 的中间件设计理念，可观测性和护栏等功能可以轻松集成到 AI Agent 中。\n- 高度可扩展：通过统一的接口和可插拔组件实现高度解耦与扩展性，便于集成不同的 LLM 模型和外部工具。\n\n## 核心概念\nBlades 框架通过一系列精心设计的核心组件实现了强大的功能与灵活性。这些组件协同工作，共同构建 Agent 的智能行为：\n\n* Agent：执行任务的核心单元，能够调用模型和工具。\n* Prompt：用于与 LLM 对话的模板化文本，支持动态变量替换和复杂上下文构建。\n* Chain：连接多个 Agent 或其他 Chain，形成复杂的流程。\n* ModelProvider：可插拔的 LLM 接口，方便切换和集成不同的语言模型服务（如 OpenAI 等）。\n* Tool：Agent 可使用的外部能力，例如调用 API、查询数据库、访问文件系统等。\n* Memory：为 Agent 提供短期或长期记忆能力，支持带上下文的连续对话。\n* Middleware：类似于 Web 框架中的中间件，可对 Agent 进行横切控制。\n\n### Agent\n`Agent` 是 Blades 框架中最核心的接口，定义了所有可执行组件的基本行为。它的设计旨在提供统一的执行范式。通过 `Run` 方法，框架内的各类功能模块实现了 **解耦、标准化和高可组合性**。`Agent`、`Chain` 和 `ModelProvider` 等组件都实现了该接口，从而统一了它们的执行逻辑，使不同组件能够像乐高积木一样灵活组合，构建复杂的 AI Agent。\n\n```go\n\u002F\u002F Agent 表示一个能够处理调用并生成消息序列的自主代理。\ntype Agent interface {\n    Name() string\n    Description() string\n    Run(context.Context, *Invocation) Generator[*Message, error]\n}\n```\n\n### ModelProvider\n`ModelProvider` 是 `Blades` 框架中用于与底层大语言模型（LLM）交互的核心抽象层。其设计目标是通过统一的接口实现 **解耦和扩展性**，将框架的核心逻辑与具体模型的实现细节（如 OpenAI、DeepSeek、Gemini 等）分离。它充当适配器的角色，负责将框架内部的标准化请求转换为模型原生 API 所需的格式，并将模型的响应转换回框架的标准格式，从而使开发者能够轻松切换和集成不同的 LLM。\n\n```go\ntype ModelProvider interface {\n    \u002F\u002F Generate 执行一次完整的生成请求，并一次性返回结果。适用于不需要实时反馈的场景。\n    Generate(context.Context, *ModelRequest, ...ModelOption) (*ModelResponse, error)\n    \u002F\u002F NewStreaming 启动流式请求。该方法会立即返回一个 Generator 对象，允许调用者逐步接收模型生成的内容。适用于构建具有打字机效果的实时对话应用。\n    NewStreaming(context.Context, *ModelRequest, ...ModelOption) (Generator[*ModelResponse])\n}\n```\n![ModelProvider](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgo-kratos_blades_readme_4fb7d73446c2.png)\n\n### Agent\n`Agent` 是 `Blades` 框架中的核心协调者。作为顶层的 `Agent`，它整合并编排 `ModelProvider`、`Tool`、`Memory` 和 `Middleware` 等组件，以理解用户意图并执行复杂任务。其设计允许通过灵活的 `Option` 函数进行配置，从而驱动智能应用的行为与能力，履行任务编排、上下文管理及指令遵循等核心职责。\n\n### Flow\n`flow` 用于构建复杂的工作流和多步推理。其设计理念是编排多个 `Agent` 组件，实现数据和控制流的传递，其中一个 `Agent` 的输出可以作为下一个 `Agent` 的输入。这种机制使开发者能够灵活地组合组件，构建高度定制化的 AI 流程，实现多步推理和复杂的数据处理。它是实现 Agent 复杂决策过程的关键。\n\n### Tool\n`Tool` 是扩展 AI Agent 能力的关键组件，代表 Agent 可以调用的外部功能或服务。其设计旨在赋予 Agent 与现实世界交互的能力，执行特定操作或获取外部信息。通过清晰的 `InputSchema`，它引导 LLM 生成正确的调用参数，并通过内部的 `Handle` 函数执行实际逻辑，从而将各种外部 API、数据库查询等封装成 Agent 能够理解和调用的形式。\n\n### 内存\n`Memory` 组件为 AI 代理赋予记忆能力，提供用于存储和检索对话消息的通用接口，确保代理在多次对话轮次中保持上下文连贯性。其设计支持按会话 ID 管理消息，并可配置消息数量限制，以在记忆广度与系统资源消耗之间取得平衡。该框架提供了 `InMemory` 实现，同时也鼓励开发者将其扩展到持久化存储或更复杂的记忆策略。\n\n```go\ntype Memory interface {\n    AddMemory(context.Context, *Memory) error\n    SaveSession(context.Context, blades.Session) error\n    SearchMemory(context.Context, string) ([]*Memory, error)\t\n}\n```\n\n### 中间件\n`Middleware` 是一种强大的机制，用于实现横切关注点（如日志记录、监控、身份验证、限流）。其设计允许在不修改 `Runner` 核心逻辑的情况下，将额外的行为注入到 `Runner` 的执行流程中。它以类似“洋葱模型”的函数链形式运作，提供高度灵活的流程控制和功能增强，从而实现非核心业务逻辑与核心功能之间的解耦。\n\n## 💡 快速入门\n\n### 使用示例（聊天代理）\n\n以下是一个简单的聊天代理示例，展示了如何使用 OpenAI 的 `ModelProvider` 构建一个基本的对话应用：\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n    \"os\"\n\n    \"github.com\u002Fgo-kratos\u002Fblades\"\n    \"github.com\u002Fgo-kratos\u002Fblades\u002Fcontrib\u002Fopenai\"\n)\n\nfunc main() {\n    \u002F\u002F 使用环境变量配置 OpenAI API 密钥和基础 URL：\n    model := openai.NewModel(\"gpt-5\", openai.Config{\n        APIKey: os.Getenv(\"OPENAI_API_KEY\"),\n    })\n    agent := blades.NewAgent(\n        \"Blades Agent\",\n        blades.WithModel(model),\n        blades.WithInstruction(\"你是一位乐于助人、能够提供详细准确信息的助手。\"),\n    )\n    \u002F\u002F 创建包含用户消息的 Prompt\n    input := blades.UserMessage(\"法国的首都是哪里？\")\n    \u002F\u002F 使用 Prompt 运行代理\n    runner := blades.NewRunner(agent)\n    output, err := runner.Run(context.Background(), input)\n    if err != nil {\n        log.Fatal(err)\n    }\n    \u002F\u002F 打印代理的回答\n    log.Println(output.Text())\n}\n```\n\n### 技能\n`Agent` 支持通过 `WithSkills(...)` 注入技能，技能可以从目录或 `embed.FS` 加载。关于技能包格式和元数据规则，请参阅 [Agent Skill specification](https:\u002F\u002Fagentskills.io\u002Fspecification)。\n\n```go\npackage main\n\nimport (\n    \"embed\"\n\n    \"github.com\u002Fgo-kratos\u002Fblades\"\n    \"github.com\u002Fgo-kratos\u002Fblades\u002Fskills\"\n)\n\n\u002F\u002Fgo:embed example-skill\u002F*\nvar skillFS embed.FS\n\nfunc createAgent(model blades.ModelProvider) (blades.Agent, error) {\n    \u002F\u002F 目录加载：\n    skillsFromDir, err := skills.NewFromDir(\".\u002Fskills\")\n    if err != nil {\n        return nil, err\n    }\n    \u002F\u002F 嵌入加载：\n    skillsFromEmbed, err := skills.NewFromEmbed(skillFS)\n    if err != nil {\n        return nil, err\n    }\n    allSkills := append(skillsFromDir, skillsFromEmbed...)\n    return blades.NewAgent(\n        \"SkillsAgent\",\n        blades.WithModel(model),\n        blades.WithSkills(allSkills...),\n    )\n}\n```\n\n更多示例请参考 [examples](.\u002Fexamples) 目录。\n\n## 🤝 贡献与社区\n该项目目前仍处于早期阶段，我们正在持续快速迭代。我们诚挚邀请所有 Go 开发者和 AI 爱好者访问我们的 GitHub 仓库，亲身体验 Blades 带来的开发乐趣。\n\n欢迎为项目点亮 ⭐️ 星标，在 `examples` 目录中探索更多使用示例，或者直接开始构建你的第一个 Go LLM 应用！\n\n我们期待您的任何反馈、建议和贡献，共同推动 Go AI 生态系统的繁荣发展。\n\n\n## 📄 许可证\n\nBlades 采用 MIT 许可证授权。有关详情，请参阅 [LICENSE](LICENSE) 文件。","# Blades 快速上手指南\n\nBlades 是一个专为 Go 语言设计的多模态 AI Agent 框架，支持自定义模型、工具、记忆和中间件。它采用地道的 Go 风格，通过统一的接口和可插拔组件，帮助开发者快速构建多轮对话、思维链推理及结构化输出的智能应用。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows\n*   **Go 版本**：Go 1.21 或更高版本（推荐使用最新稳定版）\n*   **依赖管理**：已安装并配置好 Go Modules\n*   **API Key**：若使用 OpenAI 等外部模型，需提前准备好对应的 API Key\n\n## 安装步骤\n\n使用 `go get` 命令安装 Blades 核心库及常用的 OpenAI 适配器：\n\n```bash\ngo get github.com\u002Fgo-kratos\u002Fblades\ngo get github.com\u002Fgo-kratos\u002Fblades\u002Fcontrib\u002Fopenai\n```\n\n> **提示**：如果下载速度较慢，可配置国内 Go 代理加速：\n> ```bash\n> export GOPROXY=https:\u002F\u002Fgoproxy.cn,direct\n> ```\n\n## 基本使用\n\n以下是一个最简单的聊天机器人示例，展示如何使用 OpenAI 模型创建一个基础的 AI Agent 并运行对话。\n\n### 1. 编写代码\n\n创建 `main.go` 文件，填入以下代码：\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n    \"os\"\n\n    \"github.com\u002Fgo-kratos\u002Fblades\"\n    \"github.com\u002Fgo-kratos\u002Fblades\u002Fcontrib\u002Fopenai\"\n)\n\nfunc main() {\n    \u002F\u002F 初始化 OpenAI 模型提供者\n    \u002F\u002F 请确保环境变量 OPENAI_API_KEY 已设置\n    model := openai.NewModel(\"gpt-4o\", openai.Config{\n        APIKey: os.Getenv(\"OPENAI_API_KEY\"),\n    })\n\n    \u002F\u002F 创建 Agent\n    agent := blades.NewAgent(\n        \"Blades Agent\",\n        blades.WithModel(model),\n        blades.WithInstruction(\"You are a helpful assistant that provides detailed and accurate information.\"),\n    )\n\n    \u002F\u002F 构造用户输入消息\n    input := blades.UserMessage(\"What is the capital of France?\")\n\n    \u002F\u002F 创建 Runner 并执行\n    runner := blades.NewRunner(agent)\n    output, err := runner.Run(context.Background(), input)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    \u002F\u002F 输出结果\n    log.Println(output.Text())\n}\n```\n\n### 2. 配置环境变量\n\n在终端中设置您的 OpenAI API Key：\n\n```bash\nexport OPENAI_API_KEY=\"your-openai-api-key-here\"\n```\n\n### 3. 运行程序\n\n执行以下命令启动应用：\n\n```bash\ngo run main.go\n```\n\n程序将调用 LLM 处理问题，并在控制台打印出类似 `The capital of France is Paris.` 的回答。\n\n---\n\n**进阶提示**：Blades 还支持通过 `WithSkills(...)` 注入技能（从目录或 `embed.FS` 加载），以及使用 `Chain` 编排复杂工作流。更多高级用法请参考项目 `examples` 目录。","某电商平台的后端团队需要构建一个能处理用户投诉、自动查询订单状态并生成结构化回复报告的智能客服系统。\n\n### 没有 blades 时\n- **多模态集成困难**：开发者需手动编写大量胶水代码来串联文本大模型与图片识别 API，导致代码耦合度高且难以维护。\n- **上下文记忆缺失**：在多轮对话中，历史订单信息和用户情绪状态难以持久化存储，导致机器人经常“失忆”，重复询问用户已提供的信息。\n- **流程编排僵化**：一旦需要调整“先查库后推理”的业务逻辑，必须重构核心代码，缺乏灵活的链式调用机制来应对复杂的思考路径。\n- **可观测性不足**：缺乏统一的中间件机制，无法便捷地监控 Agent 的决策过程或设置安全护栏，生产环境调试如同黑盒。\n\n### 使用 blades 后\n- **原生 Go 风格集成**：利用 blades 统一的 `Agent` 接口和插件化 `ModelProvider`，团队用简洁的 Go 代码即可无缝切换模型并挂载图像识别工具，开发效率提升显著。\n- **内置记忆管理**：通过框架自带的 `Memory` 组件，系统自动维护长短期上下文，确保在多轮交互中精准引用之前的订单详情和用户诉求。\n- **灵活链式编排**：借助 `Chain` 组件将查询、推理、生成报告等步骤像乐高一样组装，轻松实现复杂的思维链（CoT）逻辑，业务变更仅需调整配置。\n- **生态中间件支持**：直接复用 Kratos 生态的中间件能力，快速植入日志追踪、延迟监控及内容安全过滤，让智能体运行透明可控。\n\nblades 让 Go 开发者能以熟悉的范式高效构建具备记忆、推理和多模态能力的复杂 AI 智能体，大幅降低落地门槛。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgo-kratos_blades_877474cf.png","go-kratos","Kratos","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fgo-kratos_1859078d.png","Your ultimate Go microservices framework for the cloud-native era.",null,"go-kratos@googlegroups.com","https:\u002F\u002Fgo-kratos.dev","https:\u002F\u002Fgithub.com\u002Fgo-kratos",[82,86],{"name":83,"color":84,"percentage":85},"Go","#00ADD8",99.9,{"name":87,"color":88,"percentage":89},"Makefile","#427819",0.1,758,92,"2026-04-17T07:28:08","MIT","未说明",{"notes":96,"python":97,"dependencies":98},"该工具是基于 Go 语言开发的多模态 AI Agent 框架，非 Python 项目。运行需安装 Go 环境并配置相应 LLM 服务的 API Key（如 OpenAI）。支持通过 embed.FS 或目录加载技能模块，架构设计强调解耦和中间件扩展性。","不适用 (基于 Go 语言)",[99,100],"github.com\u002Fgo-kratos\u002Fblades","github.com\u002Fgo-kratos\u002Fblades\u002Fcontrib\u002Fopenai",[35,13,14,15],[103,104,105,106,107,108,109,110,111,112,113],"golang","ai","agent","workflow","agent-kit","agent-sdk","llm","multi-agent","agent-framework","agent-workflow","studio","2026-03-27T02:49:30.150509","2026-04-20T04:06:35.459158",[117,122,127,132,137,142],{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},43177,"在流式输出模式下，为什么最后一个数据块会再次输出完整内容？","这是 Blades 流式模式的有意设计：\n- Status = incomplete：表示增量更新（类似 delta）。\n- Status = completed：表示消息的最终完整快照。\n\n设计初衷是将不同提供商的流式行为标准化为统一的契约。最终完整快照是规范结果，以便下游逻辑（如最终渲染、持久化、恢复、工具循环一致性）依赖单一权威消息。\n\n推荐用法：\n- 打字机效果：消费 incomplete 更新。\n- 当收到 completed 状态时：将其视为最终消息进行替换或终结，而不是作为新的增量追加。\n可以通过判断 'Status' 属性，若为 'StatusCompleted' 则为最后一个块。","https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fissues\u002F189",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},43178,"如何简单地使用 Blades 与 AI 进行聊天？","可以直接调用 ModelProvider 接口。以下是一个简单示例：\n\n```go\nimport(\n    \"context\"\n    \"github.com\u002Fgo-kratos\u002Fblades\"\n    \"github.com\u002Fgo-kratos\u002Fblades\u002Fgraph\"\n    \"github.com\u002Fgo-kratos\u002Fblades\u002Fcontrib\u002Fopenai\"\n)\n\nfunc Planning(ctx context.Context, state graph.State) (graph.State, error) {\n    input := &blades.ModelRequest{\n        Instruction: blades.SystemMessage(\"You are a helpful assistant that provides detailed and accurate information.\"),\n        Messages: []*blades.Message{\n            blades.UserMessage(state[\"input\"]),\n        },\n    }\n    model := openai.NewChatProvider()\n    output, err := model.Generate(context.Background(), input)\n    if err != nil {\n        return nil, err\n    }\n    state[\"output\"] = output.Text()\n    return state, nil\n}\n```","https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fissues\u002F120",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},43179,"这个项目还在维护吗？","项目仍在维护中。框架整体设计延续了 Kratos 的设计美学，追求简单、高效且稳定。目前正在进行二期方案的规划，预计元旦后开始实施。","https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fissues\u002F187",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},43180,"OpenAI Provider 是否应该封装外部库的类型选项（option）？","不建议封装。因为每个用户使用的配置差异较大，如果进行 wrap 封装，后续适配会比较困难，甚至可能成为瓶颈。直接暴露原始 SDK 的配置选项虽然依赖较强，但更加灵活和直接。","https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fissues\u002F39",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},43181,"ToolCalls 在流式响应中的增量收集是否有意义？","有意义。虽然最终响应包含完整的 ToolCall 数据，但支持 Tool 消息的流式输出可以让前端在执行过程中交互式地渲染结果，从而为长时间运行或增量工具结果提供更好的用户体验。OpenAI SDK 本身也支持流式增量工具消息，Blades 应与此行为保持一致。","https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fissues\u002F131",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},43182,"如何将 Tool 的 Handle 方法转换为接口以支持强类型处理？","可以将 Handle 定义为接口，并通过适配器模式支持强类型。例如定义 `ToolHandler` 接口，并创建一个泛型适配器 `ToolAdapter[I, O any]`，将具体的输入输出结构体转换为字符串处理。这有助于未来扩展（如连接 mcp-go 时需要实现 ListTools 和适配 Call 接口），并支持更严格的类型检查。","https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fissues\u002F10",[148,153,158,163,168,173,178],{"id":149,"version":150,"summary_zh":151,"released_at":152},342864,"v0.5.0","# 🎉 发布 v0.5.0\n本次发布引入了上下文管理和循环工具支持，增强了元数据处理和缓存控制，并包含了多项优化和修复。\n## 变更内容\n\n- **功能：**\n  - @longXboy 在 [#203](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F203) 中添加了 recipe 功能\n  - @tonybase 在 [#223](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F223) 中增加了上下文控制选项和无状态模式\n  - @tonybase 在 [#221](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F221) 中为 recipe 添加了循环执行模式支持\n  - @daemon365 在 [#212](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F212) 中通过嵌套结构和滑动窗口管理增强了元数据处理\n  - @tonybase 在 [#218](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F218) 中添加了循环升级和退出工具支持\n  - @tonybase 在 [#208](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F208) 中增加了上下文管理功能\n\n- **修复：**\n  - @carmel 在 [#204](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F204) 中修复了 prompt-template 示例中缺失会话参数的问题\n  - @tonybase 在 [#205](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F205) 中恢复了中间续写状态\n  - @tonybase 在 [#207](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F207) 中将审批逻辑移出错误检查，位于 examples\u002Fresume-approve 中\n  - @shenqidebaozi 在 [#209](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F209) 中处理了 `MergeParts` 中的 nil 基础情况\n\n- **重构：**\n  - @tonybase 在 [#226](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F226) 中移除了默认上下文使用并更新了示例\n  - @tonybase 在 [#219](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F219) 中导出了 agent 结构体并重命名了示例目录\n  - @tonybase 在 [#220](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F220) 中将 `RecipeSpec` 重命名为 `AgentSpec`\n  - @tonybase 在 [#222](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F222) 中用 Compressor 替换了 Session 中的 ContextManager\n\n- **其他更新：**\n  - @tonybase 在 [#206](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F206) 中重构了 resume 结构\n\n## 新贡献者\n\n- @carmel 在 [#204](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F204) 中完成了首次贡献\n- @daemon365 在 [#212](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F212) 中完成了首次贡献\n\n**完整变更日志**: [v0.4.0...v0.5.0](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fcompare\u002Fv0.4.0...v0.5.0)","2026-04-02T06:44:43",{"id":154,"version":155,"summary_zh":156,"released_at":157},342865,"v0.4.0","# 🎉 发布 v0.4.0\n\n本次发布引入了对代理的中间件支持和技能注入功能，同时修复了多个重要问题并进行了多项改进。\n\n---\n\n## 🚀 变更内容\n\n### ✨ 功能\n- feat(flow): 允许将中间件作为选项添加到 `DeepAgent` 和 `RoutingAgent` 中 (#188) — 感谢 @yuchanns  \n- feat(skills): 为代理添加技能注入支持 (#192) — 感谢 @tonybase  \n- feat(example): 添加 Claude 天气示例 (#194) — 感谢 @tonybase  \n\n### 🐛 问题修复\n- fix(contrib): 修正助手角色映射并改进错误处理 (#191) — 感谢 @tonybase  \n- fix(contrib): 修复 Anthropic 工具调用流程 (#193) — 感谢 @tonybase  \n- fix(agent): 确保最终响应验证并添加流式传输测试 (#195) — 感谢 @tonybase  \n- fix(skills): 支持二进制技能资源 (#202) — 感谢 @tonybase  \n\n### 📚 文档\n- docs: 更新 `AGENTS.md`，包含重构后的项目布局和指南 (#190) — 感谢 @tonybase  \n\n---\n\n## 🙌 新贡献者\n- @yuchanns 在 #188 中完成了首次贡献  \n\n---\n\n## 📦 完整变更日志\nhttps:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fcompare\u002Fv0.3.1...v0.4.0","2026-03-02T02:41:08",{"id":159,"version":160,"summary_zh":161,"released_at":162},342866,"v0.3.1","## 变更内容\n* 尝试序列化不支持的类型 func() *github.com\u002Fgoogle\u002Fjsonsc…，由 @TomYang1024 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F179 中提出\n* r.Evaluate 未定义（类型 evaluate.Evaluator 没有字段或方法），由 @TomYang1024 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F178 中提出\n* 修复 OpenAI 模型流式模式下的 token 使用为零的问题，由 @jayn1985 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F180 中提出\n* 新特性（示例）：添加图像转文本示例，并更新消息部分 API，由 @tonybase 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F181 中提出\n* 为图添加 ckpt 功能，由 @longXboy 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F167 中提出\n* 重构（runner）：确保设置消息作者，并改进历史记录处理，由 @tonybase 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F183 中提出\n* 修复（runner）：优化消息处理和状态管理，由 @tonybase 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F184 中提出\n* 重构（evaluator）：将包名从 evaluate 重命名为 evaluator，由 @tonybase 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F185 中提出\n\n## 新贡献者\n* @TomYang1024 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F179 中完成了首次贡献\n* @jayn1985 在 https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F180 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fcompare\u002Fv0.3.0...v0.3.1","2025-12-05T15:38:06",{"id":164,"version":165,"summary_zh":166,"released_at":167},342867,"v0.3.0","## 🚀 功能特性\n\n### 代理系统增强\n- 实现工具上下文与动作跟踪 ([#159](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F159))\n- 添加调用模型、工具和指令 ([#160](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F160))\n- 增加动作中断支持，并优化交接流程 ([#170](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F170))\n\n### 流程管理\n- 添加深度代理能力 ([#171](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F171))\n- 引入路由代理功能 ([#174](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F174))\n\n### 运行器功能\n- 添加运行器恢复功能 ([#163](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F163))\n\n### 工作流示例\n- 添加工作流编排器示例 ([#172](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F172))\n- 添加工作流评估器示例 ([#173](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F173))\n\n## 🔧 改进\n\n### 代理架构\n- 引入 InstructionProvider 并优化指令管理 ([#162](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F162))\n\n### 文档\n- 在 README 中添加项目徽章 ([#177](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F177))\n\n## 🐛 错误修复\n\n### 代理\n- 在合并指令前添加空值检查 ([#161](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F161))\n- 修复代理指令名称中的拼写错误 ([#164](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F164))\n\n### 消息处理\n- 移除未使用的代码并简化状态克隆 ([#166](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F166))\n- 在 appendNewMessage 中为消息添加空值检查 ([#169](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F169))\n\n### 社区提供者\n- 修复 gemini 和 openai 提供者中的 linting 问题 ([#168](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F168))\n\n## 📦 依赖项\n- 升级 contrib\u002Fopenai 版本 ([#158](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F158))\n\n## 👥 新贡献者\n- [@Owen469](https:\u002F\u002Fgithub.com\u002FOwen469) 在 [#169](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F169) 中完成了首次贡献\n\n## 🔗 链接\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fcompare\u002Fv0.2.0...v0.3.0","2025-11-26T13:25:45",{"id":169,"version":170,"summary_zh":171,"released_at":172},342868,"v0.2.0","## 🚀 功能特性\n- **Flow**：新增 Handoff Agent，用于智能代理的任务委派与协作（[#135](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F135)）\n- **Flow**：新增 Sequential Agent，支持流水线式工作流执行（[#136](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F136)）\n- **Flow**：新增 Parallel Agent，实现代理的并发执行以提升效率（[#137](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F137)）\n- **Flow**：新增 Loop Agent，用于循环迭代式任务处理（[#138](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F138)）\n- **中间件**：新增重试中间件，自动处理失败请求（[#130](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F130)）\n- **工具**：为 NewFunc 添加中间件支持及选项（[#128](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F128)）\n- **模型**：支持模型提供商自定义请求选项（[#144](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F144)）\n- **示例**：在 Makefile 中添加示例目标，并允许通过环境变量配置模型（[#152](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F152)）\n- **代理**：简化流式响应处理，并新增工具流式示例（[#132](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F132)）\n\n### 🔧 改进优化\n- **Handoff**：优化代理交接逻辑及提示词优化（[#140](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F140)，[#153](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F153)）\n- **代理**：改进会话存储与消息处理机制（[#142](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F142)）\n- **代理**：支持条件性产出助手消息，以实现更精细的控制（[#149](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F149)）\n- **Runner**：在 Run 方法中正确处理迭代逻辑（[#150](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F150)）\n\n### 🏗️ 重构\n- **模型**：重构模型提供商架构设计（[#133](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F133)）\n- **模型**：重构模型配置结构（[#143](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F143)）\n\n### 🐛 Bug 修复\n- **代理**：在非流式模式下增加最终响应的产出（[#134](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F134)）\n- **示例**：修改路由示例的提示词及逻辑（[#151](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F151)）\n\n### 📚 文档\n- **Readme**：更新代码示例并修复缩进问题（[#145](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F145)）\n\n### 📦 依赖项\n- **OpenAI**：将 openai 版本升级至 v3.8.1（[#154](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F154)）\n\n### 🏆 版本亮点\n- **工作流引擎**：完整 Flow 工作流系统，包含 Handoff、Sequential、Parallel 和 Loop 四种代理类型\n- **增强型中间件**：新增重试中间件和工具中间件支持，提升系统可扩展性\n- **可靠性提升**：多项修复确保系统运行更加稳定\n- **开发者体验优化**：简化配置流程，并提供实用示例\n\n### 🔗 完整变更日志\n[查看完整变更日志](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fcompare\u002Fv0.1.1...v","2025-11-18T14:13:34",{"id":174,"version":175,"summary_zh":176,"released_at":177},342869,"v0.1.1","### 🚀 功能特性\n- **Agent**：添加对话历史支持并改进错误处理（[#121](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F121)）\n- **Agent**：在 Agent 上下文中公开工具和模式（[#122](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F122)）\n- **Agent**：添加模型上下文（[#124](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F124)）\n\n### 🔧 重构\n- **示例**：将示例文件重新组织到分类目录中（[#126](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F126)）\n\n### 🐛 Bug 修复\n- **MCP**：修复超时默认值未生效的问题（[#125](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F125)）\n- **MCP**：将重连逻辑移至 Connect 方法中（[#127](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F127)）\n\n### 📦 依赖更新\n- **文档**：将 blades 版本升级至 v0.1.0（[#129](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F129)）\n\n### 👥 新贡献者\n- **@lkzz** 在 [#125](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fpull\u002F125) 中完成了首次贡献\n\n### 🔗 完整变更日志\n[查看完整变更日志](https:\u002F\u002Fgithub.com\u002Fgo-kratos\u002Fblades\u002Fcompare\u002Fv0.1.0...v0.1.1)","2025-11-13T15:21:21",{"id":179,"version":180,"summary_zh":181,"released_at":182},342870,"v0.1.0","⏺ 更改日志 v0.1.0\n\n  🚀 功能\n\n  - Claude 提供者：添加支持多通道的 Anthropic 提供者 (#43)\n  - Gemini 提供者：添加包含错误常量和函数的 Gemini 模型提供者 (#38)\n  - 工具架构：对工具架构进行重大重构，增加类型化支持 (#41, #68, #110, #111, #114)\n  - JSON Schema：使用 github.com\u002Fgoogle\u002Fjsonschema-go 处理 jsonschema (#35)\n  - 图像与音频：添加图像和音频支持 (#7, #44)\n  - 会话管理：\n    - 添加会话记录与存储 (#51, #64, #66, #78)\n    - 添加会话上下文管理 (#112)\n    - 简化会话与状态管理 (#117)\n  - 图形流程：\n    - 添加图形处理器 (#67)\n    - 为图形添加重试中间件 (#100)\n    - 添加条件判断及并行等待支持 (#69, #77, #80)\n  - 评估系统：添加评估类型与接口 (#72, #86)\n  - MCP 支持：添加带有解析器的 MCP 客户端支持 (#81, #90)\n  - 中间件：\n    - 添加支持回调的确认中间件 (#71)\n    - 添加追踪中间件 (#79)\n    - 添加日志记录中间件 (#103)\n  - 流式传输：重构流式 API，使其使用直接迭代器函数，并支持提前终止 (#102, #104)\n  - 代理增强：\n    - 在 NewAgent 中添加模型提供者验证 (#116)\n    - 在模型请求中添加指令字段 (#119)\n    - 添加代理工具 (#114)\n  - 文档：添加文档翻译与构建工作流 (#88, #83)\n\n  🐛 修复\n\n  - 移除 .DS_Store 文件 (#14)\n  - 修复示例及 OpenAI 提供者中的流关闭问题 (#9, #15, #36)\n  - 修复 Chain RunStream 以异步方式流式输出结果 (#5)\n  - 修复拼写错误：histroy_agent → history_agent (#4)\n  - 修复顺序提示丢失问题 (#61)\n  - 修复 SearchMemory 范围内存功能在循环单词匹配到内存时崩溃的问题 (#63)\n  - 修复图形并行等待问题 (#77)\n  - 修复条件判断与并行等待的 bug (#80)\n  - 修复文档翻译输出路径问题 (#91)\n  - 修复文档中使用说明与用户提示的问题 (#93)\n  - 修复消息：移除 TextPart 字符串表示中的多余括号 (#98)\n  - 修复 MCP 无效请求参数问题 (#115)\n\n  🔧 重构\n\n  - 提供者：使用选项模式重构客户端，并简化类型 (#54)\n  - 工具：将 Tool.Handle 转换为 ToolHandler 接口 (#41, #68, #110, #111)\n  - 代理：统一处理器接口与中间件 API (#60, #108, #113)\n  - 会话：用消息历史替换基于任务的记录方式 (#64, #84, #85)\n  - 提示模板：重构为支持上下文 (#57)\n  - 泛型：进行大规模泛型重构 (#58)\n  - 可流式化：重构为通过迭代器实现 (#101)\n  - 图形任务：重构图形任务实现 (#89)\n  - 会话上下文：添加调用上下文 (#97, #106)\n  - 选项：将 Option 重命名为 AgentOption，并改进上下文处理 (#105)\n\n  🏗️ 架构改进\n\n  - 添加内存、存储和工具组件 (#50)\n  - 对整个代码库中的泛型进行重构 (#58)\n  - 移除流程转换系统 (#62)\n  - 为 Prompt 结构体添加 latest 方法 (#52)","2025-11-11T14:02:55"]