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
Pythonlangsmith_openapi_clientresourcessandboxesboxesBoxesResourcecreate
Method●Since v0.9

create

Copy
create(
  self,
  *,
  delete_after_stop_seconds: int | Omit = omit
View source on GitHub
,
env_vars
:
Dict
[
str
,
str
]
|
Omit
=
omit
,
fs_capacity_bytes
:
int
|
Omit
=
omit
,
idle_ttl_seconds
:
int
|
Omit
=
omit
,
mem_bytes
:
int
|
Omit
=
omit
,
mount_config
:
box_create_params
.
MountConfig
|
Omit
=
omit
,
name
:
str
|
Omit
=
omit
,
proxy_config
:
box_create_params
.
ProxyConfig
|
Omit
=
omit
,
restore_memory
:
bool
|
Omit
=
omit
,
snapshot_id
:
str
|
Omit
=
omit
,
snapshot_name
:
str
|
Omit
=
omit
,
tag_value_ids
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
vcpus
:
int
|
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
)
->
SandboxResponse

Parameters

NameTypeDescription
restore_memorybool | Omit
Default:omit

RestoreMemory selects how the sandbox handles a snapshot's captured memory:

nil → if-present: resume from memory when the snapshot has it, else cold-boot (default). true → always: resume from memory; rejected if the snapshot has none. false → never: always cold-boot.

Applies to this request only.

extra_headersHeaders | None
Default:None

Send extra headers

extra_queryQuery | None
Default:None
extra_bodyBody | None
Default:None
timeoutfloat | httpx.Timeout | None | NotGiven
Default:not_given

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 static blueprint.

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