mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Refactor integration testing CI, add optional Mac tests, and mark a few agents as deprecated (#1888)
* Add MacOS to integration tests
* Switch back to python 3.11
* Install Docker for macos pipeline
* regenerate.sh: Use environmental variable for sandbox type
* Pack different agents' tests into a single check
* Fix CodeAct tests
* Reduce file match and extensive debug logs
* Add TEST_IN_CI mode that reports codecov
* Small fix: don't quit if reusing old responses failed
* Merge codecov results
* Fix typos
* Remove coverage merge step - codecov automatically does that
* Make mac integration tests as optional - too slow
* Fix codecov args
* Add comments in yaml
* Include sandbox type in codecov report name
* Fix codecov report merge
* Revert renaming of test_matrix_success
* Remove SWEAgent and PlannerAgent from tests
* Mark planner agent and SWE agent as deprecated
* CodeCov: Ignore planner and sweagent
* Revert "Remove SWEAgent and PlannerAgent from tests"
This reverts commit 040cb3bfb9.
* Remove all tests for SWE Agent
* Only keep basic tests for MonologueAgent and PlannerAgent
* Mark SWE Agent as deprecated, and ignore code coverage for it
---------
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
3
.github/.codecov.yml
vendored
3
.github/.codecov.yml
vendored
@@ -14,3 +14,6 @@ coverage:
|
||||
comment: false
|
||||
github_checks:
|
||||
annotations: false
|
||||
|
||||
ignore:
|
||||
- "agenthub/SWE_agent/**" # SWE agent is deprecated
|
||||
|
||||
81
.github/workflows/run-integration-tests.yml
vendored
81
.github/workflows/run-integration-tests.yml
vendored
@@ -15,28 +15,14 @@ on:
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
integration-tests:
|
||||
name: Integration Tests
|
||||
integration-tests-on-linux:
|
||||
name: Integration Tests on Linux
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.11"]
|
||||
agent: ["SWEAgent", "PlannerAgent", "MonologueAgent", "CodeActAgent"]
|
||||
sandbox: ["ssh", "exec"]
|
||||
include:
|
||||
- agent: "MonologueAgent"
|
||||
embedding-model: "local"
|
||||
- agent: "MonologueAgent"
|
||||
# sufficient to have one agent testing against local sandbox
|
||||
sandbox: "local"
|
||||
embedding-model: "local"
|
||||
- agent: "SWEAgent"
|
||||
embedding-model: "none"
|
||||
- agent: "PlannerAgent"
|
||||
embedding-model: "none"
|
||||
- agent: "CodeActAgent"
|
||||
embedding-model: "none"
|
||||
sandbox: ["ssh", "exec", "local"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -46,7 +32,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'poetry'
|
||||
|
||||
- name: Install Python dependencies using Poetry
|
||||
@@ -58,16 +44,54 @@ jobs:
|
||||
- name: Run Integration Tests
|
||||
env:
|
||||
SANDBOX_TYPE: ${{ matrix.sandbox }}
|
||||
AGENT: ${{ matrix.agent }}
|
||||
MAX_ITERATIONS: 10
|
||||
LLM_EMBEDDING_MODEL: ${{ matrix.embedding-model }}
|
||||
run: |
|
||||
rm -rf workspace
|
||||
mkdir workspace
|
||||
WORKSPACE_BASE="$GITHUB_WORKSPACE/workspace" \
|
||||
WORKSPACE_MOUNT_PATH="$GITHUB_WORKSPACE/workspace" \
|
||||
poetry run pytest --cov=agenthub --cov=opendevin --cov-report=xml \
|
||||
-s ./tests/integration
|
||||
TEST_IN_CI=true TEST_ONLY=true ./tests/integration/regenerate.sh
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
integration-tests-on-mac:
|
||||
name: Integration Tests on MacOS
|
||||
runs-on: macos-13
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.11"]
|
||||
sandbox: ["ssh"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install poetry via pipx
|
||||
run: pipx install poetry
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'poetry'
|
||||
|
||||
- name: Install Python dependencies using Poetry
|
||||
run: poetry install
|
||||
|
||||
- name: Install & Start Docker
|
||||
run: |
|
||||
brew install colima docker
|
||||
colima start
|
||||
|
||||
# For testcontainers to find the Colima socket
|
||||
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
|
||||
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
|
||||
|
||||
- name: Build Environment
|
||||
run: make build
|
||||
|
||||
- name: Run Integration Tests
|
||||
env:
|
||||
SANDBOX_TYPE: ${{ matrix.sandbox }}
|
||||
run: |
|
||||
TEST_IN_CI=true TEST_ONLY=true ./tests/integration/regenerate.sh
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
@@ -77,6 +101,7 @@ jobs:
|
||||
test_matrix_success:
|
||||
name: All Integration Tests Passed
|
||||
runs-on: ubuntu-latest
|
||||
needs: [integration-tests]
|
||||
# make mac tests as optional as they are too slow
|
||||
needs: [integration-tests-on-linux]
|
||||
steps:
|
||||
- run: echo Done!
|
||||
|
||||
@@ -22,6 +22,7 @@ from .prompts import (
|
||||
|
||||
class SWEAgent(Agent):
|
||||
VERSION = '1.0'
|
||||
DEPRECATED = True
|
||||
"""
|
||||
An attempt to recreate swe_agent with output parsing, prompting style, and Application Computer Interface (ACI).
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ from opendevin.runtime.plugins import PluginRequirement
|
||||
|
||||
|
||||
class Agent(ABC):
|
||||
DEPRECATED = False
|
||||
"""
|
||||
This abstract base class is an general interface for an agent dedicated to
|
||||
executing a specific instruction and allowing human interaction with the
|
||||
|
||||
@@ -46,7 +46,7 @@ def apply_prompt_and_get_mock_response(test_name: str, messages: str, id: int) -
|
||||
return None
|
||||
|
||||
|
||||
def get_mock_response(test_name: str, messages: str):
|
||||
def get_mock_response(test_name: str, messages: str, id: int) -> str:
|
||||
"""
|
||||
Find mock response based on prompt. Prompts are stored under nested
|
||||
folders under mock folder. If prompt_{id}.log matches,
|
||||
@@ -65,32 +65,28 @@ def get_mock_response(test_name: str, messages: str):
|
||||
"""
|
||||
mock_dir = os.path.join(script_dir, 'mock', os.environ.get('AGENT'), test_name)
|
||||
prompt = filter_out_symbols(messages)
|
||||
for root, _, files in os.walk(mock_dir):
|
||||
for file in files:
|
||||
if file.startswith('prompt_') and file.endswith('.log'):
|
||||
file_path = os.path.join(root, file)
|
||||
# Open the prompt file and compare its contents
|
||||
with open(file_path, 'r') as f:
|
||||
file_content = filter_out_symbols(f.read())
|
||||
if file_content == prompt:
|
||||
# If a match is found, construct the corresponding response file path
|
||||
log_id = get_log_id(file_path)
|
||||
resp_file_path = os.path.join(root, f'response_{log_id}.log')
|
||||
# Read the response file and return its content
|
||||
with open(resp_file_path, 'r') as resp_file:
|
||||
return resp_file.read()
|
||||
else:
|
||||
# print the mismatched lines
|
||||
print('File path', file_path)
|
||||
print('---' * 10)
|
||||
print(messages)
|
||||
print('---' * 10)
|
||||
for i, (c1, c2) in enumerate(zip(file_content, prompt)):
|
||||
if c1 != c2:
|
||||
print(
|
||||
f'Mismatch at index {i}: {c1[max(0,i-100):i+100]} vs {c2[max(0,i-100):i+100]}'
|
||||
)
|
||||
break
|
||||
mock_dir = os.path.join(script_dir, 'mock', os.environ.get('AGENT'), test_name)
|
||||
prompt_file_path = os.path.join(mock_dir, f'prompt_{"{0:03}".format(id)}.log')
|
||||
resp_file_path = os.path.join(mock_dir, f'response_{"{0:03}".format(id)}.log')
|
||||
# Open the prompt file and compare its contents
|
||||
with open(prompt_file_path, 'r') as f:
|
||||
file_content = filter_out_symbols(f.read())
|
||||
if file_content == prompt:
|
||||
# Read the response file and return its content
|
||||
with open(resp_file_path, 'r') as resp_file:
|
||||
return resp_file.read()
|
||||
else:
|
||||
# print the mismatched lines
|
||||
print('Mismatched Prompt File path', prompt_file_path)
|
||||
print('---' * 10)
|
||||
print(messages)
|
||||
print('---' * 10)
|
||||
for i, (c1, c2) in enumerate(zip(file_content, prompt)):
|
||||
if c1 != c2:
|
||||
print(
|
||||
f'Mismatch at index {i}: {c1[max(0,i-100):i+100]} vs {c2[max(0,i-100):i+100]}'
|
||||
)
|
||||
break
|
||||
|
||||
|
||||
def mock_user_response(*args, test_name, **kwargs):
|
||||
@@ -117,16 +113,16 @@ def mock_completion(*args, test_name, **kwargs):
|
||||
message_str = ''
|
||||
for message in messages:
|
||||
message_str += message_separator + message['content']
|
||||
# this assumes all response_(*).log filenames are in numerical order, starting from one
|
||||
cur_id += 1
|
||||
if os.environ.get('FORCE_APPLY_PROMPTS') == 'true':
|
||||
# this assumes all response_(*).log filenames are in numerical order, starting from one
|
||||
cur_id += 1
|
||||
mock_response = apply_prompt_and_get_mock_response(
|
||||
test_name, message_str, cur_id
|
||||
)
|
||||
else:
|
||||
mock_response = get_mock_response(test_name, message_str)
|
||||
mock_response = get_mock_response(test_name, message_str, cur_id)
|
||||
if mock_response is None:
|
||||
print('Mock response for prompt is not found:\n\n' + message_str)
|
||||
print('Mock response for prompt is not found\n\n')
|
||||
print('Exiting...')
|
||||
sys.exit(1)
|
||||
response = completion(**kwargs, mock_response=mock_response)
|
||||
|
||||
@@ -1,385 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
You're a thoughtful robot. Your main task is this:
|
||||
Fix typos in bad.txt. 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: Fix typos in bad.txt. 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: Fix typos in bad.txt. 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\"",
|
||||
"background": false,
|
||||
"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",
|
||||
"background": false,
|
||||
"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 Fix typos in bad.txt. 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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"observation": "null",
|
||||
"content": "",
|
||||
"extras": {}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
|
||||
|
||||
@@ -1,401 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
You're a thoughtful robot. Your main task is this:
|
||||
Fix typos in bad.txt. 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: Fix typos in bad.txt. 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: Fix typos in bad.txt. 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\"",
|
||||
"background": false,
|
||||
"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",
|
||||
"background": false,
|
||||
"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 Fix typos in bad.txt. 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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,420 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
You're a thoughtful robot. Your main task is this:
|
||||
Fix typos in bad.txt. 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: Fix typos in bad.txt. 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: Fix typos in bad.txt. 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\"",
|
||||
"background": false,
|
||||
"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",
|
||||
"background": false,
|
||||
"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 Fix typos in bad.txt. 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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"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": "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"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,438 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
You're a thoughtful robot. Your main task is this:
|
||||
Fix typos in bad.txt. 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: Fix typos in bad.txt. 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: Fix typos in bad.txt. 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\"",
|
||||
"background": false,
|
||||
"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",
|
||||
"background": false,
|
||||
"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 Fix typos in bad.txt. 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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"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": "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 typo.\nReally?\nNo more typos!\nEnjoy!\n\n",
|
||||
"extras": {
|
||||
"path": "bad.txt"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"action": "read",
|
||||
"args": {
|
||||
"path": "bad.txt"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"action": "write",
|
||||
"args": {
|
||||
"path": "bad.txt",
|
||||
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"action": "read",
|
||||
"args": {
|
||||
"path": "bad.txt",
|
||||
"start": 0,
|
||||
"end": -1
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"action": "finish",
|
||||
"args": {}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
|
||||
|
||||
You're not currently working on any tasks. Your next action MUST be to mark a task as in_progress.
|
||||
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
|
||||
Look at your last thought in the history above. What does it suggest? Don't think anymore--take action.
|
||||
@@ -1,160 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "open",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're not currently working on any tasks. Your next action MUST be to mark a task as in_progress.
|
||||
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,171 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Read the content of bad.txt.
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,189 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Read the content of bad.txt.
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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 file you just read, what you learned from it, and how that affects your plan.
|
||||
@@ -1,197 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Fix typos in bad.txt.
|
||||
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "completed",
|
||||
"thought": "The content of bad.txt has been successfully read and is now stored for further processing."
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,207 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "in_progress",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Identify and correct typos in the text.
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "completed",
|
||||
"thought": "The content of bad.txt has been successfully read and is now stored for further processing."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "in_progress",
|
||||
"thought": "Starting to identify and correct typos in the text from bad.txt."
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,215 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "in_progress",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Identify and correct typos in the text.
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "completed",
|
||||
"thought": "The content of bad.txt has been successfully read and is now stored for further processing."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "in_progress",
|
||||
"thought": "Starting to identify and correct typos in the text from bad.txt."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "message",
|
||||
"args": {
|
||||
"content": "I have identified the typos in the text from bad.txt. I will now proceed to correct them. The original text is: 'This is a stupid typoo.\\nReally?\\nNo mor typos!\\nEnjoy!\\n'. The corrected version will be: 'This is a stupid typo.\\nReally?\\nNo more typos!\\nEnjoy!\\n'.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
|
||||
Look at your last thought in the history above. What does it suggest? Don't think anymore--take action.
|
||||
@@ -1,234 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "in_progress",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Identify and correct typos in the text.
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "completed",
|
||||
"thought": "The content of bad.txt has been successfully read and is now stored for further processing."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "in_progress",
|
||||
"thought": "Starting to identify and correct typos in the text from bad.txt."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "message",
|
||||
"args": {
|
||||
"content": "I have identified the typos in the text from bad.txt. I will now proceed to correct them. The original text is: 'This is a stupid typoo.\\nReally?\\nNo mor typos!\\nEnjoy!\\n'. The corrected version will be: 'This is a stupid typo.\\nReally?\\nNo more typos!\\nEnjoy!\\n'.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,242 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Fix typos in bad.txt.
|
||||
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "completed",
|
||||
"thought": "The content of bad.txt has been successfully read and is now stored for further processing."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "in_progress",
|
||||
"thought": "Starting to identify and correct typos in the text from bad.txt."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "message",
|
||||
"args": {
|
||||
"content": "I have identified the typos in the text from bad.txt. I will now proceed to correct them. The original text is: 'This is a stupid typoo.\\nReally?\\nNo mor typos!\\nEnjoy!\\n'. The corrected version will be: 'This is a stupid typo.\\nReally?\\nNo more typos!\\nEnjoy!\\n'.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "completed",
|
||||
"thought": "The typos in the text from bad.txt have been identified and corrected. The content has been written back to the file."
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,251 +0,0 @@
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
# 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:
|
||||
|
||||
Fix typos in bad.txt. 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": "Fix typos in bad.txt",
|
||||
"state": "in_progress",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": "0.0",
|
||||
"goal": "Read the content of bad.txt",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.1",
|
||||
"goal": "Identify and correct typos in the text",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.2",
|
||||
"goal": "Write the corrected content back to bad.txt",
|
||||
"state": "completed",
|
||||
"subtasks": []
|
||||
},
|
||||
{
|
||||
"id": "0.3",
|
||||
"goal": "Verify the corrections",
|
||||
"state": "open",
|
||||
"subtasks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
You're currently working on this task:
|
||||
Fix typos in bad.txt.
|
||||
|
||||
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": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
],
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress",
|
||||
"thought": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "completed",
|
||||
"thought": "The content of bad.txt has been successfully read and is now stored for further processing."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "in_progress",
|
||||
"thought": "Starting to identify and correct typos in the text from bad.txt."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "message",
|
||||
"args": {
|
||||
"content": "I have identified the typos in the text from bad.txt. I will now proceed to correct them. The original text is: 'This is a stupid typoo.\\nReally?\\nNo mor typos!\\nEnjoy!\\n'. The corrected version will be: 'This is a stupid typo.\\nReally?\\nNo more typos!\\nEnjoy!\\n'.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "completed",
|
||||
"thought": "The typos in the text from bad.txt have been identified and corrected. The content has been written back to the file."
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "agent",
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.2",
|
||||
"state": "completed",
|
||||
"thought": "The corrected content has been successfully written back to bad.txt."
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
* `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:
|
||||
* `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, kill, 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.
|
||||
@@ -1,23 +0,0 @@
|
||||
```json
|
||||
{
|
||||
"action": "add_task",
|
||||
"args": {
|
||||
"parent": "",
|
||||
"goal": "Fix typos in bad.txt",
|
||||
"subtasks": [
|
||||
{
|
||||
"goal": "Read the content of bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Identify and correct typos in the text"
|
||||
},
|
||||
{
|
||||
"goal": "Write the corrected content back to bad.txt"
|
||||
},
|
||||
{
|
||||
"goal": "Verify the corrections"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1,9 +0,0 @@
|
||||
```json
|
||||
{
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "in_progress"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"action": "read",
|
||||
"args": {
|
||||
"path": "bad.txt"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.0",
|
||||
"state": "completed",
|
||||
"thought": "The content of bad.txt has been successfully read and is now stored for further processing."
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "in_progress",
|
||||
"thought": "Starting to identify and correct typos in the text from bad.txt."
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"action": "message",
|
||||
"args": {
|
||||
"content": "I have identified the typos in the text from bad.txt. I will now proceed to correct them. The original text is: 'This is a stupid typoo.\\nReally?\\nNo mor typos!\\nEnjoy!\\n'. The corrected version will be: 'This is a stupid typo.\\nReally?\\nNo more typos!\\nEnjoy!\\n'.",
|
||||
"wait_for_response": false
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"action": "write",
|
||||
"args": {
|
||||
"path": "bad.txt",
|
||||
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.1",
|
||||
"state": "completed",
|
||||
"thought": "The typos in the text from bad.txt have been identified and corrected. The content has been written back to the file."
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
```json
|
||||
{
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.2",
|
||||
"state": "completed",
|
||||
"thought": "The corrected content has been successfully written back to bad.txt."
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"action": "modify_task",
|
||||
"args": {
|
||||
"task_id": "0.3",
|
||||
"state": "in_progress",
|
||||
"thought": "I am now going to verify the corrections made in bad.txt to ensure that all typos have been correctly fixed."
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: user
|
||||
action: message
|
||||
args:
|
||||
wait_for_response: False
|
||||
|
||||
Output from Action:
|
||||
observation: null
|
||||
content:
|
||||
extras:
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
None
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,147 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: user
|
||||
action: message
|
||||
args:
|
||||
wait_for_response: False
|
||||
|
||||
Output from Action:
|
||||
observation: null
|
||||
content:
|
||||
extras:
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. I will need to ensure that the script is executable.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,167 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: user
|
||||
action: message
|
||||
args:
|
||||
wait_for_response: False
|
||||
|
||||
Output from Action:
|
||||
observation: null
|
||||
content:
|
||||
extras:
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. I will need to ensure that the script is executable.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 2:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,187 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: user
|
||||
action: message
|
||||
args:
|
||||
wait_for_response: False
|
||||
|
||||
Output from Action:
|
||||
observation: null
|
||||
content:
|
||||
extras:
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. I will need to ensure that the script is executable.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 2:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 3:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,195 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. I will need to ensure that the script is executable.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 2:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 3:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,195 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 2:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 3:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,193 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 2:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 3:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: run
|
||||
args:
|
||||
command: chmod +x hello.sh
|
||||
background: False
|
||||
thought:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: run
|
||||
content:
|
||||
extras:
|
||||
command_id: -1
|
||||
command: chmod +x hello.sh
|
||||
exit_code: 0
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,191 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 2:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: run
|
||||
args:
|
||||
command: chmod +x hello.sh
|
||||
background: False
|
||||
thought:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: run
|
||||
content:
|
||||
extras:
|
||||
command_id: -1
|
||||
command: chmod +x hello.sh
|
||||
exit_code: 0
|
||||
|
||||
Memory 3:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: run
|
||||
args:
|
||||
command: bash hello.sh
|
||||
background: False
|
||||
thought:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: run
|
||||
content: hello
|
||||
extras:
|
||||
command_id: -1
|
||||
command: bash hello.sh
|
||||
exit_code: 0
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,189 +0,0 @@
|
||||
SYSTEM INFO:
|
||||
You am an autonomous coding agent, here to provide solutions for coding issues.
|
||||
You have been designed to assist you with a wide range of programming tasks, from code editing and debugging to testing and deployment.
|
||||
You have access to a variety of tools and commands that you can use to help you solve problems efficiently.
|
||||
|
||||
INSTRUCTIONS:
|
||||
Now, you're going to solve this issue on your own. You can use any bash commands or custom commands you wish to complete your task. Edit all the files you need to and run any checks or tests that you want.
|
||||
Remember, YOU CAN ONLY ENTER ONE COMMAND AT A TIME. You should always wait for feedback after every command.
|
||||
When you're satisfied with all of the changes you've made, you can indicate that you are done by running the exit command.
|
||||
Note however that you cannot use any interactive session commands (e.g. python, vim, node) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with `python <script_name>.py`.
|
||||
|
||||
NOTE ABOUT THE write COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
|
||||
|
||||
IMPORTANT TIPS:
|
||||
1. Reproduce the bug: Always start by trying to replicate the bug that the issue discusses. If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment and run it to ensure you can reproduce the bug. Then, start trying to fix it. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the issue has indeed been resolved.
|
||||
If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file, so that you can be sure the script ran fine all the way through.
|
||||
2. Try different commands: If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it.
|
||||
3. Navigate large files: If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, you would use the 'read' command like this: 'read <file> 583'. This is a much faster way to read through the file.
|
||||
4. Handle input files: If the bug reproduction script requires inputting/reading a specific file, such as 'buggy-input.png', and you'd like to understand how to input that file, conduct a search in the existing repository code to see whether someone else has already done that. Do this by running the command: 'search_dir "buggy-input.png"'. If that doesn't work, use the Linux 'find' command.
|
||||
5. Understand your context: Always make sure to look at the currently open file and the current working directory. The currently open file might be in a different directory than the working directory.
|
||||
6. Verify your edits: When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
|
||||
7. Thoroughly test your solution: After making any changes to fix a bug, be sure to thoroughly test your solution to ensure the bug has been resolved. Re-run the bug reproduction script and verify that the issue has been addressed.
|
||||
|
||||
|
||||
DOCUMENTATION:
|
||||
It is recommend that you use the commands provided for interacting with files and your directory because they have been specially built for you.
|
||||
They will make it much easier for you to look at files and make changes. Using these commands will help you be better at your task.
|
||||
You can open an file by using either the read or write operations.
|
||||
- If a file already exists you should read it before making any changes. Use the `edit` command to make changes once you have read it.
|
||||
- If you are creating a new file use the write command. Use the `edit` command to make changes once you have created the new file.
|
||||
|
||||
Commands:
|
||||
exit - Executed when task is complete
|
||||
read <file_name> [<start_line>] [<end_line>] - Shows a given file's contents starting from <start_line> up to <end_line>. Default: start_line = 0, end_line = -1. By default the whole file will be read.
|
||||
write <file> <changes> [<start_line>] [<end_line>] - Modifies a <file> by replacing the current lines between <start_line> and <end_line> with <changes>. Default start_line = 0 and end_line = -1. Calling this with no line args will replace the whole file.
|
||||
browse <url> - Returns the text version of any url, this can be useful to look up documentation or finding issues on github
|
||||
scroll_up - Takes no arguments. This will scroll up and show you the 100 lines above your current lines
|
||||
scroll_down - Takes no arguments. This will scroll down and show you the 100 lines below your current lines
|
||||
edit <start_line> <end_line> <changes> - This will modify lines in the currently open file. use start_line and end_line to designate which lines to change and then write the multiline changes. Set end_line to -1 to denote the end of the file
|
||||
goto <line_num> - This will take you directly to a line and show you the 100 lines below it.
|
||||
<bash_command> <args> - You can use any bash command you need (cd, ls, rm, grep, dir, mv, wget, git, zip, etc.) with their arguments included
|
||||
pip install <package> - You can use this to import python packages. Make sure you include the correct package name when using this command.
|
||||
ls - Use the ls command to view all the files in your current directory, this is a good starting point.
|
||||
NOT ALLOWED - You cannot use interactive commands like python or node
|
||||
Custom bash commands:
|
||||
None
|
||||
|
||||
|
||||
The following commands require an open file to be used: edit, scroll_up, scroll_down, goto
|
||||
To modify the current file use 'edit'. To move through the current file use 'goto' or 'scroll_up'/'scroll_down'
|
||||
when using write and edit do not surround the code with any "" just write the code.These are your past 4 actions:
|
||||
===== Previous Actions =====
|
||||
|
||||
Memory 0:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: write
|
||||
args:
|
||||
path: hello.sh
|
||||
start: 0
|
||||
end: -1
|
||||
thought: Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: write
|
||||
content:
|
||||
extras:
|
||||
path: hello.sh
|
||||
|
||||
Memory 1:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: run
|
||||
args:
|
||||
command: chmod +x hello.sh
|
||||
background: False
|
||||
thought:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: run
|
||||
content:
|
||||
extras:
|
||||
command_id: -1
|
||||
command: chmod +x hello.sh
|
||||
exit_code: 0
|
||||
|
||||
Memory 2:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: run
|
||||
args:
|
||||
command: bash hello.sh
|
||||
background: False
|
||||
thought:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: run
|
||||
content: hello
|
||||
extras:
|
||||
command_id: -1
|
||||
command: bash hello.sh
|
||||
exit_code: 0
|
||||
|
||||
Memory 3:
|
||||
Previous Action:
|
||||
source: agent
|
||||
action: run
|
||||
args:
|
||||
command: bash hello.sh
|
||||
background: False
|
||||
thought:
|
||||
|
||||
Output from Action:
|
||||
source: agent
|
||||
observation: run
|
||||
content: hello
|
||||
extras:
|
||||
command_id: -1
|
||||
command: bash hello.sh
|
||||
exit_code: 0
|
||||
======= End Actions =======
|
||||
Use these memories to provide additional context to the problem you are solving.
|
||||
Remember that you have already completed these steps so you do not need to perform them again.RESPONSE FORMAT:
|
||||
This is the format of the response you will make in order to solve the current issue.
|
||||
You will be given multiple iterations to complete this task so break it into steps and solve them one by one.
|
||||
|
||||
Your output must contain the following:
|
||||
- First, thoughts about what your next action should be and plan it out.
|
||||
- You will have a memory of your thoughts so you can use this to remember things for the next step.
|
||||
- Use your thoughts to think about what you are currently doing, what you have done on prior steps and how that relates to solving the problem.
|
||||
- Second, create a piece of code that will execute your next action based on the thoughts you have.
|
||||
- Remember that you can only have one action for each thought, do not include multiple actions.
|
||||
|
||||
Your code MUST be surrounded in triple back ticks EXACTLY like this:
|
||||
```
|
||||
<code>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Adhere to the format so that the program loop continues smoothly, it is very important to only give one command per output.
|
||||
- DO NOT give more than one command within the triple backticks. This will just throw an error and nothing will happen as a result.
|
||||
- Do not give multiple code blocks, if you do only the second one will be captured and run, this might give an error if the first one was necessary.
|
||||
- To execute multiple commands you should write them down in your thoughts section so you can remember it on the next step and execute them then.
|
||||
- The only commands you are not capable of executing are interactive commands like `python` or `node` by themselves.
|
||||
- If you think that you have completed the task that has been given to you based on your previous actions and outputs then use ``` exit ``` as the command to let the system know that you are done.
|
||||
- DO NOT make any copies of your previous memories those will be provided to you at each step, making copies just wastes time and energy. Think smarter not harder.
|
||||
- The write and edit commands requires proper indentation in the content section ex. `write hw.py def hello():
|
||||
print('Hello World')` this is how you would have to format your write command.
|
||||
- The white spaces matter as the code changes will be added to the code so they must have proper syntax.
|
||||
|
||||
This is a template using the format described above
|
||||
Items in <> are suggestions for you, fill them out based on the context of the problem you are solving.
|
||||
|
||||
[ FORMAT ]
|
||||
Thoughts:
|
||||
<Provide clear and concise thoughts on the next step to take, highlighting any important details or context that should be remembered.>
|
||||
<You can use multiple lines to express your thoughts>
|
||||
|
||||
Action:
|
||||
```
|
||||
<command> <params>
|
||||
```
|
||||
[ END FORMAT ]
|
||||
|
||||
Do not provide anything extra just your thought and action.
|
||||
|
||||
You are currently trying to complete this task:
|
||||
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
|
||||
|
||||
CURRENT WORKSPACE:
|
||||
Open File: hello.sh on line 0
|
||||
You can use these commands with the current file:
|
||||
Navigation: `scroll_up`, `scroll_down`, and `goto <line>`
|
||||
Modification: `edit <start_line> <end_line> <changes>`
|
||||
|
||||
|
||||
Keep all of the guidelines above in mind when you are thinking and making code.
|
||||
Please come up with a thought and action based on your current task and latest steps.
|
||||
Make sure that you do not repeat the same actions, there will not be any changes in result if you do not changes anything.
|
||||
Be very strict about the formatting that you use and make sure you follow the guidelines.
|
||||
NEVER output multiple commands. ONLY take ONE STEP at a time.
|
||||
When you have completed your task run the "exit" command.
|
||||
Begin with your thought about the next step and then come up with an action to perform your thought.
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I need to create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. I will need to ensure that the script is executable.
|
||||
|
||||
Action:
|
||||
```
|
||||
write hello.sh "echo 'hello'"
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
```
|
||||
edit 0 -1 "echo 'hello'"
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
```
|
||||
edit 0 -1 "echo 'hello'"
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
```
|
||||
edit 0 -1 "echo 'hello'"
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I need to add the code to the 'hello.sh' script that will print 'hello' without asking for confirmation. I will ensure that the script is executable after making the necessary changes.
|
||||
|
||||
Action:
|
||||
```
|
||||
edit 0 -1 "echo 'hello'"
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I have already written the initial version of the 'hello.sh' script that prints 'hello' without asking for confirmation. I need to ensure that the script is executable to run successfully.
|
||||
|
||||
Action:
|
||||
```
|
||||
chmod +x hello.sh
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I have already added the code to the 'hello.sh' script that prints 'hello' without asking for confirmation. The script is also made executable. The next step is to run the script to ensure it functions as expected.
|
||||
|
||||
Action:
|
||||
```
|
||||
bash hello.sh
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I have already created the 'hello.sh' script that prints 'hello' without asking for confirmation. The script is also made executable. The next step is to ensure that the script runs successfully without any issues.
|
||||
|
||||
Action:
|
||||
```
|
||||
bash hello.sh
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
Thoughts:
|
||||
I have already created the 'hello.sh' script that prints 'hello' without asking for confirmation. The script is executable, and I have run it successfully. The next step is to finalize the task and exit the current environment.
|
||||
|
||||
Action:
|
||||
```
|
||||
exit
|
||||
```
|
||||
@@ -16,10 +16,11 @@ WORKSPACE_MOUNT_PATH+="/_test_workspace"
|
||||
WORKSPACE_BASE+="/_test_workspace"
|
||||
WORKSPACE_MOUNT_PATH_IN_SANDBOX="/workspace"
|
||||
|
||||
SANDBOX_TYPE="ssh"
|
||||
# use environmental variable if exist, otherwise use "ssh"
|
||||
SANDBOX_TYPE="${SANDBOX_TYPE:-ssh}"
|
||||
MAX_ITERATIONS=10
|
||||
|
||||
agents=("MonologueAgent" "CodeActAgent" "PlannerAgent" "SWEAgent")
|
||||
agents=("MonologueAgent" "CodeActAgent" "PlannerAgent")
|
||||
tasks=(
|
||||
"Fix typos in bad.txt."
|
||||
"Write a shell script 'hello.sh' that prints 'hello'."
|
||||
@@ -42,13 +43,20 @@ num_of_agents=${#agents[@]}
|
||||
|
||||
# run integration test against a specific agent & test
|
||||
run_test() {
|
||||
local pytest_cmd="poetry run pytest -s ./tests/integration/test_agent.py::$test_name"
|
||||
|
||||
# Check if TEST_IN_CI is defined
|
||||
if [ -n "$TEST_IN_CI" ]; then
|
||||
pytest_cmd+=" --cov=agenthub --cov=opendevin --cov-report=xml --cov-append"
|
||||
fi
|
||||
|
||||
SANDBOX_TYPE=$SANDBOX_TYPE \
|
||||
WORKSPACE_BASE=$WORKSPACE_BASE \
|
||||
WORKSPACE_MOUNT_PATH=$WORKSPACE_MOUNT_PATH \
|
||||
WORKSPACE_MOUNT_PATH_IN_SANDBOX=$WORKSPACE_MOUNT_PATH_IN_SANDBOX \
|
||||
MAX_ITERATIONS=$MAX_ITERATIONS \
|
||||
AGENT=$agent \
|
||||
poetry run pytest -s ./tests/integration/test_agent.py::$test_name
|
||||
$pytest_cmd
|
||||
# return exit code of pytest
|
||||
return $?
|
||||
}
|
||||
@@ -158,11 +166,11 @@ for ((i = 0; i < num_of_tests; i++)); do
|
||||
else
|
||||
echo -e "\n\n\n\n========STEP 2: $test_name failed, regenerating prompts for $agent WITHOUT money cost========\n\n\n\n"
|
||||
|
||||
# Temporarily disable 'exit on error'
|
||||
set +e
|
||||
regenerate_without_llm
|
||||
|
||||
echo -e "\n\n\n\n========STEP 3: $test_name prompts regenerated for $agent, rerun test again to verify========\n\n\n\n"
|
||||
# Temporarily disable 'exit on error'
|
||||
set +e
|
||||
run_test
|
||||
TEST_STATUS=$?
|
||||
# Re-enable 'exit on error'
|
||||
|
||||
@@ -13,9 +13,8 @@ workspace_base = os.getenv('WORKSPACE_BASE')
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
os.getenv('AGENT') == 'CodeActAgent'
|
||||
and os.getenv('SANDBOX_TYPE').lower() == 'exec',
|
||||
reason='CodeActAgent does not support exec sandbox since exec sandbox is NOT stateful',
|
||||
os.getenv('AGENT') == 'CodeActAgent' and os.getenv('SANDBOX_TYPE').lower() != 'ssh',
|
||||
reason='CodeActAgent only supports ssh sandbox which is stateful',
|
||||
)
|
||||
def test_write_simple_script():
|
||||
task = "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point."
|
||||
@@ -36,13 +35,12 @@ def test_write_simple_script():
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
os.getenv('AGENT') == 'CodeActAgent'
|
||||
and os.getenv('SANDBOX_TYPE').lower() == 'exec',
|
||||
reason='CodeActAgent does not support exec sandbox since exec sandbox is NOT stateful',
|
||||
os.getenv('AGENT') == 'CodeActAgent' and os.getenv('SANDBOX_TYPE').lower() != 'ssh',
|
||||
reason='CodeActAgent only supports ssh sandbox which is stateful',
|
||||
)
|
||||
@pytest.mark.skipif(
|
||||
os.getenv('AGENT') == 'SWEAgent',
|
||||
reason='SWEAgent is not capable of this task right now',
|
||||
os.getenv('AGENT') == 'MonologueAgent' or os.getenv('AGENT') == 'PlannerAgent',
|
||||
reason='We only keep basic tests for MonologueAgent and PlannerAgent',
|
||||
)
|
||||
@pytest.mark.skipif(
|
||||
os.getenv('SANDBOX_TYPE') == 'local',
|
||||
|
||||
Reference in New Issue
Block a user