LangChain Introduces Sandboxes for Secure Code Execution with DeepAgents - Blockchain.News

LangChain Introduces Sandboxes for Secure Code Execution with DeepAgents

Rongchai Wang Nov 13, 2025 14:59

LangChain has launched Sandboxes for DeepAgents, offering a secure environment to execute code remotely. The integration supports partners Runloop, Daytona, and Modal.

LangChain Introduces Sandboxes for Secure Code Execution with DeepAgents

LangChain has unveiled its latest innovation, Sandboxes for DeepAgents, designed to provide a secure and configurable environment for executing arbitrary code remotely. This new integration is supported by three key partners: Runloop, Daytona, and Modal, according to LangChain.

Importance of Sandboxes

Sandboxes are instrumental in creating isolated environments where code can be safely executed without risking the security of a local machine. They offer several advantages, including:

  • Safety: Protects local systems from potentially harmful code.
  • Clean Environments: Allows the use of specific dependencies and configurations without affecting the local setup.
  • Parallel Execution: Facilitates running multiple agents simultaneously in isolated environments.
  • Long-Running Tasks: Enables agents to perform time-intensive operations without blocking local resources.
  • Reproducibility: Ensures consistent execution environments across different teams.

How Sandboxes Operate

The sandbox integration follows a straightforward three-step process:

  1. Setting up the sandbox, optionally with a setup script.
  2. Executing commands as required by the agent.
  3. The remote sandbox processes the command and returns the output.

This setup allows DeepAgents to maintain visibility into the sandbox's filesystem and command outputs, facilitating a natural workflow. The setup script can load environment variables, clone repositories, and prepare the environment for specific tasks.

Getting Started with Sandboxes

To begin using Daytona and Runloop sandboxes, users need to create an account and set their API keys as environment variables. Modal sandboxes require following specific setup instructions and executing the modal setup command.

The DeepAgents CLI simplifies the process of integrating sandboxes with commands like sandbox and sandbox-setup. Users are advised to monitor their provider dashboards to ensure no sandboxes are inadvertently left running.

Security Considerations

While sandboxes provide isolation, LangChain advises caution when handling untrusted inputs, as agents can be susceptible to prompt injection. To mitigate risks, it is recommended to use trusted setup scripts, incorporate human oversight, and utilize short-lived secrets. As sandbox APIs evolve, more providers are expected to offer features to address these security concerns.

LangChain is eager to see how developers utilize sandboxes with DeepAgents and plans to enhance sandbox configurations and provide more examples for practical integration. For more detailed instructions and resources, developers can refer to the DeepAgents documentation and GitHub repository.

Image source: Shutterstock