{"id":29482886,"url":"https://github.com/SmythOS/sre","last_synced_at":"2025-07-15T02:02:47.458Z","repository":{"id":299633029,"uuid":"998134875","full_name":"SmythOS/sre","owner":"SmythOS","description":"The Operating System for Agents","archived":false,"fork":false,"pushed_at":"2025-07-10T14:45:55.000Z","size":24410,"stargazers_count":187,"open_issues_count":4,"forks_count":21,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T21:17:35.730Z","etag":null,"topics":["agent-framework","agents","agi","ai","ai-agents","artificial-intelligence","autogpt","autonomous-agents","chatgpt","langchain","llm","llmops","mcp","multi-agent","multi-agent-systems","n8n","openai","orchestration","rag","retrieval-augmented-generation"],"latest_commit_sha":null,"homepage":"https://smythos.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SmythOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-07T23:53:06.000Z","updated_at":"2025-07-10T16:51:54.000Z","dependencies_parsed_at":"2025-07-03T18:29:54.426Z","dependency_job_id":null,"html_url":"https://github.com/SmythOS/sre","commit_stats":null,"previous_names":["smythos/sre"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/SmythOS/sre","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmythOS%2Fsre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmythOS%2Fsre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmythOS%2Fsre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmythOS%2Fsre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SmythOS","download_url":"https://codeload.github.com/SmythOS/sre/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmythOS%2Fsre/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265386079,"owners_count":23756747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-framework","agents","agi","ai","ai-agents","artificial-intelligence","autogpt","autonomous-agents","chatgpt","langchain","llm","llmops","mcp","multi-agent","multi-agent-systems","n8n","openai","orchestration","rag","retrieval-augmented-generation"],"created_at":"2025-07-15T02:02:03.300Z","updated_at":"2025-07-15T02:02:47.449Z","avatar_url":"https://github.com/SmythOS.png","language":"TypeScript","readme":"# SmythOS - The Operating System for Agentic AI\n\n[![Homepage](https://img.shields.io/badge/_Homepage-SmythOS-green?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJHSURBVHgBfVNNqBJRFL7jT1IYCeUqcRG+AsGVFLhIJIIHLVq93MRsSgpTWgRudaELBRctBDeB2qpdohsVdSOKok+eBC4UAiNSKX9440PtzYydM9yJqV4eOPfOvff8fd85Q8jFosElHo8fJhIJN71TgTJkj+CjWj6sVqu2KIo7VBCuUCg8VNj9E0iLSyQSuQmOx7VaLS4IAjqKsJ/jx3K5PKlUKg88Ho/p74ok58lkkkXDTCbziuO4rz9BMDvP898Ain04HL7fUVksFp+SyeS93+mn02kODKXHer3OYmbQTalUeoLveI8VbTabNQ36o1wuH0nOdrtdiw4iBTsYDALtdjuhwCsR2mw22e12e1YsFo/+gGC1WvW0MilALpd7Tg3UCo4kY4vFooOEV5SEq/r9/gqSD8GXASVQ6mXqJCgCiIjE7/e7Op3OWa/Xe03fNRhZo1arb7darRcMwxCDwXCN/EeAAw53m832FpJ+xyCIj8dKHA7HOygv7XQ6ryogCAoI4nq9FiViGKl7N7xer03uJe47t9t9KxwO97vdrlyiigYSG43GS7PZfJcG3OGi0+lOpVM0GrVB74+RRGB6Kw+Rz+e7HovF7sDVBC+CwSC2GNsogH4mcou0Wq0KymP0ej25BDKfz09SqdSzUCj00Wg03gfjc8xqMplwJ3D+wrLsgewvYySBQOAAhufxaDT6QIcHp0sEB348Hldms1k5m80eUh8NuUAkdqrV6iP8gRAKHbBTl8ulUfC196+UiSPpdPppPp9/sy/jL4yPfDIO4aFTAAAAAElFTkSuQmCC\u0026logoWidth=14)](https://smythos.com)\n[![Discord](https://img.shields.io/badge/Discord-Join%20Chat-5865F2?style=flat-square\u0026logo=discord\u0026logoColor=white)](https://discord.gg/smythos)\n[![](https://img.shields.io/badge/📄_Code_License-MIT-green)](https://github.com/SmythOS/sre/blob/main/LICENSE)\n\n[![Watch Video](https://img.youtube.com/vi/KDFu9s0Nm38/maxresdefault.jpg)](https://www.youtube.com/watch?v=KDFu9s0Nm38)\n\nEverything you need to build, deploy, and manage intelligent AI agents at scale. SmythOS is designed with a philosophy inspired by operating system kernels, ensuring a robust and scalable foundation for AI agents.\n\n[SDK Documentation](https://smythos.github.io/sre/sdk/) | [SRE Core Documentation](https://smythos.github.io/sre/core/) | [Code Examples](examples)\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](./docs/images/sre-diagram.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://img.youtube.com/vi/TRETl7AG-Gc/maxresdefault.jpg)](https://www.youtube.com/watch?v=TRETl7AG-Gc)\n\n\n### Method 1: Using the CLI (Recommended)\n\nInstall the [CLI](packages/cli/) globally and create a new project:\n\n```bash\nnpm i -g @smythos/cli\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/sdk\n```\n\nCheck the [Examples](examples), [documentation](https://smythos.github.io/sre/sdk/) and [Code Templates](https://github.com/SmythOS/sre-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/core`\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/ACL 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/sdk`\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/cli`\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    //Importing the agent workflow\n    const agent = Agent.import(agentPath, {\n        model: Model.OpenAI('gpt-4o'),\n    });\n\n    //query 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\u003e\n\u003csummary\u003e\u003cstrong\u003eClick to expand:\u003c/strong\u003e Stream Mode Example - Real-time response streaming with events\u003c/summary\u003e\n\n```typescript\n    const events = await agent.prompt('Hello, how are you ?').stream();\n    events.on('content', (text) =\u003e {\n        console.log('content');\n    });\n\n    events.on('end', /*... handle end ... */)\n    events.on('usage', /*... collect agent usage data ... */)\n    events.on('toolCall', /*... ... */)\n    events.on('toolResult', /*... ... */)\n    ...\n\n```\n\n\u003c/details\u003e\n\nWant chat mode ? easy\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eClick to expand:\u003c/strong\u003e Chat Mode Example - Conversational agent with memory\u003c/summary\u003e\n\n```typescript\n    const chat = agent.chat();\n\n    //from 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    //the difference between agent.prompt() and chat.prompt() is that the later remembers the conversation\n```\n\n\u003c/details\u003e\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\u003e\n\u003csummary\u003e\u003cstrong\u003eClick to expand:\u003c/strong\u003e Complete Article Writer Agent - Full example using LLM + VectorDB + Storage\u003c/summary\u003e\n\n```typescript\nimport { Agent, Model } from '@smythos/sdk';\n\nasync function main() {\n    // 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    // 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 }) =\u003e {\n            // 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) =\u003e e?.metadata?.text).join('\\n');\n\n            // 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            // Storage - Save the article\n            const storage = agent.storage.S3({\n                /*... S3 Config ...*/\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    // 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/details\u003e\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/ACL 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\u003e\n\u003csummary\u003e\u003cstrong\u003eClick to expand:\u003c/strong\u003e Basic SRE Setup - Default development configuration\u003c/summary\u003e\n\n```typescript\n// you don't need to explicitly initialize SRE\n// we are just showing you how it is initialized internally\n// const sre = SRE.init({\n//     Cache: { Connector: 'RAM' },\n//     Storage: { Connector: 'Local' },\n//     Log: { Connector: 'ConsoleLog' },\n// });\n\nasync function main() {\n    // your agent logic goes here\n}\n\nmain();\n```\n\n\u003c/details\u003e\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\u003e\n\u003csummary\u003e\u003cstrong\u003eClick to expand:\u003c/strong\u003e Production SRE Setup - Enterprise-grade configuration with custom connectors\u003c/summary\u003e\n\n```typescript\nconst sre = SRE.init({\n    Account: { Connector: 'EnterpriseAccountConnector', Settings: { ... } },\n    Vault: { Connector: 'Hashicorp', Settings: { url: 'https://vault.company.com' } },\n    Cache: { Connector: 'Redis', Settings: { url: 'redis://prod-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    // your agent logic goes here\n}\n\nmain();\n\n```\n\n\u003c/details\u003e\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/LLM**: `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## 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://smythos.com)\n-   Join our [community](https://discord.gg/smythos) to stay updated on new features, connectors, and capabilities.\n\n---\n\n/smɪθ oʊ ɛs/\n\nRide the llama. Skip the drama.\n","funding_links":[],"categories":["TypeScript","📚 Projects (1974 total)","MCP Servers","App"],"sub_categories":["MCP Servers","Agent Platforms"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSmythOS%2Fsre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSmythOS%2Fsre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSmythOS%2Fsre/lists"}