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]
Config: Add some demo configs for talks
Kilian Lieret61e5d0628405
diff --git a/config/README.md b/config/README.mdindex 5b5f71ae..d708a407 100644--- a/config/README.md+++ b/config/README.md@@ -3,6 +3,7 @@* `sweagent_0_7`: Configs from SWE-agent 0.7, similar to the one used in the paper* `exotic`: Various specific configurations that might be more of niche interest* `human`: Demo/debug configs that have the human type commands and run without a LM+* `demo`: Configs for demonstrations/talks* Configs for running with SWE-smith are at https://github.com/SWE-bench/SWE-smith/blob/main/agent/swesmith_infer.yaml🔗 For more information on config files, visit [our documentation website][docs].diff --git a/config/demo/default.yaml b/config/demo/default.yamlnew file mode 100644index 00000000..180c7f8e--- /dev/null+++ b/config/demo/default.yaml@@ -0,0 +1,73 @@+# Formerly called: anthropic_filemap.yaml+# This template is heavily inspired by anthropic's computer use demo, but you can use+# it with any LM.+agent:+ templates:+ system_template: |-+ You are a helpful assistant that can interact with a computer to solve tasks.+ instance_template: |-+ <uploaded_files>+ {{working_dir}}+ </uploaded_files>+ I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:++ <pr_description>+ {{problem_statement}}+ </pr_description>++ Can you help me implement the necessary changes to the repository so that the requirements specified in the <pr_description> are met?+ I've already taken care of all changes to any of the test files described in the <pr_description>. This means you DON'T have to modify the testing logic or any of the tests in any way!+ Your task is to make the minimal changes to non-tests files in the {{working_dir}} directory to ensure the <pr_description> is satisfied.+ Follow these steps to resolve the issue:+ 1. As a first step, it might be a good idea to find and read code relevant to the <pr_description>+ 2. Create a script to reproduce the error and execute it with `python <filename.py>` using the bash tool, to confirm the error+ 3. Edit the sourcecode of the repo to resolve the issue+ 4. Rerun your reproduce script and confirm that the error is fixed!+ 5. Think about edgecases and make sure your fix handles them as well+ Your thinking should be thorough and so it's fine if it's very long.+ next_step_template: |-+ OBSERVATION:+ {{observation}}+ next_step_no_output_template: |-+ Your command ran successfully and did not produce any output.+ tools:+ bundles:+ - path: tools/registry+ - path: tools/edit_anthropic+ - path: tools/review_on_submit_m+ registry_variables:+ USE_FILEMAP: 'true'+ SUBMIT_REVIEW_MESSAGES:+ - |+ Thank you for your work on this issue. Please carefully follow the steps below to help review your changes.++ 1. If you made any changes to your code after running the reproduction script, please run the reproduction script again.+ If the reproduction script is failing, please revisit your changes and make sure they are correct.+ If you have already removed your reproduction script, please ignore this step.+ 2. Remove your reproduction script (if you haven't done so already).+ 3. If you have modified any TEST files, please revert them to the state they had before you started fixing the issue.+ You can do this with `git checkout -- /path/to/test/file.py`. Use below <diff> to find the files you need to revert.+ 4. Run the submit command again to confirm.++ Here is a list of all of your changes:++ <diff>+ {{diff}}+ </diff>+ enable_bash_tool: true+ parse_function:+ type: function_calling+ history_processors:+ - type: cache_control+ last_n_messages: 2+ model:+ name: claude-sonnet-4-20250514+env:+ repo:+ github_url: https://github.com/SWE-agent/test-repo+ deployment:+ image: tiny+ python_standalone_dir: ""+problem_statement:+ github_url:+ https://github.com/SWE-agent/test-repo/issues/1diff --git a/config/demo/no_instructions.yaml b/config/demo/no_instructions.yamlnew file mode 100644index 00000000..41bc8858--- /dev/null+++ b/config/demo/no_instructions.yaml@@ -0,0 +1,62 @@+# Formerly called: anthropic_filemap.yaml+# This template is heavily inspired by anthropic's computer use demo, but you can use+# it with any LM.+agent:+ templates:+ system_template: |-+ You are a helpful assistant that can interact with a computer to solve tasks.+ instance_template: |-+ <uploaded_files>+ {{working_dir}}+ </uploaded_files>+ I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:++ <pr_description>+ {{problem_statement}}+ </pr_description>+ next_step_template: |-+ OBSERVATION:+ {{observation}}+ next_step_no_output_template: |-+ Your command ran successfully and did not produce any output.+ tools:+ bundles:+ - path: tools/registry+ - path: tools/edit_anthropic+ - path: tools/review_on_submit_m+ registry_variables:+ USE_FILEMAP: 'true'+ SUBMIT_REVIEW_MESSAGES:+ - |+ Thank you for your work on this issue. Please carefully follow the steps below to help review your changes.++ 1. If you made any changes to your code after running the reproduction script, please run the reproduction script again.+ If the reproduction script is failing, please revisit your changes and make sure they are correct.+ If you have already removed your reproduction script, please ignore this step.+ 2. Remove your reproduction script (if you haven't done so already).+ 3. If you have modified any TEST files, please revert them to the state they had before you started fixing the issue.+ You can do this with `git checkout -- /path/to/test/file.py`. Use below <diff> to find the files you need to revert.+ 4. Run the submit command again to confirm.++ Here is a list of all of your changes:++ <diff>+ {{diff}}+ </diff>+ enable_bash_tool: true+ parse_function:+ type: function_calling+ history_processors:+ - type: cache_control+ last_n_messages: 2+ model:+ name: claude-sonnet-4-20250514+env:+ repo:+ github_url: https://github.com/SWE-agent/test-repo+ deployment:+ image: tiny+ python_standalone_dir: ""+problem_statement:+ github_url:+ https://github.com/SWE-agent/test-repo/issues/1diff --git a/config/demo/only_bash.yaml b/config/demo/only_bash.yamlnew file mode 100644index 00000000..e1fc1199--- /dev/null+++ b/config/demo/only_bash.yaml@@ -0,0 +1,53 @@+# Formerly called: anthropic_filemap.yaml+# This template is heavily inspired by anthropic's computer use demo, but you can use+# it with any LM.+agent:+ templates:+ system_template: |-+ You are a helpful assistant that can interact with a computer to solve tasks.+ instance_template: |-+ <uploaded_files>+ {{working_dir}}+ </uploaded_files>+ I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:++ <pr_description>+ {{problem_statement}}+ </pr_description>++ Can you help me implement the necessary changes to the repository so that the requirements specified in the <pr_description> are met?+ I've already taken care of all changes to any of the test files described in the <pr_description>. This means you DON'T have to modify the testing logic or any of the tests in any way!+ Your task is to make the minimal changes to non-tests files in the {{working_dir}} directory to ensure the <pr_description> is satisfied.+ Follow these steps to resolve the issue:+ 1. As a first step, it might be a good idea to find and read code relevant to the <pr_description>+ 2. Create a script to reproduce the error and execute it with `python <filename.py>` using the bash tool, to confirm the error+ 3. Edit the sourcecode of the repo to resolve the issue+ 4. Rerun your reproduce script and confirm that the error is fixed!+ 5. Think about edgecases and make sure your fix handles them as well+ Your thinking should be thorough and so it's fine if it's very long.+ next_step_template: |-+ OBSERVATION:+ {{observation}}+ next_step_no_output_template: |-+ Your command ran successfully and did not produce any output.+ tools:+ bundles:+ - path: tools/registry+ - path: tools/submit+ enable_bash_tool: true+ parse_function:+ type: function_calling+ history_processors:+ - type: cache_control+ last_n_messages: 2+ model:+ name: claude-sonnet-4-20250514+env:+ repo:+ github_url: https://github.com/SWE-agent/test-repo+ deployment:+ image: tiny+ python_standalone_dir: ""+problem_statement:+ github_url:+ https://github.com/SWE-agent/test-repo/issues/1