Skip to main content
Databricks sandboxes are managed, isolated compute environments on the Databricks platform. DatabricksSandbox runs Deep Agents shell and filesystem tools inside a Databricks sandbox over the databricks-sdk. See the Databricks docs for workspace setup and authentication.
The DatabricksSandbox backend requires databricks-langchain>=0.22.0.

Installation

Create a sandbox backend

DatabricksSandbox binds to a sandbox that is already running. Provision (or reuse) a sandbox with the Databricks SDK, wait for it to reach RUNNING, then wrap it as a deepagents backend. The sandbox lifecycle (create, start, delete) stays in your application code, not the agent.

Use with Deep Agents

You can use any LangChain chat model, including ChatDatabricks backed by Databricks Model Serving.

Cleanup

You are responsible for managing the sandbox lifecycle. Sandboxes consume resources until deleted, so delete the sandbox when you are done.
See also: Sandboxes.