Monza sandbox integration for Deep Agents.
This package provides a MonzaSandbox backend that talks to the Monza Go service over HTTP for file operations and command execution inside isolated devcontainer sandboxes.
pip install langchain-monzaOr with uv:
uv add langchain-monzafrom langchain_monza import MonzaSandbox
# Create a new sandbox (default: python-3.12 template, Monza at http://localhost:8080)
with MonzaSandbox(template="python-3.12") as sandbox:
result = sandbox.execute("python --version")
print(result.stdout)
# Or attach to an existing sandbox
sandbox = MonzaSandbox(sandbox_id="existing-id")
sandbox.execute("ls -la")
sandbox.close()base_url– Monza backend URL (default:http://localhost:8080)sandbox_id– Optional; if set, attaches to an existing sandboxtemplate– Devcontainer template when creating a sandbox (default:python-3.12)name– Optional human-readable name for a new sandboxtimeout– Default command timeout in seconds (default: 30 minutes)
MIT