Create and return a new LangSmithSandbox in one step.
This is the recommended way to create a sandbox — no need to import
anything from langsmith/experimental/sandbox directly.
create(options: LangSmithSandboxCreateOptions = {}): Promise<LangSmithSandbox>| Name | Type | Description |
|---|---|---|
options | LangSmithSandboxCreateOptions | Default: {} |
const sandbox = await LangSmithSandbox.create({ templateName: "deepagents" });
try {
const agent = createDeepAgent({ model, backend: sandbox });
await agent.invoke({ messages: [...] });
} finally {
await sandbox.close();
}