Code & DeveloperOpen source codeSWE-agent/SWE-agent

SWE-agent: Open Source AI Repository & Self-Hosting Guide

Princeton NLP open-source autonomous software engineering agent that navigates repositories inside Docker sandboxes to reproduce, patch, and test bugs.

GitHub Stars
20,920 stars
Repository License
MIT
Last Push (UTC)
Nov 23, 2026
Check the repo's license. Model weights may have a different license.
git clone https://github.com/SWE-agent/SWE-agent.git
View on GitHub
Installpip install -e . && sweagent run --config config/default.yaml

SWE-agent: Architecture & Practical Workflow

SWE-agent equips language models with an agent-computer interface (ACI) featuring file viewers, linter-checked code editors, and isolated Docker test runners—achieving strong fix rates on SWE-bench repository issue resolution.

Recommended End-to-End Pipeline

Point SWE-agent at a failing GitHub issue in a containerized test repo so it isolates failing unit tests and proposes a minimal verified diff.

Runtime Target
Self-Hosted / CLI & Docker (GitHub)
Primary Users
Software Engineers, AI Researchers, Maintainers
Code License
MIT
Focus Topics
open-source, github, coding-agent, swe-bench

Quick Setup & Installation Steps

Platform target: Self-Hosted / CLI & Docker (GitHub). Always verify environment variables and dependencies in the upstream repository README.

  1. 1Clone the repository from GitHub: `git clone https://github.com/SWE-agent/SWE-agent.git && cd SWE-agent`.
  2. 2Review the MIT license (Check the repo's license. Model weights may have a different license.) and note any separate terms on external model weights.
  3. 3Install or launch the project directly: `pip install -e . && sweagent run --config config/default.yaml` (use an isolated Python virtualenv, Node workspace, or Docker volume so dependencies remain clean).
  4. 4Validate end-to-end behavior with a small sample input (Point SWE-agent at a failing GitHub issue in a containerized test repo so it isolates failing unit tests and proposes a minimal verified diff.)

Hardware & VRAM Notes

Lightweight to orchestrate on standard CPUs or Docker hosts; heavier local model inference can be offloaded to Ollama, vLLM, or external APIs.

CPU & Memory

Modern multi-core CPU with 8 GB–16 GB RAM for orchestration, CLI agents, OCR/document parsing, or UI workflows (32 GB+ if co-hosting large local LLMs).

GPU / VRAM

Optional unless running local neural weights; pairs cleanly with local inference servers (Ollama / llama.cpp) or remote endpoints.

Runtime Target

Self-Hosted / CLI & Docker (GitHub)

Strengths & Best For

  • Autonomously reads GitHub issues, edits files, and runs unit tests
  • Includes lightweight mini-swe-agent runner for fast agent loops
  • Sandboxed execution environment for safe code patching
  • Best suited for: Software Engineers, AI Researchers, Maintainers

Limitations & Caveats

  • Requires Docker and an LLM API key or local model endpoint
  • Autonomous runs consume tokens proportional to repo complexity
  • Check the repo's license. Model weights may have a different license.

3 Similar Tools on /tools (Code)

Prefer a hosted web app instead of managing local weights or Docker containers? Explore these cloud alternatives.

Browse all tools
Self-Hosted SWE-agent vs. Hosted Alternatives (Google Jules & OpenHands (OpenDevin))
FactorSWE-agent (Self-Hosted)Google JulesOpenHands (OpenDevin)
Execution & PrivacyRuns locally via Self-Hosted / CLI & Docker (GitHub); data stays on your disk or private server.Hosted cloud web interface; zero local dependency setup required.Hosted cloud web interface; zero local dependency setup required.
Cost & QuotaMIT code; bound only by local CPU/GPU hardware.Freemium; subject to vendor free-tier limits or paid plans.Open Source; subject to vendor free-tier limits or paid plans.
Primary FitAutonomously reads GitHub issues, edits files, and runs unit tests; Includes lightweight mini-swe-agent runner for fast agent loopsGoogle's asynchronous GitHub coding agent that clones your repo into a secure cloud VM, writes bug fixes/tests, and opens Pull Requests.Open-source AI software development agent capable of complex task execution.
Key Trade-offRequires Docker and an LLM API key or local model endpointRequires internet access and vendor account/quota limits.Requires internet access and vendor account/quota limits.

Matching Ready-Made Prompts

All Prompts →

Customize variables in Live Prompt Studio for SWE-agent workflows.

Chrome Extension Background Service Worker for One-Click ScrapingCode · Chrome Extension, Manifest V3, TypeScript, Scraping
Open in Studio
Scheduled Weekly Vendor Price Hike & Inflation Alert BotCode · Analytics, Procurement, Cost Control, Inflation
Open in Studio

More Open Source Code & Developer Repositories

Frequently Asked Questions

What does SWE-agent do and how does it work?

SWE-agent (SWE-agent/SWE-agent) is an open-source code & developer project with 20,920 stars on GitHub. Princeton NLP open-source autonomous software engineering agent that navigates repositories inside Docker sandboxes to reproduce, patch, and test bugs. SWE-agent equips language models with an agent-computer interface (ACI) featuring file viewers, linter-checked code editors, and isolated Docker test runners—achieving strong fix rates on SWE-bench repository issue resolution.

Is SWE-agent free to self-host and use commercially?

SWE-agent provides open source code licensed under MIT. Check the repo's license. Model weights may have a different license. Always verify both source code and model weight licenses in the GitHub repository before commercial deployment.

What hardware, runtime, or VRAM does SWE-agent require?

SWE-agent targets Self-Hosted / CLI & Docker (GitHub). Typical installation runs via `pip install -e . && sweagent run --config config/default.yaml`. Requires Docker and an LLM API key or local model endpoint

How does self-hosting SWE-agent compare to hosted tools like Google Jules?

Self-hosting SWE-agent gives you full local data control, zero per-usage vendor fees, and customizable Self-Hosted / CLI & Docker (GitHub) pipelines—at the cost of managing your own setup and compute. By contrast, Google Jules (Freemium) runs in the browser with no local installation, though usage quotas and cloud privacy policies apply.

Is SWE-agent actively maintained and what workflow fits it best?

Repository metadata records 20,920 stars on GitHub with the latest recorded push on Nov 23, 2026. Point SWE-agent at a failing GitHub issue in a containerized test repo so it isolates failing unit tests and proposes a minimal verified diff.