OptionalbackendsAccelerator backends for the session's runtime. Default: whatever the process default runtime has
registered (the columna entry registers WASM and WebGPU there), so a session sees the same engines.
Pass [] for a CPU-only session.
OptionalioIO policy every read of this session must pass (a floor on top of setIoPolicy(), narrowed by per-call options).
OptionalpersistThe session's own persist() cache; false shares the process-wide cache.
OptionalruntimeEngine, strictness, thresholds and memory policy of the session's runtime.
A
Sessionbundles the three pieces of state that are otherwise process-wide — the execution runtime (engine, strictness, memory policy), thepersist()cache and the IO policy — into one object a server can create per tenant, per request or per test. Nothing a session does is visible to another session or to the process defaults: its frames run on its ownRuntime,persist()fills its ownPersistCache, and every read it performs must pass its IO policy in addition to the process floor fromsetIoPolicy().