Sandbox runtime

A sandbox provides an isolated workspace with files and command execution. An agent uses one when its tools need to inspect a repository, transform a document, or run a program.

For example, an agent preparing a report can place input files in a sandbox, execute a transformation, and retrieve the result. The sandbox supplies the workspace. The agent or workflow run records the overall task.

A session and its commands

A session can serve several commands and file operations. Its lifetime is independent of any one command.

OperationPurpose
File accessRead inputs, write working files, and retrieve results.
Synchronous commandRun a short operation and receive buffered output.
Async command jobTrack a longer command's status and output.
TerminalExplore or debug the workspace interactively.

A ready session doesn't imply a command succeeded. Command output and exit status describe that operation's result. Session state describes workspace availability.

Session lifecycle

StateMeaning
pendingVeryfront accepted the session request.
provisioningThe workspace is starting.
runningThe session accepts commands and file operations.
errorThe session failed or became unavailable.
deletingThe session is closing.

Wait for the session to be running before using it. Retrieve or store required outputs before closing it. Workspace files are not automatically published as project artifacts.

Where it fits

A server runtime can host an agent that uses a sandbox tool. A job runtime can use a sandbox for one processing step. The sandbox doesn't replace either execution model.

Next