In short.
smolvm local-api is a skill and script bundle for developers building clients or agent tools for local virtual machines, but anyone who can reach its plain API can control machines. Its practical guidance covers checking guest command exit codes, waiting for the workload before uploading files, using the installed binary's schema and deleting machines before stopping the server. Upstream documentation reports lifecycle results on specific macOS, Linux and Windows versions, with uneven coverage. The helper scripts make their assertions inspectable, but leave gaps in HTTP status checking, failure handling and cleanup enforcement. No independent execution results are available; current compatibility, performance and isolation strength are not assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete docs/local-api folder at revision 9890e8a28b06a03270de95488122535ba690210b: SKILL.md, README.md, references/api-fields.md, references/traps.md, references/windows.md, and the preflight, serve-start, lifecycle-check and cleanup scripts. Repository LICENSE and THIRD-PARTY-NOTICES.md provide the accompanying rights evidence. Runtime implementation, binaries, bundled libraries, linked installation and other skill folders, external issues and release artifacts are outside this scope. No code was executed. Upstream run accounts are attributed historical evidence; current runtime behavior, complete endpoint coverage, performance and isolation guarantees remain unassessed.
The overview
Identity
The resource is the docs/local-api folder within smol-machines/smolvm. Its entry point is SKILL.md, supported by README.md, three reference pages and four Bash scripts. It teaches applications and assistants to operate an installed smolvm runtime through its local HTTP API.
The folder supplies instructions and helpers; the runtime and guest images are separate requirements. Its original location is [https://github.com/smol-machines/smolvm/tree/main/docs/local-api]. The fixed source revision is 9890e8a28b06a03270de95488122535ba690210b.
Assessment
The bundle is useful when an application needs to create, execute work in and remove smolvm machines through HTTP. Its most valuable detail is the distinction between a successful request and a successful workload: a guest command can fail inside an HTTP 200 response, and an acknowledged upload can be hidden after the workload container starts.
It provides a concrete starting point for client development, including readiness checks and a final machine-absence check. Applications still need their own error handling and cleanup guarantees. Although application operations can use HTTP without shelling out, the supplied helpers themselves invoke the CLI for tasks including startup and cleanup.
Users
The stated audience includes developers building clients, automation harnesses, agent tools or Model Context Protocol backends over smolvm. Implementing that integration remains the developer's task; the folder provides a procedure and examples rather than a complete client SDK.
Beginners need familiarity with shell commands, JSON requests and virtual machines. Experienced developers will find useful details about schema changes, workload readiness, reconnectable execution and platform differences. Windows users have a separate PowerShell-oriented reference because Unix sockets and the supplied Unix preflight helper do not apply there.
Capabilities
The central recipe covers machine creation, startup, workload readiness, command execution, streamed output, file upload and download, stopping, deletion and confirmation that the machine is absent. The references also explain pause and resume, including preservation of a running workload's state.
The README additionally describes WebSocket interaction, execution sessions that survive a disconnected client, resumable logs, directory listings, live resizing and warm-pool endpoints. These are documented API capabilities; the bundled lifecycle helper exercises a narrower set and does not establish the behavior of every listed endpoint.
Using it
Requirements
The supplied helpers require Bash, an installed smolvm binary, curl and host Python 3 for JSON parsing. The binary can be found through PATH or the SMOLVM environment variable. On Linux, the preflight helper requires read and write access to /dev/kvm. On macOS, it checks hardware virtualization availability and rejects an excessively long VM socket path.
The lifecycle example requests 2048 MiB of guest memory and uses python:3.12-alpine with a command that stays alive. This allocation is an example, not an established minimum. Image availability and architecture must suit the guest; server-local images require an explicitly permitted directory on the documented newer releases.
Windows is documented separately over loopback TCP. Its reported session was elevated, so requirements for an unelevated account are unknown. Minimum operating-system versions and general hardware sizing are not established by these files.
Mechanism
smolvm serve exposes machine operations under /api/v1/machines through a Unix socket or TCP listener. The server controls machines whose workloads run in containers inside the guests. File requests resolve against the workload container when it is running and another namespace beforehand, which explains how an early upload can become hidden by a later container mount.
Clients must inspect response bodies. A guest command's exitCode carries its outcome even when HTTP returns 200. Create requests use network, memoryMb and cmd; the documented API rejects unknown fields from v1.22.2, while earlier versions could silently ignore them. A long-lived cmd prevents an interpreter image from repeatedly exiting and leaving gaps in which execution requests fail.
For reconnectable execution, the README describes a client-supplied execId, output cursors using after and next, and numbered stdin frames for retry handling. It specifies an 8 MiB unread-output buffer and a 120-second reader-absence limit after which output can be lost with offsets reported. The lifecycle helper does not cover this recovery protocol.
Setup
The documented Unix sequence starts with scripts/preflight.sh, followed by scripts/serve-start.sh. The startup helper defaults to a Unix socket under its state directory and waits for a successful /health response. It records the address, process ID and log. If its recorded server is still running, it reuses that server and ignores a newly supplied listen address.
Before writing request bodies, export the installed binary's schema with smolvm serve openapi -o ./openapi.json. Read the create-request fields from that export. Obtain the server version from /health: the documentation records an OpenAPI info.version value of 0.5.2 across several much newer binary versions.
After starting a machine, wait for a successful workload command before uploading files. File-route paths should be absolute and URL-encoded. At teardown, delete machines before stopping the server, because server shutdown leaves machines running. The cleanup helper attempts this ordering, with the enforcement limits described below.
Example
For an agent-tool prototype, the supplied lifecycle helper creates a machine using python:3.12-alpine, network set to true, memoryMb set to 2048 and a persistent shell sleep loop as cmd. It starts the machine, waits for WORKLOAD_READY from an execution request, then checks a normal command and a deliberately failing command whose expected exitCode is 3.
It subsequently expects three streamed lines and an exit event, uploads PAYLOAD123 to /tmp/abs.txt through an encoded file route, requires an identical download, and stops and deletes the machine. Its final check requires a machine lookup to return the NOT_FOUND error code. These are expectations encoded in the supplied script; no new execution results are available.
Assessment & evidence
Limitations
A plain server has no token, certificate or other authentication. The documented Unix socket uses mode 0600 and same-user access; plain loopback TCP is reachable by other local users. Mutual TLS uses SMOLVM_SERVE_TLS_CERT, SMOLVM_SERVE_TLS_KEY and SMOLVM_SERVE_TLS_CLIENT_CA, with --mtls-client-cn available to restrict the client identity. Its auxiliary plain loopback listener exposes health, readiness, capacity and metrics routes, rather than machine-control routes.
The lifecycle helper does not capture HTTP status codes, so its failing-command check verifies exitCode handling without itself proving the documented HTTP 200 response. It checks for a streaming exit event without asserting its exit value and discards the stop response. Failed checks do not stop subsequent steps: a readiness timeout still leads to later execution and upload attempts.
Cleanup is best effort. It deletes recorded names with the smolskill- prefix and uses --cascade, which also removes branch descendants. Other custom names are skipped. Deletion failures do not prevent server shutdown, and remaining machines are reported without an explicit failing exit status. Process detection depends on platform and configured paths; --reap sends a forced kill to every matching VM it finds, including VMs belonging to other work.
Coverage is incomplete for mutual-TLS machine operations, pools, rollout-executor routes, checkpoints and newer reconnectable execution features. The references also identify inconsistent route parameter names and checkpoint routes missing from the exported schema, which can affect generated clients.
Reasoning
The skill's value comes from checking guest-produced values and final machine state. A healthy server does not establish workload readiness, a successful request does not establish command success, and a stopped server does not establish that its machines have stopped. These distinctions directly affect reliable client design.
The upload explanation connects a visible symptom to container namespace changes, giving developers a concrete ordering rule. Earlier Linux failures remain relevant even though v1.22.2 reportedly did not reproduce the problem in three attempts per host. That limited observation does not establish a universal fix.
For applications, the sensible adaptation is to make workload readiness a real gate, validate transport and workload outcomes separately, and enforce teardown completion. The supplied helpers illustrate these concerns but do not enforce all of them.
Alternatives
For terminal-driven work and ordinary shell scripts, SKILL.md points to the smolvm CLI and the related dev-env guide. The HTTP approach is intended for programs that need direct machine control without invoking a CLI for each operation. The related guide's contents are outside this folder and are not assessed here.
Developers can also build a client from the locally exported OpenAPI schema instead of adapting the Bash examples. The documented parameter-name inconsistencies and omitted checkpoint routes mean generated coverage needs inspection. These files provide no comparative evidence about other virtualization products.
Evidence
The fixed source contains all nine files in docs/local-api, together with the repository LICENSE and THIRD-PARTY-NOTICES.md. The source folder at that revision is available at [https://github.com/smol-machines/smolvm/tree/9890e8a28b06a03270de95488122535ba690210b/docs/local-api].
SKILL.md contains dated upstream accounts of lifecycle checks and platform-specific observations. The scripts expose their actual assertions, allowing a distinction between intended checks and what their code verifies. No independent runtime results are available, and the folder does not include complete raw logs or release-binary checksum values for the reported runs.
The historical record includes a Linux aarch64 v1.22.2 failure of the former global-empty-machine check because image-seed helpers remained listed. A later v1.23.0 account reports success through the target-specific NOT_FOUND check. These different final conditions do not establish the same degree of host cleanup.
Access & freshness
Costs
No operating-cost estimate, hosted-service price or paid-support price is provided. Apache-2.0 grants the covered copyright and patent permissions without a license charge, but that does not establish the cost of hardware, cloud hosting, image downloads or storage.
The Windows reference reports 30 GB of state in one session, without establishing a typical storage budget. General CPU overhead, memory overhead, throughput and storage reclamation costs are unknown.
Rights
The repository LICENSE and third-party notice identify smolvm as Apache-2.0. Redistribution requires a copy of the license, retention of relevant notices, prominent notices for modified files and preservation of applicable NOTICE attribution when such a file is included. Trademark permission is limited, and the work is supplied without warranty.
Runtime release bundles carry additional component licenses. The notices identify libkrun and MoltenVK as Apache-2.0, libkrunfw as LGPL-2.1-only with a GPL-2.0-only Linux kernel, and the macOS virglrenderer and libepoxy libraries as MIT. Those libraries are outside the selected skill folder; distributing runtime bundles requires attention to their separate obligations.
Freshness
The source snapshot is dated 2026-11-16. Its newest documented local-api lifecycle account is for smolvm v1.29.0 on macOS 27.0.1 arm64, dated 2026-10-15, over Unix sockets and loopback TCP. This does not establish the latest available smolvm release or compatibility with subsequent releases.
Linux aarch64 has a reported v1.23.0 Unix-socket pass on 2026-10-04, although the headline Linux verification stamp remains v1.18.2. Windows x86_64 has a v1.22.2 account dated 2026-10-03. Linux x86_64 is described only through an older v1.14.2 account; Intel Mac behavior is unverified. No v1.29.0 Linux or Windows lifecycle result is supplied.
The traps page explicitly corrects an older statement about --guest-rollout-port: its correction says the flag first shipped in v1.29.0 and that no v1.28.2 release occurred. The environment-variable alternative is also documented.
Actions
Before adopting the examples, confirm virtualization access, dependency availability and the server's version, then export that binary's schema. Prefer the restricted Unix socket where available. Any TCP configuration needs deliberate access control; the documented plain setup should remain on loopback.
In an application, separate transport errors, malformed responses and nonzero guest exit codes. Gate uploads on a successful workload command, use a workload that stays alive, and require evidence that the target machine has been deleted before considering teardown complete. On PowerShell 5.1, the Windows reference recommends curl.exe to read error bodies that Invoke-WebRequest can obscure.
Review cleanup names, cascade behavior and process-detection scope before using the helpers. Keep --reap out of routine cleanup unless its broader forced-kill scope is intended. TLS lifecycle operations, pools, checkpoints, reconnection behavior and platforms beyond the dated accounts need separate evaluation.
