SWE-agent is an open-source autonomous software engineering agent harness built and maintained by researchers from Princeton University and Stanford University. Developed in tandem with the SWE-bench evaluation framework, it enables language models to autonomously interact with repositories, investigate bugs, execute terminal commands, and produce patches. Operating via a command-line interface, SWE-agent couples frontier language models with an Agent-Computer Interface (ACI) designed specifically for agentic code navigation and editing. Day-to-day runs can be triggered for single repository issues or across entire dataset batches. It supports proprietary models including Claude 3.7 Sonnet and GPT-4o, as well as open-weights models, with the entire agent setup—prompts, models, tools, and history processors—configured via YAML files. Unlike interactive pair-programming assistants, SWE-agent is built for autonomous execution, academic research, and benchmarking. It provides dedicated trajectory logging, a Trajectory Inspector for post-run analysis, multimodal support for issue images, and customizable tool bundles. Note that the project maintainers have shifted primary active development to mini-swe-agent, maintaining SWE-agent in maintenance mode for benchmark reproducibility. SWE-agent is open-source under the MIT license and freely available for self-hosted execution, with operational costs tied directly to the chosen LLM provider API usage.
Agent-Computer Interface (ACI) — Equips language models with custom shell tools and linters optimized for autonomous navigation and code editing. - Declarative YAML configuration — Controls model selection, prompt templates, action parsers, and environment parameters through single configuration files. - Batch execution mode — Runs evaluation tasks across hundreds of repository instances in parallel for benchmark testing. - Trajectory Inspector — Generates detailed step-by-step logs and visual traces of agent actions, tool outputs, and model reasoning. - Multimodal issue handling — Ingests and processes visual inputs, diagrams, and screenshots embedded inside GitHub issue reports. - Pluggable tool bundles — Allows researchers to inject custom bash tools, environments, and history processors into the agent runtime.
Use cases
Use Case: SWE-bench Evaluation and Model Benchmarking AI researchers can run standardized batch evaluations across SWE-bench and SWE-bench Verified datasets to measure the autonomous coding performance of new models and prompting strategies.
Use Case: Autonomous GitHub Issue Resolution Developers can pass a repository URL and issue description to SWE-agent from the terminal to automatically reproduce bugs, modify files, run tests, and generate a pull request patch.
Use Case: Agentic Tooling and ACI Experimentation Engineers building autonomous coding workflows can experiment with custom tool definitions, action parsers, and environment isolation strategies within a modular testbed.
Who it is for
SWE-agent is designed for AI researchers, benchmark evaluators, and ML platform engineers studying or building autonomous software engineering agents. It is not intended for developers seeking an interactive in-editor chat assistant or inline code completion tool.
Install guide
Installation Install SWE-agent from source using pip in an isolated Python environment: bash git clone https://github.com/SWE-agent/SWE-agent.git cd SWE-agent pip install --editable .
First Run Configure your provider API keys by setting environment variables: bash export ANTHROPIC_API_KEY="your-anthropic-api-key" export OPENAI_API_KEY="your-openai-api-key"
Example Session Execute SWE-agent on a specific GitHub repository issue using the CLI: bash sweagent run \ --agent.model.name="claude-3-7-sonnet-20250219" \ --repo.repo_name="https://github.com/SWE-agent/SWE-agent" \ --problem_statement.issue_url="https://github.com/SWE-agent/SWE-agent/issues/123"
Agentic Engineering Framework — Agentic Engineering Framework is an open-source orchestration harness and governance layer developed by Dimitri Geelen. It is designed to constrain,…
Agent Runbook — Agent Runbook is an open-source contract-based multi-agent skill framework developed by KnoxOps. It acts as an orchestrator and compiler that…
Weaver — Weaver is an open-source agent harness and orchestration framework maintained by sean35mm on GitHub. Built on top of the Bun…
Context Bridge — Context Bridge is an open-source CLI agent harness and context orchestration utility developed by serdardb. It is built to facilitate…
Hivelore — Hivelore is an open-source agent harness and contextual memory orchestrator created by Doucs91. It provides persistent project memory, decision tracking,…
AgentLint — AgentLint is an open-source repository linting, validation, and workflow enforcement harness developed by 0xmariowu. It is designed to enforce structural…