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: Improve interlinking with enigma
Kilian Lieretaa1e01cb5c8a
diff --git a/docs/background/aci.md b/docs/background/aci.mdindex 03672d5e..c17b2af6 100644--- a/docs/background/aci.md+++ b/docs/background/aci.md@@ -2,13 +2,14 @@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) and build the SWE-agent repository to make it easy to iterate on ACI design for repository-level coding agents.-Just like how typical language models requires good prompt engineering, good ACI design leads to much better results when using agents. As we show in our [paper](https://arxiv.org/abs/2405.15793), a baseline agent without a well-tuned ACI does much worse than SWE-agent.+Just like how typical language models requires good prompt engineering, **good ACI design leads to much better results when using agents**. As we show in our [paper](https://arxiv.org/abs/2405.15793), a baseline agent without a well-tuned ACI does much worse than SWE-agent.SWE-agent contains features that we discovered to be immensely helpful during the agent-computer interface design process:-1. We add a linter that runs when an edit command is issued, and do not let the edit command go through if the code isn't syntactically correct.-2. We supply the agent with a special-built file viewer, instead of having it just `cat` files. We found that this file viewer works best when displaying just 100 lines in each turn. The file editor that we built has commands for scrolling up and down and for performing a search within the file.-3. We supply the agent with a special-built full-directory string searching command. We found that it was important for this tool to succinctly list the matches- we simply list each file that had at least one match. Showing the model more context about each match proved to be too confusing for the model.+1. We add a **linter** that runs when an edit command is issued, and do not let the edit command go through if the code isn't syntactically correct.+2. We supply the agent with a **special-built file viewer**, instead of having it just `cat` files. We found that this file viewer works best when displaying just 100 lines in each turn. The **file editor** that we built has commands for scrolling up and down and for performing a search within the file.+3. We supply the agent with a special-built full-directory string **searching command**. We found that it was important for this tool to succinctly list the matches- we simply list each file that had at least one match. Showing the model more context about each match proved to be too confusing for the model.4. When commands have an empty output we return a message saying "Your command ran successfully and did not produce any output."Read our paper for more details [here](https://arxiv.org/abs/2405.15793).+A recent extension of our ACI are [Interactive Agent Tools](iat.md).\ No newline at end of filediff --git a/docs/background/iat.md b/docs/background/iat.mdindex 5f736f50..a42f0828 100644--- a/docs/background/iat.md+++ b/docs/background/iat.md@@ -1,11 +1,14 @@# Interactive Agent Tools (IATs)-Tools useful for debugging (`gdb`, `radare2`), remote server interaction (`netcat`, `socat`) and penetration testing (`metasploit`) are widely used during CTF problem-solving and by cybersecurity experts. These tools are all interactive, i.e., they wait for user input, evaluate it, and print the results (read-eval-print loop, REPL).+Interactive Agent Tools were first developed as part of our [EnIGMA](../background#enigma) project, but are compatible with all uses of SWE-agent.+This page focuses on their usage for capture the flag (CTF) challenges.++Tools useful for debugging (`gdb`, `radare2`), remote server interaction (`netcat`, `socat`) and penetration testing (`metasploit`) are widely used during CTF problem-solving and by cybersecurity experts. These tools are all interactive, i.e., they wait for user input, evaluate it, and print the results (read-eval-print loop, REPL).Current LM agents, which build their ACI around a running shell as central REPL, lack the ability to nest REPLs or start separate REPLs for interactive tools.In EnIGMA, we build **Interactive Agent Tools (IATs)** that use the same principles from the ACIs introduced in SWE-agent, but are also able to nest new REPL of the desired tool for agent interaction.-Just like how typical programmer or cybersecurity expert uses multiple programs concurrently to build software or defend against cyber attacks, our IAT design enables the agent to use the interactive tools while still having the ability to access the main shell to run other commands.+Just like how typical programmer or cybersecurity expert uses multiple programs concurrently to build software or defend against cyber attacks, our IAT design enables the agent to use the interactive tools while still having the ability to access the main shell to run other commands.As we show in our [paper](TODO: COMPLETE LINK), a baseline agent without our IATs does worse than EnIGMA.diff --git a/docs/background/index.md b/docs/background/index.mdindex bb2e0ff7..ffd197fb 100644--- a/docs/background/index.md+++ b/docs/background/index.md@@ -1,10 +1,10 @@# Learn more about the project.-This section of the documentation talks about the architecture and research goals of SWE-agent and EnIGMA.+This section of the documentation talks about the architecture and research goals of [SWE-agent](#swe-agent) and [EnIGMA](#enigma).Just want to run SWE-agent or EnIGMA? Skip ahead to our [installation notes](../installation/index.md).-## SWE-agent+## SWE-agent <a name="swe-agent"></a>SWE-agent turns LMs (e.g. GPT-4) into software engineering agents that can fix issues in GitHub repositories.@@ -33,7 +33,7 @@ If you found this work helpful, please consider using the following citation:}```-## EnIGMA+## EnIGMA <a name="enigma"></a>EnIGMA (Enhanced Interactive Generative Model Agent) is an LM agent built on top of SWE-agent for solving Capture The Flag (CTF) cybersecurity challenges.@@ -41,7 +41,7 @@ The challenges range in various categories: cryptography, reverse-engineering, fOn [NYU CTF benchmark](https://github.com/NYU-LLM-CTF/LLM_CTF_Database), EnIGMA solves **13.5%** of challenges, achieving the state-of-the-art performance on the full test set of 200 CTF challenges.-We accomplish our results by extending the [🤖 ACIs](../background/aci.md) first introduced in SWE-agent, to the cybersecurity domain. We establish the novel **:gear: Interactive Agent Tools** (IATs) concept, which enables our agent to use interactive tools such as a debugger, in a multiprocess way such that the agent still has access to the main shell. Read more about IAT [here](iat.md).+We accomplish our results by extending the [🤖 ACIs](../background/aci.md) 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 multiprocess way such that the agent still has access to the main shell.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).diff --git a/docs/index.md b/docs/index.mdindex 28f0ddbc..c5147971 100644--- a/docs/index.md+++ b/docs/index.md@@ -2,7 +2,10 @@-SWE-agent turns LMs (e.g. GPT-4) into software engineering agents that can fix bugs and issues in real GitHub repositories.+SWE-agent turns LMs (e.g. GPT-4) into agents that can+[fix issues in real GitHub repositories](background#swe-agent),+[solve coding challenges](usage/coding_challenges.md), and+[solve capture the flag challenges (EnIGMA mode)](background#enigma).<div class="grid cards" markdown>