LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmith_openapi_clientresourcesSandboxesBoxes
Class●Since v0.8

Boxes

Copy
class Boxes

Bases

APIResource

Constructors

Properties

Methods

View source on GitHub
constructor
constructor→ Boxes
property
_client: Langsmith
method
create→ APIPromise<SandboxResponse>
method
createSnapshot→ APIPromise<SnapshotResponse>
method
delete→ APIPromise<void>
method
generateDownloadURL→ APIPromise<DownloadURLResponse>
method
generateServiceURL→ APIPromise<ServiceURLResponse>
method
getStatus→ APIPromise<SandboxStatusResponse>
method
list→ PagePromise<SandboxResponsesItemsCursorGetPagination, SandboxResponse>
method
retrieve→ APIPromise<SandboxResponse>
method
start→ APIPromise<SandboxResponse>
method
stop→ APIPromise<void>
method
update→ APIPromise<SandboxResponse>

Create a new sandbox from a snapshot. Provide at most one of snapshot_id or snapshot_name; if neither is provided, the server uses the default snapshot. snapshot_name accepts a Docker-style name or name:tag reference (a bare name resolves to name:latest).

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

Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the DB record.

Generate a tokenized link that downloads a single file from a sandbox with no further authentication. This mints a token rather than creating an addressable resource, so it returns 200 with no Location header. The token pins the sandbox, the file path, and the response content type and disposition, so a link cannot be repointed at another file. Links never expire unless expires_in_seconds is set. The link is served from the sandbox service domain, not the API host.

Create a short-lived JWT for accessing an HTTP service running on a specific port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw token, and its expiry.

Retrieve the lightweight status of a sandbox for polling.

List sandboxes for the authenticated tenant, with optional filtering, sorting, and pagination. Page with page_size and cursor: replay the response's next_cursor until it comes back null, which is the only signal that no pages remain. Cursors are opaque and only valid on this endpoint; do not parse or construct one.

Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.

Start a stopped or failed sandbox. This endpoint is not idempotent.

Stop a ready sandbox. This endpoint is not idempotent; the filesystem is preserved for later restart.

Update a sandbox's display name, retention, resources, tags, or proxy configuration. The name must be unique within the tenant. Proxy configuration sent to a sandbox that is not running is stored and applied when it next starts.