Persistence
How Freestyle VMs handle persistence, session storage, and state management.
Freestyle lets you decide how persistent your VMs should be. We currently offer three tiers of persistence:
-
Ephemeral: Ephemeral VMs exist for the duration you are using them. Once you shut them down, all data is deleted. This means you never pay for keeping the VMs stored.
-
Cache: Cache VMs are unique to Freestyle. You can define the priority of VMs to keep around, and they will be stored for a period of time after. We will always prioritize deleting at lower priority, before then deleting higher priority VMs with the oldest last access time. We do not guarantee that cache VMs will be stored indefinitely, they may be deleted at any time.
-
Persistent: Persistent VMs are stored indefinitely until you delete them. This is useful for long-running applications or those that require state to be maintained across restarts.
Why this matters?
Different VMs have different purposes.
While sometimes you just need a workbench, sometimes you want a job to stop and start, while maintaining its past history. It's an easy misconception to think ephemeral VMs can't run long running tasks, however that is not the case. There are lots of long running tasks that don't need to be stored after the fact, and there are uses for persistent VMs that start and stop a ton for lots of quick small tasks.
Cache VMs are ideal when you would prefer to have an existing VM that is pre-setup for fast startup times, but where the VM is not the source of truth. If you're building an AI SWE of any kind, these are likely ideal, as the code source of truth likely lives somewhere else. The VM serves as a workbench/devbox, and while it would be ideal for performance reasons not to have to rebuild the environment, it also doesn't need to be stored reliably forever.
Persistent VMs are for when the VM itself is the source of truth. This is useful for applications that need to maintain state across restarts, or for long-running tasks that need to be resumed. Persistent VMs are stored indefinitely until you delete them.