Skip to main content
An Environment is a single VM in a Session. Access via session.envs or session.get_env(alias).
session = plato.sessions.create(envs=[
    Env.simulator("espocrm", alias="crm"),
    Env.simulator("gitea", alias="git"),
])

crm = session.get_env("crm")
desktop = session.desktop_env       # or None

Declaring envs

Build env configs with the Env helper, then pass to plato.sessions.create(envs=[...]).
from plato.v2 import Env, SimConfigCompute

Env.simulator("espocrm")                       # the sim's example version
Env.simulator("espocrm", alias="crm")          # name it
Env.artifact("artifact-abc123")                # pin to a specific version
Env.artifact("artifact-abc123", alias="crm")
Env.resource(                                  # blank VM with custom resources
    "custom-service",
    SimConfigCompute(cpus=4, memory=8192, disk=20000),  # MB
    alias="beefy-vm",
)
Env.simulator(name) boots whatever artifact is configured as the sim’s example version. Not every sim has one set, and the example can change underneath you. For reproducible runs, grab an artifact ID from the sim’s Versions list in the Plato dashboard and use Env.artifact(...).

Operations

reset()

Reset just this env without touching others.
crm.reset()

get_state()

state = crm.get_state()
print(state.mutations)

close()

Tear down just this VM. Usually session.close() is what you want.
crm.close()

env.sdk — sim-specific client

env.sdk lazy-loads the sim’s own client based on the env’s simulator field (resolved from plato.sims.{name}). For desktop envs (currently ubuntu-vm), this is the entire computer-use surface — see Computer Use → Tools.
desktop = session.desktop_env
desktop.sdk.status()
desktop.sdk.computer(...)

Properties

PropertyTypeDescription
job_idstrUnique VM/job identifier
aliasstrHuman-readable alias
simulatorstr | NoneSim name (e.g. "espocrm", "ubuntu-vm")
artifact_idstr | NoneSource artifact ID
is_desktopboolTrue for desktop / computer-use envs
mesh_ipstr | NoneWireGuard mesh IP
internal_hostnamestr{alias}.plato.internal — reachable from other VMs in the session
session_idstrParent session ID