Open SWE is an open-source cloud-based asynchronous coding agent built with [LangGraph](https://docs.langchain.com/oss/javascript/langgraph/overview). It autonomously understands codebases, plans solutions, and executes code changes across entire repositories—from initial planning to opening pull requests.
GITHUB_WEBHOOK_SECRET="" # Secret for verifying GitHub webhooks
# Linear
LINEAR_API_KEY="" # Linear API key
LINEAR_WEBHOOK_SECRET="" # Secret for verifying Linear webhooks
# Slack (optional)
SLACK_BOT_TOKEN=""
SLACK_BOT_USER_ID=""
SLACK_BOT_USERNAME=""
SLACK_SIGNING_SECRET=""
# Sandbox
DEFAULT_SANDBOX_TEMPLATE_NAME="" # LangSmith sandbox template name (uses default if not set)
# Token encryption
TOKEN_ENCRYPTION_KEY="" # 32-byte url-safe base64 key for encrypting GitHub tokens
```
### 4. Run the agent
In one terminal, start the LangGraph dev server:
```bash
uv run langgraph dev
```
In a second terminal, start the webhook server:
```bash
make run
```
### 5. Expose webhooks with ngrok
In a third terminal, expose the webhook server so Linear/GitHub/Slack can reach it:
```bash
ngrok http 8000
```
Use the ngrok HTTPS URL as your webhook endpoint when configuring Linear, GitHub, and Slack integrations (e.g. `https://xxxx.ngrok.io/webhooks/linear`).
The LangGraph server runs on `http://localhost:2024` and the webhook server on `http://localhost:8000`.
- 📋 **From Linear**. Mention `@openswe` in a comment on any Linear issue and describe the task you want it to perform (e.g. `@openswe fix the login bug described above`). The agent will pick up the issue context along with your instructions and start working on it.
- 🐙 **GitHub (for Open SWE-generated PRs)**. Once Open SWE completes implementation, it pushes changes to a branch `open-swe/<thread-id>` and opens a **draft pull request** linking back to the originating Linear issue. From there, you can review the code, request changes, and merge when ready.