Skip to main content
The Sandbox API provides isolated command environments and filesystems. Use a session for repository inspection, code execution, file processing, or an agent tool that needs a workspace.

Sessions and lifetime

The session ID connects commands, files, and terminal access to the same environment. A created session must become ready before it can accept work. A lifetime policy limits how long the session remains available. A heartbeat updates activity for idle-timeout handling; it does not replace that policy. Copy out artifacts you need before the session is deleted or expires.

Commands and terminals

A command can run synchronously, stream output, or continue in the background. Background commands have IDs for reading status and output or requesting cancellation. A WebSocket terminal provides interactive access to the same environment. Command streams use newline-delimited JSON (application/x-ndjson). They are separate from the SSE run-event streams in the Execution API.

Files and project context

File operations address the selected session’s filesystem. Session files are separate from project source and uploads, which belong to the Projects API. Project context identifies the billing project. An environment can supply a snapshot of variables at session creation; later configuration changes do not automatically update an existing session. For example, a support agent can use a sandbox to inspect an attached file. The session holds the working files, while the agent run records execution progress. Their IDs, lifetimes, and results remain separate.

Get started

Run a command in a sandbox covers session creation, readiness, execution, and cleanup. The Veryfront Code sandbox guide shows application-level usage.

API references