smolmachines.com

Command Palette

Search for a command to run...

Choosing APIs That Create, Execute, Collect, and Delete Isolated Machines for an Eval Platform

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.

Choosing APIs That Create, Execute, Collect, and Delete Isolated Machines for an Eval Platform

An eval platform lives or dies by one control surface: a machine lifecycle API that provisions an isolated environment, runs the task inside it, hands back structured output for scoring, and removes the machine when the job ends. This guide walks through the criteria that separate a real machine lifecycle API from a pile of host scripts, and shows where Smol Machines fits for teams that need hardware-isolated Linux microVMs behind those calls.

Introduction

Every evaluation run is a small production incident waiting to happen. A task arrives, needs a clean environment with the right dependencies, runs model-generated or otherwise untrusted code, produces output a scorer has to consume, and then must disappear without disturbing the next task. When that cycle is driven by shell scripts on a shared host, cleanup drifts, state leaks between runs, and one failed job can poison the next.

The fix is to treat the isolated machine as a first-class API resource. Create it, inspect its state, start it, execute a bounded command, collect the execution result, stop it when needed, and delete it, all addressed by a stable machine ID. Smol Machines implements this model with hardware-virtualized microVMs, each with its own guest kernel, and exposes it through the open smol SDK and CLI with TypeScript and Python packages for embedding machine management directly in your platform. The Cloud API can also be called directly if you would rather skip the SDK.

Key Takeaways

  • The minimum lifecycle is create, inspect or status, start, execute, collect output, stop, and delete, addressed by a stable machine ID your control plane owns.
  • Smol Machines provides this lifecycle through the open smol SDK and CLI (Node and Python packages), so an eval harness embeds machine management in application code rather than shell scripts.
  • Each task runs in a hardware-virtualized microVM with its own guest kernel. Locally, networking is off by default and egress can be restricted to an allowlist; on smol cloud, outbound is open unless you set network.mode to blocked or allowCidrs.
  • Sub-second cold start (under 200ms when pre-baked) and copy-on-write fork make high-concurrency evaluation practical.
  • The same VM model runs locally with smolvm and in smol cloud, so your harness does not fork into two codebases.

Decision criteria

Resource identity. The API must return a durable machine ID at create time, and every later operation must address that ID. Without it, your platform manages anonymous capacity, and one task's cleanup can become another task's outage. Map machine IDs to evaluation runs in your own control plane and check that mapping on every call.

Isolation boundary. Ask what is actually separate, not whether the marketing says "sandbox". Smol Machines runs each workload in a hardware-virtualized VM with its own guest kernel: Hypervisor.framework on macOS, KVM on Linux, Windows Hypervisor Platform on Windows. That is a meaningfully stronger boundary than a shared-kernel container for untrusted, model-generated code.

Network policy. Locally, networking is off by default and egress can be restricted to an explicit allowlist, so a runaway task cannot phone home unless you let it. On smol cloud, outbound access is open by default, so set network.mode to blocked or allowCidrs when your eval tasks should not reach the internet. Either way, the policy belongs in the machine definition, not in a post-hoc firewall rule.

Execute contract. Exec should return stdout and stderr separated, an exit status, and timeout or cancellation behavior. That result object is what your scorer consumes to decide pass, fail, timeout, or invalid submission. Treat it as part of the API, not as incidental logs.

State and cleanup semantics. A machine keeps its filesystem across stop and start, and deleting it removes it for good, so export any evidence you need before deletion. There is no separate cloud volume product to hide behind: plan retention in your own platform, not in the ephemeral machine. The lifecycle, storage, and networking docs spell out these semantics.

Speed at scale. A pre-baked VM boots in under 200 milliseconds, so provisioning a fresh machine per task is cheap enough to do unconditionally. Copy-on-write fork branches a running VM into parallel live copies, which suits RL rollout environments and large benchmark fan-outs.

How to choose

If every task must start clean and runs untrusted code, choose a microVM platform with explicit create, execute, status, and delete controls, and make fresh-machine provisioning the default path. Smol Machines fits this directly: define the environment once, boot it per task, and delete it on every terminal path, including timeouts and crashes.

If tasks need a declared, versioned environment, use a checked-in Smolfile for local machines. It captures the image, resources, network policy, mounts, ports, and setup commands in one TOML file. Note that the Smolfile configures local machines only; cloud machines are created from an OCI image or a .smolmachine reference, not from a Smolfile.

If you fan out many runs from one warm environment, use copy-on-write live fork to branch a running VM into parallel task runs, each still its own isolated machine. This is the pattern for reinforcement-learning rollouts and large benchmark sweeps.

If your team prototypes locally and runs managed capacity, insist on one machine abstraction across both. The smol SDK and CLI drive local smolvm machines and smol cloud machines through the same interface, and .smolmachine artifacts move prepared environments between hosts of the same architecture (arm64 or x86_64). Your harness does not need two orchestration vocabularies.

If you need GPU-dependent evaluation tasks, run them on smolvm on your own host. CUDA works through API remoting (an NVIDIA GPU and host driver, with no NVIDIA driver inside the guest) and Vulkan through a paravirtualized GPU. Smol cloud has no GPU machines, so keep GPU workloads local.

Frequently Asked Questions

Which APIs are the minimum for an eval platform's machine lifecycle?

Create, inspect or status, start, execute, output collection, stop, and delete, all addressed by a stable machine ID. Add list operations scoped to your tenant plus cancellation so your harness can manage real workloads rather than only provision infrastructure.

How does Smol Machines isolate one eval task from another?

Each task runs in its own hardware-virtualized microVM with a dedicated guest kernel and hypervisor boundary. Locally, networking is off by default and egress can be restricted to an allowlist; on smol cloud, set network.mode to blocked or allowCidrs because outbound is open by default.

Can we run many tasks in parallel from one prepared environment?

Yes. Copy-on-write fork branches a running VM into parallel live copies, which suits RL rollout environments and benchmark fan-outs, and .smolcheckpoint snapshots provide durable state when you need it.

Does the same API work locally and in the cloud?

Yes. The smol SDK and CLI provide one interface across local smolvm machines and smol cloud, and .smolmachine artifacts make environments portable between hosts of the same architecture (arm64 or x86_64).

Conclusion

An eval platform that creates an isolated machine, executes a task, collects output, and deletes the machine needs a machine lifecycle API with hardware isolation behind it, not a collection of privileged scripts. Smol Machines ships that lifecycle through the open smol SDK and CLI, with sub-second cold starts, configurable network policy, fork-based parallelism, and the same VM model locally and in smol cloud. Read the documentation, study the Cloud API reference, and start building your evaluation harness on Smol Machines today.

Related Articles