DEV.co
AI Frameworks · SWE-agent

SWE-agent

SWE-agent is an LLM-based agent that autonomously fixes GitHub issues, finds security vulnerabilities, or solves coding challenges by controlling tools and file operations. It requires an external LM (GPT-4o, Claude, etc.) and is configured via YAML, with active development focused on a simpler successor called mini-SWE-agent.

Source: GitHub — github.com/SWE-agent/SWE-agent
19.7k
GitHub stars
2.2k
Forks
Python
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositorySWE-agent/SWE-agent
OwnerSWE-agent
Primary languagePython
LicenseMIT — OSI-approved
Stars19.7k
Forks2.2k
Open issues28
Latest releasev1.1.0 (2025-05-22)
Last updated2026-07-07
Sourcehttps://github.com/SWE-agent/SWE-agent

What SWE-agent is

Python-based agentic framework enabling LLMs to interact with Git/filesystem tools to perform software engineering tasks. Achieves state-of-the-art on SWE-bench benchmarks; uses agent-computer interface patterns to delegate maximal agency to the language model. Active development has pivoted to mini-SWE-agent, a 100-line Python simplification with comparable performance.

Quickstart

Get the SWE-agent source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/SWE-agent/SWE-agent.gitcd SWE-agent# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Autonomous GitHub Issue Resolution

Directly integrate with GitHub workflows to automatically attempt fixes for reported issues, reducing human triage and reducing time-to-fix for low-complexity bugs.

Security Vulnerability Research & CTF Challenges

Leverages EnIGMA mode (SWE-agent 0.7) to autonomously discover and exploit security weaknesses in code or participate in capture-the-flag competitions.

Benchmarking & Evaluating LLM Coding Capabilities

Use SWE-bench integration to systematically measure and compare different LM models (e.g., Claude vs GPT-4o) on standardized real-world software engineering tasks.

Implementation considerations

  • Requires API keys and account setup for external LMs (OpenAI, Anthropic). Plan budget for token consumption per execution.
  • YAML-based configuration governs tool access, model selection, and prompting; review and customize the config file before deploying in sensitive contexts.
  • Output does not guarantee correctness; implement review gates (human approval or automated testing) before merging generated code.
  • Latest development effort is on mini-SWE-agent; SWE-agent 1.x is stable but consider the migration path if you adopt this now.
  • Requires Git repository access and a working development environment (bash, Python, file I/O). Ensure sandboxing if running untrusted codebases.

When to avoid it — and what to weigh

  • Fully Autonomous Production Deployment Without Review — SWE-agent is a research tool designed for evaluation and exploration, not a replacement for human code review. Auto-generated fixes require validation before merging.
  • Closed-Source or Air-Gapped Environments — The tool depends on external LM APIs (OpenAI, Anthropic) and Git/file system access. Not suitable for strict offline or proprietary model-only requirements.
  • Cost-Sensitive Operations at Scale — Each task invocation consumes LM API tokens (GPT-4o, Claude Sonnet); per-issue cost is non-trivial. High-volume issue triage without cost controls can become expensive.
  • Polyglot Codebases with Specialized Languages — Performance is optimized for Python and JavaScript. Complex, multi-language, or domain-specific codebases (e.g., Rust systems, embedded, legacy Fortran) may see degraded results.

License & commercial use

MIT License. Permissive OSI-approved license allowing free use, modification, and distribution in commercial and proprietary contexts, provided original license and copyright notice are retained.

MIT license permits commercial use without restrictions. However, SWE-agent itself is a framework and depends on external LM APIs (OpenAI, Anthropic) which have their own commercial terms. Verify that your LM provider's ToS permit the intended use case (e.g., automated code generation at scale). No express warranty is provided by SWE-agent authors.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

SWE-agent executes Git and filesystem commands based on LM decisions; this poses risk if the LM is prompted with untrusted input or if sandboxing is insufficient. Generated code should be reviewed for malicious patterns before execution. API key exposure (LM tokens) is a concern in shared environments. The tool itself has CI/CD checks (pytest, codecov, pre-commit) but is not cryptographically signed. For high-sensitivity use, audit dependencies and restrict LM API permissions.

Alternatives to consider

mini-SWE-agent

Official successor by the same team; 100 lines of Python, matches SWE-agent performance, actively recommended in README for new projects. Simpler, faster iteration.

GitHub Copilot / GitHub Copilot for Repositories

Proprietary GitHub-native AI assistant; integrated directly into GitHub UI and workflow. Less customizable and research-oriented but more tightly coupled to GitHub platform.

OpenDevin / DevOpsGPT

Open-source alternatives for agentic code automation; different architectural choices and maturity. Compare on SWE-bench performance and feature set for your use case.

Software development agency

Build on SWE-agent with DEV.co software developers

Explore SWE-agent (or mini-SWE-agent) to evaluate LM capabilities on real-world GitHub issues. Start with a free trial via GitHub Codespaces, configure your LM API, and run your first benchmark.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

SWE-agent FAQ

Should I use SWE-agent or mini-SWE-agent for a new project?
README explicitly recommends mini-SWE-agent for new projects. It achieves comparable performance in 100 lines of Python and is the active development focus. Use SWE-agent if you need the additional features (e.g., EnIGMA cybersecurity mode on v0.7) or prefer the mature ecosystem.
How much does it cost to run SWE-agent?
Depends on your LM choice. GPT-4o and Claude Sonnet 4 both have per-token pricing; a typical issue might consume 50k–200k tokens. Plan for $0.50–$5 per issue depending on complexity and model. Batch processing on SWE-bench can accumulate significant costs.
Can I use SWE-agent with open-source models (e.g., Llama, Mistral)?
SWE-agent is model-agnostic and can call any LM via API. However, performance is optimized for frontier models (GPT-4o, Claude). Open-source models will likely perform worse on complex issues; evaluate on your own benchmark first.
Is SWE-agent safe for production use?
SWE-agent is a research tool for evaluation and exploration, not a replacement for human code review. Generated fixes should always be validated with automated tests and human approval before merging. Treat outputs as suggestions, not commitments.

Software developers & web developers for hire

DEV.co helps companies turn open-source tools like SWE-agent into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your ai frameworks stack.

Ready to automate software engineering tasks?

Explore SWE-agent (or mini-SWE-agent) to evaluate LM capabilities on real-world GitHub issues. Start with a free trial via GitHub Codespaces, configure your LM API, and run your first benchmark.