Will it run?
Agents

LangChain adds runtime baking to Deep Agents manager

By Nadia Ksiazek Clawpit staff
LangChain adds runtime baking to Deep Agents manager

LangChain’s Deep Agents manager now supports “baking” the runtime environment during deployment. Instead of cloning a repository and installing packages each time a new thread starts, the system runs an initialization script once, stores the resulting file system snapshot, and reuses that snapshot for subsequent threads until the sandbox/setup.sh file changes.

If a sandbox/setup.sh file exists in a project, the mda deploy and mda dev commands execute it a single time at deployment and record the file state as a snapshot. Every new thread opened afterward clones the prepared snapshot rather than starting from scratch. The snapshot remains valid as long as setup.sh is unchanged; any modification triggers an automatic re-bake.

Writing setup.sh from scratch is not required. Teams can start the baking process from an already published Docker image or from an existing LangSmith snapshot. This lets teams bring production-ready or CI environments into Deep Agents without rewriting the setup logic.

Each thread receives its own sandbox, and because everything setup.sh writes to disk becomes part of every future clone, secrets stay only in environment variables, never on disk. This prevents key or token leakage between threads and between deployments.

The change reduces the cold-start overhead of long or multi-threaded sessions. Developers no longer wait for repository clones, npm install or pip install on each run; instead they receive an instantly ready environment. The mda deploy and mda dev commands handle the baking transparently, without requiring changes to the agent code itself.

The feature is available as of today. Full documentation is in the LangSmith docs under the path for the Deep Agents manager in Python.