Skip to content

Integrations

LangChain integration

Use a Promigence sandbox as the backend of a LangChain Deep Agent, so the agent's shell commands and file edits happen in the sandbox. The same package adds a promigence sandbox provider to deepagents-code.

The package is langchain-promigence on PyPI, for Python.

Install

Install it and set your key.

Terminal
pip install langchain-promigence
pip install "langchain-promigence[code]"     # adds the deepagents-code provider
export PROMIGENCE_API_KEY=prom_api_...
export PROMIGENCE_SPEND_CAP=5
Language: bash

Example

From the guide Run LangChain Deep Agents in a Promigence sandbox, which goes on to the spend cap, cleaning up, and what the package does not support.

Python
from deepagents import create_deep_agent
from langchain_promigence import PromigenceSandbox

sandbox = PromigenceSandbox.create(image="python:3.12-slim", working_dir="/workspace", spend_cap=1)
try:
    agent = create_deep_agent(model="anthropic:claude-sonnet-4-5", backend=sandbox)
    agent.invoke({"messages": [{"role": "user", "content": "run the tests and fix what fails"}]})
finally:
    sandbox.kill()
Language: python

Next

Get started

Leave your work email and we will get you started.

See our Privacy Policy for how we use your email.