Templates
Pre-built Templates
Ready-to-use templates for common development environments.
Available Templates
Lelantos provides six pre-built templates that cover the most common development and AI agent environments. These templates are ready to use immediately with no build step.
| Template | Base | Description |
|---|---|---|
base | Ubuntu 22.04 | Minimal Linux environment with core utilities. Good starting point for custom workloads. |
python | Python 3.12 | Python runtime with commonly used libraries pre-installed (pip, setuptools, etc.). |
node | Node.js 22 | Node.js runtime with npm. Ready for JavaScript/TypeScript workloads. |
bun | Bun | Bun runtime for fast JavaScript/TypeScript execution and package management. |
playwright | Chromium | Browser testing environment with Playwright and Chromium pre-installed. |
code-interpreter | Jupyter | Jupyter kernel for interactive code execution. Ideal for data analysis agents. |
Usage Examples
base
The default template. Use it when you need a clean Linux environment:
const sandbox = await client.createSandbox({
templateID: "base",
});
await sandbox.commands.run("apt-get update && apt-get install -y python3");python
Pre-configured Python 3.12 environment:
const sandbox = await client.createSandbox({
templateID: "python",
});
await sandbox.commands.run("pip install openai langchain");
const result = await sandbox.commands.run("python -c 'import sys; print(sys.version)'");
console.log(result.stdout); // 3.12.xnode
Node.js 22 with npm:
const sandbox = await client.createSandbox({
templateID: "node",
});
await sandbox.commands.run("npm install express");
const result = await sandbox.commands.run("node -e 'console.log(process.version)'");
console.log(result.stdout); // v22.x.xbun
Bun runtime for fast JS/TS execution:
const sandbox = await client.createSandbox({
templateID: "bun",
});
const result = await sandbox.commands.run("bun --version");
console.log(result.stdout);playwright
Browser automation with Chromium:
const sandbox = await client.createSandbox({
templateID: "playwright",
});
await sandbox.uploadFile("/home/user/scrape.js", `
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
await browser.close();
})();
`);
const result = await sandbox.commands.run("node /home/user/scrape.js");
console.log(result.stdout); // Example Domaincode-interpreter
Jupyter kernel for interactive code execution:
const sandbox = await client.createSandbox({
templateID: "code-interpreter",
});
// Execute Python code via the Jupyter kernel
await sandbox.commands.run("python -c 'print(2 + 2)'");All pre-built templates include DNS configuration and full internet access. They use the default resource allocation of 2 vCPU and 512 MB RAM. For different resource requirements, create a custom template.