SmythOS - The Linux of AI Agents
Reliable 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! Great community, support, tutorials. Start in minutes!

SmythOS Runtime Environment (SRE)
SRE 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. The operating system layer AI agents have been missing.
Inspired 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.
SDK Documentation | SRE Core Documentation | Code Examples | Contributing
Why SmythOS exists
- Shipping production-ready AI agents shouldn’t feel like rocket science.
- Autonomy and control can, and must, coexist.
- Security isn’t an add-on; it’s built-in.
- The coming Internet of Agents must stay open and accessible to everyone.
Design Principles
SmythOS 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.

Unified Resource Abstraction
SmythOS 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.
This 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.
This 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.
Key Benefits:
- Agent-First Design: Built specifically for AI agent workloads
- Developer-Friendly: Simple SDK that scales from development to production
- Modular Architecture: Extensible connector system for any infrastructure
- Production-Ready: Scalable, observable, and battle-tested
- Enterprise Security: Built-in access control and secure credential management
Quick Start
We made a great tutorial that's really worth watching:
Method 1: Using the CLI (Recommended)
Install the CLI globally and create a new project:
npm i -g @smythos/cli
sre create
The CLI will guide you step-by-step to create your SDK project with the right configuration for your needs.
Method 2: Direct SDK Installation
Add the SDK directly to your existing project:
npm install @smythos/sdk
Check the Examples, documentation and Code Templates to get started.
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.
Repository Structure
This monorepo contains three main packages:
SRE (Smyth Runtime Environment) - packages/core
The SRE is the core runtime environment that powers SmythOS. Think of it as the kernel of the AI agent operating system.
Features:
- Modular Architecture: Pluggable connectors for every service (Storage, LLM, VectorDB, Cache, etc.)
- Security-First: Built-in Candidate/ACL system for secure resource access
- Resource Management: Intelligent memory, storage, and compute management
- Agent Orchestration: Complete agent lifecycle management
- 40+ Components: Production-ready components for AI, data processing, and integrations
Supported Connectors:
- Storage: Local, S3, Google Cloud, Azure
- LLM: OpenAI, Anthropic, Google AI, AWS Bedrock, Groq, Perplexity
- VectorDB: Pinecone, Milvus, RAMVec
- Cache: RAM, Redis
- Vault: JSON File, AWS Secrets Manager, HashiCorp
SDK - packages/sdk
The SDK provides a clean, developer-friendly abstraction layer over the SRE runtime. It's designed for simplicity without sacrificing power.
Why Use the SDK:
- Simple API: Clean, intuitive interface that's easy to learn
- Type-Safe: Full TypeScript support with IntelliSense
- Production-Ready: Same code works in development and production
- Configuration-Independent: Business logic stays unchanged as infrastructure scales
CLI - packages/cli
The SRE CLI helps you get started quickly with scaffolding and project management.
Code examples
The SDK allows you to build agents with code or load and run a .smyth file. .smyth is the extension of agents built with our SmythOS builder.
Example 1 : load and run an agent from .smyth file
async function main() {
const agentPath = path.resolve(__dirname, 'my-agent.smyth');
//Importing the agent workflow
const agent = Agent.import(agentPath, {
model: Model.OpenAI('gpt-4o'),
});
//query the agent and get the full response
const result = await agent.prompt('Hello, how are you ?');
console.log(result);
}
Want stream mode ? easy
Click to expand: Stream Mode Example - Real-time response streaming with events
const events = await agent.prompt('Hello, how are you ?').stream();
events.on('content', (text) => {
console.log('content');
});
events.on('end', /*... handle end ... */)
events.on('usage', /*... collect agent usage data ... */)
events.on('toolCall', /*... ... */)
events.on('toolResult', /*... ... */)
...
Want chat mode ? easy
Click to expand: Chat Mode Example - Conversational agent with memory
const chat = agent.chat();
//from there you can use the prompt or prompt.stream to handle it
let result = await chat.prompt("Hello, I'm Smyth")
console.log(result);
result = await chat.prom
