Sessions
A Session groups one or more environments together and provides session-level operations.Creating Sessions
From Simulators
Create sessions from pre-built simulator snapshots:From Tasks
Create sessions from a pre-defined task:From Artifacts
Create sessions from specific snapshots:Session Operations
Reset
Reset all environments to their initial state:Execute Commands
Run shell commands across all environments:Get State
Retrieve the current application state (database mutations, file changes):Get Public URLs
Get browser-accessible URLs for each environment:Evaluate
Evaluate the session against task criteria:Snapshot
Create a checkpoint of all environments:Disk Snapshot
Create a disk-only snapshot (faster, no memory state):Accessing Environments
List All Environments
Get Environment by Alias
Heartbeats
Sessions automatically send heartbeats to keep environments alive. The heartbeat is started automatically when creating a session.Serialization
Sessions can be serialized for persistence and later restoration:Cleanup
Always close sessions when done to free resources:Browser Login
For environments with login flows, use thelogin method with Playwright:
Session Properties
| Property | Type | Description |
|---|---|---|
session_id | str | Unique session identifier |
task_public_id | str | None | Task ID if created from task |
envs | list[Environment] | List of environments |