Skip to content

About

Render Sandboxes backend for LangChain Deep Agents (development preview)

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

langchain-rendersandbox-plugin

langchain-render runs LangChain Deep Agents' shell and file tools in Render Sandboxes. Your agent runs in your application; commands and files live in the remote sandbox.

Prerequisites

Install the review build

Clone this repository and install the review build:

git clone https://github.com/render-oss/langchain-rendersandbox-plugin.git
cd langchain-rendersandbox-plugin
uv sync --frozen --group dev

Copy .env.example to .env in your editor and fill in:

Variable Purpose and setup
RENDER_API_KEY API key with access to your Render workspace
RENDER_WORKSPACE_ID Selects the sandbox's workspace; find its ID in Dashboard workspace Settings
ANTHROPIC_API_KEY Model credentials for Claude

.env is gitignored. Credentials stay in your application; the agent sends task content and tool results to the model.

Quickstart

Save as quickstart.py in the checkout root:

import asyncio

from deepagents import create_deep_agent
from langchain_render import sandbox_session


async def main():
    async with sandbox_session() as backend:
        agent = create_deep_agent(
            model="anthropic:claude-sonnet-4-6",
            backend=backend,
        )
        result = await agent.ainvoke(
            {"messages": [{"role": "user", "content": "Create /tmp/hello.py and run it."}]}
        )
        print(result["messages"][-1].content)


asyncio.run(main())
uv run --env-file .env python quickstart.py

The helper creates a sandbox, waits for readiness, and verifies termination on exit, including after errors. Defaults are a 15-minute lifetime and deny-all outbound networking. Download wanted files before leaving the block; termination removes them.

Documentation

Apache-2.0.

About

Render Sandboxes backend for LangChain Deep Agents (development preview)

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages