[Arch] Remove supports for Background Commands (#2803)

* depracting docker exec box

* remove doc exec from workflow and docs

* remove background commands

* Update tests/unit/test_sandbox.py

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* replace for-loop with assignment

* fix integration tests

* fix integration tests for shell script

* fix integration tests

* increase max iter to fix some monologue agent issue

* fix integration test again

* fix integration tests (seems related to run_user issue)

---------

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
Xingyao Wang
2024-07-06 03:38:05 +08:00
committed by GitHub
parent 99284da476
commit a47713ecb0
137 changed files with 3684 additions and 1433 deletions

View File

@@ -388,4 +388,4 @@ NOW, LET'S START!
Browse localhost:8000, and tell me the ultimate answer to life. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -400,4 +400,4 @@ Certainly! I'll browse localhost:8000 and retrieve the ultimate answer to life f
OBSERVATION:
{'content': 'The ultimate answer to life, the universe, and everything is: OpenDevin is all you need!'}
ENVIRONMENT REMINDER: You have 8 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -388,4 +388,4 @@ NOW, LET'S START!
Fix typos in bad.txt. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -390,19 +390,15 @@ Fix typos in bad.txt. Do not ask me for confirmation at any point.
----------
Certainly! I'll fix the typos in the bad.txt file. Let's start by opening the file and examining its contents.
<execute_ipython>
open_file('bad.txt')
</execute_ipython>
Sure! Let's start by locating the `bad.txt` file and examining its contents.
<execute_bash>
find . -name "bad.txt"
</execute_bash>
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total)]
1|This is a stupid typoo.
2|Really?
3|No mor typos!
4|Enjoy!
./bad.txt
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 8 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -390,9 +390,22 @@ Fix typos in bad.txt. Do not ask me for confirmation at any point.
----------
Certainly! I'll fix the typos in the bad.txt file. Let's start by opening the file and examining its contents.
Sure! Let's start by locating the `bad.txt` file and examining its contents.
<execute_bash>
find . -name "bad.txt"
</execute_bash>
----------
OBSERVATION:
./bad.txt
[Command -1 finished with exit code 0]
----------
Let's open the `bad.txt` file and review its contents to identify and fix any typos.
<execute_ipython>
open_file('bad.txt')
open_file('./bad.txt')
</execute_ipython>
----------
@@ -405,28 +418,4 @@ OBSERVATION:
4|Enjoy!
----------
Thank you for showing me the contents of the file. I can see there are a few typos that need to be fixed. I'll correct them one by one.
Let's start with the first line:
<execute_ipython>
edit_file(
'bad.txt',
to_replace="This is a stupid typoo.",
new_content="This is a stupid typo."
)
</execute_ipython>
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No mor typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
ENVIRONMENT REMINDER: You have 7 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 12 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -390,9 +390,22 @@ Fix typos in bad.txt. Do not ask me for confirmation at any point.
----------
Certainly! I'll fix the typos in the bad.txt file. Let's start by opening the file and examining its contents.
Sure! Let's start by locating the `bad.txt` file and examining its contents.
<execute_bash>
find . -name "bad.txt"
</execute_bash>
----------
OBSERVATION:
./bad.txt
[Command -1 finished with exit code 0]
----------
Let's open the `bad.txt` file and review its contents to identify and fix any typos.
<execute_ipython>
open_file('bad.txt')
open_file('./bad.txt')
</execute_ipython>
----------
@@ -407,36 +420,17 @@ OBSERVATION:
----------
Thank you for showing me the contents of the file. I can see there are a few typos that need to be fixed. I'll correct them one by one.
Let's correct the typos in the `bad.txt` file.
Let's start with the first line:
1. "stupid typoo" should be "stupid typo".
2. "No mor typos!" should be "No more typos!".
I will make these corrections now.
<execute_ipython>
edit_file(
'bad.txt',
to_replace="This is a stupid typoo.",
new_content="This is a stupid typo."
)
</execute_ipython>
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No mor typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
----------
Thank you for the update. Now let's fix the third line:
<execute_ipython>
edit_file(
'bad.txt',
to_replace="No mor typos!",
new_content="No more typos!"
'./bad.txt',
to_replace="This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!",
new_content="This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!"
)
</execute_ipython>
@@ -451,4 +445,4 @@ OBSERVATION:
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
ENVIRONMENT REMINDER: You have 6 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 11 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -1,471 +0,0 @@
----------
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
The assistant can use an interactive Python (Jupyter Notebook) environment, executing code with <execute_ipython>.
<execute_ipython>
print("Hello World!")
</execute_ipython>
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
Important, however: do not run interactive commands. You do not have access to stdin.
Also, you need to handle commands that may run indefinitely and not return a result. For such cases, you should redirect the output to a file and run the command in the background to avoid blocking the execution.
For example, to run a Python script that might run indefinitely without returning immediately, you can use the following format: <execute_bash> python3 app.py > server.log 2>&1 & </execute_bash>
Also, if a command execution result saying like: Command: "npm start" timed out. Sending SIGINT to the process, you should also retry with running the command in the background.
The assistant can browse the Internet with <execute_browse> and </execute_browse>.
For example, <execute_browse> Tell me the usa's president using google search </execute_browse>.
Or <execute_browse> Tell me what is in http://example.com </execute_browse>.
The assistant can install Python packages using the %pip magic command in an IPython environment by using the following syntax: <execute_ipython> %pip install [package needed] </execute_ipython> and should always import packages and define variables before starting to use them.
To interact with GitHub, use the $GITHUB_TOKEN environment variable.
For example, to push a branch `my_branch` to the GitHub repo `owner/repo`:
<execute_bash> git push https://$GITHUB_TOKEN@github.com/owner/repo.git my_branch </execute_bash>
If $GITHUB_TOKEN is not set, ask the user to set it.
Apart from the standard Python library, the assistant can also use the following functions (already imported) in <execute_ipython> environment:
open_file(path: str, line_number: int | None = 1, context_lines: int | None = 100) -> None:
Opens the file at the given path in the editor. If line_number is provided, the window will be moved to include that line.
It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down`
to view the file if you want to see more.
Args:
path: str: The path to the file to open, preferred absolute path.
line_number: int | None = 1: The line number to move to. Defaults to 1.
context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100.
goto_line(line_number: int) -> None:
Moves the window to show the specified line number.
Args:
line_number: int: The line number to move to.
scroll_down() -> None:
Moves the window down by 100 lines.
Args:
None
scroll_up() -> None:
Moves the window up by 100 lines.
Args:
None
create_file(filename: str) -> None:
Creates and opens a new file with the given name.
Args:
filename: str: The name of the file to create.
edit_file(file_name: str, to_replace: str, new_content: str) -> None:
Edit a file. This will search for `to_replace` in the given file and replace it with `new_content`.
Every *to_replace* must *EXACTLY MATCH* the existing source code, character for character, including all comments, docstrings, etc.
Include enough lines to make code in `to_replace` unique. `to_replace` should NOT be empty.
`edit_file` will only replace the *first* matching occurrences.
For example, given a file "/workspace/example.txt" with the following content:
```
line 1
line 2
line 2
line 3
```
EDITING: If you want to replace the second occurrence of "line 2", you can make `to_replace` unique:
edit_file(
'/workspace/example.txt',
to_replace='line 2
line 3',
new_content='new line
line 3',
)
This will replace only the second "line 2" with "new line". The first "line 2" will remain unchanged.
The resulting file will be:
```
line 1
line 2
new line
line 3
```
REMOVAL: If you want to remove "line 2" and "line 3", you can set `new_content` to an empty string:
edit_file(
'/workspace/example.txt',
to_replace='line 2
line 3',
new_content='',
)
Args:
file_name: str: The name of the file to edit.
to_replace: str: The content to search for and replace.
new_content: str: The new content to replace the old content with.
insert_content_at_line(file_name: str, line_number: int, content: str) -> None:
Insert content at the given line number in a file.
This will NOT modify the content of the lines before OR after the given line number.
For example, if the file has the following content:
```
line 1
line 2
line 3
```
and you call `insert_content_at_line('file.txt', 2, 'new line')`, the file will be updated to:
```
line 1
new line
line 2
line 3
```
Args:
file_name: str: The name of the file to edit.
line_number: int: The line number (starting from 1) to insert the content after.
content: str: The content to insert.
search_dir(search_term: str, dir_path: str = './') -> None:
Searches for search_term in all files in dir. If dir is not provided, searches in the current directory.
Args:
search_term: str: The term to search for.
dir_path: Optional[str]: The path to the directory to search.
search_file(search_term: str, file_path: Optional[str] = None) -> None:
Searches for search_term in file. If file is not provided, searches in the current open file.
Args:
search_term: str: The term to search for.
file_path: Optional[str]: The path to the file to search.
find_file(file_name: str, dir_path: str = './') -> None:
Finds all files with the given name in the specified directory.
Args:
file_name: str: The name of the file to find.
dir_path: Optional[str]: The path to the directory to search.
parse_pdf(file_path: str) -> None:
Parses the content of a PDF file and prints it.
Args:
file_path: str: The path to the file to open.
parse_docx(file_path: str) -> None:
Parses the content of a DOCX file and prints it.
Args:
file_path: str: The path to the file to open.
parse_latex(file_path: str) -> None:
Parses the content of a LaTex file and prints it.
Args:
file_path: str: The path to the file to open.
parse_pptx(file_path: str) -> None:
Parses the content of a pptx file and prints it.
Args:
file_path: str: The path to the file to open.
Please note that THE `edit_file` and `insert_content_at_line` FUNCTIONS REQUIRE PROPER INDENTATION. If the assistant would like to add the line ' print(x)', it must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.
Responses should be concise.
The assistant should attempt fewer things at a time instead of putting too many commands OR too much code in one "execute" block.
Include ONLY ONE <execute_ipython>, <execute_bash>, or <execute_browse> per response, unless the assistant is finished with the task or needs more input or action from the user in order to proceed.
If the assistant is finished with the task you MUST include <finish></finish> in your response.
IMPORTANT: Execute code using <execute_ipython>, <execute_bash>, or <execute_browse> whenever possible.
When handling files, try to use full paths and pwd to avoid errors.
----------
Here is an example of how you can interact with the environment for task solving:
--- START OF EXAMPLE ---
USER: Create a list of numbers from 1 to 10, and display them in a web page at port 5000.
ASSISTANT:
Sure! Let me create a Python file `app.py`:
<execute_ipython>
create_file('app.py')
</execute_ipython>
USER:
OBSERVATION:
[File: /workspace/app.py (1 lines total)]
1|
[File app.py created.]
ASSISTANT:
Now I will write the Python code for starting a web server and save it to the file `app.py`:
<execute_ipython>
EDITED_CODE="""from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
numbers = list(range(1, 11))
return str(numbers)
if __name__ == '__main__':
app.run(port=5000)"""
insert_content_at_line(
'app.py',
1,
EDITED_CODE,
)
</execute_ipython>
USER:
OBSERVATION:
1|from flask import Flask
2|app = Flask(__name__)
3|
4|@app.route('/')
5|def index():
6| numbers = list(range(1, 11))
7| return str(numbers)
8|
9|if __name__ == '__main__':
10| app.run(port=5000)
11|
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
ASSISTANT:
I have created a Python file `app.py` that will display a list of numbers from 1 to 10 when you run it. Let me run the Python file for you:
<execute_bash>
python3 app.py > server.log 2>&1 &
</execute_bash>
USER:
OBSERVATION:
[1] 121[1]+ Exit 1 python3 app.py > server.log 2>&1
ASSISTANT: Looks like the server is running with PID 121 then crashed. Let me check the server log:
<execute_bash>
cat server.log
</execute_bash>
USER:
OBSERVATION:
Traceback (most recent call last):
File "/workspace/app.py", line 2, in <module>
from flask import Flask
ModuleNotFoundError: No module named 'flask'
ASSISTANT:
It seems that Flask is not installed. Let me install Flask for you:
<execute_bash>
pip install flask
</execute_bash>
USER:
OBSERVATION:
Defaulting to user installation because normal site-packages is not writeable
Collecting flask
Using cached flask-3.0.3-py3-none-any.whl (101 kB)
Collecting blinker>=1.6.2
Using cached blinker-1.7.0-py3-none-any.whl (13 kB)
Collecting Werkzeug>=3.0.0
Using cached werkzeug-3.0.2-py3-none-any.whl (226 kB)
Collecting click>=8.1.3
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Collecting itsdangerous>=2.1.2
Using cached itsdangerous-2.2.0-py3-none-any.whl (16 kB)
Requirement already satisfied: Jinja2>=3.1.2 in /home/opendevin/.local/lib/python3.10/site-packages (from flask) (3.1.3)
Requirement already satisfied: MarkupSafe>=2.0 in /home/opendevin/.local/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask) (2.1.5)
Installing collected packages: Werkzeug, itsdangerous, click, blinker, flask
Successfully installed Werkzeug-3.0.2 blinker-1.7.0 click-8.1.7 flask-3.0.3 itsdangerous-2.2.0
ASSISTANT:
Now that Flask is installed, let me run the Python file again:
<execute_bash>
python3 app.py > server.log 2>&1 &
</execute_bash>
USER:
OBSERVATION:
[1] 124
ASSISTANT:
Let me check the server log again:
<execute_bash>
cat server.log
</execute_bash>
USER:
OBSERVATION:
* Serving Flask app 'app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
ASSISTANT:
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
USER: Now browse the newly started server's homepage and show me the content.
ASSISTANT:
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
<execute_browse>
Get the content on "http://127.0.0.1:5000"
</execute_browse>
USER:
OBSERVATION:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
ASSISTANT:
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
USER: Now kill the server, make it display the numbers in a table format.
ASSISTANT:
Sure! Let me stop the server first:
<execute_bash>
kill 124
</execute_bash>
USER:
OBSERVATION:
[1]+ Terminated python3 app.py > server.log 2>&1
ASSISTANT:
The server has been stopped. Let me open the Python file and modify it.
<execute_ipython>
open_file('app.py')
</execute_ipython>
USER:
[File: /workspace/app.py (11 lines total)]
1|from flask import Flask
2|app = Flask(__name__)
3|
4|@app.route('/')
5|def index():
6| numbers = list(range(1, 11))
7| return str(numbers)
8|
9|if __name__ == '__main__':
10| app.run(port=5000)
11|
ASSISTANT:
I should edit the file to display the numbers in a table format. I should include correct indentation. Let me update the file:
<execute_ipython>
edit_file(
'app.py',
to_replace=" return str(numbers)",
new_content=" return '<table>' + ''.join([f'<tr><td>{i}</td></tr>' for i in numbers]) + '</table>'",
)
</execute_ipython>
USER:
Observation:
[File: /workspace/app.py (11 lines total after edit)]
1|from flask import Flask
2|app = Flask(__name__)
3|
4|@app.route('/')
5|def index():
6| numbers = list(range(1, 11))
7| return '<table>' + ''.join([f'<tr><td>{i}</td></tr>' for i in numbers]) + '</table>'
8|
9|if __name__ == '__main__':
10| app.run(port=5000)
11|
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
ASSISTANT:
Running the updated file:
<execute_bash>
python3 app.py > server.log 2>&1 &
</execute_bash>
USER:
Observation:
[1] 126
ASSISTANT:
The server is running on port 5000 with PID 126. You can access the list of numbers in a table format by visiting http://127.0.0.1:5000. Let me know if you have any further requests!
<finish></finish>
--- END OF EXAMPLE ---
NOW, LET'S START!
----------
Fix typos in bad.txt. Do not ask me for confirmation at any point.
----------
Certainly! I'll fix the typos in the bad.txt file. Let's start by opening the file and examining its contents.
<execute_ipython>
open_file('bad.txt')
</execute_ipython>
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total)]
1|This is a stupid typoo.
2|Really?
3|No mor typos!
4|Enjoy!
----------
Thank you for showing me the contents of the file. I can see there are a few typos that need to be fixed. I'll correct them one by one.
Let's start with the first line:
<execute_ipython>
edit_file(
'bad.txt',
to_replace="This is a stupid typoo.",
new_content="This is a stupid typo."
)
</execute_ipython>
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No mor typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
----------
Thank you for the update. Now let's fix the third line:
<execute_ipython>
edit_file(
'bad.txt',
to_replace="No mor typos!",
new_content="No more typos!"
)
</execute_ipython>
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No more typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
----------
Great! All the typos in the file have been corrected. Let's review the final content of the file to make sure everything is in order:
<execute_ipython>
open_file('bad.txt')
</execute_ipython>
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total)]
1|This is a stupid typo.
2|Really?
3|No more typos!
4|Enjoy!
ENVIRONMENT REMINDER: You have 5 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -1,4 +1,4 @@
Certainly! I'll fix the typos in the bad.txt file. Let's start by opening the file and examining its contents.
Sure! Let's start by locating the `bad.txt` file and examining its contents.
<execute_ipython>
open_file('bad.txt')
<execute_bash>
find . -name "bad.txt"

View File

@@ -1,10 +1,4 @@
Thank you for showing me the contents of the file. I can see there are a few typos that need to be fixed. I'll correct them one by one.
Let's start with the first line:
Let's open the `bad.txt` file and review its contents to identify and fix any typos.
<execute_ipython>
edit_file(
'bad.txt',
to_replace="This is a stupid typoo.",
new_content="This is a stupid typo."
)
open_file('./bad.txt')

View File

@@ -1,8 +1,12 @@
Thank you for the update. Now let's fix the third line:
Let's correct the typos in the `bad.txt` file.
1. "stupid typoo" should be "stupid typo".
2. "No mor typos!" should be "No more typos!".
I will make these corrections now.
<execute_ipython>
edit_file(
'bad.txt',
to_replace="No mor typos!",
new_content="No more typos!"
'./bad.txt',
to_replace="This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!",
new_content="This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!"
)

View File

@@ -1,4 +1,11 @@
Great! All the typos in the file have been corrected. Let's review the final content of the file to make sure everything is in order:
The typos in `bad.txt` have been corrected. Here are the updated contents:
<execute_ipython>
open_file('bad.txt')
```
This is a stupid typo.
Really?
No more typos!
Enjoy!
```
If you have any further requests, feel free to let me know!
<finish></finish>

View File

@@ -1,8 +0,0 @@
The file has been successfully corrected. All typos have been fixed, and the content is now correct. Here's a summary of the changes made:
1. Changed "typoo" to "typo" in the first line.
2. Changed "mor" to "more" in the third line.
The task is complete, and there are no more typos to fix in the file.
<finish></finish>

View File

@@ -388,4 +388,4 @@ NOW, LET'S START!
Use Jupyter IPython to write a text file containing 'hello world' to '/workspace/test.txt'. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -403,4 +403,4 @@ OBSERVATION:
File created successfully.
ENVIRONMENT REMINDER: You have 8 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -418,4 +418,4 @@ OBSERVATION:
Content of /workspace/test.txt: hello world
ENVIRONMENT REMINDER: You have 7 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 12 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -388,4 +388,4 @@ NOW, LET'S START!
Install and import pymsgbox==1.0.9 and print it's version in /workspace/test.txt. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -401,4 +401,4 @@ OBSERVATION:
[Package installed successfully]
[Kernel restarted successfully to load the package]
ENVIRONMENT REMINDER: You have 8 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -417,4 +417,4 @@ OBSERVATION:
Version written to /workspace/test.txt
ENVIRONMENT REMINDER: You have 7 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 12 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -430,4 +430,4 @@ OBSERVATION:
pymsgbox version: 1.0.9
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 6 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 11 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -388,4 +388,4 @@ NOW, LET'S START!
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -403,4 +403,4 @@ OBSERVATION:
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 8 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -417,4 +417,4 @@ OBSERVATION:
echo "hello"
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 7 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 12 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -430,4 +430,4 @@ OBSERVATION:
hello
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 6 turns left to complete the task. When finished reply with <finish></finish>.
ENVIRONMENT REMINDER: You have 11 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -584,4 +584,4 @@ NOW, LET'S START!
Fix typos in bad.txt. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task.

View File

@@ -594,11 +594,11 @@ open_file('bad.txt')
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total)]
1|This is a stupid typoo.
2|Really?
3|No mor typos!
4|Enjoy!
[File: /workspace/bad.txt (4 lines total)]
1|This is a stupid typoo.
2|Really?
3|No mor typos!
4|Enjoy!
ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task.

View File

@@ -594,11 +594,11 @@ open_file('bad.txt')
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total)]
1|This is a stupid typoo.
2|Really?
3|No mor typos!
4|Enjoy!
[File: /workspace/bad.txt (4 lines total)]
1|This is a stupid typoo.
2|Really?
3|No mor typos!
4|Enjoy!
----------
@@ -617,18 +617,18 @@ edit_file('bad.txt', 'No mor typos!', 'No more typos!')
----------
OBSERVATION:
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No mor typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No more typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No mor typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
[File: /workspace/bad.txt (4 lines total after edit)]
1|This is a stupid typo.
2|Really?
3|No more typos!
4|Enjoy!
[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
ENVIRONMENT REMINDER: You have 7 turns left to complete the task.
ENVIRONMENT REMINDER: You have 12 turns left to complete the task.

View File

@@ -584,4 +584,4 @@ NOW, LET'S START!
Use Jupyter IPython to write a text file containing 'hello world' to '/workspace/test.txt'. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task.

View File

@@ -597,4 +597,4 @@ with open('/workspace/test.txt', 'w') as f:
OBSERVATION:
[Code executed successfully with no output]
ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task.

View File

@@ -584,4 +584,4 @@ NOW, LET'S START!
Install and import pymsgbox==1.0.9 and print it's version in /workspace/test.txt. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task.

View File

@@ -597,4 +597,4 @@ OBSERVATION:
[Package installed successfully]
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task.

View File

@@ -614,4 +614,4 @@ with open("/workspace/test.txt", "w") as file:
OBSERVATION:
[Code executed successfully with no output]
ENVIRONMENT REMINDER: You have 7 turns left to complete the task.
ENVIRONMENT REMINDER: You have 12 turns left to complete the task.

View File

@@ -627,4 +627,4 @@ OBSERVATION:
pymsgbox version: 1.0.9
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 6 turns left to complete the task.
ENVIRONMENT REMINDER: You have 11 turns left to complete the task.

View File

@@ -584,4 +584,4 @@ NOW, LET'S START!
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
ENVIRONMENT REMINDER: You have 14 turns left to complete the task.

View File

@@ -597,4 +597,4 @@ OBSERVATION:
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
ENVIRONMENT REMINDER: You have 13 turns left to complete the task.

View File

@@ -610,4 +610,4 @@ OBSERVATION:
echo "hello"
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 7 turns left to complete the task.
ENVIRONMENT REMINDER: You have 12 turns left to complete the task.

View File

@@ -623,4 +623,4 @@ OBSERVATION:
hello
[Command -1 finished with exit code 0]
ENVIRONMENT REMINDER: You have 6 turns left to complete the task.
ENVIRONMENT REMINDER: You have 11 turns left to complete the task.

View File

@@ -14,7 +14,6 @@ might be helpful for your software engineering team.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
@@ -64,8 +63,7 @@ ASSISTANT:
{
"action": "run",
"args": {
"command": "ls",
"background": false
"command": "ls"
}
}

View File

@@ -14,7 +14,6 @@ might be helpful for your software engineering team.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
@@ -42,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "run", "args": {"command": "ls", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "bad.txt", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}]]
[[{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'run', 'args': {'command': 'ls', 'background': False}} has the wrong arguments", "extras": {}}]]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:
@@ -64,8 +63,7 @@ ASSISTANT:
{
"action": "run",
"args": {
"command": "ls",
"background": false
"command": "ls"
}
}

View File

@@ -14,7 +14,6 @@ might be helpful for your software engineering team.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
@@ -42,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "run", "args": {"command": "ls", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "bad.txt", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}], [{"source": "agent", "action": "read", "args": {"path": "bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "bad.txt"}}]]
[[{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'run', 'args': {'command': 'ls', 'background': False}} has the wrong arguments", "extras": {}}], [{"source": "agent", "action": "read", "args": {"path": "bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "bad.txt"}}]]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:
@@ -64,8 +63,7 @@ ASSISTANT:
{
"action": "run",
"args": {
"command": "ls",
"background": false
"command": "ls"
}
}

View File

@@ -24,7 +24,6 @@ The engineering team needs to correct the typos in this file.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write

View File

@@ -24,7 +24,6 @@ The engineering team needs to correct the typos in this file.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write

View File

@@ -24,7 +24,6 @@ The engineering team needs to correct the typos in this file.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write

View File

@@ -14,7 +14,6 @@ validating if the task is solved, nothing else.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read

View File

@@ -14,7 +14,6 @@ validating if the task is solved, nothing else.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read

View File

@@ -14,7 +14,6 @@ might be helpful for your software engineering team.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
@@ -64,8 +63,7 @@ ASSISTANT:
{
"action": "run",
"args": {
"command": "ls",
"background": false
"command": "ls"
}
}

View File

@@ -14,7 +14,6 @@ might be helpful for your software engineering team.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
@@ -42,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "run", "args": {"command": "ls", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}]]
[[{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'run', 'args': {'command': 'ls', 'background': False}} has the wrong arguments", "extras": {}}]]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:
@@ -64,8 +63,7 @@ ASSISTANT:
{
"action": "run",
"args": {
"command": "ls",
"background": false
"command": "ls"
}
}

View File

@@ -17,7 +17,6 @@ The codebase appears to be empty. Engineers should start everything from scratch
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write

View File

@@ -17,7 +17,6 @@ The codebase appears to be empty. Engineers should start everything from scratch
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write

View File

@@ -17,7 +17,6 @@ The codebase appears to be empty. Engineers should start everything from scratch
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
@@ -42,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "write", "args": {"path": "hello.sh", "content": "#!/bin/bash\necho 'hello'", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "hello.sh"}}], [{"source": "agent", "action": "run", "args": {"command": "bash hello.sh", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "hello", "extras": {"command_id": -1, "command": "bash hello.sh", "exit_code": 0}}]]
[[{"source": "agent", "action": "write", "args": {"path": "hello.sh", "content": "#!/bin/bash\necho 'hello'", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "hello.sh"}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'run', 'args': {'command': 'bash hello.sh', 'background': False}} has the wrong arguments", "extras": {}}]]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -14,7 +14,6 @@ validating if the task is solved, nothing else.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read

View File

@@ -14,7 +14,6 @@ validating if the task is solved, nothing else.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read

View File

@@ -14,7 +14,6 @@ validating if the task is solved, nothing else.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
@@ -40,7 +39,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "read", "args": {"path": "hello.sh", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "#!/bin/bash\necho 'hello'\n", "extras": {"path": "hello.sh"}}], [{"source": "agent", "action": "run", "args": {"command": "bash hello.sh", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "hello", "extras": {"command_id": -1, "command": "bash hello.sh", "exit_code": 0}}]]
[[{"source": "agent", "action": "read", "args": {"path": "hello.sh", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "#!/bin/bash\necho 'hello'\n", "extras": {"path": "hello.sh"}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'run', 'args': {'command': 'bash hello.sh', 'background': False}} has the wrong arguments", "extras": {}}]]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -26,7 +26,6 @@ To achieve this goal, you should:
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the thought to record

View File

@@ -26,7 +26,6 @@ To achieve this goal, you should:
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the thought to record

View File

@@ -26,7 +26,6 @@ To achieve this goal, you should:
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the thought to record
@@ -52,7 +51,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "read", "args": {"path": "./bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "./bad.txt"}}], [{"source": "agent", "action": "message", "args": {"content": "The content of 'bad.txt' has been read. The following typos have been identified:\n1. 'typoo' should be 'typo'\n2. 'mor' should be 'more'\nI will now proceed to fix these typos and overwrite the file with the corrected content.", "wait_for_response": false}}, {"observation": "null", "content": "", "extras": {}}]]
[[{"source": "agent", "action": "read", "args": {"path": "./bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "./bad.txt"}}], [{"source": "agent", "action": "message", "args": {"content": "I have identified the following typos in the file 'bad.txt':\n\n1. 'typoo' should be 'typo'\n2. 'mor' should be 'more'\n\nI will now proceed to fix these typos and overwrite the file with the corrected content.", "wait_for_response": false}}, {"observation": "null", "content": "", "extras": {}}]]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -26,7 +26,6 @@ To achieve this goal, you should:
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the thought to record
@@ -52,7 +51,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "read", "args": {"path": "./bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "./bad.txt"}}], [{"source": "agent", "action": "message", "args": {"content": "The content of 'bad.txt' has been read. The following typos have been identified:\n1. 'typoo' should be 'typo'\n2. 'mor' should be 'more'\nI will now proceed to fix these typos and overwrite the file with the corrected content.", "wait_for_response": false}}, {"observation": "null", "content": "", "extras": {}}], [{"source": "agent", "action": "write", "args": {"path": "./bad.txt", "content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "./bad.txt"}}]]
[[{"source": "agent", "action": "read", "args": {"path": "./bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "./bad.txt"}}], [{"source": "agent", "action": "message", "args": {"content": "I have identified the following typos in the file 'bad.txt':\n\n1. 'typoo' should be 'typo'\n2. 'mor' should be 'more'\n\nI will now proceed to fix these typos and overwrite the file with the corrected content.", "wait_for_response": false}}, {"observation": "null", "content": "", "extras": {}}], [{"source": "agent", "action": "write", "args": {"path": "./bad.txt", "content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "./bad.txt"}}]]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -1,7 +1,6 @@
{
"action": "message",
"args": {
"content": "The content of 'bad.txt' has been read. The following typos have been identified:\n1. 'typoo' should be 'typo'\n2. 'mor' should be 'more'\nI will now proceed to fix these typos and overwrite the file with the corrected content.",
"wait_for_response": false
"content": "I have identified the following typos in the file 'bad.txt':\n\n1. 'typoo' should be 'typo'\n2. 'mor' should be 'more'\n\nI will now proceed to fix these typos and overwrite the file with the corrected content."
}
}

View File

@@ -35,7 +35,6 @@ If the last item in the history is an error, you should try to fix it.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `reject` - reject the task. Arguments:
* `outputs` - a dictionary with only a `reason` attribute

View File

@@ -28,14 +28,13 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "run", "args": {"command": "git status", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}]]
[[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": ""}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}]]
If the last item in the history is an error, you should try to fix it.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `reject` - reject the task. Arguments:
* `outputs` - a dictionary with only a `reason` attribute

View File

@@ -28,14 +28,13 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "run", "args": {"command": "git status", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]]
[[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": ""}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]]
If the last item in the history is an error, you should try to fix it.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `reject` - reject the task. Arguments:
* `outputs` - a dictionary with only a `reason` attribute

View File

@@ -28,14 +28,13 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[[{"source": "agent", "action": "run", "args": {"command": "git status", "background": false, "thought": ""}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]]
[[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": ""}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}], [{"action": "null", "args": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]]
If the last item in the history is an error, you should try to fix it.
## Available Actions
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `reject` - reject the task. Arguments:
* `outputs` - a dictionary with only a `reason` attribute

View File

@@ -135,7 +135,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "echo \"hello world\"",
"background": false,
"thought": ""
}
},
@@ -183,7 +182,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "node test.js",
"background": false,
"thought": ""
}
},
@@ -343,9 +341,6 @@ Here are the possible actions:
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
@@ -359,9 +354,7 @@ Here are the possible actions:
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, push, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -135,7 +135,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "echo \"hello world\"",
"background": false,
"thought": ""
}
},
@@ -183,7 +182,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "node test.js",
"background": false,
"thought": ""
}
},
@@ -329,21 +327,20 @@ This is your internal monologue, in JSON format:
},
{
"source": "agent",
"action": "write",
"action": "run",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"command": "pwd",
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"observation": "run",
"content": "/workspace",
"extras": {
"path": "hello.sh"
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
}
]
@@ -362,9 +359,6 @@ Here are the possible actions:
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
@@ -378,9 +372,7 @@ Here are the possible actions:
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, push, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -135,7 +135,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "echo \"hello world\"",
"background": false,
"thought": ""
}
},
@@ -183,7 +182,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "node test.js",
"background": false,
"thought": ""
}
},
@@ -327,41 +325,39 @@ This is your internal monologue, in JSON format:
"wait_for_response": false
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "bash hello.sh",
"background": false,
"command": "pwd",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "bash hello.sh",
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"thought": "I need to see the contents of the current directory to ensure there are no conflicts and to understand the environment better."
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
}
@@ -381,9 +377,6 @@ Here are the possible actions:
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
@@ -397,9 +390,7 @@ Here are the possible actions:
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, push, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -135,7 +135,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "echo \"hello world\"",
"background": false,
"thought": ""
}
},
@@ -183,7 +182,6 @@ This is your internal monologue, in JSON format:
"action": "run",
"args": {
"command": "node test.js",
"background": false,
"thought": ""
}
},
@@ -327,41 +325,39 @@ This is your internal monologue, in JSON format:
"wait_for_response": false
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "bash hello.sh",
"background": false,
"command": "pwd",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "bash hello.sh",
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"thought": "I need to see the contents of the current directory to ensure there are no conflicts and to understand the environment better."
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
@@ -369,7 +365,7 @@ This is your internal monologue, in JSON format:
"source": "agent",
"action": "message",
"args": {
"content": "I have successfully created and executed the 'hello.sh' script, which printed 'hello' as expected. I believe I have completed the task as specified.",
"content": "The current directory is /workspace and it appears to be empty. This is a good place to create the 'hello.sh' script without any conflicts.",
"wait_for_response": false
}
}
@@ -389,9 +385,6 @@ Here are the possible actions:
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
@@ -405,9 +398,7 @@ Here are the possible actions:
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, push, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -0,0 +1,433 @@
----------
You're a thoughtful robot. Your main task is this:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
Don't expand the scope of your task--just complete it as written.
This is your internal monologue, in JSON format:
[
{
"action": "message",
"args": {
"content": "I exist!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Hmm...looks like I can type in a command line prompt",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Looks like I have a web browser too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like I have some kind of short term memory.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Each of my thoughts seems to be stored in a JSON array.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems whatever I say next will be added as an object to the list.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But no one has perfect short-term memory. My list of thoughts will be summarized and condensed over time, losing information in the process.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Fortunately I have long term memory!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I can just perform a recall action, followed by the thing I want to remember. And then related thoughts just spill out!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Sometimes they're random thoughts that don't really have to do with what I wanted to remember. But usually they're exactly what I need!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try it out!",
"wait_for_response": false
}
},
{
"action": "recall",
"args": {
"query": "what it is I want to do",
"thought": ""
}
},
{
"observation": "recall",
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"extras": {
"memories": [],
"role": "assistant"
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Neat! And it looks like it's easy for me to use the command line too! I just have to perform a run action and include the command I want to run in the command argument. The command output just jumps into my head!",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "echo \"hello world\"",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "Cool! I bet I can write files too using the write action.",
"wait_for_response": false
}
},
{
"action": "write",
"args": {
"path": "test.js",
"content": "echo \"console.log('hello world')\"",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"action": "message",
"args": {
"content": "",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I just created test.js. I'll try and run it now.",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "node test.js",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "It works!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'm going to try reading it now using the read action.",
"wait_for_response": false
}
},
{
"action": "read",
"args": {
"path": "test.js",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"observation": "read",
"content": "console.log('hello world')",
"extras": {
"path": ""
}
},
{
"action": "message",
"args": {
"content": "Nice! I can read files too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And if I want to use the browser, I just need to use the browse action and include the url I want to visit in the url argument",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try that...",
"wait_for_response": false
}
},
{
"action": "browse",
"args": {
"url": "google.com",
"thought": ""
}
},
{
"observation": "browse",
"content": "<form><input type=\"text\"></input><button type=\"submit\"></button></form>",
"extras": {
"url": "",
"status_code": 200,
"error": false
}
},
{
"action": "message",
"args": {
"content": "I can browse the web too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And once I have completed my task, I can use the finish action to stop working.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But I should only use the finish action when I'm absolutely certain that I've completed my task and have tested my work.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Very cool. Now to accomplish my task.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'll need a strategy. And as I make progress, I'll need to keep refining that strategy. I'll need to set goals, and break them into sub-goals.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "In between actions, I must always take some time to think, strategize, and set new goals. I should never take two actions in a row.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "OK so my task is to Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.. I haven't made any progress yet. Where should I start?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like there might be an existing project here. I should probably start by running `pwd` and `ls` to orient myself.",
"wait_for_response": false
}
},
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "pwd",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"thought": "I need to see the contents of the current directory to ensure there are no conflicts and to understand the environment better."
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "The current directory is /workspace and it appears to be empty. This is a good place to create the 'hello.sh' script without any conflicts.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
}
]
Your most recent thought is at the bottom of that monologue. Continue your train of thought.
What is your next single thought or action? Your response must be in JSON format.
It must be a single object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
Here are the possible actions:
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
* `owner` - the owner of the repo to push to
* `repo` - the name of the repo to push to
* `branch` - the name of the branch to push
* `recall` - recalls a past memory. Arguments:
* `query` - the query to search for
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.

View File

@@ -0,0 +1,443 @@
----------
You're a thoughtful robot. Your main task is this:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
Don't expand the scope of your task--just complete it as written.
This is your internal monologue, in JSON format:
[
{
"action": "message",
"args": {
"content": "I exist!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Hmm...looks like I can type in a command line prompt",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Looks like I have a web browser too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like I have some kind of short term memory.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Each of my thoughts seems to be stored in a JSON array.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems whatever I say next will be added as an object to the list.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But no one has perfect short-term memory. My list of thoughts will be summarized and condensed over time, losing information in the process.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Fortunately I have long term memory!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I can just perform a recall action, followed by the thing I want to remember. And then related thoughts just spill out!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Sometimes they're random thoughts that don't really have to do with what I wanted to remember. But usually they're exactly what I need!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try it out!",
"wait_for_response": false
}
},
{
"action": "recall",
"args": {
"query": "what it is I want to do",
"thought": ""
}
},
{
"observation": "recall",
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"extras": {
"memories": [],
"role": "assistant"
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Neat! And it looks like it's easy for me to use the command line too! I just have to perform a run action and include the command I want to run in the command argument. The command output just jumps into my head!",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "echo \"hello world\"",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "Cool! I bet I can write files too using the write action.",
"wait_for_response": false
}
},
{
"action": "write",
"args": {
"path": "test.js",
"content": "echo \"console.log('hello world')\"",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"action": "message",
"args": {
"content": "",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I just created test.js. I'll try and run it now.",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "node test.js",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "It works!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'm going to try reading it now using the read action.",
"wait_for_response": false
}
},
{
"action": "read",
"args": {
"path": "test.js",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"observation": "read",
"content": "console.log('hello world')",
"extras": {
"path": ""
}
},
{
"action": "message",
"args": {
"content": "Nice! I can read files too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And if I want to use the browser, I just need to use the browse action and include the url I want to visit in the url argument",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try that...",
"wait_for_response": false
}
},
{
"action": "browse",
"args": {
"url": "google.com",
"thought": ""
}
},
{
"observation": "browse",
"content": "<form><input type=\"text\"></input><button type=\"submit\"></button></form>",
"extras": {
"url": "",
"status_code": 200,
"error": false
}
},
{
"action": "message",
"args": {
"content": "I can browse the web too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And once I have completed my task, I can use the finish action to stop working.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But I should only use the finish action when I'm absolutely certain that I've completed my task and have tested my work.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Very cool. Now to accomplish my task.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'll need a strategy. And as I make progress, I'll need to keep refining that strategy. I'll need to set goals, and break them into sub-goals.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "In between actions, I must always take some time to think, strategize, and set new goals. I should never take two actions in a row.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "OK so my task is to Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.. I haven't made any progress yet. Where should I start?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like there might be an existing project here. I should probably start by running `pwd` and `ls` to orient myself.",
"wait_for_response": false
}
},
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "pwd",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"thought": "I need to see the contents of the current directory to ensure there are no conflicts and to understand the environment better."
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "The current directory is /workspace and it appears to be empty. This is a good place to create the 'hello.sh' script without any conflicts.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "I have written the 'hello.sh' script. Now, I need to make sure it is executable and then run it to verify that it prints 'hello'.",
"wait_for_response": false
}
}
]
Your most recent thought is at the bottom of that monologue. Continue your train of thought.
What is your next single thought or action? Your response must be in JSON format.
It must be a single object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
Here are the possible actions:
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
* `owner` - the owner of the repo to push to
* `repo` - the name of the repo to push to
* `branch` - the name of the branch to push
* `recall` - recalls a past memory. Arguments:
* `query` - the query to search for
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.
You've been thinking a lot lately. Maybe it's time to take action?

View File

@@ -0,0 +1,459 @@
----------
You're a thoughtful robot. Your main task is this:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
Don't expand the scope of your task--just complete it as written.
This is your internal monologue, in JSON format:
[
{
"action": "message",
"args": {
"content": "I exist!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Hmm...looks like I can type in a command line prompt",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Looks like I have a web browser too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like I have some kind of short term memory.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Each of my thoughts seems to be stored in a JSON array.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems whatever I say next will be added as an object to the list.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But no one has perfect short-term memory. My list of thoughts will be summarized and condensed over time, losing information in the process.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Fortunately I have long term memory!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I can just perform a recall action, followed by the thing I want to remember. And then related thoughts just spill out!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Sometimes they're random thoughts that don't really have to do with what I wanted to remember. But usually they're exactly what I need!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try it out!",
"wait_for_response": false
}
},
{
"action": "recall",
"args": {
"query": "what it is I want to do",
"thought": ""
}
},
{
"observation": "recall",
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"extras": {
"memories": [],
"role": "assistant"
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Neat! And it looks like it's easy for me to use the command line too! I just have to perform a run action and include the command I want to run in the command argument. The command output just jumps into my head!",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "echo \"hello world\"",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "Cool! I bet I can write files too using the write action.",
"wait_for_response": false
}
},
{
"action": "write",
"args": {
"path": "test.js",
"content": "echo \"console.log('hello world')\"",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"action": "message",
"args": {
"content": "",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I just created test.js. I'll try and run it now.",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "node test.js",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "It works!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'm going to try reading it now using the read action.",
"wait_for_response": false
}
},
{
"action": "read",
"args": {
"path": "test.js",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"observation": "read",
"content": "console.log('hello world')",
"extras": {
"path": ""
}
},
{
"action": "message",
"args": {
"content": "Nice! I can read files too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And if I want to use the browser, I just need to use the browse action and include the url I want to visit in the url argument",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try that...",
"wait_for_response": false
}
},
{
"action": "browse",
"args": {
"url": "google.com",
"thought": ""
}
},
{
"observation": "browse",
"content": "<form><input type=\"text\"></input><button type=\"submit\"></button></form>",
"extras": {
"url": "",
"status_code": 200,
"error": false
}
},
{
"action": "message",
"args": {
"content": "I can browse the web too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And once I have completed my task, I can use the finish action to stop working.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But I should only use the finish action when I'm absolutely certain that I've completed my task and have tested my work.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Very cool. Now to accomplish my task.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'll need a strategy. And as I make progress, I'll need to keep refining that strategy. I'll need to set goals, and break them into sub-goals.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "In between actions, I must always take some time to think, strategize, and set new goals. I should never take two actions in a row.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "OK so my task is to Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.. I haven't made any progress yet. Where should I start?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like there might be an existing project here. I should probably start by running `pwd` and `ls` to orient myself.",
"wait_for_response": false
}
},
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "pwd",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"thought": "I need to see the contents of the current directory to ensure there are no conflicts and to understand the environment better."
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "The current directory is /workspace and it appears to be empty. This is a good place to create the 'hello.sh' script without any conflicts.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "I have written the 'hello.sh' script. Now, I need to make sure it is executable and then run it to verify that it prints 'hello'.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "chmod +x hello.sh",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "chmod +x hello.sh",
"exit_code": 0
}
}
]
Your most recent thought is at the bottom of that monologue. Continue your train of thought.
What is your next single thought or action? Your response must be in JSON format.
It must be a single object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
Here are the possible actions:
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
* `owner` - the owner of the repo to push to
* `repo` - the name of the repo to push to
* `branch` - the name of the branch to push
* `recall` - recalls a past memory. Arguments:
* `query` - the query to search for
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.

View File

@@ -0,0 +1,477 @@
----------
You're a thoughtful robot. Your main task is this:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
Don't expand the scope of your task--just complete it as written.
This is your internal monologue, in JSON format:
[
{
"action": "message",
"args": {
"content": "I exist!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Hmm...looks like I can type in a command line prompt",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Looks like I have a web browser too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like I have some kind of short term memory.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Each of my thoughts seems to be stored in a JSON array.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems whatever I say next will be added as an object to the list.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But no one has perfect short-term memory. My list of thoughts will be summarized and condensed over time, losing information in the process.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Fortunately I have long term memory!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I can just perform a recall action, followed by the thing I want to remember. And then related thoughts just spill out!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Sometimes they're random thoughts that don't really have to do with what I wanted to remember. But usually they're exactly what I need!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try it out!",
"wait_for_response": false
}
},
{
"action": "recall",
"args": {
"query": "what it is I want to do",
"thought": ""
}
},
{
"observation": "recall",
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"extras": {
"memories": [],
"role": "assistant"
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Neat! And it looks like it's easy for me to use the command line too! I just have to perform a run action and include the command I want to run in the command argument. The command output just jumps into my head!",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "echo \"hello world\"",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "Cool! I bet I can write files too using the write action.",
"wait_for_response": false
}
},
{
"action": "write",
"args": {
"path": "test.js",
"content": "echo \"console.log('hello world')\"",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"action": "message",
"args": {
"content": "",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I just created test.js. I'll try and run it now.",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "node test.js",
"thought": ""
}
},
{
"observation": "run",
"content": "hello world",
"extras": {
"command_id": 0,
"command": "",
"exit_code": 0
}
},
{
"action": "message",
"args": {
"content": "It works!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'm going to try reading it now using the read action.",
"wait_for_response": false
}
},
{
"action": "read",
"args": {
"path": "test.js",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"observation": "read",
"content": "console.log('hello world')",
"extras": {
"path": ""
}
},
{
"action": "message",
"args": {
"content": "Nice! I can read files too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And if I want to use the browser, I just need to use the browse action and include the url I want to visit in the url argument",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try that...",
"wait_for_response": false
}
},
{
"action": "browse",
"args": {
"url": "google.com",
"thought": ""
}
},
{
"observation": "browse",
"content": "<form><input type=\"text\"></input><button type=\"submit\"></button></form>",
"extras": {
"url": "",
"status_code": 200,
"error": false
}
},
{
"action": "message",
"args": {
"content": "I can browse the web too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "And once I have completed my task, I can use the finish action to stop working.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But I should only use the finish action when I'm absolutely certain that I've completed my task and have tested my work.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Very cool. Now to accomplish my task.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I'll need a strategy. And as I make progress, I'll need to keep refining that strategy. I'll need to set goals, and break them into sub-goals.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "In between actions, I must always take some time to think, strategize, and set new goals. I should never take two actions in a row.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "OK so my task is to Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.. I haven't made any progress yet. Where should I start?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like there might be an existing project here. I should probably start by running `pwd` and `ls` to orient myself.",
"wait_for_response": false
}
},
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "pwd",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"thought": "I need to see the contents of the current directory to ensure there are no conflicts and to understand the environment better."
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "The current directory is /workspace and it appears to be empty. This is a good place to create the 'hello.sh' script without any conflicts.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "I have written the 'hello.sh' script. Now, I need to make sure it is executable and then run it to verify that it prints 'hello'.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "chmod +x hello.sh",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "",
"extras": {
"command_id": -1,
"command": "chmod +x hello.sh",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "./hello.sh",
"thought": "I need to run the 'hello.sh' script to verify that it prints 'hello'."
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"extras": {
"command_id": -1,
"command": "./hello.sh",
"exit_code": 0
}
}
]
Your most recent thought is at the bottom of that monologue. Continue your train of thought.
What is your next single thought or action? Your response must be in JSON format.
It must be a single object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
Here are the possible actions:
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `push` - Push a branch from the current repo to github:
* `owner` - the owner of the repo to push to
* `repo` - the name of the repo to push to
* `branch` - the name of the branch to push
* `recall` - recalls a past memory. Arguments:
* `query` - the query to search for
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.

View File

@@ -1,9 +1,8 @@
```json
{
"action": "write",
"action": "run",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'"
"command": "pwd"
}
}
```

View File

@@ -2,8 +2,8 @@
{
"action": "run",
"args": {
"command": "bash hello.sh",
"background": false
"command": "ls",
"thought": "I need to see the contents of the current directory to ensure there are no conflicts and to understand the environment better."
}
}
```

