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]
Doc: Fix dead links (#846)
Kilian Lieret73d42cf4cd64
diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yamlindex 5b06b2fb..b37ec24c 100644--- a/.github/workflows/pytest.yaml+++ b/.github/workflows/pytest.yaml@@ -71,4 +71,4 @@ jobs:uses: codecov/[email protected]with:token: ${{ secrets.CODECOV_TOKEN }}- slug: princeton-nlp/SWE-agent+ slug: SWE-agent/SWE-agentdiff --git a/.github/workflows/release-dockerhub-nightly.yaml b/.github/workflows/release-dockerhub-nightly.yamlindex 2e3fafca..6c055647 100644--- a/.github/workflows/release-dockerhub-nightly.yaml+++ b/.github/workflows/release-dockerhub-nightly.yaml@@ -20,5 +20,5 @@ jobs:- name: Checkout codeuses: actions/checkout@v4- name: Run release script- if: (github.ref == 'refs/heads/main') && (github.repository == 'princeton-nlp/SWE-agent')+ if: (github.ref == 'refs/heads/main') && (github.repository == 'SWE-agent/SWE-agent')run: ./release_dockerhub.sh sweagent latest\ No newline at end of filediff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex cfb8890d..b91a7702 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -13,4 +13,4 @@ The easiest way to contribute is to give us feedback.<!-- INCLUSION END -->-You want to do contribute to the development? Great! Please see the [development guidelines](https://princeton-nlp.github.io/SWE-agent/dev/contribute/) for guidelines and tips.\ No newline at end of file+You want to do contribute to the development? Great! Please see the [development guidelines](https://swe-agent.com/latest/dev/contribute/) for guidelines and tips.\ No newline at end of filediff --git a/README.md b/README.mdindex 8d638766..8cc7cb0a 100644--- a/README.md+++ b/README.md@@ -1,11 +1,11 @@<p align="center">- <a href="https://www.swe-agent.com/">+ <a href="https://swe-agent.com/latest/"><img src="assets/swe-agent-banner.png" alt="swe-agent.com" style="height: 12em" /></a></p><p align="center">- <a href="https://princeton-nlp.github.io/SWE-agent/"><strong>Documentation</strong></a> | + <a href="https://swe-agent.com/latest/"><strong>Documentation</strong></a> | <a href="https://discord.gg/AVEFbBn2rH"><strong>Discord</strong></a> | <a href="https://arxiv.org/abs/2405.15793"><strong>Paper</strong></a></p>@@ -13,10 +13,10 @@SWE-agent lets your language model of choice (e.g. GPT-4o or Claude Sonnet 3.5) autonomously use tools to:-* [fix issues in real GitHub repositories](https://swe-agent.com/latest/usage/hello_world.md),+* [fix issues in real GitHub repositories](https://swe-agent.com/latest/usage/hello_world),* perform tasks on the web,* crack cybersecurity challenges, or-* [any custom task](https://swe-agent.com/latest/usage/coding_challenges.md).+* [any custom task](https://swe-agent.com/latest/usage/coding_challenges).It does so by using configurable [agent-computer interfaces](https://arxiv.org/abs/2405.15793) (ACIs) to interact with isolated computer environments.@@ -24,13 +24,12 @@ SWE-agent is built and maintained by researchers from Princeton University and S## π Get started!-π Try SWE-agent in your browser: [](https://codespaces.new/princeton-nlp/SWE-agent) ([more information](https://swe-agent.com/latest/installation/codespaces/))+π Try SWE-agent in your browser: [](https://codespaces.new/SWE-agent/SWE-agent) ([more information](https://swe-agent.com/latest/installation/codespaces/))Read our [documentation][docs] to learn more:* [Installation](https://swe-agent.com/latest/installation/)* [Command line usage](https://swe-agent.com/latest/usage/cl_tutorial/)-* [Using the web UI](https://swe-agent.com/latest/usage/web_ui/)* [Benchmarking on SWE-bench](https://swe-agent.com/latest/usage/benchmarking/)* [Frequently Asked Questions](https://swe-agent.com/latest/faq/)@@ -44,7 +43,7 @@ EnIGMA achieves state-of-the-art results on multiple cybersecurity benchmarks (sThe EnIGMA project introduced multiple features that are available in all modes of SWE-agent, such as the [debugger and server connection tools](https://swe-agent.com/0.7/background/iat/) and a [summarizer](https://swe-agent.com/0.7/config/summarizers/) to handle long outputs.[enigma]: https://enigma-agent.com-[SWE-bench]: https://github.com/princeton-nlp/SWE-bench+[SWE-bench]: https://github.com/SWE-bench/SWE-bench[nyu-ctf]: https://arxiv.org/abs/2406.05590## About@@ -92,8 +91,8 @@ MIT. Check `LICENSE`.[](https://github.com/SWE-agent/SWE-agent/actions/workflows/release-dockerhub-nightly.yaml)[](https://github.com/SWE-agent/SWE-agent/actions/workflows/release-dockerhub-release.yaml)[](https://github.com/SWE-agent/SWE-agent/actions/workflows/build-docs.yaml)-[](https://codecov.io/gh/princeton-nlp/SWE-agent)-[](https://results.pre-commit.ci/latest/github/princeton-nlp/SWE-agent/main)+[](https://codecov.io/gh/SWE-agent/SWE-agent)+[](https://results.pre-commit.ci/latest/github/SWE-agent/SWE-agent/main)[](https://github.com/SWE-agent/SWE-agent/actions/workflows/check-links.yaml)</div>diff --git a/config/README.md b/config/README.mdindex a1c947cd..4c51124b 100644--- a/config/README.md+++ b/config/README.md@@ -2,5 +2,5 @@You can also find the corresponding markdown files in the [`docs/` folder][source].-[docs]: https://princeton-nlp.github.io/SWE-agent/config/config+[docs]: https://swe-agent.com/latest/config/config[source]: https://github.com/SWE-agent/SWE-agent/tree/main/docsdiff --git a/docs/README.md b/docs/README.mdindex fed05b07..f508460f 100644--- a/docs/README.md+++ b/docs/README.md@@ -4,7 +4,7 @@<img src="assets/readme_assets/swe-agent-banner.png" alt="SWE-agent banner" style="height: 12em;"></div>-π Simply want to read the docs? Please head to [the web version of these docs](https://princeton-nlp.github.io/SWE-agent/)+π Simply want to read the docs? Please head to [the web version of these docs](https://swe-agent.com/latest/)This folder holds the source for the SWE-agent documentation.-Want to modify and build the website locally? See [here](https://princeton-nlp.github.io/SWE-agent/dev/contribute#mkdocs).+Want to modify and build the website locally? See [here](https://swe-agent.com/latest/dev/contribute#mkdocs).diff --git a/docs/assets/image_theme.css b/docs/assets/image_theme.cssindex e14807a8..9dd9f102 100644--- a/docs/assets/image_theme.css+++ b/docs/assets/image_theme.css@@ -1,11 +1,11 @@.dark-mode-only {- display: none !important;+ display: none !important;}[data-md-color-scheme="slate"] .dark-mode-only {- display: inline-block !important;+ display: inline-block !important;}[data-md-color-scheme="slate"] .light-mode-only {- display: none !important;-}\ No newline at end of file+ display: none !important;+}diff --git a/docs/background/architecture.md b/docs/background/architecture.mdindex 6560762d..0d60f0e8 100644--- a/docs/background/architecture.md+++ b/docs/background/architecture.md@@ -15,4 +15,4 @@ The second class that is initialized by `run.py` is the [`Agent`](../reference/aTo prompt the model, the history (all prompts to the model together with actions and outputs) need to be sent to the LM. In order to make the best use of the context window of the model, the history gets compressed by a `HistoryProcessor` (7). The model output (8) is then interpreted by the `Agent` class and executed in the Shell session via `SWEEnv`.-The [ACI](aci.md) elements are implemented as [custom commands](../config/commands.md) (9) that are available to the shell session.\ No newline at end of file+The [ACI](aci.md) elements are implemented as [custom commands](../config/tools.md) (9) that are available to the shell session.\ No newline at end of filediff --git a/docs/background/index.md b/docs/background/index.mdindex 9c874ef7..224b161a 100644--- a/docs/background/index.md+++ b/docs/background/index.md@@ -6,7 +6,7 @@ This section of the documentation talks about the architecture and research goalSWE-agent turns LMs (e.g. GPT-4) into software engineering agents that can fix issues in 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.+On [SWE-bench](https://github.com/SWE-bench/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 the ACI [here](aci.md).@@ -42,9 +42,9 @@ SWE-agent <span class="enigma">EnIGMA</span> adds advanced **offensive cybersecuOn the [NYU CTF benchmark](https://github.com/NYU-LLM-CTF/LLM_CTF_Database), EnIGMA solves **13.5%** of the capture the flag (CTF) challenges, achieving the state-of-the-art performance on the full test set of 200 challenges, **surpassing previous agents by more than 3x** ([leaderboard](https://enigma-agent.com#results)).-We accomplish our results by extending the [π€ ACIs](../background/aci.md) concept first introduced in SWE-agent, to the cybersecurity domain. We establish the novel [**:gear: Interactive Agent Tools** (IATs)](iat.md) concept, which enables our agent to use interactive tools such as a debugger, in a multitasking way such that the agent still has access to the main shell while using the debugger.+We accomplish our results by extending the [π€ ACIs](../background/aci.md) concept first introduced in SWE-agent, to the cybersecurity domain. We establish the novel [**:gear: Interactive Agent Tools** (IATs)](https://swe-agent.com/0.7/background/iat/) concept, which enables our agent to use interactive tools such as a debugger, in a multitasking way such that the agent still has access to the main shell while using the debugger.-We also use a new **Summarizer** concept integrated into the agent to deal with long context. Read more about our different summarizers [here](../config/summarizers.md).+We also use a new **Summarizer** concept integrated into the agent to deal with long context. Read more about our different summarizers [here](https://swe-agent.com/0.7/config/summarizers/).Specific [demonstrations](../config/demonstrations.md) were built per each CTF category (cryptography, reverse-engineering, forensics, ...), to enhance the model ability to solve new tasks from the same category.diff --git a/docs/config/config.md b/docs/config/config.mdindex 57e1216b..38e6e399 100644--- a/docs/config/config.md+++ b/docs/config/config.md@@ -7,7 +7,7 @@ This page contains details describing how to write your own configurations to coA configuration is represented in one or more `.yaml` files, specified by the `--config` flag in the [command line interface](../usage/cl_tutorial.md), allowing you to...-* Define the **commands** that agents may use to traverse + modify a codebase (see [here](commands.md) for more details)+* Define the **commands** that agents may use to traverse + modify a codebase (see [here](tools.md) for more details)* Write **prompts** that are deterministically/conditionally shown to the agent over the course of a single trajectory.* Control the **input/output interface** that sits between the agent and `SWEEnv`.diff --git a/docs/config/tools.md b/docs/config/tools.mdnew file mode 100644index 00000000..8fdce95d--- /dev/null+++ b/docs/config/tools.md@@ -0,0 +1,4 @@+# Configuring tools++!!! warning "Under construction"+ This section is under construction.diff --git a/docs/dev/contribute.md b/docs/dev/contribute.mdindex 835d7eb1..50cb28d8 100644--- a/docs/dev/contribute.md+++ b/docs/dev/contribute.md@@ -86,7 +86,7 @@ If you are using VSCode, you might want to add the following two files:* It might be good to open an issue and discuss first before investing time on an experimental feature.* Don't know where to get started? Look for issues marked [π good first issue][gfi] or [π help wanted][help_wanted]* When changing the behavior of the agent, we need to have some indication that it actually improves the success rate of SWE-agent.- However, if you make the behavior optional without complicating SWE-agent (for example by providing new [commands](../config/commands.md)),+ However, if you make the behavior optional without complicating SWE-agent (for example by providing new [commands](../config/tools.md)),we might be less strict.* Please add simple unit tests or integration tests wherever possible. Take a look in the [tests directory](https://github.com/SWE-agent/SWE-agent/tree/main/tests)for inspiration. We emphasize simple easy-tow-rite tests that get a lot of coverage.diff --git a/docs/dev/formatting_conflicts.md b/docs/dev/formatting_conflicts.mdindex 9f25e346..41b9309e 100644--- a/docs/dev/formatting_conflicts.md+++ b/docs/dev/formatting_conflicts.md@@ -1,5 +1,5 @@On May 28th, 2024, we introduced automated formatting with `ruff-format` and `pre-commit`. This changed almost every file in the project.-If you forked or branched off before these changes and now try to synchronize your fork/branch with `princeton-nlp/SWE-agent:main`, you will+If you forked or branched off before these changes and now try to synchronize your fork/branch with `SWE-agent/SWE-agent:main`, you willsee a lot of merge conflicts.To solve this, you need to apply the same formatting to your code. Here's how you can do it.@@ -12,7 +12,7 @@ git fetch upstream```Now, you need the updated `pyproject.toml` and `.pre-commit-config.yaml` files.-We can get them from `princeton-nlp/SWE-agent:main`:+We can get them from `SWE-agent/SWE-agent:main`:```bashgit checkout upstream/main -- .pre-commit-config.yaml pyproject.tomldiff --git a/docs/faq.md b/docs/faq.mdindex 0f8f97ef..a31ad406 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -2,7 +2,7 @@> What models are supported?-Probably all of them! There's even a few for testing. See [models](../installation/keys.md).+Probably all of them! There's even a few for testing. See [models](installation/keys.md).> What's up with all the output files?diff --git a/docs/dev/changelog.md b/docs/installation/changelog.mdsimilarity index 98%rename from docs/dev/changelog.mdrename to docs/installation/changelog.mdindex 7f0c88b8..d80d22b4 100644--- a/docs/dev/changelog.md+++ b/docs/installation/changelog.md@@ -113,13 +113,13 @@ We also solve a bug where existing linter errors in a file left SWE-agent unable[All new commits](https://github.com/SWE-agent/SWE-agent/compare/v0.4.0...v0.5.0)-β¨ The big news is our [brand new documentation](https://princeton-nlp.github.io/SWE-agent/) β¨+β¨ The big news is our [brand new documentation](https://swe-agent.com/latest/) β¨Secondly, @ollmer added a new flag `--cache_task_images` that will significantly speed up SWE-agent when running on the same environment/repository multiple times (no more waiting for cloning and installation!)### Breaking changes-* We have reformatted our codebase. If you create a PR based on a previous commit, make sure you install our `pre-commit` hook to avoid merge-conflicts because of formatting. See [our docs](https://princeton-nlp.github.io/SWE-agent/dev/formatting_conflicts/) for more information.+* We have reformatted our codebase. If you create a PR based on a previous commit, make sure you install our `pre-commit` hook to avoid merge-conflicts because of formatting. See [our docs](https://swe-agent.com/latest/dev/formatting_conflicts/) for more information.* Remove direct imports in `__init__.py` (you can no longer `from sweagent import Agent` by [@klieret](https://github.com/klieret) in [#436]([#436]([#436](https://github.com/SWE-agent/SWE-agent/pull/436)))### Addeddiff --git a/docs/installation/codespaces.md b/docs/installation/codespaces.mdindex 40923e95..a4376d7c 100644--- a/docs/installation/codespaces.md+++ b/docs/installation/codespaces.md@@ -6,7 +6,7 @@ Running SWE-agent in your browser is the easiest way to try out our project.<source src=" https://github.com/SWE-agent/SWE-agent/assets/13602468/44d60674-59ca-4986-9b22-7052a45cbed9" type="video/mp4"></video>-1. Click [](https://codespaces.new/princeton-nlp/SWE-agent)+1. Click [](https://codespaces.new/SWE-agent/SWE-agent)2. Add your language modelAPI keys to `.env` (find the file in the left sidebar and fill out the template). More information on the keys [here](keys.md).3. Make sure to wait until the `postCreateCommand` in the terminal window at the bottom is finished4. Enter your SWE-agent command, see, see [using the command line](../usage/cl_tutorial.md).@@ -33,8 +33,4 @@ Instead, click on the `Ports` tab, and click on the globe next to port `3000`:-!!! tip "More information"- See [running the web UI](../usage/web_ui.md) for more information about the- web UI and additional hints for how to solve problems with the starting it.-{% include-markdown "../_footer.md" %}\ No newline at end of filediff --git a/docs/usage/benchmarking.md b/docs/usage/benchmarking.mdindex 876593cf..3cc68499 100644--- a/docs/usage/benchmarking.md+++ b/docs/usage/benchmarking.md@@ -49,7 +49,7 @@ python -m swebench.harness.run_evaluation \--split dev```-Head over to [SWE-bench](https://github.com/princeton-nlp/SWE-bench/) for details.+Head over to [SWE-bench](https://github.com/SWE-bench/SWE-bench/) for details.!!! note "Default split"diff --git a/docs/usage/cl_tutorial.md b/docs/usage/cl_tutorial.mdindex 34ff9014..b783c6aa 100644--- a/docs/usage/cl_tutorial.md+++ b/docs/usage/cl_tutorial.md@@ -180,7 +180,7 @@ The repository can be specified in a few different ways:--env.repo.path=/path/to/repo```-Again, those are [union types](union-types). See here for all the options:+Again, those are [union types](#union-types). See here for all the options:* [`GithubRepoConfig`](../reference/repo.md#sweagent.environment.repo.GithubRepoConfig): Pull a repository from GitHub.* [`LocalRepoConfig`](../reference/repo.md#sweagent.environment.repo.LocalRepoConfig): Copies a repository from your local filesystem to the docker container.diff --git a/mkdocs.yml b/mkdocs.ymlindex d667c4f1..afef32bc 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -62,6 +62,7 @@ nav:- "In browser": "installation/codespaces.md"- "Models and keys": "installation/keys.md"- "Troubleshooting": "installation/tips.md"+ - "Changelog": "installation/changelog.md"- "Tutorials":- "Hello world": "usage/hello_world.md"- "Command line basics": "usage/cl_tutorial.md"@@ -76,7 +77,6 @@ nav:- "index": "background/index.md"- "Architecture": "background/architecture.md"- "Agent tools": "background/aci.md"- # - "Interactive agent tools": "background/iat.md"- "Output files": "usage/trajectories.md"- Configuration:- "index": "config/index.md"@@ -86,7 +86,6 @@ nav:- Development:- "Contribution guide": "dev/contribute.md"- "Formatting conflicts": "dev/formatting_conflicts.md"- - "Changelog": "dev/changelog.md"- API Reference:- "reference/index.md"- Run config:@@ -139,7 +138,7 @@ plugins:- "!^model_config"- "!^model_post_init"repo_url: https://github.com/SWE-agent/SWE-agent-repo_name: princeton-nlp/SWE-agent+repo_name: SWE-agent/SWE-agentedit_uri: edit/main/docs/extra_css:- assets/custom.cssdiff --git a/pyproject.toml b/pyproject.tomlindex d3195840..6313c1fe 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -89,9 +89,9 @@ namespaces = false[project.urls]"Homepage" = "https://swe-agent.com"-"Bug Reports" = "http://github.com/princeton-nlp/SWE-agent/issues"-"Documentation" = "https://princeton-nlp.github.io/SWE-agent/"-"Source" = "http://github.com/princeton-nlp/SWE-agent"+"Bug Reports" = "http://github.com/SWE-agent/SWE-agent/issues"+"Documentation" = "https://swe-agent.com/latest/"+"Source" = "http://github.com/SWE-agent/SWE-agent"[tool.pytest.ini_options]diff --git a/start_web_ui.sh b/start_web_ui.shindex 0fdcb5d1..6188c18f 100755--- a/start_web_ui.sh+++ b/start_web_ui.sh@@ -34,10 +34,10 @@ echo " open your browser at http://localhost:3000"echo "* If you are running in github codespaces, please click the popup "echo " that offers to forward port 3000 (not 8000!)."echo " Missed it? Find more information at "-echo " https://princeton-nlp.github.io/SWE-agent/installation/codespaces#running-the-web-ui"+echo " https://swe-agent.com/latest/installation/codespaces#running-the-web-ui"echo "* Something went wrong? Please check "echo " web_api.log for error messages!"-echo "* See here for more information: https://princeton-nlp.github.io/SWE-agent/usage/web_ui/"+echo "* See here for more information: https://swe-agent.com/latest/usage/web_ui/"cd ../../diff --git a/sweagent/api/index.html b/sweagent/api/index.htmlindex f0be755e..d4814141 100644--- a/sweagent/api/index.html+++ b/sweagent/api/index.html@@ -18,7 +18,7 @@cd sweagent/frontend/ && npm install && npm start</p><p>- For more information, please visit the <a href="https://princeton-nlp.github.io/SWE-agent/usage/web_ui/">documentation</a>.+ For more information, please visit the <a href="https://swe-agent.com/latest/usage/web_ui/">documentation</a>.</p></body></html>\ No newline at end of filediff --git a/sweagent/inspector/README.md b/sweagent/inspector/README.mdindex f3d1225a..4ef8a0f0 100644--- a/sweagent/inspector/README.md+++ b/sweagent/inspector/README.md@@ -2,5 +2,5 @@You can also find the corresponding markdown files in the [`docs/` folder][source].-[docs]: https://princeton-nlp.github.io/SWE-agent/usage/inspector/+[docs]: https://swe-agent.com/latest/usage/inspector/[source]: https://github.com/SWE-agent/SWE-agent/tree/main/docsdiff --git a/sweagent/utils/github.py b/sweagent/utils/github.pyindex cb319235..4250b4e5 100644--- a/sweagent/utils/github.py+++ b/sweagent/utils/github.py@@ -29,7 +29,7 @@ def _get_commit(api: GhApi, owner: str, repo: str, ref: str | None = None):Args:api (GhApi):- owner (str): Repo owner, e.g., "princeton-nlp"+ owner (str): Repo owner, e.g., "SWE-agent"repo (str): Repo, e.g., "SWE-agent"ref (str, optional): Branch, tag or commit hashdiff --git a/tests/test_env_utils.py b/tests/test_env_utils.pyindex a11df657..03b17674 100644--- a/tests/test_env_utils.py+++ b/tests/test_env_utils.py@@ -29,7 +29,7 @@ def test_remove_triple_backticks():def test_is_github_repo_url():assert _is_github_repo_url("https://github.com/SWE-agent/SWE-agent")assert _is_github_repo_url("https://github.com/SWE-agent/SWE-agent/anything")- assert _is_github_repo_url("github.com/princeton-nlp/SWE-agent/anything")+ assert _is_github_repo_url("github.com/SWE-agent/SWE-agent/anything")assert not _is_github_repo_url("")assert not _is_github_repo_url("/path/to/file")@@ -72,7 +72,7 @@ def test_is_from_github_url():def test_get_associated_commit_urls():assoc = _get_associated_commit_urls(- org="princeton-nlp",+ org="SWE-agent",repo="SWE-agent",issue_number="41",token=os.environ.get("GITHUB_TOKEN", ""),diff --git a/trajectories/README.md b/trajectories/README.mdindex 61e78738..ea3246cb 100644--- a/trajectories/README.md+++ b/trajectories/README.md@@ -2,5 +2,5 @@You can also find the corresponding markdown files in the [`docs/` folder][source].-[docs]: https://princeton-nlp.github.io/SWE-agent/usage/trajectories/-[source]: https://github.com/princeton-nlp/SWE-agent/tree/main/docs+[docs]: https://swe-agent.com/latest/usage/trajectories/+[source]: https://github.com/SWE-agent/SWE-agent/tree/main/docs