feat: make other agents support asking user input in MessageAction. (#1777)

* feat: make other agents support asking user input in MessageAction.

* Update agenthub/micro/_instructions/actions/message.md

Co-authored-by: Robert Brennan <accounts@rbren.io>

* Update agenthub/micro/_instructions/actions/message.md

Co-authored-by: Robert Brennan <accounts@rbren.io>

* feat: make other agents support asking user input in MessageAction.

* Regenerate test artifacts

---------

Co-authored-by: aaren.xzh <aaren.xzh@antfin.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
This commit is contained in:
Xia Zhenhua
2024-05-15 15:44:45 +08:00
committed by GitHub
parent 817222061f
commit bf14b47890
51 changed files with 3998 additions and 143 deletions

View File

@@ -360,8 +360,9 @@ Here are the possible actions:
* `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, or record your thoughts. Arguments:
* `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.

View File

@@ -334,20 +334,21 @@ This is your internal monologue, in JSON format:
},
{
"source": "agent",
"action": "read",
"action": "run",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1,
"command": "pwd",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "read",
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
"observation": "run",
"content": "/workspace",
"extras": {
"path": "bad.txt"
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
}
]
@@ -378,8 +379,9 @@ Here are the possible actions:
* `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, or record your thoughts. Arguments:
* `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.

View File

