Sandbox templates

no
Summary: Define container images, resource limits, and configuration for sandboxes using templates.

Original Documentation

Documentation Index#

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt Use this file to discover all available pages before exploring further.

Define container images, resource limits, and configuration for sandboxes using templates.

Sandboxes are in private preview. APIs and features may change as we iterate. Sign up for the waitlist to get access.

Before creating a sandbox, you need a template. Templates define the blueprint for sandbox instances, including the container image, resource allocation, and optional configuration like volumes and auth proxy rules.

Template list view

What templates define#

SettingDescription
Container imageThe Docker image to use (private registries are supported)
Resource capacityCPU, memory, and storage limits
VolumesPersistent storage to attach (optional)
Auth proxy configRules for injecting secrets into outbound requests (optional) — see Auth proxy

Create a template#

from langsmith.sandbox import SandboxClient

client = SandboxClient()

client.create_template(
    name="python-sandbox",
    image="python:3.12-slim",
)
import { SandboxClient } from "langsmith/experimental/sandbox";

const client = new SandboxClient();

await client.createTemplate("node-sandbox", {
  image: "node:20-slim",
});

You can also create templates via the REST API with full control over resources and proxy configuration:

curl -X POST "$LANGSMITH_ENDPOINT/api/v2/sandboxes/templates" \
  -H "x-api-key: $LANGSMITH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "python-sandbox",
    "image": "python:3.12-slim",
    "resources": {"cpu": "500m", "memory": "512Mi", "storage": "2Gi"}
  }'

Next steps#


Edit this page on GitHub or file an issue.

Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

Link last verified June 7, 2026. View original ↗
Source: LangChain Docs
Link last verified: 2026-04-05