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

waitForSandbox

Wait for a sandbox to become ready.

Polls getSandboxStatus() until the sandbox reaches "ready" or "failed" status, then returns the full Sandbox object.

Copy
waitForSandbox(name: string, options: WaitForSandboxOptions = {}): Promise<Sandbox>

Parameters

NameTypeDescription
name*string

Sandbox name.

optionsWaitForSandboxOptions
Default:{}

Polling options (timeout, pollInterval).

Example

Copy
const sandbox = await client.createSandbox("python-sandbox", { waitForReady: false });
// ... do other work ...
const readySandbox = await client.waitForSandbox(sandbox.name);
View source on GitHub