[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-SmythOS--sre":3,"tool-SmythOS--sre":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 真正成长为懂上",153609,2,"2026-04-13T11:34:59",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[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},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",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"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":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":73,"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":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":32,"env_os":97,"env_gpu":97,"env_ram":97,"env_deps":98,"category_tags":104,"github_topics":106,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":127,"updated_at":128,"faqs":129,"releases":158},7243,"SmythOS\u002Fsre","sre","The SmythOS Runtime Environment (SRE) is an open-source, cloud-native runtime for agentic AI. Secure, modular, and production-ready, it lets developers build, run, and manage intelligent agents across local, cloud, and edge environments.","SmythOS Runtime Environment（简称 SRE）是一个专为智能体（AI Agents）打造的开源云原生运行时环境，被誉为\"AI 智能体的 Linux\"。它旨在解决开发者在构建和生产部署智能体时面临的基础设施复杂、资源管理分散以及安全性难以保障等痛点。\n\n通过提供操作系统级别的抽象层，SRE 将大语言模型、向量数据库、存储和缓存等核心 AI 资源统一封装，并暴露一致的 API 接口。这意味着开发者只需编写一次代码，即可让智能体无缝运行于本地、云端或边缘设备等多种环境中，无需针对不同服务商重复适配。此外，SRE 内置了企业级的安全机制、可观测性工具以及 40 多个开箱即用的生产级组件，让智能体的工程化落地不再像“造火箭”般困难。\n\n这款工具主要面向希望高效构建、运行和管理生产级 AI 智能体的软件开发者和工程师。无论是需要精细控制代码逻辑的技术团队，还是寻求稳定基础设施支持的研究人员，SRE 都能提供坚实的底层支撑。其独特的设计灵感来源于传统操作系统内核，强调自主性与可控性的共存，致力于推动开放、安全的“智能体互联网”发展，让每个人都能轻松将创意转化为实际运行的智能应","SmythOS Runtime Environment（简称 SRE）是一个专为智能体（AI Agents）打造的开源云原生运行时环境，被誉为\"AI 智能体的 Linux\"。它旨在解决开发者在构建和生产部署智能体时面临的基础设施复杂、资源管理分散以及安全性难以保障等痛点。\n\n通过提供操作系统级别的抽象层，SRE 将大语言模型、向量数据库、存储和缓存等核心 AI 资源统一封装，并暴露一致的 API 接口。这意味着开发者只需编写一次代码，即可让智能体无缝运行于本地、云端或边缘设备等多种环境中，无需针对不同服务商重复适配。此外，SRE 内置了企业级的安全机制、可观测性工具以及 40 多个开箱即用的生产级组件，让智能体的工程化落地不再像“造火箭”般困难。\n\n这款工具主要面向希望高效构建、运行和管理生产级 AI 智能体的软件开发者和工程师。无论是需要精细控制代码逻辑的技术团队，还是寻求稳定基础设施支持的研究人员，SRE 都能提供坚实的底层支撑。其独特的设计灵感来源于传统操作系统内核，强调自主性与可控性的共存，致力于推动开放、安全的“智能体互联网”发展，让每个人都能轻松将创意转化为实际运行的智能应用。","# SmythOS - The Linux of AI Agents\n\nReliable Agent Engineering starts with great, open source infrastructure. This repository contains the **Smyth Runtime Environment** Kernel (SRE), the **Software Development Kit** (SDK) and **Command Line Interface** (CLI) for running agents and creating them with code. If you prefer visual drag & drop agent interfaces instead, check out our open source [SmythOS Visual Agent Studio](https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsmythos-studio)! Great community, support, tutorials. Start in minutes!\n\n![SRE Banner](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSmythOS_sre_readme_4b75899f3ed9.png)\n\n\u003Cbr>\n\n\u003Cdiv align=\"center\">\n\n[![Homepage](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F_www-SmythOS-2ea44f?style=flat-square&logo=data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8\u002F9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJHSURBVHgBfVNNqBJRFL7jT1IYCeUqcRG+AsGVFLhIJIIHLVq93MRsSgpTWgRudaELBRctBDeB2qpdohsVdSOKok+eBC4UAiNSKX9440PtzYydM9yJqV4eOPfOvff8fd85Q8jFosElHo8fJhIJN71TgTJkj+CjWj6sVqu2KIo7VBCuUCg8VNj9E0iLSyQSuQmOx7VaLS4IAjqKsJ\u002Fjx3K5PKlUKg88Ho\u002Fp74ok58lkkkXDTCbziuO4rz9BMDvP898Ain04HL7fUVksFp+SyeS93+mn02kODKXHer3OYmbQTalUeoLveI8VbTabNQ36o1wuH0nOdrtdiw4iBTsYDALtdjuhwCsR2mw22e12e1YsFo\u002F+gGC1WvW0MilALpd7Tg3UCo4kY4vFooOEV5SEq\u002Fr9\u002FgqSD8GXASVQ6mXqJCgCiIjE7\u002Fe7Op3OWa\u002FXe03fNRhZo1arb7darRcMwxCDwXCN\u002FEeAAw53m832FpJ+xyCIj8dKHA7HOygv7XQ6ryogCAoI4nq9FiViGKl7N7xer03uJe47t9t9KxwO97vdrlyiigYSG43GS7PZfJcG3OGi0+lOpVM0GrVB74+RRGB6Kw+Rz+e7HovF7sDVBC+CwSC2GNsogH4mcou0Wq0KymP0ej25BDKfz09SqdSzUCj00Wg03gfjc8xqMplwJ3D+wrLsgewvYySBQOAAhufxaDT6QIcHp0sEB348Hldms1k5m80eUh8NuUAkdqrV6iP8gRAKHbBTl8ulUfC196+UiSPpdPppPp9\u002Fsy\u002FjL4yPfDIO4aFTAAAAAElFTkSuQmCC&logoWidth=14)](https:\u002F\u002Fsmythos.com)&nbsp;\n[![SmythOS Visual Agent Studio](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frepo-Smyth_Studio-006b5f?style=flat-square&logo=github&logoColor=white)](https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsmythos-studio)&nbsp;\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F📄_License-MIT-ad0808?style=flat-square)](https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre\u002Fblob\u002Fmain\u002FLICENSE)\n\n\u003C\u002Fdiv>\n\n\u003Cbr>\n\n\u003Cdiv align=\"left\">\n\n### SmythOS Runtime Environment (SRE)\n\nSRE is an open-source runtime and SDK for production AI agents. It provides OS-level abstractions for AI resources—LLMs, vector databases, storage, and caching—with a unified API that works identically across all providers. Write your agent logic once, scale it anywhere. Built-in security, observability, and 40+ production-ready components included.\nThe operating system layer AI agents have been missing.\n\n\u003Cbr>\n\nInspired by the architecture of operating system kernels, SmythOS provides a robust and scalable foundation for agent orchestration and lifecycle management, giving every builder the tools to act, not just imagine.\n\n\u003C\u002Fdiv>\n\n\u003Cbr>\n\n\u003Cdiv align=\"center\">\n\n[SDK Documentation](https:\u002F\u002Fsmythos.github.io\u002Fsre\u002Fsdk\u002F) &nbsp;|&nbsp; [SRE Core Documentation](https:\u002F\u002Fsmythos.github.io\u002Fsre\u002Fcore\u002F) &nbsp;|&nbsp; [Code Examples](examples) &nbsp;|&nbsp; [Contributing](CONTRIBUTING.md)\n\n\u003C\u002Fdiv>\n\n\u003C!-- ![Watch Video](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSmythOS_sre_readme_82ccc583da6e.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=KDFu9s0Nm38)-->\n\n\u003Cdiv align=\"center\">\n\n\u003C\u002Fdiv>\n    \n\u003Cbr>\n\n## Why SmythOS exists\n\n1. Shipping production-ready AI agents shouldn’t feel like rocket science.\n2. Autonomy and control can, and must, coexist.\n3. Security isn’t an add-on; it’s built-in.\n4. The coming Internet of Agents must stay open and accessible to everyone.\n\n## Design Principles\n\nSmythOS provides a complete **Operating System for Agentic AI**. Just as traditional operating systems manage resources and provide APIs for applications, SmythOS manages AI resources and provides a unified SDK that works from development to production.\n\n![SRE Diagram](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSmythOS_sre_readme_5fa4a9eb1868.png)\n\n### Unified Resource Abstraction\n\nSmythOS provides a **unified interface for all resources**, ensuring consistency and simplicity across your entire AI platform. Whether you're storing a file locally, on S3, or any other storage provider, you don't need to worry about the underlying implementation details. SmythOS offers a powerful abstraction layer where all providers expose the same functions and APIs.\n\nThis principle applies to **all services** - not just storage. Whether you're working with VectorDBs, cache (Redis, RAM), LLMs (OpenAI, Anthropic), or any other resource, the interface remains consistent across providers.\n\nThis approach makes your AI platform **easy to scale** and incredibly flexible. You can seamlessly swap between different providers to test performance, optimize costs, or meet specific requirements without changing a single line of your business logic.\n\n**Key Benefits:**\n\n- **Agent-First Design**: Built specifically for AI agent workloads\n- **Developer-Friendly**: Simple SDK that scales from development to production\n- **Modular Architecture**: Extensible connector system for any infrastructure\n- **Production-Ready**: Scalable, observable, and battle-tested\n- **Enterprise Security**: Built-in access control and secure credential management\n\n## Quick Start\n\nWe made a great tutorial that's really worth watching:\n\n[![Watch Video](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSmythOS_sre_readme_727216b9e435.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=TRETl7AG-Gc)\n\n### Method 1: Using the CLI (Recommended)\n\nInstall the [CLI](packages\u002Fcli\u002F) globally and create a new project:\n\n```bash\nnpm i -g @smythos\u002Fcli\nsre create\n```\n\nThe CLI will guide you step-by-step to create your SDK project with the right configuration for your needs.\n\n### Method 2: Direct SDK Installation\n\nAdd the SDK directly to your existing project:\n\n```bash\nnpm install @smythos\u002Fsdk\n```\n\nCheck the [Examples](examples), [documentation](https:\u002F\u002Fsmythos.github.io\u002Fsre\u002Fsdk\u002F) and [Code Templates](https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre-project-templates) to get started.\n\n---\n\n**Note:** If you face an issue with the CLI or with your code, set environment variable LOG_LEVEL=\"debug\" and run your code again. Then share the logs with us, it will help diagnose the problem.\n\n## Repository Structure\n\nThis monorepo contains three main packages:\n\n### SRE (Smyth Runtime Environment) - `packages\u002Fcore`\n\nThe **SRE** is the core runtime environment that powers SmythOS. Think of it as the kernel of the AI agent operating system.\n\n**Features:**\n\n- **Modular Architecture**: Pluggable connectors for every service (Storage, LLM, VectorDB, Cache, etc.)\n- **Security-First**: Built-in Candidate\u002FACL system for secure resource access\n- **Resource Management**: Intelligent memory, storage, and compute management\n- **Agent Orchestration**: Complete agent lifecycle management\n- **40+ Components**: Production-ready components for AI, data processing, and integrations\n\n**Supported Connectors:**\n\n- **Storage**: Local, S3, Google Cloud, Azure\n- **LLM**: OpenAI, Anthropic, Google AI, AWS Bedrock, Groq, Perplexity\n- **VectorDB**: Pinecone, Milvus, RAMVec\n- **Cache**: RAM, Redis\n- **Vault**: JSON File, AWS Secrets Manager, HashiCorp\n\n### SDK - `packages\u002Fsdk`\n\nThe **SDK** provides a clean, developer-friendly abstraction layer over the SRE runtime. It's designed for simplicity without sacrificing power.\n\n**Why Use the SDK:**\n\n- **Simple API**: Clean, intuitive interface that's easy to learn\n- **Type-Safe**: Full TypeScript support with IntelliSense\n- **Production-Ready**: Same code works in development and production\n- **Configuration-Independent**: Business logic stays unchanged as infrastructure scales\n\n### CLI - `packages\u002Fcli`\n\nThe **SRE CLI** helps you get started quickly with scaffolding and project management.\n\n## Code examples\n\nThe SDK allows you to build agents with code or load and run a .smyth file.\n.smyth is the extension of agents built with our SmythOS builder.\n\n## Example 1 : load and run an agent from .smyth file\n\n```typescript\nasync function main() {\n    const agentPath = path.resolve(__dirname, 'my-agent.smyth');\n\n    \u002F\u002FImporting the agent workflow\n    const agent = Agent.import(agentPath, {\n        model: Model.OpenAI('gpt-4o'),\n    });\n\n    \u002F\u002Fquery the agent and get the full response\n    const result = await agent.prompt('Hello, how are you ?');\n\n    console.log(result);\n}\n```\n\nWant stream mode ? easy\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand:\u003C\u002Fstrong> Stream Mode Example - Real-time response streaming with events\u003C\u002Fsummary>\n\n```typescript\n    const events = await agent.prompt('Hello, how are you ?').stream();\n    events.on('content', (text) => {\n        console.log('content');\n    });\n\n    events.on('end', \u002F*... handle end ... *\u002F)\n    events.on('usage', \u002F*... collect agent usage data ... *\u002F)\n    events.on('toolCall', \u002F*... ... *\u002F)\n    events.on('toolResult', \u002F*... ... *\u002F)\n    ...\n\n```\n\n\u003C\u002Fdetails>\n\nWant chat mode ? easy\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand:\u003C\u002Fstrong> Chat Mode Example - Conversational agent with memory\u003C\u002Fsummary>\n\n```typescript\n    const chat = agent.chat();\n\n    \u002F\u002Ffrom there you can use the prompt or prompt.stream to handle it\n\n    let result = await chat.prompt(\"Hello, I'm Smyth\")\n    console.log(result);\n\n    result = await chat.prompt('Do you remember my name ?\");\n    console.log(result);\n\n\n    \u002F\u002Fthe difference between agent.prompt() and chat.prompt() is that the later remembers the conversation\n```\n\n\u003C\u002Fdetails>\n\n## Example 2 : Article Writer Agent\n\nIn this example we are coding the agent logic with the help of the SDK elements.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand:\u003C\u002Fstrong> Complete Article Writer Agent - Full example using LLM + VectorDB + Storage\u003C\u002Fsummary>\n\n```typescript\nimport { Agent, Model } from '@smythos\u002Fsdk';\n\nasync function main() {\n    \u002F\u002F Create an intelligent agent\n    const agent = new Agent({\n        name: 'Article Writer',\n        model: 'gpt-4o',\n        behavior: 'You are a copy writing assistant. The user will provide a topic and you have to write an article about it and store it.',\n    });\n\n    \u002F\u002F Add a custom skill that combines multiple AI capabilities\n    agent.addSkill({\n        id: 'AgentWriter_001',\n        name: 'WriteAndStoreArticle',\n        description: 'Writes an article about a given topic and stores it',\n        process: async ({ topic }) => {\n            \u002F\u002F VectorDB - Search for relevant context\n            const vec = agent.vectordb.Pinecone({\n                namespace: 'myNameSpace',\n                indexName: 'demo-vec',\n                pineconeApiKey: process.env.PINECONE_API_KEY,\n                embeddings: Model.OpenAI('text-embedding-3-large'),\n            });\n\n            const searchResult = await vec.search(topic, {\n                topK: 10,\n                includeMetadata: true,\n            });\n            const context = searchResult.map((e) => e?.metadata?.text).join('\\n');\n\n            \u002F\u002F LLM - Generate the article\n            const llm = agent.llm.OpenAI('gpt-4o-mini');\n            const result = await llm.prompt(`Write an article about ${topic} using the following context: ${context}`);\n\n            \u002F\u002F Storage - Save the article\n            const storage = agent.storage.S3({\n                \u002F*... S3 Config ...*\u002F\n            });\n            const uri = await storage.write('article.txt', result);\n\n            return `The article has been generated and stored. Internal URI: ${uri}`;\n        },\n    });\n\n    \u002F\u002F Use the agent\n    const result = await agent.prompt('Write an article about Sakura trees');\n    console.log(result);\n}\n\nmain().catch(console.error);\n```\n\n\u003C\u002Fdetails>\n\n## Architecture Highlights\n\n### Built-in Security\n\nSecurity is a core tenant of SRE. Every operation requires proper authorization through the **Candidate\u002FACL system**, ensuring that agents only\naccess resources they are permitted to.\n\n```typescript\nconst candidate = AccessCandidate.agent(agentId);\nconst storage = ConnectorService.getStorageConnector().user(candidate);\nawait storage.write('data.json', content);\n```\n\n### Development to Production Evolution\n\nYour business logic stays identical while infrastructure scales:\nWhen you use the SDK, SmythOS Runtime Environment will be implicitly initialized with general connectors that covers standard agent use cases.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand:\u003C\u002Fstrong> Basic SRE Setup - Default development configuration\u003C\u002Fsummary>\n\n```typescript\n\u002F\u002F you don't need to explicitly initialize SRE\n\u002F\u002F we are just showing you how it is initialized internally\n\u002F\u002F const sre = SRE.init({\n\u002F\u002F     Cache: { Connector: 'RAM' },\n\u002F\u002F     Storage: { Connector: 'Local' },\n\u002F\u002F     Log: { Connector: 'ConsoleLog' },\n\u002F\u002F });\n\nasync function main() {\n    \u002F\u002F your agent logic goes here\n}\n\nmain();\n```\n\n\u003C\u002Fdetails>\n\nBut you can explicitly initialize SRE with other built-in connectors, or make your own\nUse cases :\n\n- You want to use a custom agents store\n- You want to store your API keys and other credentials in a more secure vault\n- You need enterprise grade security and data isolation\n- ...\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand:\u003C\u002Fstrong> Production SRE Setup - Enterprise-grade configuration with custom connectors\u003C\u002Fsummary>\n\n```typescript\nconst sre = SRE.init({\n    Account: { Connector: 'EnterpriseAccountConnector', Settings: { ... } },\n    Vault: { Connector: 'Hashicorp', Settings: { url: 'https:\u002F\u002Fvault.company.com' } },\n    Cache: { Connector: 'Redis', Settings: { url: 'redis:\u002F\u002Fprod-cluster' } },\n    Storage: { Connector: 'S3', Settings: { bucket: 'company-ai-agents' } },\n    VectorDB: { Connector: 'Pinecone', Settings: { indexName: 'company-ai-agents' } },\n    Log: { Connector: 'CustomLogStore'},\n});\n\n\nasync function main() {\n    \u002F\u002F your agent logic goes here\n}\n\nmain();\n\n```\n\n\u003C\u002Fdetails>\n\n### Component System\n\n40+ production-ready components for every AI use case.\nThese components can be invoked programmatically or through the symbolic representation of the agent workflow (the .smyth file).\n\n- **AI\u002FLLM**: `GenAILLM`, `ImageGen`, `LLMAssistant`\n- **External**: `APICall`, `WebSearch`, `WebScrape`, `HuggingFace`\n- **Data**: `DataSourceIndexer`, `DataSourceLookup` `JSONFilter`\n- **Logic**: `LogicAND`, `LogicOR`, `Classifier`, `ForEach`\n- **Storage**: `LocalStorage`, `S3`\n- **Code**: `ECMAScript`, `ServerlessCode`\n\n## Key Features\n\n| Feature               | Description                                            |\n| --------------------- | ------------------------------------------------------ |\n| **Agent-Centric**     | Built specifically for AI agent workloads and patterns |\n| **Secure by Default** | Enterprise-grade security with data isolation          |\n| **High Performance**  | Optimized for high-throughput AI operations            |\n| **Modular**           | Swap any component without breaking your system        |\n| **Observable**        | Built-in monitoring, logging, and debugging tools      |\n| **Cloud-Native**      | Runs anywhere - local, cloud, edge, or hybrid          |\n| **Scalable**          | From development to enterprise production              |\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## Contributors\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=SmythOS\u002Fsre\" \u002F>\n\u003C\u002Fa>\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## What's Next?\n\n- We will release an open source visual agent IDE later this year.\n- Support us at [SmythOS](https:\u002F\u002Fsmythos.com)\n\n---\n\nRide the llama. Skip the drama.\n","# SmythOS - 人工智能代理领域的 Linux\n\n可靠的代理工程始于卓越的开源基础设施。本仓库包含 **Smyth 运行时环境** 内核（SRE）、用于运行和通过代码创建代理的 **软件开发工具包**（SDK）以及 **命令行界面**（CLI）。如果您更倾向于使用可视化拖放式代理界面，不妨试试我们的开源 [SmythOS 可视化代理工作室](https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsmythos-studio)！拥有活跃的社区、完善的支持与教程，几分钟即可上手！\n\n![SRE 横幅](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSmythOS_sre_readme_4b75899f3ed9.png)\n\n\u003Cbr>\n\n\u003Cdiv align=\"center\">\n\n[![主页](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F_www-SmythOS-2ea44f?style=flat-square&logo=data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8\u002F9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJHSURBVHgBfVNNqBJRFL7jT1IYCeUqcRG+AsGVFLhIJIIHLVq93MRsSgpTWgRudaELBRctBDeB2qpdohsVdSOKok+eBC4UAiNSKX9440PtzYydM9yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJq......# SmythOS - 人工智能代理领域的 Linux\n\n可靠的代理工程始于卓越的开源基础设施。本仓库包含 **Smyth 运行时环境** 内核（SRE）、用于运行和通过代码创建代理的 **软件开发工具包**（SDK）以及 **命令行界面**（CLI）。如果您更倾向于使用可视化拖放式代理界面，不妨试试我们的开源 [SmythOS 可视化代理工作室](https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsmythos-studio)！拥有活跃的社区、完善的支持与教程，几分钟即可上手！\n\n![SRE 横幅](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSmythOS_sre_readme_4b75899f3ed9.png)\n\n\u003Cbr>\n\n\u003Cdiv align=\"center\">\n\n[![官网](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F_www-SmythOS-2ea44f?style=flat-square&logo=data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8\u002F9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJHSURBVHgBfVNNqBJRFL7jT1IYCeUqcRG+AsGVFLhIJIIHLVq93MRsSgpTWgRudaELBRctBDeB2qpdohsVdSOKok+eBC4UAiNSKX9440PtzYydM9yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOPfOvff8fd8540yJqV4eOP......\n\n### SDK - `packages\u002Fsdk`\n\n**SDK** 提供了一个简洁、对开发者友好的抽象层，用于封装 SRE 运行时。它旨在保持简单的同时不牺牲功能的强大性。\n\n**为什么使用 SDK：**\n\n- **简洁的 API**：干净、直观的接口，易于上手\n- **类型安全**：全面支持 TypeScript，并提供 IntelliSense 功能\n- **生产就绪**：同一套代码可在开发和生产环境中运行\n- **与配置无关**：无论基础设施如何扩展，业务逻辑始终保持不变\n\n### CLI - `packages\u002Fcli`\n\n**SRE CLI** 可帮助您通过脚手架工具和项目管理快速入门。\n\n## 代码示例\n\nSDK 允许您通过编写代码构建代理，或者直接加载并运行一个 `.smyth` 文件。`.smyth` 是我们 SmythOS 构建工具生成的代理文件的扩展名。\n\n## 示例 1：从 .smyth 文件加载并运行代理\n\n```typescript\nasync function main() {\n    const agentPath = path.resolve(__dirname, 'my-agent.smyth');\n\n    \u002F\u002F 导入代理工作流\n    const agent = Agent.import(agentPath, {\n        model: Model.OpenAI('gpt-4o'),\n    });\n\n    \u002F\u002F 向代理提问并获取完整响应\n    const result = await agent.prompt('你好，最近怎么样？');\n\n    console.log(result);\n}\n```\n\n想要流式模式吗？很简单！\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>点击展开：\u003C\u002Fstrong> 流式模式示例——实时响应流与事件处理\u003C\u002Fsummary>\n\n```typescript\n    const events = await agent.prompt('你好，最近怎么样？').stream();\n    events.on('content', (text) => {\n        console.log('内容：' + text);\n    });\n\n    events.on('end', \u002F*... 处理结束 ... *\u002F)\n    events.on('usage', \u002F*... 收集代理使用数据 ... *\u002F)\n    events.on('toolCall', \u002F*... ... *\u002F)\n    events.on('toolResult', \u002F*... ... *\u002F)\n    ...\n\n```\n\n\u003C\u002Fdetails>\n\n想要聊天模式吗？也很简单！\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>点击展开：\u003C\u002Fstrong> 聊天模式示例——带记忆的对话型代理\u003C\u002Fsummary>\n\n```typescript\n    const chat = agent.chat();\n\n    \u002F\u002F 从此处您可以使用 prompt 或 prompt.stream 来处理对话\n    let result = await chat.prompt(\"你好，我是 Smyth\");\n    console.log(result);\n\n    result = await chat.prompt('你还记得我的名字吗？');\n    console.log(result);\n\n    \u002F\u002F agent.prompt() 和 chat.prompt() 的区别在于，后者会记住之前的对话历史。\n```\n\n\u003C\u002Fdetails>\n\n## 示例 2：文章撰写代理\n\n在本示例中，我们将借助 SDK 中的组件来实现代理的逻辑。\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>点击展开：\u003C\u002Fstrong> 完整的文章撰写代理——结合 LLM、向量数据库和存储的完整示例\u003C\u002Fsummary>\n\n```typescript\nimport { Agent, Model } from '@smythos\u002Fsdk';\n\nasync function main() {\n    \u002F\u002F 创建一个智能代理\n    const agent = new Agent({\n        name: '文章撰写代理',\n        model: 'gpt-4o',\n        behavior: '你是一名文案助手。用户会提供一个主题，你需要根据该主题撰写一篇文章并将其保存下来。',\n    });\n\n    \u002F\u002F 添加一个自定义技能，整合多种 AI 能力\n    agent.addSkill({\n        id: 'AgentWriter_001',\n        name: '撰写并存储文章',\n        description: '根据给定的主题撰写文章并将其存储',\n        process: async ({ topic }) => {\n            \u002F\u002F 向量数据库——搜索相关上下文\n            const vec = agent.vectordb.Pinecone({\n                namespace: 'myNameSpace',\n                indexName: 'demo-vec',\n                pineconeApiKey: process.env.PINECONE_API_KEY,\n                embeddings: Model.OpenAI('text-embedding-3-large'),\n            });\n\n            const searchResult = await vec.search(topic, {\n                topK: 10,\n                includeMetadata: true,\n            });\n            const context = searchResult.map((e) => e?.metadata?.text).join('\\n');\n\n            \u002F\u002F LLM——生成文章\n            const llm = agent.llm.OpenAI('gpt-4o-mini');\n            const result = await llm.prompt(`请根据以下上下文撰写一篇关于 ${topic} 的文章：${context}`);\n\n            \u002F\u002F 存储——保存文章\n            const storage = agent.storage.S3({\n                \u002F*... S3 配置 ...*\u002F\n            });\n            const uri = await storage.write('article.txt', result);\n\n            return `文章已生成并存储完毕。内部 URI：${uri}`;\n        },\n    });\n\n    \u002F\u002F 使用代理\n    const result = await agent.prompt('写一篇关于樱花树的文章');\n    console.log(result);\n}\n\nmain().catch(console.error);\n```\n\n\u003C\u002Fdetails>\n\n## 架构亮点\n\n### 内置安全机制\n\n安全性是 SRE 的核心原则之一。每项操作都需要通过 **候选人\u002FACL 系统** 进行适当的授权，以确保代理仅能访问其被允许的资源。\n\n```typescript\nconst candidate = AccessCandidate.agent(agentId);\nconst storage = ConnectorService.getStorageConnector().user(candidate);\nawait storage.write('data.json', content);\n```\n\n### 从开发到生产环境的演进\n\n您的业务逻辑在基础设施扩展时保持不变：\n当您使用 SDK 时，SmythOS 运行时环境会隐式初始化一些通用连接器，覆盖标准的代理使用场景。\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>点击展开：\u003C\u002Fstrong> 基础 SRE 设置——默认开发配置\u003C\u002Fsummary>\n\n```typescript\n\u002F\u002F 您无需显式初始化 SRE\n\u002F\u002F 这里只是展示其内部是如何初始化的\n\u002F\u002F const sre = SRE.init({\n\u002F\u002F     Cache: { Connector: 'RAM' },\n\u002F\u002F     Storage: { Connector: 'Local' },\n\u002F\u002F     Log: { Connector: 'ConsoleLog' },\n\u002F\u002F });\n\nasync function main() {\n    \u002F\u002F 您的代理逻辑在此处\n}\n\nmain();\n```\n\n\u003C\u002Fdetails>\n\n不过，您也可以显式地使用其他内置连接器初始化 SRE，或自定义连接器。\n适用场景：\n\n- 您希望使用自定义的代理存储服务\n- 您希望将 API 密钥和其他凭据存储在一个更安全的保险库中\n- 您需要企业级的安全性和数据隔离\n- …\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>点击展开：\u003C\u002Fstrong> 生产级 SRE 设置——结合自定义连接器的企业级配置\u003C\u002Fsummary>\n\n```typescript\nconst sre = SRE.init({\n    Account: { Connector: 'EnterpriseAccountConnector', Settings: { ... } },\n    Vault: { Connector: 'Hashicorp', Settings: { url: 'https:\u002F\u002Fvault.company.com' } },\n    Cache: { Connector: 'Redis', Settings: { url: 'redis:\u002F\u002Fprod-cluster' } },\n    Storage: { Connector: 'S3', Settings: { bucket: 'company-ai-agents' } },\n    VectorDB: { Connector: 'Pinecone', Settings: { indexName: 'company-ai-agents' } },\n    Log: { Connector: 'CustomLogStore'},\n});\n\nasync function main() {\n    \u002F\u002F 您的代理逻辑在此处\n}\n\nmain();\n```\n\n\u003C\u002Fdetails>\n\n### 组件系统\n\n40 多种适用于各类 AI 场景的生产就绪组件。\n这些组件可以通过编程方式调用，也可以通过智能体工作流的符号化表示（.smyth 文件）来使用。\n\n- **AI\u002FLLM**：`GenAILLM`、`ImageGen`、`LLMAssistant`\n- **外部服务**：`APICall`、`WebSearch`、`WebScrape`、`HuggingFace`\n- **数据**：`DataSourceIndexer`、`DataSourceLookup`、`JSONFilter`\n- **逻辑**：`LogicAND`、`LogicOR`、`Classifier`、`ForEach`\n- **存储**：`LocalStorage`、`S3`\n- **代码**：`ECMAScript`、`ServerlessCode`\n\n## 核心特性\n\n| 特性               | 描述                                            |\n| --------------------- | ------------------------------------------------------ |\n| **以智能体为中心**     | 专为 AI 智能体的工作负载和模式而构建 |\n| **默认安全** | 具备企业级安全性与数据隔离          |\n| **高性能**  | 针对高吞吐量的 AI 操作进行优化            |\n| **模块化**           | 可随意替换任意组件而不破坏系统        |\n| **可观测性**        | 内置监控、日志记录和调试工具      |\n| **云原生**      | 可在任何环境中运行——本地、云端、边缘或混合环境          |\n| **可扩展**          | 从开发阶段到企业级生产环境              |\n\n## 贡献\n\n我们欢迎各方贡献！请参阅我们的[贡献指南](CONTRIBUTING.md)和[行为准则](CODE_OF_CONDUCT.md)。\n\n## 贡献者\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=SmythOS\u002Fsre\" \u002F>\n\u003C\u002Fa>\n\n## 许可证\n\n本项目采用 [MIT 许可证](LICENSE)授权。\n\n## 下一步计划？\n\n- 我们将于今年晚些时候发布一款开源的可视化智能体 IDE。\n- 欢迎支持 [SmythOS](https:\u002F\u002Fsmythos.com)\n\n---\n\n驾驭 Llama，远离纷扰。","# SmythOS (SRE) 快速上手指南\n\nSmythOS Runtime Environment (SRE) 是专为生产级 AI Agent 打造的开源运行时与 SDK。它提供了操作系统级别的资源抽象（如 LLM、向量数据库、存储和缓存），通过统一的 API 屏蔽底层提供商差异，让开发者只需编写一次逻辑即可在任何环境中扩展运行。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS, 或 Windows (支持 WSL2)\n*   **Node.js**：版本 18.0 或更高 (推荐使用 LTS 版本)\n*   **包管理器**：npm (随 Node.js 安装) 或 yarn\u002Fpnpm\n*   **API Keys**：根据需求准备相关服务的密钥（如 OpenAI, Pinecone, AWS 等）\n\n> **国内开发者提示**：如果 npm 安装速度较慢，建议切换至国内镜像源（如淘宝镜像）：\n> ```bash\n> npm config set registry https:\u002F\u002Fregistry.npmmirror.com\n> ```\n\n## 安装步骤\n\n您可以选择以下两种方式之一开始使用 SRE：\n\n### 方式一：使用 CLI 创建新项目（推荐）\n\n这是最快捷的入门方式，CLI 会引导您完成项目脚手架和配置。\n\n1.  全局安装 SmythOS CLI：\n    ```bash\n    npm i -g @smythos\u002Fcli\n    ```\n\n2.  创建新项目：\n    ```bash\n    sre create\n    ```\n    *跟随终端提示完成项目初始化配置。*\n\n### 方式二：在现有项目中集成 SDK\n\n如果您已有项目，可直接安装 SDK 包：\n\n```bash\nnpm install @smythos\u002Fsdk\n```\n\n## 基本使用\n\nSRE SDK 支持加载现有的 `.smyth` 工作流文件，也支持完全通过代码构建 Agent 逻辑。\n\n### 示例 1：加载并运行 Agent\n\n假设您有一个通过 SmythOS Visual Studio 构建的 `my-agent.smyth` 文件：\n\n```typescript\nimport path from 'path';\nimport { Agent, Model } from '@smythos\u002Fsdk';\n\nasync function main() {\n    const agentPath = path.resolve(__dirname, 'my-agent.smyth');\n\n    \u002F\u002F 导入 Agent 工作流并指定模型\n    const agent = Agent.import(agentPath, {\n        model: Model.OpenAI('gpt-4o'),\n    });\n\n    \u002F\u002F 发送提示并获取完整响应\n    const result = await agent.prompt('Hello, how are you ?');\n\n    console.log(result);\n}\n\nmain().catch(console.error);\n```\n\n**进阶功能：**\n*   **流式输出**：调用 `.stream()` 方法即可实时接收内容、工具调用等事件。\n*   **对话模式**：使用 `agent.chat()` 创建具有记忆功能的会话对象，自动维护上下文历史。\n\n### 示例 2：代码构建复杂 Agent\n\n您也可以直接使用 SDK 组合各种能力（如向量检索、LLM 生成、存储）来构建 Agent：\n\n```typescript\nimport { Agent, Model } from '@smythos\u002Fsdk';\n\nasync function main() {\n    \u002F\u002F 创建智能 Agent\n    const agent = new Agent({\n        name: 'Article Writer',\n        model: 'gpt-4o',\n        behavior: 'You are a copy writing assistant. The user will provide a topic and you have to write an article about it and store it.',\n    });\n\n    \u002F\u002F 添加自定义技能：结合向量库、LLM 和存储\n    agent.addSkill({\n        id: 'AgentWriter_001',\n        name: 'WriteAndStoreArticle',\n        description: 'Writes an article about a given topic and stores it',\n        process: async ({ topic }) => {\n            \u002F\u002F 1. 向量数据库 - 搜索相关上下文\n            const vec = agent.vectordb.Pinecone({\n                namespace: 'myNameSpace',\n                indexName: 'demo-vec',\n                pineconeApiKey: process.env.PINECONE_API_KEY,\n                embeddings: Model.OpenAI('text-embedding-3-large'),\n            });\n\n            const searchResult = await vec.search(topic, {\n                topK: 10,\n                includeMetadata: true,\n            });\n            const context = searchResult.map((e) => e?.metadata?.text).join('\\n');\n\n            \u002F\u002F 2. LLM - 生成文章\n            const llm = agent.llm.OpenAI('gpt-4o-mini');\n            const result = await llm.prompt(`Write an article about ${topic} using the following context: ${context}`);\n\n            \u002F\u002F 3. 存储 - 保存文章\n            const storage = agent.storage.S3({\n                \u002F* ... S3 Config ... *\u002F\n            });\n            const uri = await storage.write('article.txt', result);\n\n            return `The article has been generated and stored. Internal URI: ${uri}`;\n        },\n    });\n\n    \u002F\u002F 调用 Agent\n    const result = await agent.prompt('Write an article about Sakura trees');\n    console.log(result);\n}\n\nmain().catch(console.error);\n```\n\n### 调试提示\n\n如果在运行过程中遇到问题，可以通过设置环境变量开启详细日志以便排查：\n\n```bash\nexport LOG_LEVEL=\"debug\"\n# 然后重新运行您的代码\n```","某电商初创团队正急于构建一套能自动处理售后退款、查询库存并回复客户的智能代理系统，以应对大促期间激增的服务请求。\n\n### 没有 sre 时\n- **环境适配痛苦**：开发人员在本地测试通过的代理逻辑，部署到云端或边缘设备时，因 LLM 接口、向量数据库和存储路径的差异，需要反复修改代码进行适配。\n- **安全机制缺失**：为了防止代理误操作或数据泄露，团队不得不手动编写大量额外的权限校验和沙箱代码，严重拖慢了上线进度。\n- **资源管理混乱**：缺乏统一的资源抽象层，切换不同的云服务商（如从 AWS S3 切换到本地存储）几乎意味着要重构整个数据访问模块。\n- **运维监控盲区**：代理在生产环境中运行时，缺乏原生的可观测性支持，出现故障后难以快速定位是模型问题还是基础设施问题。\n\n### 使用 sre 后\n- **一次编写，随处运行**：借助 sre 的统一资源抽象 API，团队只需编写一次代理逻辑，即可无缝在本地开发机、云服务器及边缘网关上运行，无需关心底层提供商差异。\n- **内置企业级安全**：sre 原生集成了安全的执行环境和模块化权限控制，团队无需重复造轮子，直接获得生产级别的安全防护能力。\n- **灵活的资源调度**：通过 sre 的操作系统级抽象，存储、缓存和向量库等资源被标准化，随意切换后端基础设施而无需改动核心业务代码。\n- **全链路可观测性**：sre 自带监控组件，实时展示代理的生命周期状态和资源消耗，让团队能迅速发现并解决运行瓶颈。\n\nsre 就像为 AI 代理提供了缺失的“操作系统”，让开发者从繁琐的基础设施适配中解放出来，专注于构建真正智能的业务逻辑。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSmythOS_sre_4b75899f.png","SmythOS","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FSmythOS_3023fc88.png","The Operating System for Agentic AI",null,"hello@smythos.com","https:\u002F\u002Fsmythos.com","https:\u002F\u002Fgithub.com\u002FSmythOS",[81,85,89],{"name":82,"color":83,"percentage":84},"TypeScript","#3178c6",95.7,{"name":86,"color":87,"percentage":88},"JavaScript","#f1e05a",3.9,{"name":90,"color":91,"percentage":92},"Go Template","#00ADD8",0.4,1254,189,"2026-04-13T12:24:33","MIT","未说明",{"notes":99,"python":97,"dependencies":100},"该工具是基于 Node.js\u002FTypeScript 的 AI 代理运行时环境和 SDK，而非 Python 项目。安装需使用 npm 或 npx 命令（例如：npm i -g @smythos\u002Fcli）。支持多种后端服务连接器（如 OpenAI、Anthropic、Pinecone、S3 等），具体资源需求取决于所连接的外部服务和代理任务的复杂度。",[101,102,103],"@smythos\u002Fsdk","@smythos\u002Fcli","typescript",[35,14,15,105,13],"其他",[107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126],"ai","artificial-intelligence","agents","autonomous-agents","llm","mcp","multi-agent","multi-agent-systems","orchestration","rag","retrieval-augmented-generation","autogpt","chatgpt","langchain","llmops","n8n","openai","agent-framework","agi","ai-agents","2026-03-27T02:49:30.150509","2026-04-14T04:34:59.592253",[130,135,140,145,149,153],{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},32519,"如何在 SmythOS SRE 中添加对 Ollama 的原生支持？","目前该功能已被接受并合并（PR #174）。实现自定义连接器时，需参考 `packages\u002Fcore\u002Fsrc\u002Fsubsystems\u002FLLMManager\u002FLLM.service\u002Fconnectors` 下的现有实现（如 Anthropic），并遵循官方文档扩展连接器。关键点是连接器类和对象必须命名为 **Ollama**，且无需在 SDK 中编写额外代码，核心包构建后会自动生成支持的类。使用时可通过 `Model.Ollama('model-name', { baseURL: 'http:\u002F\u002Flocalhost:11434\u002Fapi\u002F', ... })` 语法调用。","https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre\u002Fissues\u002F169",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},32520,"如何为 SmythOS 项目做出贡献，除了修复代码问题外还有哪些方式？","除了修复代码问题，贡献者还可以：1. 实现缺失的存储（Storage）或向量数据库（VectorDB）连接器（目前已支持 Pinecone, Milvus, S3, 本地存储，正在开发 Weaviate, Azure Blob, Google Cloud Storage 等）；2. 使用 SmythSDK 创建智能体（Agents）并在账户中分享，这能增加项目曝光度并展示社区成果（例如参考 SmythOS 创建的 Docker MCP 项目）。","https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre\u002Fissues\u002F144",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},32521,"如何在 CLI 中使用 Planner 模式运行 .smyth 智能体并查看任务侧边栏？","该功能已在 @smythos\u002Fcli v0.3.0 版本中部署。现在可以通过在命令中添加 `--mode planner` 参数来启用。完整命令格式为：`sre agent .\u002Fmyagent.smyth --chat \u003Cmodel-name> --mode planner`。启用后，终端右侧将显示待办事项列表报告器（TODO list reporter），并以不同颜色区分 `\u003Cthinking>`、`\u003Cplanning>` 等状态块，同时测量每个块的耗时。","https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre\u002Fissues\u002F117",{"id":146,"question_zh":147,"answer_zh":148,"source_url":139},32522,"如何将代码中已弃用的 @google\u002Fgenerative-ai 包迁移到新的 @google\u002Fgenai 包？","需要将核心包中使用旧版 `@google\u002Fgenerative-ai` 类的代码替换为新版 `@google\u002Fgenai` 提供的功能。修改时应保持原有功能逻辑不变，仅更新导入路径和 API 调用方式以适配新包。此问题对应的修复 PR (#156) 已被接受并合并，可参考该 PR 的具体代码变更作为迁移范例。",{"id":150,"question_zh":151,"answer_zh":152,"source_url":139},32523,"SmythOS 目前支持哪些向量数据库和存储服务？","在向量数据库（VectorDB）方面，目前支持 Pinecone 和 Milvus，Weaviate 的支持正在通过 PR 开发中。在存储服务（Storage）方面，支持 S3 和本地存储，同时已收到针对 Azure Blob Storage 和 Google Cloud Storage 的 PR 贡献。",{"id":154,"question_zh":155,"answer_zh":156,"source_url":157},32524,"在哪里可以找到 SmythOS 与 LangChain 的对比文档？","如果您在寻找 SmythOS 与 LangChain 的对比信息，可以直接在社区或 Issue 中提问获取具体解答。原文档链接可能存在错误（曾误指向 Zapier 对比页），维护者已确认会将错误的文档链接反馈给团队进行修复。","https:\u002F\u002Fgithub.com\u002FSmythOS\u002Fsre\u002Fissues\u002F72",[]]