sandboxes

Capture a snapshot from a sandbox

Changed on

Create a snapshot by capturing the current state of a sandbox or promoting an existing checkpoint.

post/api/v2/sandboxes/boxes/{name}/snapshot

Request

  • Base URL
    https://api.smith.langchain.com
  • URL
    https://api.smith.langchain.com/api/v2/sandboxes/boxes/{name}/snapshot
  • Auth
    • API key in header X-API-Key
    • or API key in header X-Tenant-Id
    • or HTTP bearer

Path parameters

namestring required

Sandbox display name

Request body

checkpointstring

if omitted, creates a fresh checkpoint from the running VM

confirm_allow_snapshot_secret_valuesboolean

Must be true when the included settings hold literal secret values (opaque values rather than workspace secret references, and any env var value), acknowledging that the snapshot stores them and every sandbox created from it can use them.

descriptionstring

Description says what this snapshot's image can do, so a caller can hand it to an agent as a capability summary. At most 1024 characters.

docker_imagestring

sandbox-local Docker image to export

fs_capacity_bytesinteger

required for Docker image export unless the sandbox has a capacity

includestring[]

Sandbox settings to carry into the snapshot. Sandboxes created from it start with each carried setting their create request leaves unset: "mounts" (the mount_config, with its auth), "proxy_config", "env_vars", "resources" (CPU and memory), "lifecycle" (idle_ttl_seconds, delete_after_stop_seconds, preserve_memory_on_stop), and "labels" (merged under this request's labels; reserved com.langchain.* labels are left out). "all" names every one of these. VM memory is captured with include_memory, not here. Warning: mounts, proxy_config and env_vars carry the sandbox's credentials, and every sandbox created from the snapshot can use them.

include_memoryboolean

IncludeMemory, when true, captures a full VM memory snapshot alongside the filesystem clone. Only honored when the sandbox is running AND Checkpoint is omitted (i.e. a fresh in-VM checkpoint is requested). Defaults to false to keep snapshots small unless memory restore is explicitly desired.

labelsSandboxesLabels
namestring required
tagstring

mutable Docker-style tag; defaults to "latest"

Response

Created

created_atstring
created_bystring
descriptionstring

Description says what this snapshot's image can do, so a caller can hand it to an agent as a capability summary.

docker_imagestring
fs_capacity_bytesinteger
fs_used_bytesinteger
idstring
image_digeststring
includedstring[]

The settings this snapshot carries, in include terms: sandboxes created from it start with each one their create request leaves unset. Env var values are never returned.

labelsSandboxesLabels
memory_snapshot_size_bytesinteger

MemorySnapshotSizeBytes is non-nil iff the snapshot was captured with VM memory state. A non-nil value is the canonical signal that this snapshot can warm-restore from memory; nil means rootfs only.

mount_configSandboxesSandboxMountConfig (unresolved $ref)
namestring
registry_idstring
source_sandbox_idstring
statusstring
status_messagestring
tagsstring[]

Tags currently resolving to this snapshot, under Name. A snapshot with no tags is dangling — addressable only by id.

updated_atstring

Changes

    • info

      added the optional property /////// to the response with the status

    • info

      added the new optional request property