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
Pythonlangsmithsandbox_sandboxSandboxto_async
Method●Since v0.8

to_async

Copy
to_async(
  self,
  *,
  client: Optional[AsyncSandboxClient] = None
) -> AsyncSandbox
View source on GitHub

Parameters

NameTypeDescription
clientOptional[AsyncSandboxClient]
Default:None

AsyncSandboxClient to use for operations. If not provided, one is created with the same configuration as this sandbox's client (see :meth:SandboxClient.to_async).

Create an AsyncSandbox for the same underlying sandbox.

The returned instance has auto_delete disabled so the sandbox's lifecycle stays tied to this instance; both refer to the same server-side sandbox.