For AI agents: the complete documentation index is available at https://enclo.nstlopez.com/llms.txt, the full documentation bundle is available at https://enclo.nstlopez.com/llms-full.txt, and this page is available as Markdown at https://enclo.nstlopez.com/guide/how-it-works.md.

How it works

Each sandbox has a private disk image under ~/.enclo. The first command boots a libkrun microVM backed by that disk alongside a per-sandbox supervisor process that executes commands and records their results. The VM stays running until stopped or until its idle timeout expires with no active commands.

On an Apple M1 Max, a cold command (including VM boot) takes about 0.25 s, and a warm command takes about 5 ms. Copying a 70 MiB file into a sandbox takes about 0.3 s.

enclo mcp exposes the same operations to an agent harness over stdio. It responds to initialize and tools/list immediately without touching disk, so a harness can start the server even on a machine where enclo is not installed yet, and the first tool call reports what is missing. Commands continue running inside their sandbox even if enclo mcp exits, and results are retained for the next session.

Enclo does not run a background daemon. Every running sandbox has its own supervisor process, and stopped sandboxes leave no host processes running.

harness ── stdio ──▶ enclo mcp ──▶ supervisor (per sandbox) ──▶ libkrun microVM
                                    run/ctl.sock                  Alpine guest, agent as init

Where this is going

This architecture is an interim step. The design documents cover a host daemon, OCI registry images, and remote deployment, none of which are built yet. Persistent running sandboxes are implemented today without a daemon. See the roadmap for the planned order of work and the decision log for the rationale behind major design choices.