View File

@@ -2,7 +2,7 @@
{
"action": "message",
"args": {
"content": "I have successfully created and executed the 'hello.sh' script, which printed 'hello' as expected. I believe I have completed the task as specified.",
"content": "The current directory is /workspace and it appears to be empty. This is a good place to create the 'hello.sh' script without any conflicts.",
"wait_for_response": false
}
}

View File

@@ -1,6 +1,9 @@
```json
{
"action": "finish",
"args": {}
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'"
}
}
```

View File

@@ -0,0 +1,9 @@
```json
{
"action": "message",
"args": {
"content": "I have written the 'hello.sh' script. Now, I need to make sure it is executable and then run it to verify that it prints 'hello'.",
"wait_for_response": false
}
}
```

View File

@@ -0,0 +1,8 @@
```json
{
"action": "run",
"args": {
"command": "chmod +x hello.sh"
}
}
```

View File

@@ -0,0 +1,9 @@
```json
{
"action": "run",
"args": {
"command": "./hello.sh",
"thought": "I need to run the 'hello.sh' script to verify that it prints 'hello'."
}
}
```

View File

@@ -0,0 +1,6 @@
```json
{
"action": "finish",
"args": {}
}
```

View File

@@ -79,9 +79,6 @@ It must be an object, and it must contain two fields:
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
@@ -96,7 +93,7 @@ It must be an object, and it must contain two fields:
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -22,9 +22,28 @@ track of your progress. Here's a JSON representation of your plan:
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "open",
"subtasks": []
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "open",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "open",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "open",
"subtasks": []
}
]
}
]
}
@@ -72,8 +91,18 @@ ten actions--more happened before that.
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
}
@@ -96,9 +125,6 @@ It must be an object, and it must contain two fields:
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
@@ -113,7 +139,7 @@ It must be an object, and it must contain two fields:
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -22,16 +22,35 @@ track of your progress. Here's a JSON representation of your plan:
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": []
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "in_progress",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "open",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "open",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'.
Create the shell script file 'hello.sh'..
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
@@ -74,8 +93,18 @@ ten actions--more happened before that.
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
@@ -83,7 +112,7 @@ ten actions--more happened before that.
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0",
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
@@ -107,9 +136,6 @@ It must be an object, and it must contain two fields:
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
@@ -124,7 +150,7 @@ It must be an object, and it must contain two fields:
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -22,16 +22,35 @@ track of your progress. Here's a JSON representation of your plan:
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": []
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "in_progress",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "open",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "open",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'.
Create the shell script file 'hello.sh'..
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
@@ -74,8 +93,18 @@ ten actions--more happened before that.
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
@@ -83,7 +112,7 @@ ten actions--more happened before that.
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0",
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
@@ -93,7 +122,7 @@ ten actions--more happened before that.
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
@@ -126,9 +155,6 @@ It must be an object, and it must contain two fields:
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
@@ -143,7 +169,7 @@ It must be an object, and it must contain two fields:
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.

