Import Studio Agents into SRE
If you’ve created an agent in SmythOS Studio (Visual Canvas), you don’t need to rebuild it to run locally. Export the agent as a .smyth file, add a default_model, and run it inside the SmythOS Runtime Environment (SRE).
This guide shows you the quickest path: export, add a default_model, import the .smyth into SRE, and test it with Terminal Chat.
Before you start
Before you import your Studio agent into SRE, make sure you have the right setup:
- You’ll need to be able to open your workflow in the SmythOS Studio builder so you can export it.
- On your machine, have Node.js installed and the SRE CLI set up.
- If your agent uses LLM-based components, keep your API key for OpenAI, Anthropic, or another provider handy.
And if you’re new to building visually, you can take a quick look at the Studio Canvas guide before you go further.
Step 1. Export your agent from Studio
Open your agent in Studio and export it as a .smyth file.
For example, you might have a simple agent skill named test that takes a name and echoes back Hello, <name>.
Step 2. Add the required default_model
SRE requires the .smyth file to include a default_model. This field is missing in Studio exports, so you’ll need to add it manually.
Here’s what you need to add:
{
"default_model": "gpt-4.o"
}
Replace "gpt-4o" with the LLM you plan to use, such as "gpt-5" or "claude-3-sonnet".
Step 3. Import the .smyth file into SRE
Next, bring your exported agent into your SRE project.
- Copy your
.smythfile into the SRE project folder. - Create a new file (for example,
myAgent.ts) and import the agent:
import { agentImport } from "sre/agent";
const agentPath = "./myAgent.smyth";
export const myAgent = agentImport(agentPath);
Step 4. Test the agent with Terminal Chat
Once imported, you can quickly test the agent with the built-in Terminal Chat helper.
In your index.ts file:
import { terminalChat } from "./terminalChat";
import { myAgent } from "./myAgent";
terminalChat(myAgent);
Then run the project:
$ npm start
? Enter session ID: demo-session
> Hello Raul
< Hello Raul`
Component compatibility in SRE
Not every Studio component works in SRE. Here’s a quick compatibility table:
| Component | SRE status | Notes |
|---|---|---|
| GenAI LLM | Supported | Works with your provider API key |
| LLM Assistant | Supported | Default choice for chat style workflows |
| Classifier | Supported | Uses your LLM provider |
| Image Generator | Supported | Feature set depends on provider |
| Web Search | Not supported | Studio credit based |
| Web Scrape | Not supported | Studio credit based |
| Node.js component | Not supported | Use local code or Node.js scripts alongside SRE |
FAQs
What’s next
- Understand execution in the Runtime overview
- Design richer workflows with Studio Canvas
- Start faster using Agent Templates
- Deploy securely with the Deployments guide