An Open-Source Asynchronous Coding Agent
Find a file
2026-03-06 15:06:16 -08:00
.github/workflows fix: Security fixes for ci (#974) 2026-02-24 07:52:47 -08:00
.vscode Brace/07 16/fixes (#431) 2025-07-16 13:17:35 -07:00
apps fix: Only send using repo msg if not already sent (#1019) 2026-03-05 13:11:10 -08:00
packages/shared chore(docs): update old docs links (#875) 2026-01-16 11:35:53 -05:00
static chore: Update UI screenshot (#693) 2025-08-06 18:18:25 +00:00
.codespellignore init commit 2025-05-21 14:47:56 -07:00
.gitignore chore: Update dep to master (#895) 2026-02-06 13:28:24 -08:00
.yarnrc.yml feat: Monorepo (#22) 2025-05-26 13:02:51 -07:00
AGENTS.md fix: Rename from open-swe to openswe (#809) 2025-08-27 19:33:26 +00:00
langgraph.json fix: Add configurable headers to langgraph.json (#824) 2025-09-03 23:05:02 +00:00
LICENSE feat: Monorepo (#22) 2025-05-26 13:02:51 -07:00
package.json chore: add proper jsonwebtoken deps (#659) 2025-08-04 13:31:59 -07:00
README.md readme update 2026-03-06 15:06:16 -08:00
SECURITY.md fix: Security stuff (#441) 2025-07-17 12:19:20 -07:00
tsconfig.json chore: Add CI job which runs the dev server (#61) 2025-05-30 13:54:44 -07:00
turbo.json ci: Include a better clean command (#638) 2025-08-01 19:34:05 +00:00
yarn.lock chore: update yarn.lock 2026-02-13 14:48:43 -08:00

Open SWE Logo

Open SWE - An Open-Source Asynchronous Coding Agent

Open SWE is an open-source cloud-based asynchronous coding agent built with LangGraph. It autonomously understands codebases, plans solutions, and executes code changes across entire repositories—from initial planning to opening pull requests.

Note: you're required to set your own LLM API keys to use the demo.

Note

💬 Read the announcement blog post here

Features

UI Screenshot

  • 🔗 Trigger from Linear, Slack, or GitHub — mention @openswe in a Linear comment, Slack thread, or GitHub PR comment to kick off a task
  • 👀 Instant acknowledgement — reacts with 👀 the moment it picks up your message so you know it's on it
  • 💬 Message it while it's running — send follow-up messages mid-task and it'll pick them up before its next step
  • 🔀 Run multiple tasks in parallel — each task runs in its own isolated cloud sandbox, no queuing
  • 🔐 GitHub OAuth built-in — authenticates with your GitHub account automatically, no token setup needed
  • 🚀 Opens PRs automatically — commits changes and opens a draft PR when done, linked back to your Linear ticket

Installation

Prerequisites

1. Clone the repo

git clone https://github.com/langchain-ai/open-swe.git
cd open-swe/apps/agent

2. Install dependencies

uv sync

3. Set up the Linear webhook

In a terminal, start ngrok to get your public URL:

ngrok http 2024
# e.g. https://xxxx.ngrok.io

Then in Linear:

  1. Go to Settings → API → Webhooks → New webhook
  2. Fill in:
    • Label: open-swe
    • URL: https://xxxx.ngrok.io/webhooks/linear
    • Secret: generate a random string — copy it, you'll need it for LINEAR_WEBHOOK_SECRET
  3. Under Data change events, enable Comments → Create only
  4. Click Create webhook

To get your LINEAR_API_KEY:

  1. Go to Settings → API → Personal API keys → New API key
  2. Name it open-swe and copy the key

4. Set environment variables

Create a .env file in apps/agent/ with the following:

# LangSmith
LANGSMITH_API_KEY_PROD=""           # Your LangSmith API key
LANGCHAIN_TRACING_V2="true"
LANGCHAIN_PROJECT=""

# LLM
ANTHROPIC_API_KEY=""                # Anthropic API key (recommended default provider)

# GitHub App (Bot)
GITHUB_APP_ID=""                    # GitHub App ID
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
"
GITHUB_APP_INSTALLATION_ID=""       # GitHub App installation ID

# GitHub Webhook
GITHUB_WEBHOOK_SECRET=""            # Secret for verifying GitHub webhooks

# Linear
LINEAR_API_KEY=""                   # Linear API key (from step 3)
LINEAR_WEBHOOK_SECRET=""            # Secret you set when creating the webhook (from step 3)

# 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
# Generate with: openssl rand -base64 32
TOKEN_ENCRYPTION_KEY=""

5. Run the agent

uv run langgraph dev --no-browser

The LangGraph server runs on http://localhost:2024 and serves the webhook endpoints automatically.

6. Verify it works

Comment @openswe on any Linear issue. You should see:

  • A 👀 reaction on your comment within a few seconds
  • A new run appear in your LangSmith project

Usage

Open SWE can be used in multiple ways:

  • 📋 From Linear. Mention @openswe in a comment on any Linear issue to trigger the agent. It will automatically read the issue description and full context, then autonomously start working on it. You can also include additional instructions in the comment if needed (e.g. @openswe focus on the auth module).
  • 🐙 GitHub (for Open SWE-generated PRs). In PRs which Open SWE has created, you can tag it in comments or reviews via @openswe to have it resolve reviews automatically for you. Tagging @openswe on an Open SWE generated PR will create a new run passing all of the comments from the PR as the prompt. Any changes will be directly committed back to the same branch.