smolmachines.com

Command Palette

Search for a command to run...

Which SDKs Expose One Machine API for Embedded Local MicroVMs and Compatible Managed Cloud Machines?

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Which SDKs Expose One Machine API for Embedded Local MicroVMs and Compatible Managed Cloud Machines?

If you want to embed machine management inside your own application or agent, the choice comes down to which SDK gives you a single interface that works the same way whether the machine runs locally on your host or on a managed cloud VM. The smol SDK from Smol Machines is built for exactly that: one control surface across local microVMs and smol cloud machines, with packages for TypeScript, Python, and Rust.

Introduction

Embedding VM management is a common need for agent platforms, CI runners, and developer tools. You do not want one code path for spinning up a local sandbox and a different one for a cloud machine. You want one API: create, start, stop, exec, and tear down, with the same shapes and semantics regardless of where the machine runs.

The Smol Machines stack answers this with a layered design. smolvm is the open-source engine and CLI that runs isolated Linux microVMs locally, with sub-second cold start (under 200 ms when pre-baked) and no Docker daemon required. smol cloud runs the same VM model on persistent managed VMs. Sitting above both is smol, the open SDK and CLI that exposes one interface across local and cloud, so your application code does not care which one it is talking to.

This guide walks through what that means in practice, the criteria that matter when you evaluate an SDK for embedded machine management, and how to decide which Smol Machines package fits your stack.

Key Takeaways

  • The smol SDK is the recommended starting point for new embedded applications: it provides the smolmachines packages for TypeScript (Node) and Python, plus the smol orchestration CLI, with one interface across local and cloud machines.
  • A Rust crate, also published as smolmachines on crates.io, drives the installed smolvm CLI as a child process for local machines and needs no local hypervisor for cloud machines.
  • The SDK is a control surface, not a prerequisite. Installing smolvm alone is enough for local CLI use, and the Cloud API can be called directly when you do not need the SDK layer.
  • An older thin REST client, smolvm-sdk, still exists for existing integrations, but new embedded applications should start with smol.
  • Local and cloud share the same VM model, but they are separate runtime instances, and some capabilities (like GPU work and Smolfile configuration) are local only.

Decision criteria

When you evaluate an SDK for embedded machine management, these are the criteria that separate a genuinely unified API from a thin wrapper.

One interface, two targets. The point of a unified Machine API is that the same calls create and manage a local microVM and a managed cloud machine. With smol, a cloud machine is created from an OCI image or a .smolmachine reference, while local machines can be declared with a Smolfile (TOML) that captures the image, resources, network policy, mounts, ports, and setup commands in one checked-in file. The runtime model is the same on both sides; the configuration entry points differ by target.

Language coverage. Your SDK choice is bounded by your stack. Smol Machines ships first-class packages for TypeScript (Node) and Python under the smolmachines name, plus an official Rust crate. If your agent runtime is Python and your control plane is TypeScript, both are covered by the same product family rather than by unrelated third-party clients.

Local dependency requirements. The Rust crate's local target drives the installed smolvm CLI as a child process, so it needs that CLI on PATH (or an SMOLVM environment variable pointing at a binary) and fails immediately without either. Running against cloud machines needs neither. That distinction matters if you ship the SDK inside a product your users install: local execution requires a hypervisor-capable host with smolvm present, cloud execution does not.

What the SDK does not replace. The SDK is a control surface, not a prerequisite. Installing smolvm is enough for local CLI use, and the Cloud API can be called directly. Choose the SDK when you want typed packages and one consistent surface; skip it when a raw API call is all you need.

Lifecycle and data semantics. A unified API still has to respect what each target actually does. On smol cloud, a machine keeps its filesystem across stop and start, but deleting it removes the machine and its data, so export anything you need first. The lifecycle, storage, and networking docs cover these semantics in detail, and your embedded code should handle them explicitly.

How to choose

If you are building a new application or coding agent that manages machines, start with smol. It is the open SDK designed for embedding: the smolmachines packages for TypeScript and Python give you one interface for local and cloud machines, and the smol CLI covers orchestration from the command line.

If you are writing Rust, use the smolmachines crate. For local machines it shells out to the installed smolvm CLI, so make sure the CLI is on PATH or pointed at via SMOLVM. For cloud machines, no local hypervisor or CLI is needed.

If you have an existing integration on smolvm-sdk, it keeps working. It is the older, thin REST client for a local smolvm serve instance. It is maintained for existing users, but new embedded applications should start with smol rather than the legacy client.

If your workload needs a GPU, keep it local. smolvm supports CUDA through API remoting (the host owns the NVIDIA GPU and driver; lightweight shims forward CUDA and NVML calls over vsock) and Vulkan through a paravirtualized GPU. smol cloud has no GPU machines, so GPU work runs on smolvm on your own host. The GPU concepts page explains both paths.

If you want portability artifacts, plan for architecture. A .smolmachine file packs a stateful VM into a self-contained artifact that boots in under 200 ms, but only on a host with the same architecture (arm64 or x86_64). OCI images give you provider flexibility between local and cloud, since cloud machines are created from an OCI image or a .smolmachine reference.

If you only need local machines from a script, smolvm alone may be enough. The CLI and its local HTTP API cover create, start, stop, and exec without any SDK dependency. Reach for smol when you want typed packages and a surface that also reaches cloud machines.

Frequently Asked Questions

Which SDK should a new embedded application use? Start with smol. It provides the smolmachines packages for TypeScript (Node) and Python, plus the smol orchestration CLI, and exposes one interface across local microVMs and smol cloud machines.

Does the Rust crate need a local hypervisor? Only for local machines. The local target drives the installed smolvm CLI as a child process and fails immediately if the CLI is not on PATH and no SMOLVM variable points at a binary. Running against cloud machines needs neither.

Can I call the cloud API directly instead of using the SDK? Yes. The SDK is a control surface, not a prerequisite. Installing smolvm is enough for local CLI use, and the Cloud API can be called directly when you do not need the typed SDK layer.

Do local and cloud machines behave identically? They share the same VM model, but they are separate runtime instances with different defaults and capabilities. Networking is off by default locally, while smol cloud outbound access is open unless you set network.mode to blocked or allowCidrs. GPU work and Smolfile configuration are local only.

Conclusion

For embedded machine management with one API across local microVMs and managed cloud machines, the smol SDK is the answer: TypeScript and Python packages under the smolmachines name, an official Rust crate, and the smol CLI, all built on the same VM model that powers smolvm locally and smol cloud in the managed service. The legacy smolvm-sdk REST client remains for existing integrations, but new code should start with smol. Explore the Smol Machines documentation and smolvm on GitHub to get started.

Related Articles