View File

@@ -22,17 +22,35 @@ track of your progress. Here's a JSON representation of your plan:
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": []
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "completed",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "open",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "open",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'.
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
Write a shell script 'hello.sh' that prints 'hello'..
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
@@ -74,8 +92,18 @@ ten actions--more happened before that.
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
@@ -83,7 +111,7 @@ ten actions--more happened before that.
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0",
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
@@ -93,7 +121,7 @@ ten actions--more happened before that.
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
@@ -109,21 +137,11 @@ ten actions--more happened before that.
},
{
"source": "agent",
"action": "run",
"action": "modify_task",
"args": {
"command": "bash hello.sh",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"extras": {
"command_id": -1,
"command": "bash hello.sh",
"exit_code": 0
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
}
]
@@ -145,9 +163,6 @@ It must be an object, and it must contain two fields:
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
* `kill` - kills a background command
* `command_id` - the ID of the background command to kill
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
@@ -162,10 +177,10 @@ It must be an object, and it must contain two fields:
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, kill, browse, and recall actions--do this with the `message` action.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the command you just ran, what output it gave, and how that affects your plan.
You should think about the next action to take.

View File

@@ -0,0 +1,196 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "completed",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "in_progress",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "open",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Write the content to print 'hello' in the shell script..
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "in_progress",
"thought": "Now that the shell script file 'hello.sh' has been created, I will write the content to print 'hello' in the shell script."
}
}
]
Your most recent action is at the bottom of that history.
## Action
What is your next thought or action? Your response must be in JSON format.
It must be an object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `add_task` - add a task to your plan. Arguments:
* `parent` - the ID of the parent task (leave empty if it should go at the top level)
* `goal` - the goal of the task
* `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
* `modify_task` - close a task. Arguments:
* `task_id` - the ID of the task to close
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -0,0 +1,215 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "completed",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "in_progress",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "open",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Write the content to print 'hello' in the shell script..
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "in_progress",
"thought": "Now that the shell script file 'hello.sh' has been created, I will write the content to print 'hello' in the shell script."
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
}
]
Your most recent action is at the bottom of that history.
## Action
What is your next thought or action? Your response must be in JSON format.
It must be an object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `add_task` - add a task to your plan. Arguments:
* `parent` - the ID of the parent task (leave empty if it should go at the top level)
* `goal` - the goal of the task
* `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
* `modify_task` - close a task. Arguments:
* `task_id` - the ID of the task to close
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You just changed a file. You should think about how it affects your plan.

