Why templates exist
Cold-booting a Linux kernel, initializing the userspace, and waiting for a process supervisor to be ready takes time. Templates eliminate that cost. The boot already happened at build time; creating a sandbox is a restore, not a boot. At scale — especially when an AI agent creates dozens of sandboxes in rapid succession — the difference between a multi-second boot and a sub-second restore is the difference between a responsive experience and a slow one. Templates also let you bake in expensive one-time setup. If your workload always needs a specific version of a compiler, a set of Python packages, or a pre-warmed model file, you can install those at build time and never pay for them at sandbox-creation time.Building a template
A template build is asynchronous. You provide an OCI image name and, optionally, a set of build steps to run inside the booted image before the snapshot is taken. You can also give the template a human-readable alias so you can reference it by name rather than by an opaque artifact ID.Waiting for the build to finish
build() returns immediately with a build handle. Use wait() to block until the build succeeds or fails, or poll the build status yourself and stream build logs incrementally.
build.logs() with an offset and pass the returned nextOffset to the following call:
Template aliases
An alias is a mutable, human-readable name that points to a specific template artifact. You set an alias when you callbuild(). Later, when you create a sandbox, you pass the alias name and FissionPlane resolves it to the correct immutable artifact ID at the moment the sandbox is admitted.
This means you can update what "python-tools" points to by building a new template with the same alias — without changing any code that creates sandboxes from it. Old artifact IDs remain valid; they are never overwritten.
Creating a sandbox from a template
Pass the alias or artifact ID as thetemplate argument when creating a sandbox. That’s the only required field.
Managing templates
List, retrieve, and delete templates through the SDK.Deleting a template does not affect sandboxes already created from it. Those sandboxes continue to run normally because they hold their own copy of the filesystem state.
End-to-end: build and use a template
1
Build the template
Pass an OCI image, an alias, and any setup steps you need baked in.
2
Wait for the build
Poll status or block with
wait(). Stream build logs to monitor progress.3
Create sandboxes from it
Reference the alias when creating sandboxes. The snapshot boots in milliseconds.