SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Move documentation to mkdocs (#371)
Kilian Lieretc0564321571c
diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yamlnew file mode 100644index 00000000..e2185934--- /dev/null+++ b/.github/workflows/build-docs.yaml@@ -0,0 +1,30 @@+name: build-docs++on:+ push:+ branches:+ - main+permissions:+ contents: write+jobs:+ deploy:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ - name: Configure Git Credentials+ run: |+ git config user.name github-actions[bot]+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com+ - uses: actions/setup-python@v5+ with:+ python-version: 3.x+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV+ - uses: actions/cache@v4+ with:+ key: mkdocs-material-${{ env.cache_id }}+ path: .cache+ restore-keys: |+ mkdocs-material-+ - run: pip install mkdocs-material+ - run: mkdocs gh-deploy --force+diff --git a/assets/swe-agent-hand.png b/assets/swe-agent-hand.pngnew file mode 100644index 00000000..48e40b01Binary files /dev/null and b/assets/swe-agent-hand.png differdiff --git a/docs/assets/readme_assets b/docs/assets/readme_assetsnew file mode 120000index 00000000..41aef43f--- /dev/null+++ b/docs/assets/readme_assets@@ -0,0 +1 @@+../../assets\ No newline at end of filediff --git a/docs/assets/swe-agent.svg b/docs/assets/swe-agent.svgnew file mode 100644index 00000000..0bee35f8--- /dev/null+++ b/docs/assets/swe-agent.svg@@ -0,0 +1,184 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Generator: Adobe Illustrator 28.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"+ viewBox="0 0 429.4 442.2" style="enable-background:new 0 0 429.4 442.2;" xml:space="preserve">+<style type="text/css">+ .st0{fill-rule:evenodd;clip-rule:evenodd;}+ .st1{fill:#FFF7EC;}+ .st2{fill-rule:evenodd;clip-rule:evenodd;fill:#FFF7EC;}+</style>+<path d="M65.4,305c-5.4,4.4-6.5,5.3-11,3.5c-3.7-1.5-10.7-3.8-10.1-4.3c4.9-4.4,7.4-8.8,13.5-6.4c4.9,1.9,6.8,3.4,6.8,3.4+ S68.3,302.4,65.4,305z"/>+<path d="M116.4,367.5c-18-7.2-35.6-14.3-53.6-21.5c5.6-7.1,9.5-8.5,16.1-5.9c22.8,8.9,45.5,17.9,68.3,26.9c1.5,0.6,3.2,1.1,3.8,2.9+ c-4.3,5.9-9.4,7.5-15.7,5.1C129.1,372.6,122.9,370.1,116.4,367.5z"/>+<path d="M253.6,380.7c3.5-2.9,6.9-3,10.5-1.2c5.3,2.5,11.3,3.7,16,7c0.2,1.7-0.5,2.4-1.4,2.9c-7.6,4.5-15.2,8.9-22.8,13.4+ c-1.7,1-3.5,1.4-5.3,0.8c-8-3.2-16.1-6.4-24.1-9.7c-0.9-0.4-1.8-0.9-1.9-2.1c5-5.8,8.6-7,15-4.8c2.7,1,4.7,0.7,6.8-1.1+ C248.6,384.2,251,382.6,253.6,380.7z"/>+<path d="M259.5,361.1c11.1,4.3,21.8,8.5,32.4,12.8c1.7,0.7,3.9,1,4.2,3.1c0.3,2.5-2.2,3-3.8,4.1c-3.1,2.2-6.3,3-10.2,1.3+ c-16.3-6.7-32.8-13-49.2-19.5c-1.7-0.7-3.5-1.2-4.4-3c3.8-5.6,8.8-7.3,14.7-5.1C248.6,356.9,253.9,359,259.5,361.1z"/>+<path d="M175,390.8c-9.1-3.9-18.3-6.9-26.9-11.3c4.2-6.3,9.4-8.2,15.5-5.8c14,5.4,27.9,10.9,41.8,16.5c1.8,0.7,4.1,1.3,4.2,3.7+ c0.1,2.2-2.3,2.6-3.7,3.7c-3.6,2.9-7.4,3-11.6,1.1C188.1,395.9,181.7,393.5,175,390.8z"/>+<path d="M50.1,328.5c5.5,2.6,11.2,3.8,16,7.2c-5.6,6.9-9.2,7.9-16.2,5.2c-10.8-4.3-21.6-8.6-32.4-12.9c-1.5-0.6-3.5-1.1-3.8-2.9+ c-0.5-2.3,1.9-2.8,3.2-3.9c3.4-2.9,6.8-3.3,11-1.5C35.1,322.9,42.5,325.6,50.1,328.5z"/>+<path d="M62,316.7c4.7,1.9,9,3.6,13.3,5.4c3.3,1.3,3.1,3,0.5,4.9c-4.2,3.2-8.2,4.6-13.7,2.1c-9.3-4.3-19-7.7-28.6-11.6+ c-1.6-0.7-3.8-1-4.2-3.1c-0.4-2.3,2-2.7,3.3-3.9c3-2.7,6.3-3.1,10.1-1.4C48.9,311.7,55.3,314,62,316.7z"/>+<path d="M237.5,403.1c3,1.5,6.2,1.6,8.3,4c-2.4,4.1-8.5,7.8-12.3,6.5c-8.3-2.9-16.4-6.3-24.6-9.6c-0.5-0.2-0.8-0.9-1.2-1.3+ c4.4-5.8,9.1-7.4,15.1-5.3C227.6,399.1,232.4,401.1,237.5,403.1z"/>+<path d="M212.7,355.1c-4.4-1.7-8.4-3.2-12.4-4.9c-1.3-0.5-3-1-3.1-2.8c-0.1-1.8,1.8-2.1,2.9-3c4.4-3.5,8.8-3.7,13.8-1.2+ c4.3,2.1,8.9,3.5,13.4,5.3c1.3,0.5,2.9,1.1,3.1,2.9c0.2,1.9-1.6,2.2-2.7,3.2C223,358.8,218.1,358,212.7,355.1z"/>+<path d="M183.1,376.8c-6.2-2.7-12.5-4.1-17.9-7.8c4.7-6.5,9-7.8,15.6-5.3c4.3,1.7,8.7,3.3,13,5c1.7,0.7,3.5,1.2,4.4,2.9+ C194.5,377.4,189.6,379.1,183.1,376.8z"/>+<path d="M179.1,341.4c-6.2-2.7-12.5-4.1-17.9-7.8c4.7-6.5,9-7.8,15.6-5.3c4.3,1.7,8.7,3.3,13,5c1.7,0.7,3.5,1.2,4.4,2.9+ C190.6,341.9,185.7,343.7,179.1,341.4z"/>+<path d="M123,328.7c-5.4,4.4-10.7,4.2-16.4,1.1c-4.7-2.5-10.3-3.3-14.7-6.8c4.4-6.1,8.9-7.5,15.1-5.1c4.9,1.9,9.9,3.8,14.8,5.8+ C124.2,324.7,125.8,326,123,328.7z"/>+<path d="M136.5,350.6c-5.4,4.4-10.7,4.2-16.4,1.1c-4.7-2.5-10.3-3.3-14.7-6.8c4.4-6.1,8.9-7.5,15.1-5.1c4.9,1.9,9.9,3.8,14.8,5.8+ C137.7,346.6,139.3,347.9,136.5,350.6z"/>+<path d="M210.1,358.5c1.7,0.8,3.2,1.1,3.9,2.7c-3.5,5.9-8.4,7.6-14.5,5.3c-4.5-1.7-9-3.5-13.5-5.2c-1.7-0.7-3.6-1.1-4.2-3.1+ c4-5.5,8.2-7,13.9-5C200.4,354.7,205.1,356.6,210.1,358.5z"/>+<path d="M177.3,345.2c1.7,0.8,3.2,1.1,3.9,2.7c-3.5,5.9-8.4,7.6-14.5,5.3c-4.5-1.7-9-3.5-13.5-5.2c-1.7-0.7-3.5-1.1-4.2-3.1+ c4-5.5,8.2-7,13.9-5C167.7,341.4,172.3,343.3,177.3,345.2z"/>+<path d="M166.8,361.1c-5.5,4.9-11.1,6-17.5,2.4c-4.5-2.5-10-3.3-14.2-6.8c6.2-6.5,9.5-7.3,16.9-4.5c3.9,1.5,7.7,3,11.6,4.5+ C165.3,357.5,167.6,358,166.8,361.1z"/>+<path d="M222.1,387.8c-3.1,2.3-6,2.3-9.2,0.9c-4.4-1.9-8.9-3.6-13.4-5.4c-1.5-0.6-3.1-1.1-3.8-2.8c4.3-5.9,8.8-7.4,14.9-5.1+ c3.7,1.4,7.4,2.9,11.1,4.4c1.9,0.8,4.9,0.8,5.3,3.2C227.5,385.9,224.1,386.1,222.1,387.8z"/>+<path d="M89.1,327.4c6.7,2.9,13.4,4.6,19.4,8.3c-4.7,6.4-9.5,7.9-16,5.1c-5.5-2.4-11.7-3.5-17.1-8.2+ C79.9,329.6,82.9,325.2,89.1,327.4z"/>+<path d="M75.5,305.6c0.2,6.6,5.2,10.9,10.2,10.2c3.1-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.8c-0.1-0.7-0.1-1.4-0.2-2.2c-0.2-2.1-0.3-4.1-0.3-6+ C113.1,290.5,108,288.5,103.5,286.8z"/>+<path d="M148.6,304.3c0.1,1.1,0.2,2.3,0.3,3.4c0.2,1.7,0.3,3.3,0.4,5c14.5,5.7,25.5,10,25.5,10S252,353,290.6,368.1+ c5.4,2.1,10.8,4.3,16.3,6.4c3.3,1.3,3.8,3.1,0.7,5.2c-1.1,0.8-2.2,1.5-3.4,2.1c-5.2,3.1-10.5,6.1-15.7,9.1c0,0,0,0,0,0l0,0+ c-12.2,7.1-24.4,14.1-36.3,21.7c-10.4,6.6-20.1,6.8-31.2,2.4c-49.9-20-99.9-39.9-149.9-59.8c-17.5-7-35-13.9-52.4-20.9+ c-3.1-1.2-12.5-6.3-8.7-9.8c6.4-6,32.2-24.7,49.3-36.9c-0.4-1.1-0.7-2.4-0.8-3.8c-22.9,15-52.7,37-55.5,40.7+ c-4.7,6.2-2.7,15.2-1.7,20c0,0.1,0,0.2,0.1,0.3c1.6,7.4,3.3,8.1,10.6,10.9c1.2,0.4,2.5,0.9,4,1.5c39.9,15.9,79.8,31.9,119.8,47.9+ c28.8,11.5,57.6,23.1,86.6,34.6c9.9,2.9,19.4,3.9,28.4-1.3c13.3-7.7,26.6-15.6,39.8-23.4c3.7-2.2,7.3-4.3,11-6.5+ c15.3-9,15.3-9.2,15.1-20.3c0-1.8-0.1-3.9,0-6.4c0.1-10.8-1.1-12.3-11-16.2c-17.4-6.8-34.9-13.6-52.3-20.5+ c-14.8-5.8-29.7-11.6-44.5-17.4c-1.6,0.3-3.3,0.3-4.8-0.2c-2.7-0.9-5.2-2.4-7.2-4.5c-0.1-0.1-0.3-0.1-0.4-0.2+ c-0.7-0.3-2.2-0.9-4.4-1.7C183.8,318.1,166.8,311.5,148.6,304.3z"/>+<path d="M126.1,327.8c-2.2,0.9-4.3,2.7-6.3,5.5c2.6,2.1,5.7,3.2,8.7,4.3c2,0.7,4.1,1.5,6,2.5c5.6,3,10.9,3.3,16.4-1.1+ c2.8-2.7,1.1-4-1.1-4.9c-1.6-0.7-3.3-1.3-4.9-1.9c-1.7,2.7-4,4.5-6.7,4.4C133.3,336.2,129.3,332.8,126.1,327.8z"/>+<path d="M119.4,306.7c-4.1-0.4-7.4,1.6-10.8,6.2c2.6,2.1,5.7,3.2,8.7,4.3c1.5,0.5,2.9,1.1,4.3,1.7+ C120.2,314.6,119.8,311,119.4,306.7z"/>+<path d="M96.7,309.6c1,0.4,1.9,0.7,2.7,1c4.5,1.8,5.6,1,11-3.5c2.8-2.7-0.8-3.9-0.8-3.9s-1.9-1.5-6.8-3.4c-0.7-0.3-1.3-0.4-1.9-0.6+ c-0.3,2.1-0.7,4.2-1.1,6.2C99.8,305.6,98.7,307.5,96.7,309.6z"/>+<path d="M74.6,300.3c-0.1-0.8-0.2-1.5-0.2-2.2v0c0-1,0-2,0-3c-0.9-1-1.9-0.9-2.9-0.8c-0.3,0-0.6,0.1-0.9,0.1c-3.1,0-5.7-0.7-7.7-2+ c-0.5,0.6-1,1.2-1.5,1.9c2.6,2.1,5.7,3.2,8.7,4.3C71.7,299,73.2,299.6,74.6,300.3z"/>+<path d="M184.9,1.5c-12-4.5-21.2,1.5-21,14.9l-0.4,161.2l14.7-3.5l4.2-1.1c0.8-50.3,1-100.5,1-150.9c37.9,13.9,75.6,28.2,113.4,42.4+ c0,0,0,0,0,0c32,12.1,64,24.2,96.1,36c9.7,3.6,11,5.2,11,15.3c0,20.7,0,41.3,0,62c0,47.2,0,94.3,0,141.5c0,5.2-4.3,6.6-7.4,5.5+ c-45.6-15.4-89.7-31.4-133.8-48c-1,1.9-2.3,3.8-4,5.6c-3.4,3.6-6.4,6-10,8.8c0,0,0,0,0,0c3.2,1.2,6.4,2.3,9.6,3.5+ c47.8,17.1,95,34,132.6,49c9.4,3.7,17.9,4,27,0c7.8-3.4,11.5-8.6,11.5-17.2c0-7.2,0-14.4,0-21.6c0-3.6,0-7.2,0-10.8+ c0-19.6,0-39.1,0-58.7c0-42.9,0-85.8,0-128.7c0-11.4-3.3-16.3-14-20.1c-3.4-1.2-6.7-2.5-10.1-3.7c-19.6-7.2-39.3-14.3-58.9-21.5+ c-10.3-3.8-20.5-7.6-30.8-11.4C272,34,228.4,17.9,184.9,1.5z"/>+<path d="M208.2,276.8c0.5-0.6,1.1-1.2,1.7-1.8c4.5-5,8.9-9.9,10.4-14.2c-7.7-3-15.4-5.9-23.1-8.9c-1,0.2-2,0.4-3.1,0.8+ c-1.1,0.3-2.1,0.6-3,0.9h0c-5.7,1.7-10.2,3-15.7,6.5c-1.7,1.1-3.2,2.1-4.5,3.2C183,267.7,195.5,272.3,208.2,276.8z"/>+<path d="M146.7,328.3c0.3,0.1,0.7,0.3,1,0.4l0,0c1.3,0.5,2.6,1,3.6,1.4c4.5,1.8,5.6,1,11-3.5c2.8-2.7-0.8-3.9-0.8-3.9+ s-1.9-1.5-6.8-3.4c-2.3-0.9-4.1-0.9-5.7-0.2c-0.1,1-0.3,2-0.5,3.1C148.1,324.1,147.5,326.3,146.7,328.3z"/>+<path d="M305,203.4c-3.1,2-6.1,2.5-8.4-0.2c-2.2-2.6-1.9-5.6-0.2-8.4c2.1-3.5,6.5-4.5,9.5-2.4C309.1,194.8,308.9,198.6,305,203.4z"+ />+<path class="st0" d="M85.7,315.8c-5,0.7-10-3.6-10.2-10.2c0-1.1-0.3-2.3-0.5-3.6c-0.3-1.4-0.5-2.8-0.5-4v0c0-1,0-2,0-3+ c-1.2-1.4-2.6-0.7-3.8-0.7c-8.7,0-13.4-5.6-11.9-14.3c2.1-12,5.8-24.1,10.9-35.2l0,0c0.7-1.5,1.4-3,0.8-5c-1.5,0.3-3,0.7-4.4,1.2+ c-2.5,0.8-5,1.5-7.7,1.5c-6.6,0-11.1-2.3-13.2-7.1c-2.1-4.9-0.7-10.3,4.3-14.8c9.7-8.7,16.7-18.1,30.7-23.9+ c5.5-2.3,8.8-2.9,14.6-4.4c11.4-3,29.7-5.3,29.7-5.3l53.7-12.8l34.3-9.1c0,0,15.9-2.6,23.7-8.6c3.2-2.5,3.7-5.7,7.4-7.3+ c7.6-3.3,17.7-5,25-8.2c6.5-2.9,12.6-5.6,19.5-6.6c6.7-1,14.6,5.3,21.7,12.3c5.2,5.2,11,17.5,13.2,30.3c2.1,11.7,2.5,19.3,0,29.8+ c-1.2,5.1-2.7,8.3-6.9,11.4c-8.1,6-17.1,5.4-28,9.3c-4.8,1.7-12.2,4.5-12.2,4.5s-3.1,16.4-6.8,26.2c-3.4,8.7-3.5,17.1-10.4,24.5+ c-4.2,4.5-7.9,7.1-12.7,11c-6,4.9-12.9,11.3-17.1,15.7c-3.4,3.5-5.6,5.8-9.3,10.8c-4.6,6.1-10.7,9.2-15.8,7.6+ c-6.2-2-11.5-7.5-11.7-15.4c-0.1-6,4.9-16.8,7-22.5c3.6-9.9,20.6-22,21.7-30.9c0.6-4.6-6.5-5.2-10.3-6.2c-6.2-1.7-11.3-1.5-16.4,0+ c-7.2,2.2-12.3,3.4-18.8,7.4c-5.6,3.5-8.3,6.7-12.8,9.8c-7.3,5.1-8.6,4.6-11.6,10.2c-1.8,3.4-2,10-2.4,17.1c-0.6,9.5,2,15.5,0,25+ c-1.3,6.2-4.8,14.6-10.5,14.3c-6.8-0.4-12-7.2-15.5-15.6c-3.2-7.6-2.8-13.1-3.7-22.2c-1-10,0.5-16.8,2.9-26.5+ c1.5-5.9,3.7-10.2,6.6-14.1c2.4-3.3,6-6.3,6-6.3s-9.6,6-12.5,8.3c-4.4,3.5-8.3,9-9.2,10.9c-10.8,11.8-10.5,24.1-12.7,34.7+ C99.8,305.6,94.4,314.6,85.7,315.8z M82.7,261.8L82.7,261.8c2.9-6.2,5.8-12.4,8.5-18.7c3.3-7.6,8.5-12.8,16.1-16.2+ c14.8-6.5,29.6-12.9,44.7-18.6c1.9-0.7,3.8-1.3,5.7-1.6c2.1-0.3,4.1,0.2,4.8,2.6c0.6,2.2-0.8,3.5-2.4,4.5c-1.1,0.7-2.4,1.1-3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-11.4,14.5c-7.5,9-12.9,18.8-13.4,30.9c-0.1,3.1-1.4,6.2-4.1,8.3c-1.4,1.2-2.8,2.5-4.9,1.8+ c-2.1-0.7-2.1-2.8-2-4.6c0.3-11.8,0.5-24.3,6.4-34.9c2.8-5.2,5.3-10.6,7.7-15.9l0,0l0,0c0.9-2.1,1.9-4.1,2.8-6.1+ c2.7-5.7,6.9-9.6,12.7-12.1c10.7-4.5,21.3-9.1,31.9-13.7l0,0l0,0c4-1.8,12.1-5.3,12.1-5.3c1.2-0.5,2.5-0.9,3.6-1.7+ c1.6-1,3-2.3,2.4-4.5c-0.7-2.4-2.7-2.9-4.8-2.6c-2,0.3-3.9,0.9-5.7,1.6c-15.1,5.7-29.9,12.1-44.7,18.6c-7.6,3.3-12.8,8.6-16.1,16.2+ C88.5,249.3,85.6,255.5,82.8,261.8z"/>+<path class="st1" d="M188.8,155.9c0,0,0-77.5,0-114.5c0-0.4,0-0.9-0.1-1.4c-0.1-1.8-0.2-3.8,1.4-5.8c1.4,0.5,2.9,1,4.4,1.6l0,0+ c3.2,1.1,6.3,2.3,9.5,3.5c13.1,4.8,26.2,9.7,39.3,14.5l0.1,0c49,18,98.1,36.1,147.1,54.1c4,1.5,5.8,3.4,5.8,7.9+ c-0.1,43.8-0.1,87.6-0.1,131.4v0.1c0,21.3,0,42.6,0,64c0,0.4,0,0.7,0,1.1c0.1,1.8,0.2,3.6-1.7,5.1c-0.4-0.1-0.8-0.3-1.2-0.4+ c-0.9-0.3-1.9-0.6-2.8-1c-39.7-15-119.1-45.1-119.1-45.1s-2.1-0.8-5.7-2.3c-0.8,2.8-1.7,5.5-3.1,8.1c44,16.6,88.2,32.6,133.8,48+ c3.1,1,7.4-0.3,7.4-5.5c0-47.2,0-94.3,0-141.5c0-20.7,0-41.3,0-62c0-10.1-1.3-11.7-11-15.3c-32.1-11.9-64.1-24-96.1-36l0,0+ C259.1,50.3,221.3,36,183.4,22.1c0,50.3-0.2,100.6-1,150.9l6.4-1.7C188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,10.8-6.2c-0.1-1.8-0.3-3.8-0.4-5.9+ c-6.1-2.4-12-4.7-17.2-6.8c-0.3,1.8-0.6,3.6-0.9,5.4c0.6,0.1,1.2,0.3,1.9,0.6c4.9,1.9,6.8,3.4,6.8,3.4s3.6,1.2,0.8,3.9+ c-5.4,4.4-6.5,5.3-11,3.5c-0.8-0.3-1.7-0.7-2.7-1C95.8,310.5,94.8,311.5,93.6,312.4z M54.5,308.5c4.5,1.8,5.6,1,11-3.5+ c2.8-2.7-0.8-3.9-0.8-3.9s-1.9-1.5-6.8-3.4c-6.2-2.4-8.6,2-13.5,6.4C43.7,304.7,50.8,307,54.5,308.5z M62.8,346+ c18,7.2,35.6,14.3,53.6,21.5c6.5,2.6,12.7,5.1,18.9,7.5c6.3,2.4,11.4,0.8,15.7-5.1c-0.6-1.8-2.3-2.3-3.8-2.9+ c-22.8-9-45.5-18-68.3-26.9C72.3,337.5,68.4,338.9,62.8,346z M264.1,379.5c-3.7-1.7-7-1.7-10.5,1.2c-2.6,1.9-5,3.4-7.1,5.3+ c-2.1,1.8-4.2,2.1-6.8,1.1c-6.4-2.3-10-1-15,4.8c0.2,1.1,1,1.7,1.9,2.1c8,3.3,16,6.5,24.1,9.7c1.8,0.7,3.6,0.2,5.3-0.8+ c7.6-4.5,15.2-8.9,22.8-13.4c0.9-0.5,1.6-1.3,1.4-2.9C275.4,383.2,269.5,382,264.1,379.5z M291.9,373.9+ c-10.7-4.2-21.4-8.4-32.4-12.8c-5.7-2.2-10.9-4.2-16.2-6.2c-6-2.2-10.9-0.5-14.7,5.1c0.9,1.8,2.7,2.3,4.4,3+ c16.4,6.5,32.9,12.8,49.2,19.5c4,1.6,7.1,0.9,10.2-1.3c1.6-1.1,4.1-1.7,3.8-4.1C295.9,374.9,293.6,374.5,291.9,373.9z M148.1,379.5+ c8.6,4.5,17.8,7.4,26.9,11.3c6.7,2.7,13.1,5.1,19.3,7.8c4.2,1.8,8,1.8,11.6-1.1c1.4-1.1,3.8-1.5,3.7-3.7c-0.1-2.4-2.4-3-4.2-3.7+ c-13.9-5.5-27.8-11.1-41.8-16.5C157.5,371.3,152.3,373.2,148.1,379.5z M66.1,335.8c-4.8-3.4-10.6-4.6-16-7.2c-7.6-3-15-5.6-22.1-8.8+ c-4.2-1.9-7.6-1.4-11,1.5c-1.3,1.1-3.7,1.6-3.2,3.9c0.4,1.8,2.3,2.2,3.8,2.9c10.8,4.3,21.6,8.6,32.4,12.9+ C56.9,343.7,60.5,342.6,66.1,335.8z M75.2,322.1c-4.3-1.7-8.6-3.5-13.3-5.4c-6.7-2.6-13.1-5-19.3-7.7c-3.8-1.6-7-1.3-10.1,1.4+ c-1.3,1.2-3.7,1.6-3.3,3.9c0.4,2,2.6,2.4,4.2,3.1c9.5,3.9,19.3,7.3,28.6,11.6c5.5,2.5,9.5,1.1,13.7-2.1+ C78.3,325,78.6,323.4,75.2,322.1z M245.8,407.1c-2.1-2.4-5.3-2.5-8.3-4c-5.2-2-9.9-4-14.8-5.7c-5.9-2.2-10.6-0.5-15.1,5.3+ c0.4,0.4,0.7,1.1,1.2,1.3c8.2,3.3,16.3,6.7,24.6,9.6C237.3,414.9,243.4,411.3,245.8,407.1z M200.3,350.3c4,1.6,8,3.2,12.4,4.9+ c5.4,2.9,10.3,3.6,15-0.5c1.1-0.9,2.9-1.3,2.7-3.2c-0.2-1.8-1.8-2.3-3.1-2.9c-4.4-1.8-9.1-3.2-13.4-5.3c-5-2.5-9.5-2.3-13.8,1.2+ c-1.1,0.9-3,1.2-2.9,3C197.3,349.3,199,349.7,200.3,350.3z M165.1,369c5.4,3.6,11.8,5.1,17.9,7.8c6.6,2.3,11.4,0.6,15-5.2+ c-0.9-1.7-2.7-2.3-4.4-2.9c-4.3-1.7-8.7-3.3-13-5C174.2,361.2,169.8,362.6,165.1,369z M161.2,333.6c5.4,3.6,11.8,5.1,17.9,7.8+ c6.6,2.3,11.4,0.6,15-5.2c-0.9-1.7-2.7-2.3-4.4-2.9c-4.3-1.7-8.7-3.3-13-5C170.2,325.8,165.9,327.1,161.2,333.6z M106.7,329.8+ c5.6,3,10.9,3.3,16.4-1.1c2.8-2.7,1.1-4-1.1-4.9c-4.9-2-9.9-3.9-14.8-5.8c-6.2-2.4-10.6-1-15.1,5.1+ C96.4,326.5,102,327.3,106.7,329.8z M120.2,351.7c5.6,3,10.9,3.3,16.4-1.1c2.8-2.7,1.1-4-1.1-4.9c-4.9-2-9.9-3.9-14.8-5.8+ c-6.2-2.4-10.6-1-15.1,5.1C109.9,348.4,115.5,349.2,120.2,351.7z M213.9,361.2c-0.7-1.6-2.2-1.9-3.9-2.7c-5-1.9-9.6-3.8-14.3-5.4+ c-5.7-2-9.9-0.4-13.9,5c0.6,2.1,2.5,2.5,4.2,3.1c4.5,1.8,9,3.5,13.5,5.2C205.6,368.8,210.4,367.1,213.9,361.2z M181.2,347.9+ c-0.7-1.6-2.2-1.9-3.9-2.7c-5-1.9-9.6-3.8-14.3-5.4c-5.7-2-9.9-0.4-13.9,5c0.6,2.1,2.5,2.5,4.2,3.1c4.5,1.8,9,3.5,13.5,5.2+ C172.8,355.5,177.7,353.7,181.2,347.9z M149.3,363.5c6.4,3.6,12,2.5,17.5-2.4c0.7-3.1-1.6-3.6-3.3-4.3c-3.8-1.6-7.7-3.1-11.6-4.5+ c-7.4-2.8-10.7-2-16.9,4.5C139.4,360.2,144.8,361,149.3,363.5z M212.9,388.7c3.2,1.4,6.1,1.4,9.2-0.9c1.9-1.7,5.4-1.9,4.9-4.8+ c-0.4-2.3-3.3-2.4-5.3-3.2c-3.7-1.5-7.4-3-11.1-4.4c-6.2-2.3-10.6-0.8-14.9,5.1c0.7,1.6,2.3,2.2,3.8,2.8+ C204,385.1,208.5,386.8,212.9,388.7z M108.5,335.7c-6-3.7-12.7-5.4-19.4-8.3c-6.3-2.2-9.3,2.2-13.7,5.2c5.4,4.7,11.6,5.7,17.1,8.2+ C99,343.6,103.8,342.1,108.5,335.7z"/>+<path class="st2" d="M279.5,216.6c0.2-1.7,0.4-3.4,0.1-5.1c-0.1-20.1-9.2-42-27.5-52.2c-1.3-0.7-2.6-1.4-3.4-2.9+ c0.4-2,2-2.4,3.4-2.8h0c3.1-0.9,6.1-1.9,9.2-2.9c1.6-0.5,3.3-1.1,4.9-1.6l0,0c6.2-1.9,12.3-3.9,18.4-5.9c2.8-0.9,5-0.6,7.5,1+ c12.9,8.3,19.2,20.7,22.1,35.3c1.8,9.2,1.4,18.5,0,27.8c-0.6,4-2.1,6.4-6.4,7.7c-6.6,1.9-13.2,4.1-19.9,6.4l0,0l0,0l0,0l0,0h0l0,0+ c-2.7,0.9-5.5,1.9-8.3,2.8C278.9,221.5,279.2,219,279.5,216.6z M296.5,203.2c2.4,2.8,5.3,2.2,8.4,0.2c4-4.8,4.2-8.7,0.9-11+ c-3-2.1-7.4-1.1-9.5,2.4C294.7,197.6,294.4,200.6,296.5,203.2z"/>+</svg>diff --git a/docs/dev.md b/docs/dev.mdnew file mode 100644index 00000000..e69de29bdiff --git a/docs/github_codespace.md b/docs/github_codespace.mddeleted file mode 100644index 92d758a0..00000000--- a/docs/github_codespace.md+++ /dev/null@@ -1,20 +0,0 @@-# SWE-agent on GitHub Codespaces--## Running the web UI--Go to the terminal and enter--```bash-./start_web_ui.sh-```--After a while, you should see a popup offering you to forward port `3000`. Click `Open in Browser`.-----If you instead only see the offer to forward port `8000`, do not click it (this is the port that's being used by the backend).--Instead, click on the `Ports` tab, and click on the globe next to port `3000`:--\ No newline at end of filediff --git a/docs/index.md b/docs/index.mdnew file mode 100644index 00000000..c2d1a22e--- /dev/null+++ b/docs/index.md@@ -0,0 +1,32 @@+# SWE-agent++++SWE-agent turns LMs (e.g. GPT-4) into software engineering agents that can fix bugs and issues in real GitHub repositories.++On [SWE-bench](https://github.com/princeton-nlp/SWE-bench), SWE-agent resolves **12.29%** of issues, achieving the state-of-the-art performance on the full test set.++We accomplish our results by designing simple LM-centric commands and feedback formats to make it easier for the LM to browse the repository, view, edit and execute code files. We call this an 🤖 **Agent-Computer Interface (ACI)**.+Read more about it in our [paper](https://swe-agent.com/paper.pdf)!++SWE-agent is built and maintained by researchers from Princeton University.++<p align="center">+ <img src="assets/readme_assets/results+preview.png" style="width: 80%; height: auto;">+</p>++If you found this work helpful, please consider using the following citation:++```+@misc{yang2024sweagent,+ title={SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering},+ author={John Yang and Carlos E. Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik Narasimhan and Ofir Press},+ year={2024},+}+```++### ✨ Use SWE-agent as a dev tool++We provide a command line tool and a graphical web interface:++\ No newline at end of filediff --git a/docs/installation/codespaces.md b/docs/installation/codespaces.mdnew file mode 100644index 00000000..302d0136--- /dev/null+++ b/docs/installation/codespaces.md@@ -0,0 +1,10 @@+# Running SWE-agent in your browser++<video controls>+<source src=" https://github.com/princeton-nlp/SWE-agent/assets/13602468/44d60674-59ca-4986-9b22-7052a45cbed9" type="video/mp4">+</video>++1. Click [](https://codespaces.new/princeton-nlp/SWE-agent)+2. Add your API keys to `keys.cfg` (find the file in the left sidebar and fill out the template)+3. Make sure to wait until the `postCreateCommand` in the terminal window at the bottom is finished+4. Enter your SWE-agent command, see [using the web interface](../usage/web_ui.md) or [using the command line](../usage/cl_tutorial.md).\ No newline at end of filediff --git a/docs/installation/docker.md b/docs/installation/docker.mdnew file mode 100644index 00000000..b1a14f0f--- /dev/null+++ b/docs/installation/docker.md@@ -0,0 +1,32 @@+# Fallback: Usage with docker++!!! warning "Limitations"+ The latest containerized version does not yet provide the web interface.++Instead of installing SWE-agent from source, you can also run the software directly using Docker.++1. [Install Docker](https://docs.docker.com/engine/install/), then start Docker locally.+2. Run `docker pull sweagent/swe-agent:latest`+3. Add your API tokens to a file `keys.cfg` as explained [here](keys.md)++Then run++```bash+# NOTE:+# This assumes that keys.cfg is in your current directory (else fix the path below)+# This command is equivalent to the script shown in the quickstart+docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock \+ -v $(pwd)/keys.cfg:/app/keys.cfg \+ sweagent/swe-agent-run:latest \+ python run.py --image_name=sweagent/swe-agent:latest \+ --model_name gpt4 \+ --data_path https://github.com/pvlib/pvlib-python/issues/1603 \+ --config_file config/default_from_url.yaml --skip_existing=False+```++!!! tip "Tips"+ * For more information on the different API keys/tokens, see [below](keys.md).+ * If you're using docker on Windows, use `-v //var/run/docker.sock:/var/run/docker.sock`+ (double slash) to escape it ([more information](https://stackoverflow.com/a/47229180/)).+ * See the [installation issues section](tips.md) for more help if you run into+ trouble.\ No newline at end of filediff --git a/docs/installation/keys.md b/docs/installation/keys.mdnew file mode 100644index 00000000..c9884d9d--- /dev/null+++ b/docs/installation/keys.md@@ -0,0 +1,17 @@+# Adding your API keys++Create a `keys.cfg` file at the root of this repository and populate it with your API keys.++```+GITHUB_TOKEN: 'GitHub Token for access to private repos' # <-- delete line if not used+OPENAI_API_KEY: 'OpenAI API Key Here if using OpenAI Model'+ANTHROPIC_API_KEY: 'Anthropic API Key Here if using Anthropic Model'+TOGETHER_API_KEY: 'Together API Key Here if using Together Model'+AZURE_OPENAI_API_KEY: 'Azure OpenAI API Key Here if using Azure OpenAI Model'+AZURE_OPENAI_ENDPOINT: 'Azure OpenAI Endpoint Here if using Azure OpenAI Model'+AZURE_OPENAI_DEPLOYMENT: 'Azure OpenAI Deployment Here if using Azure OpenAI Model'+AZURE_OPENAI_API_VERSION: 'Azure OpenAI API Version Here if using Azure OpenAI Model'+OPENAI_API_BASE_URL: 'LM base URL here if using Local or alternative api Endpoint'+```++See the following links for tutorials on obtaining [Anthropic](https://docs.anthropic.com/claude/reference/getting-started-with-the-api), [OpenAI](https://platform.openai.com/docs/quickstart/step-2-set-up-your-api-key), and [Github](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) tokens.\ No newline at end of filediff --git a/docs/installation/source.md b/docs/installation/source.mdnew file mode 100644index 00000000..60a51d1a--- /dev/null+++ b/docs/installation/source.md@@ -0,0 +1,20 @@+# Installation from source++!!! warning "Issues on Windows"+ Expect some issues with Windows (we're working on them).+ In the meantime, use Docker (see below).++1. [Install Docker](https://docs.docker.com/engine/install/), then start Docker locally.+2. For the web interface only: Install [`nodejs`][nodejs-install].+3. Clone this repository.+4. Run `pip install --editable .` at the repository root (as with any python setup, it's recommended to use [conda][] or [virtual environments][] to manage dependencies).+5. Run `./setup.sh` to create the `swe-agent` docker image.+6. Create a `keys.cfg` file at the root of this repository ([more information](keys.md)).++[nodejs-install]: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm++!!! tip "Docker issues"+ If you run into docker issues, see the [installation tips section](tips.md) for more help++[conda]: https://docs.conda.io/en/latest/+[virtual environments]: https://realpython.com/python-virtual-environments-a-primer/\ No newline at end of filediff --git a/docs/installation/tips.md b/docs/installation/tips.mdnew file mode 100644index 00000000..85d932aa--- /dev/null+++ b/docs/installation/tips.md@@ -0,0 +1,8 @@+# More installation tips++If you seem to be having issues with running docker++* Make sure that you allow the use of the Docker socket. In Docker desktop, click *Settings* > *Advanced* > *Allow the default Docker socket to be used (requires password)*+* If your docker installation uses a different socket, you might have to symlink them, see [this command for example](https://github.com/princeton-nlp/SWE-agent/issues/20#issuecomment-2047506005)++Any remaining issues? Please [open a GitHub issue](https://github.com/princeton-nlp/SWE-agent/issues/new/choose)!\ No newline at end of filediff --git a/docs/modify.md b/docs/modify.mdnew file mode 100644index 00000000..b58eedd5--- /dev/null+++ b/docs/modify.md@@ -0,0 +1,21 @@+# Modifying the behavior of SWE-agent++## Code structure++* See the [`scripts/`](https://github.com/princeton-nlp/SWE-agent/tree/main/scripts/) folder for other useful scripts and details.+* See the [`config/`](https://github.com/princeton-nlp/SWE-agent/tree/main/config/) folder for details about how you can define your own configuration!+* See the [`sweagent/agent/`](https://github.com/princeton-nlp/SWE-agent/tree/main/sweagent/agent/) folder for details about the logic behind configuration based workflows.+* See the [`sweagent/environment/`](https://github.com/princeton-nlp/SWE-agent/tree/main/sweagent/environment/) folder for details about the `SWEEnv` environment (interface + implementation).+* See the [`trajectories/`](https://github.com/princeton-nlp/SWE-agent/tree/main/trajectories) folder for details about the output of `run.py`.+* See the [`evaluation/`](https://github.com/princeton-nlp/SWE-agent/tree/main/evaluation/) folder for details about how evaluation works.++## Changing the demonstrations++If you'd like to modify the example demonstration that we feed the model at the start of each run, first generate a trajectory manually by running the agent with ```--model_name human```+and then convert that trajectory into a demonstration by following the guide [here](https://github.com/princeton-nlp/SWE-agent/tree/main/make_demos).++To edit text in ```human``` mode:++1. Run the command ```edit edit_start_line:edit_end_line```+2. Write the text you want to insert. Feel free to write the text across multiple lines.+3. Press ```return``` then write ```end_of_edit``` and then press ```return``` again to submit the edit.\ No newline at end of filediff --git a/docs/usage/benchmarking.md b/docs/usage/benchmarking.mdnew file mode 100644index 00000000..d7e506f6--- /dev/null+++ b/docs/usage/benchmarking.md@@ -0,0 +1,32 @@+# Benchmarking++There are two steps to the SWE-agent pipeline. First SWE-agent takes an input GitHub issue and returns a pull request that attempts to fix it. We call that step *inference*. The second step (currently, only available for issues in the SWE-bench benchmark) is to *evaluate* the pull request to verify that it has indeed fixed the issue.++!!! warning "Architectures"+ At this moment, there are known issues with a small number of repositories that don't install properly for `arm64` / `aarch64` architecture computers. We're working on a fix, but if you'd like to run and evaluate on the entirety of SWE-bench, the easiest way is by using an `x86` machine.++## 👩💻 Inference <a name="inference"></a>+**Inference on *any* GitHub Issue**: See [above](cl_tutorial.md).++**Inference on SWE-bench**: Run SWE-agent on [SWE-bench Lite](https://www.swebench.com/lite.html) and generate patches.++```bash+python run.py --model_name gpt4 \+ --per_instance_cost_limit 2.00 \+ --config_file ./config/default.yaml+```++If you'd like to run on a *single* issue from SWE-bench, use the `--instance_filter` option as follows:+```bash+python run.py --model_name gpt4 \+ --instance_filter marshmallow-code__marshmallow-1359+```++## 🧪 Evaluation <a name="evaluation"></a>+This step is only available for issues from the SWE-bench set. To evaluate generated pull requests:+```bash+cd evaluation/+./run_eval.sh <predictions_path>+```+Replace `<predictions_path>` with the path to the model's predictions, which should be generated from the *Inference* step. The `<predictions_path>` arguments should look like `../trajectories/<username>/<model>-<dataset>-<hyperparams>/all_preds.jsonl`+* See the [`evaluation/`](https://github.com/princeton-nlp/SWE-agent/tree/main/evaluation/) folder for details about how evaluation works.\ No newline at end of filediff --git a/docs/usage/cl_tutorial.md b/docs/usage/cl_tutorial.mdnew file mode 100644index 00000000..4d5f9a7d--- /dev/null+++ b/docs/usage/cl_tutorial.md@@ -0,0 +1,44 @@+# Command line usage tutorial++## Getting started++For the CLI, use the `run.py` script.++```bash+python run.py --model_name gpt4 \+ --data_path https://github.com/pvlib/pvlib-python/issues/1603 \+ --config_file config/default_from_url.yaml \+ --per_instance_cost_limit 2.00+```++Here, `--per_instance_cost_limit` limits the total inference cost to $2 (default is $3).++!!! tip "All options"+ Run `python run.py --help` to see all available options.++## Running on local repositories++```bash+python run.py --model_name gpt4 \+ --data_path /path/to/my_issue.md \+ --repo_path /path/to/my/local/repo \+ --config_file config/default_from_url.yaml \+ --per_instance_cost_limit 2.00 \+ --apply_patch_locally+```++## Taking actions++* You can have the agent automatically open a PR if the issue has been solved by supplying the `--open_pr`+ flag. Please use this feature responsibly (on your own repositories or after careful consideration).++## Ollama support++Models served with an ollama server can be used by specifying `--model` with `ollama:model_name` and `--host_url` to point to the url used to serve ollama (`http://localhost:11434` by default). See more details about using ollama [here](https://github.com/ollama/ollama/tree/main/docs).++```bash+python run.py --model_name ollama:deepseek-coder:6.7b-instruct \+ --host_url http://localhost:11434 \+ --data_path https://github.com/pvlib/pvlib-python/issues/1603 \+ --config_file config/default_from_url.yaml+```\ No newline at end of filediff --git a/docs/usage/web_ui.md b/docs/usage/web_ui.mdnew file mode 100644index 00000000..667b2e66--- /dev/null+++ b/docs/usage/web_ui.md@@ -0,0 +1,14 @@+# Using the web interface++To start our web UI, simply run++```bash+./start_web_ui.sh+```++from the root of the repository.++If the user interface doesn't automatically open in your browser, please open it at `http://localhost:3000`.++!!! warning "Limitations"+ Currently, the web interface only has a subset of the options of the command line interface (CLI).\ No newline at end of filediff --git a/mkdocs.yml b/mkdocs.ymlnew file mode 100644index 00000000..0d1d6454--- /dev/null+++ b/mkdocs.yml@@ -0,0 +1,51 @@+site_name: SWE-agent documentation+theme:+ name: material+ logo: assets/swe-agent.svg++ palette:++++ # Palette toggle for light mode+ - media: "(prefers-color-scheme)"+ toggle:+ icon: material/brightness-auto+ name: Switch to light mode++ - scheme: default+ media: "(prefers-color-scheme: light)"+ toggle:+ icon: material/weather-night++ name: Switch to dark mode++ # Palette toggle for dark mode+ - scheme: slate+ media: "(prefers-color-scheme: dark)"+ toggle:+ icon: material/weather-sunny+ name: Switch to light mode++markdown_extensions:+ - admonition+ - pymdownx.details+ - pymdownx.superfences+nav:+ - Home: index.md+ - Installation:+ - "Use in-browser": "installation/codespaces.md"+ - "Install from source": "installation/source.md"+ - "Docker": "installation/docker.md"+ - "Adding your keys": "installation/keys.md"+ - "Installation tips": "installation/tips.md"+ - Usage:+ - "Command line usage": "usage/cl_tutorial.md"+ - "Using the web UI": "usage/web_ui.md"+ - "Benchmarking": "usage/benchmarking.md"+ - Development:+ - "Modifying swe-agent": "modify.md"+ - "Contribution guide": "dev.md"+++