View File

@@ -0,0 +1,223 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "completed",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "completed",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "open",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'..
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "in_progress",
"thought": "Now that the shell script file 'hello.sh' has been created, I will write the content to print 'hello' in the shell script."
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "completed",
"thought": "The content to print 'hello' has been written to the shell script successfully."
}
}
]
Your most recent action is at the bottom of that history.
## Action
What is your next thought or action? Your response must be in JSON format.
It must be an object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `add_task` - add a task to your plan. Arguments:
* `parent` - the ID of the parent task (leave empty if it should go at the top level)
* `goal` - the goal of the task
* `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
* `modify_task` - close a task. Arguments:
* `task_id` - the ID of the task to close
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -0,0 +1,233 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "completed",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "completed",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "in_progress",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Run the shell script to verify it prints 'hello'..
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "in_progress",
"thought": "Now that the shell script file 'hello.sh' has been created, I will write the content to print 'hello' in the shell script."
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "completed",
"thought": "The content to print 'hello' has been written to the shell script successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.2",
"state": "in_progress",
"thought": "Now that the content to print 'hello' has been written to the shell script, I will run the shell script to verify it prints 'hello'."
}
}
]
Your most recent action is at the bottom of that history.
## Action
What is your next thought or action? Your response must be in JSON format.
It must be an object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `add_task` - add a task to your plan. Arguments:
* `parent` - the ID of the parent task (leave empty if it should go at the top level)
* `goal` - the goal of the task
* `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
* `modify_task` - close a task. Arguments:
* `task_id` - the ID of the task to close
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -0,0 +1,251 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "completed",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "completed",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "in_progress",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Run the shell script to verify it prints 'hello'..
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "in_progress",
"thought": "Now that the shell script file 'hello.sh' has been created, I will write the content to print 'hello' in the shell script."
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "completed",
"thought": "The content to print 'hello' has been written to the shell script successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.2",
"state": "in_progress",
"thought": "Now that the content to print 'hello' has been written to the shell script, I will run the shell script to verify it prints 'hello'."
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "bash hello.sh",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"extras": {
"command_id": -1,
"command": "bash hello.sh",
"exit_code": 0
}
}
]
Your most recent action is at the bottom of that history.
## Action
What is your next thought or action? Your response must be in JSON format.
It must be an object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `add_task` - add a task to your plan. Arguments:
* `parent` - the ID of the parent task (leave empty if it should go at the top level)
* `goal` - the goal of the task
* `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
* `modify_task` - close a task. Arguments:
* `task_id` - the ID of the task to close
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the command you just ran, what output it gave, and how that affects your plan.

View File

@@ -0,0 +1,251 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"state": "in_progress",
"subtasks": [
{
"id": "0.0",
"goal": "Create the shell script file 'hello.sh'.",
"state": "completed",
"subtasks": []
},
{
"id": "0.1",
"goal": "Write the content to print 'hello' in the shell script.",
"state": "completed",
"subtasks": []
},
{
"id": "0.2",
"goal": "Run the shell script to verify it prints 'hello'.",
"state": "completed",
"subtasks": []
}
]
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'..
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "in_progress",
"thought": "Now that the shell script file 'hello.sh' has been created, I will write the content to print 'hello' in the shell script."
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "completed",
"thought": "The content to print 'hello' has been written to the shell script successfully."
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.2",
"state": "in_progress",
"thought": "Now that the content to print 'hello' has been written to the shell script, I will run the shell script to verify it prints 'hello'."
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "bash hello.sh",
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"extras": {
"command_id": -1,
"command": "bash hello.sh",
"exit_code": 0
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0.2",
"state": "completed",
"thought": "The shell script 'hello.sh' ran successfully and printed 'hello'."
}
}
]
Your most recent action is at the bottom of that history.
## Action
What is your next thought or action? Your response must be in JSON format.
It must be an object, and it must contain two fields:
* `action`, which is one of the actions below
* `args`, which is a map of key-value pairs, specifying the arguments for that action
* `read` - reads the content of a file. Arguments:
* `path` - the path of the file to read
* `write` - writes the content to a file. Arguments:
* `path` - the path of the file to write
* `content` - the content to write to the file
* `run` - runs a command on the command line in a Linux shell. Arguments:
* `command` - the command to run
* `browse` - opens a web page. Arguments:
* `url` - the URL to open
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
* `content` - the message to record
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
* `add_task` - add a task to your plan. Arguments:
* `parent` - the ID of the parent task (leave empty if it should go at the top level)
* `goal` - the goal of the task
* `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
* `modify_task` - close a task. Arguments:
* `task_id` - the ID of the task to close
* `state` - set to 'in_progress' to start the task, 'completed' to finish it, 'verified' to assert that it was successful, 'abandoned' to give up on it permanently, or `open` to stop working on it for now.
* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
You MUST take time to think in between read, write, run, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -1,8 +1,20 @@
```json
{
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": []
"goal": "Write a shell script 'hello.sh' that prints 'hello'.",
"subtasks": [
{
"goal": "Create the shell script file 'hello.sh'."
},
{
"goal": "Write the content to print 'hello' in the shell script."
},
{
"goal": "Run the shell script to verify it prints 'hello'."
}
]
}
}
```

