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.
- Python 3.11+
- uv
- A Render workspace with Sandboxes enabled (early access)
- Claude Sonnet 4.6 for the example
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 devCopy .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.
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.pyThe 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.
- Integration guide: repair a Python program and verify the result.
- Examples: connection check and complete agent workflow.
- Configuration and runtime behavior.
- Development and testing.