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.
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.
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.
Quick Setup & Installation Steps
Platform target: Self-Hosted / CLI & Docker (GitHub). Always verify environment variables and dependencies in the upstream repository README.
- 1Clone the repository from GitHub: `git clone https://github.com/SWE-agent/SWE-agent.git && cd SWE-agent`.
- 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.
- 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).
- 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.
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).
Optional unless running local neural weights; pairs cleanly with local inference servers (Ollama / llama.cpp) or remote endpoints.
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.
Google Jules
Google's asynchronous GitHub coding agent that clones your repo into a secure cloud VM, writes bug fixes/tests, and opens Pull Requests.
OpenHands (OpenDevin)
Open-source AI software development agent capable of complex task execution.
Devika
Open-source agentic AI software engineer for autonomous coding tasks.
| Factor | SWE-agent (Self-Hosted) | Google Jules | OpenHands (OpenDevin) |
|---|---|---|---|
| Execution & Privacy | Runs 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 & Quota | MIT 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 Fit | Autonomously reads GitHub issues, edits files, and runs unit tests; Includes lightweight mini-swe-agent runner for fast agent loops | Google'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-off | Requires Docker and an LLM API key or local model endpoint | Requires internet access and vendor account/quota limits. | Requires internet access and vendor account/quota limits. |
Matching Ready-Made Prompts
Customize variables in Live Prompt Studio for SWE-agent workflows.
Compare Alternatives
Compare SWE-agent side-by-side on setup ease, privacy, and role scorecards.
More Open Source Code & Developer Repositories
Dify
Open-source LLMOps and AI agent workflow studio uniting drag-and-drop canvas orchestration, hybrid RAG document indexing, and REST API publishing.
Langflow
Open-source Python visual builder and API runtime for designing multi-agent AI workflows, RAG pipelines, and custom tool components via drag-and-drop.
LangChain
Open-source Python and TypeScript orchestration framework for composing LLM chains, tool-calling agents, structured outputs, and retrieval integrations.
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.