跳到主要内容Skip to main content
Agent 框架与编排Agent Frameworks & Orchestration生产可用Production

SWE-agent

SWE-agent / SWE-agent

把 GitHub issue 变成代码修改的软件工程 agent:通过 agent-computer interface(ACI)把搜索、编辑、测试等命令收进受限接口,让模型闭环修 issue。A software-engineering agent that turns a GitHub issue into a code change, using an agent-computer interface (ACI) to constrain search, edit and test commands so the model can close the loop on the issue.

20.8k stars 2280 forks Python 语言Language MIT 许可License 最近推送Last push 2026-11-16

为什么选Why choose it

  • ACI 设计是核心贡献,比裸 shell 更可控,也更容易复现实验。The ACI constrains actions instead of giving a raw shell.
  • NeurIPS 2024 论文与 SWE-bench 评测配套,适合做研究基线。Designed around issue-to-patch tasks.
  • trajectory 与 patch 可保存,失败能逐 step 复盘。Works with SWE-bench-style evaluation.

不适合Not for

真实仓库仍会失败,不能替代 CI 与人工 review。You need a general chat agent.
给仓库写权限前要隔离密钥与网络。You cannot run tests in an isolated repository.
评测分数受模型、重试预算与 scaffold 影响,不能直接当产品排名。评测分数受模型、重试预算与 scaffold 影响,不能直接当产品排名。

最小上手Minimum setup

  1. 按 README 用 Docker 起环境,选一个 SWE-bench Lite 实例。Run one issue in a disposable repo with a test command.
  2. 跑一个 issue,保存 trajectory 与 patch。Inspect every ACI action and the final patch.
  3. 用官方 harness 评一次通过率,再改 ACI 或模型做对照。Check whether the patch passes the repository’s tests.

依赖与成本Dependencies and cost

Docker;Python;模型 API;SWE-bench 数据集与评测 harness。Check runtime, model weights and external service dependencies in the README.

许可与使用边界License and usage boundaries

MIT;数据集、仓库代码与模型权重各自许可。Code is MIT; model weights, training data and generated content may have separate terms — check each before commercial use.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • OpenHands — 生产可用Production,能读代码、改代码、跑命令的软件工程 agent,提供 CLI、Web 界面与沙箱运行时,可接本地或云端模型。A software-engineering agent that can read code, edit it and run commands, with CLI, web UI and a sandboxed runtime.
  • Aider — 先试这个Start here,终端里的结对编程 agent,直接读写本地 git 仓库、生成 diff、自动提交,并用 repo map 控制上下文。A pair-programming agent in the terminal that reads and writes a local git repo, produces diffs, commits automatically and uses a repo map to control context.
  • Cline — 先试这个Start here,VS Code 内的 autonomous coding agent,能读文件、改代码、跑终端命令、用浏览器,并在每步请求确认。An autonomous coding agent inside VS Code that can read files, edit code, run terminal commands and use a browser, asking for approval at each step.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.