Skip to main content
Open SWE is LangChain’s open-source framework for building your org’s internal coding agent, built on LangGraph and Deep Agents. Every task runs in an isolated cloud sandbox where the agent gets full shell access — and E2B is a supported sandbox provider out of the box.

Get started

1

Clone and install Open SWE

2

Set the sandbox provider to E2B

Get your API key from the E2B dashboard and create a .env file in the repo root — langgraph dev loads it automatically:
.env
You need an API key for at least one LLM provider — the default model is openai:gpt-5.6-sol, and you can switch with LLM_MODEL_ID (e.g. LLM_MODEL_ID="anthropic:claude-sonnet-5"). Google and Fireworks are also supported — see the full environment variable reference for LangSmith tracing, GitHub App, and trigger configuration.No other sandbox changes are needed — Open SWE creates and manages the sandboxes for you.
3

Run the backend

Open SWE’s backend is a LangGraph app served together with its webhook API:
The full deployment (GitHub App, webhooks, dashboard) is covered in the installation guide.
4

Watch the sandboxes

As Open SWE picks up tasks, you can watch it create and reuse sandboxes with the E2B CLI:

Custom templates

By default, sandboxes start from the E2B base template. To pre-install languages, frameworks, or internal tools your repositories depend on — and cut setup time per agent run — build a custom template and point Open SWE at it:

Learn more

Templates

Build custom sandbox templates with pre-installed dependencies

Sandbox persistence

Auto-pause, resume, and manage sandbox lifecycle

Git integration

Clone repos, manage branches, and push changes