The SmythOS Runtime Environment (SRE) is an open-source, cloud-native runtime for agentic AI. Secure, modular, and production-ready, it lets developers build, r
The SmythOS Runtime Environment (SRE) is an open-source, cloud-native runtime for agentic AI. Secure, modular, and production-ready, it lets developers build, r
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 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.
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:
We made a great tutorial that's really worth watching:
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.
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.
This monorepo contains three main packages:
packages/coreThe SRE is the core runtime environment that powers SmythOS. Think of it as the kernel of the AI agent operating system.
Features:
Supported Connectors:
packages/sdkThe SDK provides a clean, developer-friendly abstraction layer over the SRE runtime. It's designed for simplicity without sacrificing power.
Why Use the SDK:
packages/cliThe SRE CLI helps you get started quickly with scaffolding and project management.
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.
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.prompt('Do you remember my name ?");
console.log(result);
//the difference between agent.prompt() and chat.prompt() is that the later remembers the conversation
In this example we are coding the agent logic with the help of the SDK elements.
Click to expand: Complete Article Writer Agent - Full example using LLM + VectorDB + Storage
…
Security is a core tenant of SRE. Every operation requires proper authorization through the Candidate/ACL system, ensuring that agents only access resources they are permitted to.
const candidate = AccessCandidate.agent(agentId);
const storage = ConnectorService.getStorageConnector().user(candidate);
await storage.write('data.json', content);
Your business logic stays identical while infrastructure scales: When you use the SDK, SmythOS Runtime Environment will be implicitly initialized with general connectors that covers standard agent use cases.
Click to expand: Basic SRE Setup - Default development configuration
// you don't need to explicitly initialize SRE
// we are just showing you how it is initialized internally
// const sre = SRE.init({
// Cache: { Connector: 'RAM' },
// Storage: { Connector: 'Local' },
// Log: { Connector: 'ConsoleLog' },
// });
async function main() {
// your agent logic goes here
}
main();
But you can explicitly initialize SRE with other built-in connectors, or make your own Use cases :
Click to expand: Production SRE Setup - Enterprise-grade configuration with custom connectors
const sre = SRE.init({
Account: { Connector: 'EnterpriseAccountConnector', Settings: { ... } },
Vault: { Connector: 'Hashicorp', Settings: { url: 'https://vault.company.com' } },
Cache: { Connector: 'Redis', Settings: { url: 'redis://prod-cluster' } },
Storage: { Connector: 'S3', Settings: { bucket: 'company-ai-agents' } },
VectorDB: { Connector: 'Pinecone', Settings: { indexName: 'company-ai-agents' } },
Log: { Connector: 'CustomLogStore'},
});
async function main() {
// your agent logic goes here
}
main();
40+ production-ready components for every AI use case. These components can be invoked programmatically or through the symbolic representation of the agent workflow (the .smyth file).
GenAILLM, ImageGen, LLMAssistantAPICall, WebSearch, WebScrape, HuggingFaceDataSourceIndexer, DataSourceLookup JSONFilterLogicAND, LogicOR, Classifier, ForEachLocalStorage, S3ECMAScript, ServerlessCode| Feature | Description |
|---|---|
| Agent-Centric | Built specifically for AI agent workloads and patterns |
| Secure by Default | Enterprise-grade security with data isolation |
| High Performance | Optimized for high-throughput AI operations |
| Modular | Swap any component without breaking your system |
| Observable | Built-in monitoring, logging, and debugging tools |
| Cloud-Native | Runs anywhere - local, cloud, edge, or hybrid |
| Scalable | From development to enterprise production |
We welcome contributions! Please see our Contributing Guide and Code of Conduct.
This project is licensed under the MIT License.
Ride the llama. Skip the drama.
No open issues yet, or sync has not completed.