Overview
A session is one running agent, started from an environment. The harness runs unmodified inside an isolated sandbox. You send messages, the agent works, and every step lands in an ordered transcript you can read back or stream live.Lifecycle
Sessions pause themselves after the environment’s
idle_timeout_s without input. Sending a message to a paused session returns 409; call resume first (it takes a few seconds while the workspace is restored).
If the environment’s model is a Veri deployment, each session gets a 24-hour model access key that can only call that deployment. It is revoked when the session ends.
Transcript
GET /v1/sessions/{id}/events?after_seq=N returns a page of events, oldest first. GET /v1/sessions/{id}/stream is a server-sent-events stream of the same rows: id is the event’s seq, event is its type. Reconnect with Last-Event-ID (or ?after_seq=) to continue without gaps; the stream closes after the session’s terminal status event.
Payloads above 64 KiB (a large file read, for example) are stored in object storage; the event carries a 1 KiB preview and
payload_ref.
Lifecycle transitions also fire webhooks: session.started, session.paused, session.ended, session.failed.
Pricing and limits
A session is billed at a flat rate per hour while its sandbox is awake, settled per minute. Paused and ended sessions cost nothing. Model calls to a Veri deployment are billed through that deployment; calls to your own endpoint are billed by its provider. Setbudget_usd to pause the session automatically when its sandbox spend reaches the ceiling; the transcript records a session.budget_exhausted event and the session’s failure_code reads budget_exhausted. Resume it to continue (the budget still applies, so raise it first or start a new session).
A workspace can have two sessions that are not ended at a time, paused sessions included. Creating a third returns 429 CONCURRENT_SESSION_LIMIT. Contact us to raise the limit.
