> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-docsfl-1776371397-e812a24.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox warm pools

> Pre-provision sandboxes for faster execution with automatic replenishment.

<Warning>
  Sandboxes are in private preview. APIs and features may change as we iterate. [Sign up for the waitlist](https://www.langchain.com/langsmith-sandboxes-waitlist?ref=docs.langchain.com) to get access.
</Warning>

Warm pools let you pre-provision sandboxes so they are ready to use immediately. When a sandbox from a pool is consumed or deleted, a new one is automatically created to maintain the desired pool size.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-docsfl-1776371397-e812a24/g8BB-HNcnflnTrm7/images/langsmith/sandboxes/sb-pools.png?fit=max&auto=format&n=g8BB-HNcnflnTrm7&q=85&s=65e75ed74a0efb4933d75737ea900f06" alt="Pool list view" width="1912" height="464" data-path="images/langsmith/sandboxes/sb-pools.png" />

## When to use warm pools

Warm pools are ideal for workloads that require:

* **Rapid isolated interactions**—skip container startup time by using a pre-provisioned sandbox
* **A clean state for every execution**—each sandbox starts fresh from the template

## How pools work

1. You create a pool linked to a [template](/langsmith/sandbox-templates) and specify a desired size.
2. The pool pre-creates that many sandbox instances.
3. When you create a sandbox with the same template, it is drawn from the pool.
4. When a sandbox is deleted, the pool automatically replenishes to maintain the target size.

<Note>
  To use a pool, create a sandbox with the same template as the pool. No additional configuration is needed—the system automatically draws from available pool instances.
</Note>

## Create a warm pool

<CodeGroup>
  ```python Python theme={null}
  from langsmith.sandbox import SandboxClient

  client = SandboxClient()

  # Create a pool that maintains 5 pre-provisioned sandboxes
  client.create_pool(
      name="python-pool",
      template_name="python-sandbox",
      size=5,
  )
  ```

  ```ts TypeScript theme={null}
  import { SandboxClient } from "langsmith/experimental/sandbox";

  const client = new SandboxClient();

  // Create a pool that maintains 5 pre-provisioned sandboxes
  await client.createPool("python-pool", {
    templateName: "python-sandbox",
    size: 5,
  });
  ```
</CodeGroup>

***

<div className="source-links">
  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/sandbox-warm-pools.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>
</div>