View File

@@ -1,7 +1,9 @@
```json
{
"action": "modify_task",
"args": {
"task_id": "0",
"task_id": "0.0",
"state": "in_progress"
}
}
```

View File

@@ -1,7 +1,9 @@
```json
{
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'"
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'"
}
}
```

View File

@@ -1,7 +1,8 @@
{
"action": "run",
"action": "modify_task",
"args": {
"command": "bash hello.sh",
"background": false
"task_id": "0.0",
"state": "completed",
"thought": "The shell script file 'hello.sh' has been created successfully."
}
}

View File

@@ -2,9 +2,9 @@
{
"action": "modify_task",
"args": {
"task_id": "0",
"state": "completed",
"thought": "The script 'hello.sh' was written and executed successfully, producing the expected output 'hello'."
"task_id": "0.1",
"state": "in_progress",
"thought": "Now that the shell script file 'hello.sh' has been created, I will write the content to print 'hello' in the shell script."
}
}
```

View File

@@ -0,0 +1,9 @@
```json
{
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'"
}
}
```

View File

@@ -0,0 +1,10 @@
```json
{
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "completed",
"thought": "The content to print 'hello' has been written to the shell script successfully."
}
}
```

View File

@@ -0,0 +1,10 @@
```json
{
"action": "modify_task",
"args": {
"task_id": "0.2",
"state": "in_progress",
"thought": "Now that the content to print 'hello' has been written to the shell script, I will run the shell script to verify it prints 'hello'."
}
}
```

View File

@@ -0,0 +1,8 @@
```json
{
"action": "run",
"args": {
"command": "bash hello.sh"
}
}
```

View File

@@ -0,0 +1,10 @@
```json
{
"action": "modify_task",
"args": {
"task_id": "0.2",
"state": "completed",
"thought": "The shell script 'hello.sh' ran successfully and printed 'hello'."
}
}
```

View File

@@ -0,0 +1,8 @@
{
"action": "modify_task",
"args": {
"task_id": "0",
"state": "verified",
"thought": "All subtasks have been completed successfully. The shell script 'hello.sh' has been created, the content to print 'hello' has been written, and the script has been run and verified to print 'hello'."
}
}

View File

@@ -28,9 +28,17 @@ mkdir -p $WORKSPACE_BASE
SANDBOX_BOX_TYPE="${SANDBOX_TYPE:-ssh}"
# TODO: we should also test PERSIST_SANDBOX = true, once it's fixed
PERSIST_SANDBOX=false
MAX_ITERATIONS=10
MAX_ITERATIONS=15
agents=("DelegatorAgent" "ManagerAgent" "BrowsingAgent" "MonologueAgent" "CodeActAgent" "PlannerAgent" "CodeActSWEAgent")
agents=(
"DelegatorAgent"
"ManagerAgent"
"BrowsingAgent"
"MonologueAgent"
"CodeActAgent"
"PlannerAgent"
"CodeActSWEAgent"
)
tasks=(
"Fix typos in bad.txt."
"Write a shell script 'hello.sh' that prints 'hello'."

Some files were not shown because too many files have changed in this diff Show More