LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithresourcessandboxessnapshotsSnapshotsResourcecreate
Method●Since v0.14

create

Copy
create(
  self,
  *,
  docker_image: str,
  fs_capacity_bytes: int,
  name: str
View source on GitHub
,
description
:
str
|
Omit
=
omit
,
labels
:
Dict
[
str
,
str
]
|
Omit
=
omit
,
registry_id
:
str
|
Omit
=
omit
,
run_config
:
snapshot_create_params
.
RunConfig
|
Omit
=
omit
,
tag
:
str
|
Omit
=
omit
,
extra_headers
:
Headers
|
None
=
None
,
extra_query
:
Query
|
None
=
None
,
extra_body
:
Body
|
None
=
None
,
timeout
:
float
|
httpx
.
Timeout
|
None
|
NotGiven
=
not_given
)
->
SnapshotResponse

Parameters

NameTypeDescription
descriptionstr | Omit
Default:omit

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.

labelsDict[str, str] | Omit
Default:omit
run_configsnapshot_create_params.RunConfig | Omit
Default:omit
tagstr | Omit
Default:omit
extra_headersHeaders | None
Default:None
extra_queryQuery | None
Default:None
extra_bodyBody | None
Default:None
timeoutfloat | httpx.Timeout | None | NotGiven
Default:not_given

Create a snapshot from a Docker image (async build).

Names use lowercase registry-style components separated by slashes, up to 255 characters. The system/ namespace is read-only.

Labels seed the snapshot's labels, overriding any label of the same key derived from the Docker image.

RunConfig overrides the runtime configuration taken from the Docker image. Every sandbox created from the snapshot runs as the image's USER, in its WORKDIR, with its ENV beneath the sandbox's own env_vars; user and work_dir given here replace the image's, and env_vars merge over it.

mutable Docker-style tag; defaults to "latest"

Send extra headers

Add additional query parameters to the request

Add additional JSON properties to the request

Override the client-level default timeout for this request, in seconds