Sandbox templates ↗
noOriginal 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.

What templates define#
| Setting | Description |
|---|---|
| Container image | The Docker image to use (private registries are supported) |
| Resource capacity | CPU, memory, and storage limits |
| Volumes | Persistent storage to attach (optional) |
| Auth proxy config | Rules 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#
- Create a sandbox from your template
- Configure auth proxy rules to inject secrets into outbound requests
- Set up warm pools to pre-provision sandboxes for faster startup
Edit this page on GitHub or file an issue.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.