How to set up Open SWE for development
Clone the Repository
Install Dependencies
Set Up Environment Files
apps/web/.env
)apps/open-swe/.env
)NEXT_PUBLIC_ALLOWED_USERS_LIST
environment variable, every user will be required to set their own LLM API keys to use the agent. Additionally, none of the webhook features (triggering new runs by adding labels to GitHub issues, tagging the agent in PR reviews, etc.) will work unless you include the username’s of the GitHub users you want to allow access to in the NEXT_PUBLIC_ALLOWED_USERS_LIST
environment variable (in both web and agent deployments).SECRETS_ENCRYPTION_KEY
using: openssl rand -hex 32
. This key must be identical in both environment files.Create GitHub App
http://localhost:3000/api/auth/github/callback
/webhook/github
(e.g., https://abc123.ngrok.io/webhook/github
)
GITHUB_WEBHOOK_SECRET
in apps/open-swe/.env
12345678
).pem
file and copy its contents\\n
for line breaks, or use the multiline format shown in the examplehttp://localhost:3000/api/auth/github/callback
for local development, or https://your-production-url.com/api/auth/github/callback
for production.GITHUB_WEBHOOK_SECRET
in apps/open-swe/.env
and apps/web/.env
.GitHub App OAuth Settings
GITHUB_APP_ID
NEXT_PUBLIC_GITHUB_APP_CLIENT_ID
GITHUB_APP_CLIENT_SECRET
GITHUB_APP_REDIRECT_URI
GITHUB_APP_PRIVATE_KEY
.env
files are already included in .gitignore
.Start Development Servers
http://localhost:2024
Terminal 2 - Start the Web Application:http://localhost:3000
http://localhost:3000