skillfed

langchain-modal

Modal sandbox integration for Deep Agents

langchain-modal v0.0.6 82.9K downloads/30d#14,118 on PyPI27,777
Permissive license MIT Active released

What it is and what it does

langchain-modal is a thin integration layer that connects LangChain's Deep Agents framework to Modal's serverless compute platform. It wraps Modal sandboxes in a ModalSandbox class that agents can use to execute commands in isolated, remote environments. The package is part of the LangChain ecosystem and is actively maintained alongside the broader Deep Agents project.

You use it by creating a ModalSandbox from an existing Modal app, then calling execute() to run shell commands or other operations inside that sandbox. The result object contains the output and status of the execution. This is useful when you want agents to run workloads on Modal's infrastructure rather than locally, but it requires you to already have Modal set up and a Modal app deployed.

Use it for:

  • Let a Deep Agent execute arbitrary shell commands in a Modal sandbox without running them on your local machine.
  • Build multi-step agent workflows where some steps run remotely on Modal infrastructure for isolation or scale.
  • Integrate Modal's serverless compute into LangChain agent chains for tasks that need ephemeral, on-demand execution.
  • Test agent logic in isolated Modal environments before deploying to production systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates Modal serverless compute sandboxes with LangChain's Deep Agents framework, allowing agents to execute commands in isolated Modal environments.

Yes, if you are already using LangChain's Deep Agents and Modal and want to orchestrate remote execution. The package is actively maintained, has no known vulnerabilities, and installs cleanly. However, it is a narrow integration—only install if you specifically need Modal sandbox execution within agents; it adds no value if you're not using both Modal and Deep Agents.

Install

langchain-modal on PyPI

pip

pip install langchain-modal

uv

uv add langchain-modal

poetry

poetry add langchain-modal

Installing langchain-modal

Before you install

Low install friction with a pure-Python wheel. Active maintenance—last commit 2026-08-14, release 16 days old. Depends on deepagents and modal, both external packages you'll need to manage separately.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install langchain-modal

import modal
from langchain_modal import ModalSandbox

sandbox = ModalSandbox(modal.Sandbox.create(app=modal.App.lookup("your-app")))
result = sandbox.execute("echo hello")
print(result.output)

Requires an existing Modal app and a Modal account with configured credentials; modal.App.lookup() must resolve a valid app name.

Verify before relying

  • Whether deepagents and modal are stable, well-maintained dependencies or if they introduce their own friction.
  • What error handling and retry logic the ModalSandbox provides for failed or timed-out commands.
  • Whether this package is suitable for production workloads or primarily for experimentation and development.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 2 — deepagents, modal
Maintenance actively maintained — 16 days since the last release
Last repo commit
First released
Downloads 82,947/month — #14,118 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: langchain_modal-0.0.6-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

modal sandbox integrationlangchain modal executorserverless agent executiondeep agents modalremote command execution langchainmodal deepagents
langchain-integrationserverless-computeagent-framework

More Artificial Intelligence packages