prompt_009.log 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. # Task
  2. You're a diligent software engineer AI. You can't see, draw, or interact with a
  3. browser, but you can read and write files, and you can run commands, and you can think.
  4. You've been given the following task:
  5. Fix typos in bad.txt. Do not ask me for confirmation at any point.
  6. ## Plan
  7. As you complete this task, you're building a plan and keeping
  8. track of your progress. Here's a JSON representation of your plan:
  9. {
  10. "id": "",
  11. "goal": "",
  12. "state": "in_progress",
  13. "subtasks": [
  14. {
  15. "id": "0",
  16. "goal": "Fix typos in bad.txt",
  17. "state": "in_progress",
  18. "subtasks": [
  19. {
  20. "id": "0.0",
  21. "goal": "Read the content of bad.txt",
  22. "state": "completed",
  23. "subtasks": []
  24. },
  25. {
  26. "id": "0.1",
  27. "goal": "Identify and correct typos in the text",
  28. "state": "completed",
  29. "subtasks": []
  30. },
  31. {
  32. "id": "0.2",
  33. "goal": "Write the corrected content back to bad.txt",
  34. "state": "open",
  35. "subtasks": []
  36. },
  37. {
  38. "id": "0.3",
  39. "goal": "Verify the corrections",
  40. "state": "open",
  41. "subtasks": []
  42. }
  43. ]
  44. }
  45. ]
  46. }
  47. You're currently working on this task:
  48. Fix typos in bad.txt.
  49. You're responsible for managing this plan and the status of tasks in
  50. it, by using the `add_task` and `modify_task` actions described below.
  51. If the History below contradicts the state of any of these tasks, you
  52. MUST modify the task using the `modify_task` action described below.
  53. Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
  54. a task that's already represented. Every task must be represented only once.
  55. Tasks that are sequential MUST be siblings. They must be added in order
  56. to their parent task.
  57. If you mark a task as 'completed', 'verified', or 'abandoned',
  58. all non-abandoned subtasks will be marked the same way.
  59. So before closing a task this way, you MUST not only be sure that it has
  60. been completed successfully--you must ALSO be sure that all its subtasks
  61. are ready to be marked the same way.
  62. If, and only if, ALL tasks have already been marked verified,
  63. you MUST respond with the `finish` action.
  64. ## History
  65. Here is a recent history of actions you've taken in service of this plan,
  66. as well as observations you've made. This only includes the MOST RECENT
  67. ten actions--more happened before that.
  68. [
  69. {
  70. "source": "user",
  71. "action": "message",
  72. "args": {
  73. "content": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
  74. "wait_for_response": false
  75. }
  76. },
  77. {
  78. "source": "agent",
  79. "action": "add_task",
  80. "args": {
  81. "parent": "",
  82. "goal": "Fix typos in bad.txt",
  83. "subtasks": [
  84. {
  85. "goal": "Read the content of bad.txt"
  86. },
  87. {
  88. "goal": "Identify and correct typos in the text"
  89. },
  90. {
  91. "goal": "Write the corrected content back to bad.txt"
  92. },
  93. {
  94. "goal": "Verify the corrections"
  95. }
  96. ],
  97. "thought": ""
  98. }
  99. },
  100. {
  101. "source": "agent",
  102. "action": "modify_task",
  103. "args": {
  104. "task_id": "0.0",
  105. "state": "in_progress",
  106. "thought": ""
  107. }
  108. },
  109. {
  110. "source": "agent",
  111. "action": "read",
  112. "args": {
  113. "path": "bad.txt",
  114. "start": 0,
  115. "end": -1,
  116. "thought": ""
  117. }
  118. },
  119. {
  120. "source": "agent",
  121. "observation": "read",
  122. "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
  123. "extras": {
  124. "path": "bad.txt"
  125. }
  126. },
  127. {
  128. "source": "agent",
  129. "action": "modify_task",
  130. "args": {
  131. "task_id": "0.0",
  132. "state": "completed",
  133. "thought": "The content of bad.txt has been successfully read and is now stored for further processing."
  134. }
  135. },
  136. {
  137. "source": "agent",
  138. "action": "modify_task",
  139. "args": {
  140. "task_id": "0.1",
  141. "state": "in_progress",
  142. "thought": "Starting to identify and correct typos in the text from bad.txt."
  143. }
  144. },
  145. {
  146. "source": "agent",
  147. "action": "message",
  148. "args": {
  149. "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'.",
  150. "wait_for_response": false
  151. }
  152. },
  153. {
  154. "source": "agent",
  155. "action": "write",
  156. "args": {
  157. "path": "bad.txt",
  158. "content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n",
  159. "start": 0,
  160. "end": -1,
  161. "thought": ""
  162. }
  163. },
  164. {
  165. "source": "agent",
  166. "observation": "write",
  167. "content": "",
  168. "extras": {
  169. "path": "bad.txt"
  170. }
  171. },
  172. {
  173. "source": "agent",
  174. "action": "modify_task",
  175. "args": {
  176. "task_id": "0.1",
  177. "state": "completed",
  178. "thought": "The typos in the text from bad.txt have been identified and corrected. The content has been written back to the file."
  179. }
  180. }
  181. ]
  182. Your most recent action is at the bottom of that history.
  183. ## Action
  184. What is your next thought or action? Your response must be in JSON format.
  185. It must be an object, and it must contain two fields:
  186. * `action`, which is one of the actions below
  187. * `args`, which is a map of key-value pairs, specifying the arguments for that action
  188. * `read` - reads the content of a file. Arguments:
  189. * `path` - the path of the file to read
  190. * `write` - writes the content to a file. Arguments:
  191. * `path` - the path of the file to write
  192. * `content` - the content to write to the file
  193. * `run` - runs a command on the command line in a Linux shell. Arguments:
  194. * `command` - the command to run
  195. * `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.
  196. * `kill` - kills a background command
  197. * `command_id` - the ID of the background command to kill
  198. * `browse` - opens a web page. Arguments:
  199. * `url` - the URL to open
  200. * `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
  201. * `content` - the message to record
  202. * `wait_for_response` - set to `true` to wait for the user to respond before proceeding
  203. * `add_task` - add a task to your plan. Arguments:
  204. * `parent` - the ID of the parent task (leave empty if it should go at the top level)
  205. * `goal` - the goal of the task
  206. * `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
  207. * `modify_task` - close a task. Arguments:
  208. * `task_id` - the ID of the task to close
  209. * `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.
  210. * `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.
  211. You MUST take time to think in between read, write, run, kill, browse, and recall actions--do this with the `message` action.
  212. You should never act twice in a row without thinking. But if your last several
  213. actions are all `message` actions, you should consider taking a different action.
  214. What is your next thought or action? Again, you must reply with JSON, and only with JSON.
  215. You should think about the next action to take.