SDK Overview

Official SDK libraries for smol machines. Create and manage microVM machines for secure code execution. The engine runs in-process — there is no server to start.

Available SDKs

The package is published as smolmachines on both npm and PyPI. In Python you import it from the smol module.

SDKLanguageInstall
smolmachines (Node)TypeScript / JavaScriptnpm install smolmachines
smolmachines (Python)Pythonpip install smolmachines

Features

  • Machine Management - Create, start, stop, delete machines
  • Command Execution - Run commands directly in the microVM
  • Container Support - Run OCI containers (Docker images) inside machines
  • Volume Mounts - Mount host directories into machines
  • Resource Control - Configure CPU and memory limits
  • GPU Acceleration - Vulkan access to host GPU for rendering and ML
  • Local or Cloud - Same Machine API on the embedded engine or the smolfleet cloud

Requirements

The engine runs in-process — there is no server to start. The native (local) path runs on:

  • macOS with Apple Silicon (M1/M2/M3), or
  • Linux with KVM support (/dev/kvm accessible)

The cloud transport works anywhere the package installs. See Installation for details.

Quick Example

import { Machine } from 'smolmachines';

const machine = await Machine.create({ name: 'my-machine' });
try {
  const result = await machine.exec(['echo', 'Hello!']);
  console.log(result.stdout);
} finally {
  await machine.delete();
}
from smol import Machine, MachineConfig

# Context-managed: the machine is stopped and deleted automatically on exit.
with Machine.create(MachineConfig(name="my-machine")) as machine:
    result = machine.exec(["echo", "Hello!"])
    print(result.stdout)

Next Steps