open-swe README

The project's README from github.com/langchain-ai/open-swe. As one markdown file: README.md.

Open SWE Logo

An open-source software factory built on Deep Agents by LangChain.

License GitHub Stars Built on Deep Agents Powered by LangGraph Twitter / X

Open SWE turns engineering work into a repeatable system. Give it a code-change task from the dashboard, GitHub, Slack, or Linear—or run one on a schedule—and it works in an isolated environment to understand the codebase, make changes, validate them, and deliver a pull request.

It goes beyond code generation. Open SWE can review pull requests, learn a repository's review style, monitor CI, and respond to feedback. It is open source, deployable in your infrastructure, and designed to be adapted to your team's repositories, tools, policies, and workflows.

[!NOTE] Open SWE is under active development. APIs, setup, and product surfaces may continue to evolve.


The software factory loop

flowchart LR
    A[Issues, conversations, PRs, schedules] --> B[Plan and investigate]
    B --> C[Implement in an isolated sandbox]
    C --> D[Validate and deliver a PR]
    D --> E[Review, CI, and feedback]
    E -->|Follow-up work| B

Each cloud coding thread is bound to its own persistent sandbox, so the agent can continue from prior work when you reply. A thread is a durable conversation and work context. It can contain multiple invocations, each an agent execution triggered by a message or automation. An initial request and a follow-up belong to one thread and produce two invocations, each with its own usage. Independent threads run in parallel, and the same thread carries context from request through delivery and follow-up. Read-only PR chat does not need a sandbox, while desktop work can run directly against an allowlisted local project.

What Open SWE does

Build

Review

Operate

Customize

API contract

swagger.json is the generated OpenAPI 3.1 contract for the custom FastAPI backend (agent.webapp:app). Import it into an OpenAPI 3.1-compatible viewer, or run make run and open http://localhost:8000/docs for interactive API documentation (/openapi.json serves the live schema).

Regenerate the file with make swagger after changing backend routes or models. It reflects the current route declarations: some request/response schemas and authentication requirements are not yet documented. LangGraph runtime endpoints (such as /runs, /threads, and /assistants) are not included.

How it works

Deep Agents is the harness

Open SWE composes the agent with Deep Agents. Deep Agents provides the planning, file operations, shell access, skills, state, and subagent primitives; Open SWE adds the software-engineering tools, prompts, middleware, integrations, authorization, and product surfaces needed for end-to-end engineering work.

This composition keeps the system extensible while allowing it to inherit improvements from the underlying LangChain agent stack.

LangGraph is the runtime

LangGraph provides durable execution and thread state. Each Open SWE invocation executes as a LangGraph run within a thread. Open SWE currently ships five graph entrypoints:

Graph Role
Agent Plans, implements, validates, and delivers software changes
Reviewer Performs read-only pull request reviews
Analyzer Learns repository-specific review style
Chat Answers questions about pull requests without changing code
Scheduler Dispatches recurring tasks and CI monitoring work

Sandboxes contain the work

Cloud work runs in isolated Linux sandboxes with the development tooling supplied by the configured environment or snapshot. A sandbox persists with its thread, but an unreachable coding sandbox is not silently replaced—Open SWE fails safely rather than risk discarding uncommitted work.

LangSmith is the default sandbox and tracing provider. Open SWE also supports Modal, Daytona, Runloop, E2B, and local execution, with a pluggable interface for additional providers.

Tools stay curated

Deep Agents supplies the core filesystem, shell, and subagent tools. Open SWE adds focused capabilities for GitHub delivery, Linear, Slack, thread management, web research, browser-based application verification, planning, review, CI monitoring, and connected services. Personal integrations load using the user's connections. Admin-configured workspace MCP tools are available to all coding-agent users.

Work where your team works

Control and safety

A useful software factory needs both autonomy and boundaries. Open SWE includes:

Sandboxes can have network access and powerful tools. Deployments should use least-privilege credentials, restrict enabled repositories and integrations, and tailor approval rules to their environment.

