SWE-agent
github.com/swe-agent/swe-agent- Category
- AI Agents
- Rank
- No. 781Tools index
- Pricing
- Open Source
- Type
- AGENT
- Use case
- Coding · Security & Identity
- Interfaces
- CLI · Web
- Builder
- swe-agent
- GitHub
- 20.5k stars
- Latest release
- v1.1.0
- Date
About
SWE-agent lets a language model like GPT-4o or Claude autonomously use tools to fix real GitHub issues, solve custom coding tasks, or find cybersecurity vulnerabilities via its EnIGMA mode. It is a research project from Princeton and Stanford that achieves state-of-the-art results on SWE-bench and is fully configurable through a single YAML file.
What it does
SWE-agent wraps a large language model in a command-line loop that can read a codebase, run shell commands, edit files, and submit a patch, all aimed at closing a real bug report or coding task on its own. Every step the agent is allowed to take, and how it is prompted, comes from a YAML configuration rather than hardcoded logic, so the same harness can be pointed at ordinary software fixes or, in a separate mode, at security capture-the-flag puzzles.
Why it's ranked here
This is the project that established the agent-computer interface pattern much of today's coding-agent tooling still uses, from a Princeton and Stanford research team with a peer-reviewed paper behind it. That track record is the case for it, not current momentum: the maintainers themselves now point newcomers toward a smaller successor project and describe this one as superseded. Worth knowing for the ideas and the benchmark work; anyone choosing what to run today should read the maintainers' own recommendation before picking this over the newer one.
What's good
The configuration system is genuinely deep: agent prompts, allowed tools, model choice, and the execution interface are all controlled from YAML files that can be layered and merged rather than edited in code. Command-line usage covers single runs, batch runs, and trajectory replay for debugging, and there are two separate inspectors, a terminal one and a browser-based one, for stepping back through what the agent actually did. Model access goes through a provider-agnostic layer rather than being tied to one vendor's API.
Tradeoffs
The headline caveat is in the project's own documentation: it has been superseded by a simpler successor the maintainers now recommend by default, so anyone adopting this version is opting into the older, more complex codebase over the one actively being improved. The offensive-security mode is currently unsupported on the main line and requires checking out an old release tag to use. This is an academic research codebase first, not a polished product, so expect surface area built for experimentation rather than turnkey deployment.
How to use it well
Reach for this if you want to study or extend the agent-computer interface approach itself, reproduce benchmark results, or need the offensive-security capture-the-flag mode and are willing to pin an older release for it. If you just want a working coding agent to point at a repository today, read the maintainers' own recommendation first: they steer new users toward the newer, simpler successor project instead. Treat the YAML configuration layer as the main lever for adapting it to a new task.
Technical notes+
The package entry point is defined in pyproject.toml as project.scripts sweagent = sweagent.run.run:main, and sweagent/__main__.py just imports and calls that same main function, so the installed sweagent CLI and python -m sweagent are equivalent. sweagent/__init__.py enforces Python 3.11+ at import time, resolves CONFIG_DIR and TOOLS_DIR relative to the package location (overridable via the SWE_AGENT_CONFIG_DIR and SWE_AGENT_TOOLS_DIR environment variables), and calls impose_rex_lower_bound(), which raises if the separately installed swe-rex execution-backend package is below its minimum supported version. docs/usage/cli.md documents the run, run-batch, run-replay, inspect, inspector, quick-stats, merge-preds, traj-to-demo, and remove-unfinished subcommands. docs/config/index.md describes YAML configs as mergeable via repeated --config flags, resolved against SWE_AGENT_CONFIG_ROOT, and documents a multimodal profile (default_mm_with_images.yaml) that raises max_observation_length and adds image_tools and web_browser tool bundles plus an image_parsing history processor. pyproject.toml lists dependencies including litellm, GitPython, ghapi, flask/flask-cors/flask-socketio (backing the web inspector), textual (backing the terminal inspector), and swe-rex, and its [tool.pytest.ini_options] block points testpaths at a tests directory.
Observed
- License
- MIT licensed, per both README.md and the pyproject.toml license field.
- Packaging
- Requires Python 3.11 or newer; packaged as a pip-installable Python project with a sweagent CLI entry point.
- CLI commands
- CLI subcommands include run, run-batch, run-replay, inspect (terminal), inspector (web-based), quick-stats, merge-preds, traj-to-demo, and remove-unfinished.
- Configuration
- Agent behavior, prompts, tool access, and model choice are all set through external YAML config files rather than code, and multiple config files can be merged.
- Dependencies
- Depends on litellm for model access, making the LLM backend swappable rather than fixed to one provider.
- Dependencies
- Depends on a separate swe-rex package for executing commands in the target environment, with a minimum required version enforced at startup.
- Interfaces
- Ships a Flask/Flask-SocketIO-based web inspector alongside a Textual-based terminal inspector.
- Operating modes
- Has two operating modes: a general coding-task/bug-fix mode and a separate offensive-security (capture-the-flag) mode; the latter is documented as unsupported on the current main line and requiring an older release.
- Project status
- The README states development focus has shifted to a separate, simpler successor project that the maintainers describe as having superseded this one and recommend using instead.
Read from README.md, pyproject.toml, sweagent/__init__.py, sweagent/__main__.py, docs/usage/cli.md, docs/config/index.md.
What it can do
Autonomously resolve GitHub issues using an LLM-driven agent
GitHub issue → Code fix/patch
Find cybersecurity vulnerabilities via EnIGMA mode
CTF challenge or codebase → Identified vulnerability
Configure agent behavior through a single YAML file
YAML configuration file → Configured agent
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.