Sessions are served from the sandbox controller at
https://api.sandbox.stateset.com/api/v1, and authenticate with the sandbox
scheme β Authorization: ApiKey <key>, not Bearer. The key needs
sandbox:write
for anything that mutates a session, and sandbox:read to inspect one.Create a session
The budget is the point. All three limits are optional, and a session with none of them set has nothing stopping it.Run work in it
timeoutMs is bounded to 1sβ10min. Each execution is charged against the
budget, and the response carries what remains.
Rotation, and what survives it
A session outlives the sandbox it started on. When the underlying sandbox reaches its timeout, the session entersrotating, provisions a fresh one, and
carries context across:
- the working directory
- environment variables
- any custom state you have written to the session context
Surviving a disconnect
A session is addressable after your client dies. Reattach with theclientId
you supplied at creation:
POST .../heartbeat while you hold a session so the controller can tell a
live client from an abandoned one.
Lifecycle
Next steps
Active-horizon agents
The durable supervisor that drives sessions like these across hours.
Sandbox API flow
The one-shot path, for work that fits in a single sandbox.
Runtime selection
Container, gVisor or MicroVM for the
isolation field above.Security guide
What a session can reach, and how to narrow it.