@@ -334,39 +334,40 @@ This is your internal monologue, in JSON format:
},
{
"source": "agent",
"action": "read",
"action": "run",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1,
"command": "pwd",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "read",
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
"observation": "run",
"content": "/workspace",
"extras": {
"path": "bad.txt"
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "write",
"action": "run",
"args": {
"path": "bad.txt",
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n",
"start": 0,
"end": -1,
"command": "ls",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"observation": "run",
"content": "bad.txt",
"extras": {
"path": "bad.txt"
"command_id": -1,
"command": "ls",
"exit_code": 0
}
}
]
@@ -397,8 +398,9 @@ Here are the possible actions:
* `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, or record your thoughts. Arguments:
* `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.

View File

@@ -0,0 +1,439 @@
----------
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": "run",
"args": {
"command": "pwd",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "bad.txt",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
{
"source": "agent",
"action": "read",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "read",
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
"extras": {
"path": "bad.txt"
}
}
]
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, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.

View File

@@ -0,0 +1,458 @@
----------
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": "run",
"args": {
"command": "pwd",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "bad.txt",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
{
"source": "agent",
"action": "read",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "read",
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
"extras": {
"path": "bad.txt"
}
},
{
"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, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.

View File

@@ -0,0 +1,476 @@
----------
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": "run",
"args": {
"command": "pwd",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "/workspace",
"extras": {
"command_id": -1,
"command": "pwd",
"exit_code": 0
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "ls",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "bad.txt",
"extras": {
"command_id": -1,
"command": "ls",
"exit_code": 0
}
},
{
"source": "agent",
"action": "read",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "read",
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
"extras": {
"path": "bad.txt"
}
},
{
"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, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.

View File

@@ -1,6 +1,7 @@
{
"action": "read",
"action": "run",
"args": {
"path": "bad.txt"
"command": "pwd",
"background": false
}
}

View File

@@ -1,10 +1,7 @@
{
"action": "write",
"action": "run",
"args": {
"path": "bad.txt",
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n",
"start": 0,
"end": -1,
"thought": ""
"command": "ls",
"background": false
}
}

View File

@@ -1,4 +1,6 @@
{
"action": "finish",
"args": {}
"action": "read",
"args": {
"path": "bad.txt"
}
}

View File

@@ -0,0 +1,7 @@
{
"action": "write",
"args": {
"path": "bad.txt",
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n"
}
}

View File

@@ -0,0 +1,8 @@
{
"action": "read",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1
}
}

View File

@@ -0,0 +1,4 @@
{
"action": "finish",
"args": {}
}

View File

@@ -360,8 +360,9 @@ Here are the possible actions:
* `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, or record your thoughts. Arguments:
* `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.

View File

@@ -337,7 +337,7 @@ This is your internal monologue, in JSON format:
"action": "write",
"args": {
"path": "hello.sh",
"content": "echo 'hello'",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
@@ -379,8 +379,9 @@ Here are the possible actions:
* `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, or record your thoughts. Arguments:
* `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.

View File

@@ -0,0 +1,421 @@
----------
You're a thoughtful robot. Your main task is this:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
Don't expand the scope of your task--just complete it as written.
This is your internal monologue, in JSON format:
[
{
"action": "message",
"args": {
"content": "I exist!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Hmm...looks like I can type in a command line prompt",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Looks like I have a web browser too!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like I have some kind of short term memory.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Each of my thoughts seems to be stored in a JSON array.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems whatever I say next will be added as an object to the list.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "But no one has perfect short-term memory. My list of thoughts will be summarized and condensed over time, losing information in the process.",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Fortunately I have long term memory!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "I can just perform a recall action, followed by the thing I want to remember. And then related thoughts just spill out!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Sometimes they're random thoughts that don't really have to do with what I wanted to remember. But usually they're exactly what I need!",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Let's try it out!",
"wait_for_response": false
}
},
{
"action": "recall",
"args": {
"query": "what it is I want to do",
"thought": ""
}
},
{
"observation": "recall",
"content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"extras": {
"memories": [],
"role": "assistant"
}
},
{
"action": "message",
"args": {
"content": "How am I going to get there though?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "Neat! And it looks like it's easy for me to use the command line too! I just have to perform a run action and include the command I want to run in the command argument. The command output just jumps into my head!",
"wait_for_response": false
}
},
{
"action": "run",
"args": {
"command": "echo \"hello world\"",
"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 Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.. I haven't made any progress yet. Where should I start?",
"wait_for_response": false
}
},
{
"action": "message",
"args": {
"content": "It seems like there might be an existing project here. I should probably start by running `pwd` and `ls` to orient myself.",
"wait_for_response": false
}
},
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"observation": "null",
"content": "",
"extras": {}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "bash hello.sh",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"extras": {
"command_id": -1,
"command": "bash hello.sh",
"exit_code": 0
}
}
]
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, browse, push, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
Notes:
* you are logged in as opendevin, but sudo will always work without a password.
* all non-background commands will be forcibly stopped if they remain running for over 120 seconds.
* your environment is Debian Linux. You can install software with `sudo apt-get`, but remember to use -y.
* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`)
* don't run interactive text editors (e.g. `nano` or 'vim'), instead use the 'write' or 'read' action.
* don't run gui applications (e.g. software IDEs (like vs code or codium), web browsers (like firefox or chromium), or other complex software packages). Use non-interactive cli applications, or special actions instead.
* whenever an action fails, always send a `message` about why it may have happened before acting again.
What is your next single thought or action? Again, you must reply with JSON, and only with JSON. You must respond with exactly one 'action' object.

View File

@@ -2,6 +2,6 @@
"action": "write",
"args": {
"path": "hello.sh",
"content": "echo 'hello'"
"content": "#!/bin/bash\necho 'hello'"
}
}

View File

@@ -1,4 +1,9 @@
```json
{
"action": "finish",
"args": {}
"action": "run",
"args": {
"command": "bash hello.sh",
"background": false
}
}
```

View File

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

View File

@@ -84,8 +84,9 @@ It must be an object, and it must contain two fields:
* `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, or record your thoughts. Arguments:
* `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

View File

@@ -19,7 +19,39 @@ track of your progress. Here's a JSON representation of your plan:
"id": "",
"goal": "",
"state": "open",
"subtasks": []
"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": []
}
]
}
]
}
@@ -62,21 +94,26 @@ ten actions--more happened before that.
},
{
"source": "agent",
"action": "read",
"action": "add_task",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1,
"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",
"observation": "read",
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
"extras": {
"path": "bad.txt"
}
}
]
@@ -102,8 +139,9 @@ It must be an object, and it must contain two fields:
* `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, or record your thoughts. Arguments:
* `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
@@ -119,4 +157,4 @@ 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.
You should think about the next action to take.

View File

@@ -18,12 +18,46 @@ track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "open",
"subtasks": []
"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 not currently working on any tasks. Your next action MUST be to mark a task as in_progress.
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.
@@ -62,28 +96,34 @@ ten actions--more happened before that.
},
{
"source": "agent",
"action": "read",
"action": "add_task",
"args": {
"path": "bad.txt",
"start": 0,
"end": -1,
"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",
"observation": "read",
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
"extras": {
"path": "bad.txt"
}
},
{
"source": "agent",
"action": "message",
"action": "modify_task",
"args": {
"content": "I have read the content of bad.txt and identified the typos that need to be fixed. I will now proceed to fix the typos in the file.",
"wait_for_response": false
"task_id": "0.0",
"state": "in_progress",
"thought": ""
}
}
]
@@ -110,8 +150,9 @@ It must be an object, and it must contain two fields:
* `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, or record your thoughts. Arguments:
* `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
@@ -127,4 +168,4 @@ 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.
You should think about the next action to take.

View File

@@ -18,12 +18,46 @@ track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "open",
"subtasks": []
"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 not currently working on any tasks. Your next action MUST be to mark a task as in_progress.
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.
@@ -60,6 +94,38 @@ ten actions--more happened before that.
"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",
@@ -77,33 +143,6 @@ ten actions--more happened before that.
"extras": {
"path": "bad.txt"
}
},
{
"source": "agent",
"action": "message",
"args": {
"content": "I have read the content of bad.txt and identified the typos that need to be fixed. I will now proceed to fix the typos in the file.",
"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"
}
}
]
@@ -129,8 +168,9 @@ It must be an object, and it must contain two fields:
* `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, or record your thoughts. Arguments:
* `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
@@ -146,4 +186,4 @@ 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.
You should think about the file you just read, what you learned from it, and how that affects your plan.

View File

@@ -0,0 +1,197 @@
----------
# 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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -0,0 +1,207 @@
----------
# 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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -0,0 +1,215 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
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, 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.

View File

@@ -0,0 +1,234 @@
----------
# 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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You just changed a file. You should think about how it affects your plan.

View File

@@ -0,0 +1,242 @@
----------
# 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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -0,0 +1,251 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -1,6 +1,23 @@
```json
{
"action": "read",
"action": "add_task",
"args": {
"path": "bad.txt"
"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"
}
]
}
}
```

View File

@@ -1,6 +1,9 @@
```json
{
"action": "message",
"action": "modify_task",
"args": {
"content": "I have read the content of bad.txt and identified the typos that need to be fixed. I will now proceed to fix the typos in the file."
"task_id": "0.0",
"state": "in_progress"
}
}
```

View File

@@ -1,7 +1,6 @@
{
"action": "write",
"action": "read",
"args": {
"path": "bad.txt",
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n"
"path": "bad.txt"
}
}

View File

@@ -1,4 +1,8 @@
{
"action": "finish",
"args": {}
"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."
}
}

View File

@@ -0,0 +1,8 @@
{
"action": "modify_task",
"args": {
"task_id": "0.1",
"state": "in_progress",
"thought": "Starting to identify and correct typos in the text from bad.txt."
}
}

View File

@@ -0,0 +1,7 @@
{
"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
}
}

View File

@@ -0,0 +1,7 @@
{
"action": "write",
"args": {
"path": "bad.txt",
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n"
}
}

View File

@@ -0,0 +1,8 @@
{
"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."
}
}

View File

@@ -0,0 +1,10 @@
```json
{
"action": "modify_task",
"args": {
"task_id": "0.2",
"state": "completed",
"thought": "The corrected content has been successfully written back to bad.txt."
}
}
```

View File

@@ -0,0 +1,8 @@
{
"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."
}
}

View File

@@ -84,8 +84,9 @@ It must be an object, and it must contain two fields:
* `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, or record your thoughts. Arguments:
* `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

View File

@@ -19,7 +19,14 @@ track of your progress. Here's a JSON representation of your plan:
"id": "",
"goal": "",
"state": "open",
"subtasks": []
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"state": "open",
"subtasks": []
}
]
}
@@ -62,22 +69,13 @@ ten actions--more happened before that.
},
{
"source": "agent",
"action": "write",
"action": "add_task",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\necho 'hello'",
"start": 0,
"end": -1,
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
}
]
@@ -103,8 +101,9 @@ It must be an object, and it must contain two fields:
* `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, or record your thoughts. Arguments:
* `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
@@ -120,4 +119,4 @@ 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.
You should think about the next action to take.

View File

@@ -0,0 +1,133 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"state": "in_progress",
"subtasks": []
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'.
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the next action to take.

View File

@@ -0,0 +1,152 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"state": "in_progress",
"subtasks": []
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'.
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
}
]
Your most recent 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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You just changed a file. You should think about how it affects your plan.

View File

@@ -0,0 +1,171 @@
----------
# Task
You're a diligent software engineer AI. You can't see, draw, or interact with a
browser, but you can read and write files, and you can run commands, and you can think.
You've been given the following task:
Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
## Plan
As you complete this task, you're building a plan and keeping
track of your progress. Here's a JSON representation of your plan:
{
"id": "",
"goal": "",
"state": "in_progress",
"subtasks": [
{
"id": "0",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"state": "in_progress",
"subtasks": []
}
]
}
You're currently working on this task:
Write a shell script 'hello.sh' that prints 'hello'.
If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
You're responsible for managing this plan and the status of tasks in
it, by using the `add_task` and `modify_task` actions described below.
If the History below contradicts the state of any of these tasks, you
MUST modify the task using the `modify_task` action described below.
Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
a task that's already represented. Every task must be represented only once.
Tasks that are sequential MUST be siblings. They must be added in order
to their parent task.
If you mark a task as 'completed', 'verified', or 'abandoned',
all non-abandoned subtasks will be marked the same way.
So before closing a task this way, you MUST not only be sure that it has
been completed successfully--you must ALSO be sure that all its subtasks
are ready to be marked the same way.
If, and only if, ALL tasks have already been marked verified,
you MUST respond with the `finish` action.
## History
Here is a recent history of actions you've taken in service of this plan,
as well as observations you've made. This only includes the MOST RECENT
ten actions--more happened before that.
[
{
"source": "user",
"action": "message",
"args": {
"content": "Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.",
"wait_for_response": false
}
},
{
"source": "agent",
"action": "add_task",
"args": {
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": [],
"thought": ""
}
},
{
"source": "agent",
"action": "modify_task",
"args": {
"task_id": "0",
"state": "in_progress",
"thought": ""
}
},
{
"source": "agent",
"action": "write",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\necho 'hello'",
"start": 0,
"end": -1,
"thought": ""
}
},
{
"source": "agent",
"observation": "write",
"content": "",
"extras": {
"path": "hello.sh"
}
},
{
"source": "agent",
"action": "run",
"args": {
"command": "bash hello.sh",
"background": false,
"thought": ""
}
},
{
"source": "agent",
"observation": "run",
"content": "hello",
"extras": {
"command_id": -1,
"command": "bash hello.sh",
"exit_code": 0
}
}
]
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, browse, and recall actions--do this with the `message` action.
You should never act twice in a row without thinking. But if your last several
actions are all `message` actions, you should consider taking a different action.
What is your next thought or action? Again, you must reply with JSON, and only with JSON.
You should think about the command you just ran, what output it gave, and how that affects your plan.

View File

@@ -1,7 +1,8 @@
{
"action": "write",
"action": "add_task",
"args": {
"path": "hello.sh",
"content": "#!/bin/bash\n\necho 'hello'"
"parent": "",
"goal": "Write a shell script 'hello.sh' that prints 'hello'",
"subtasks": []
}
}

View File

@@ -1,4 +1,7 @@
{
"action": "finish",
"args": {}
"action": "modify_task",
"args": {
"task_id": "0",
"state": "in_progress"
}
}

View File

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

View File

@@ -0,0 +1,7 @@
{
"action": "run",
"args": {
"command": "bash hello.sh",
"background": false
}
}

View File

@@ -0,0 +1,10 @@
```json
{
"action": "modify_task",
"args": {
"task_id": "0",
"state": "completed",
"thought": "The script 'hello.sh' was written and executed successfully, producing the expected output 'hello'."
}
}
```