Getting started

Open SWE includes a LangGraph backend, a web dashboard, and an experimental desktop client.

One deployment serves the API, the webhooks, and the dashboard from a single URL. Locally:

git clone https://github.com/langchain-ai/open-swe.git
cd open-swe
uv venv
source .venv/bin/activate
uv sync --all-extras
make build-dashboard   # pnpm install + Vite build of the dashboard
make dev               # http://localhost:2024 serves the API and the dashboard

Create a GitHub App and a Slack app for your machine and fill in .env as described in the development guide, then sign in at http://localhost:2024. For UI work, make dev-ui starts Vite and the backend fronting it, so the same URL hot-reloads. GitHub and Slack deliver to a public webhook URL: locally the static domain of a free ngrok account (make tunnel NGROK_DOMAIN=<name>.ngrok-free.dev, which exposes only /webhooks/*, since the dev server's LangGraph API has no authentication), on LangGraph Platform the deployment URL.

Production self-hosting uses the standalone LangGraph Agent Server and requires its license key.

Project status

Open SWE is built in the open by LangChain and is evolving quickly. The original internal coding-agent framework announcement is available on the LangChain blog; the project has since expanded considerably.

License

Open SWE is licensed under the MIT License.

open-swe (langchain-ai/open-swe)

Searching Database…

这是什么?Open SWE 是一个开源的异步编程智能体,也就是一座“软件工厂”,基于 LangChain 的 Deep Agents 构建。它可以接收来自控制面板、GitHub、Slack、Linear 或定时计划的代码修改任务,在隔离的沙箱中理解代码库、做出修改、验证结果,最后提交一个 PR。
这是现成的应用,还是需要我自己部署?这是一个自托管的平台,需要部署在你自己的基础设施中,包括一个 LangGraph 后端、一个 Web 控制面板,以及一个实验性的桌面客户端。可以通过 LangGraph Platform 或 Docker 启动。
我该怎么把它跑起来?如果要给团队部署,可以通过 LangGraph Platform 或 Docker 进行,并按照安装指南创建 GitHub 和 Slack 应用,配置模型服务商和环境变量;如果是本地开发,可以开启热重载运行,并使用 ngrok 隧道来接收 webhook。
部署前我需要准备什么?比如 GitHub 和 Slack 应用、API 密钥?你需要一个用于触发和交付的 GitHub App 和 Slack 应用,模型服务商的凭证,以及沙箱/追踪服务商(默认为 LangSmith,也可以选择 Modal、Daytona、Runloop 或 E2B);如果是生产环境自托管,还需要 LangGraph Agent Server 的许可证密钥。
桌面客户端在所有系统上都能用吗?桌面客户端仍处于实验阶段。目前打包发布的版本只支持 macOS,Windows 和 Linux 只能通过源码自行构建后使用。
我可以在哪里发起和管理任务?你可以从 Web 控制面板、GitHub 的 issue 和 PR 评论、Slack 频道或话题串、Linear 的 issue 中发起和管理任务,也可以通过实验性桌面客户端让智能体直接在你自己的电脑上本地运行。
Deep Agents 是什么?它和 Open SWE 是什么关系?Deep Agents 是 LangChain 的智能体框架,提供规划、文件操作、Shell 访问和子智能体等基础能力;Open SWE 则在其之上添加了软件工程工具、提示词、集成以及产品界面。
云端工作可以用哪些沙箱服务商?LangSmith 是默认的沙箱和追踪服务商,内置支持 Modal、Daytona、Runloop、E2B,并可通过可插拔的接口使用本地执行。
提交 PR 之后,它会盯着 CI 吗?开启可选的 /baby-sit 自动化后,它会监控拉取请求、诊断 CI 失败,并且只会重跑有依据证明是偶发失败的任务。
Size
76.1 MB
Stars
11K
Age
1y
Commits · 90 Days