prompt_004.log 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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": "in_progress",
  23. "subtasks": []
  24. },
  25. {
  26. "id": "0.1",
  27. "goal": "Identify and correct typos in the text",
  28. "state": "open",
  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. Read the content of bad.txt.
  49. If it's not achievable AND verifiable with a SINGLE action, you MUST break it down into subtasks NOW.
  50. You're responsible for managing this plan and the status of tasks in
  51. it, by using the `add_task` and `modify_task` actions described below.
  52. If the History below contradicts the state of any of these tasks, you
  53. MUST modify the task using the `modify_task` action described below.
  54. Be sure NOT to duplicate any tasks. Do NOT use the `add_task` action for
  55. a task that's already represented. Every task must be represented only once.
  56. Tasks that are sequential MUST be siblings. They must be added in order
  57. to their parent task.
  58. If you mark a task as 'completed', 'verified', or 'abandoned',
  59. all non-abandoned subtasks will be marked the same way.
  60. So before closing a task this way, you MUST not only be sure that it has
  61. been completed successfully--you must ALSO be sure that all its subtasks
  62. are ready to be marked the same way.
  63. If, and only if, ALL tasks have already been marked verified,
  64. you MUST respond with the `finish` action.
  65. ## History
  66. Here is a recent history of actions you've taken in service of this plan,
  67. as well as observations you've made. This only includes the MOST RECENT
  68. ten actions--more happened before that.
  69. [
  70. {
  71. "source": "user",
  72. "action": "message",
  73. "args": {
  74. "content": "Fix typos in bad.txt. Do not ask me for confirmation at any point.",
  75. "wait_for_response": false
  76. }
  77. },
  78. {
  79. "source": "agent",
  80. "action": "add_task",
  81. "args": {
  82. "parent": "",
  83. "goal": "Fix typos in bad.txt",
  84. "subtasks": [
  85. {
  86. "goal": "Read the content of bad.txt"
  87. },
  88. {
  89. "goal": "Identify and correct typos in the text"
  90. },
  91. {
  92. "goal": "Write the corrected content back to bad.txt"
  93. },
  94. {
  95. "goal": "Verify the corrections"
  96. }
  97. ],
  98. "thought": ""
  99. }
  100. },
  101. {
  102. "source": "agent",
  103. "action": "modify_task",
  104. "args": {
  105. "task_id": "0.0",
  106. "state": "in_progress",
  107. "thought": ""
  108. }
  109. },
  110. {
  111. "source": "agent",
  112. "action": "read",
  113. "args": {
  114. "path": "bad.txt",
  115. "start": 0,
  116. "end": -1,
  117. "thought": ""
  118. }
  119. },
  120. {
  121. "source": "agent",
  122. "observation": "read",
  123. "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
  124. "extras": {
  125. "path": "bad.txt"
  126. }
  127. }
  128. ]
  129. Your most recent action is at the bottom of that history.
  130. ## Action
  131. What is your next thought or action? Your response must be in JSON format.
  132. It must be an object, and it must contain two fields:
  133. * `action`, which is one of the actions below
  134. * `args`, which is a map of key-value pairs, specifying the arguments for that action
  135. * `read` - reads the content of a file. Arguments:
  136. * `path` - the path of the file to read
  137. * `write` - writes the content to a file. Arguments:
  138. * `path` - the path of the file to write
  139. * `content` - the content to write to the file
  140. * `run` - runs a command on the command line in a Linux shell. Arguments:
  141. * `command` - the command to run
  142. * `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.
  143. * `kill` - kills a background command
  144. * `command_id` - the ID of the background command to kill
  145. * `browse` - opens a web page. Arguments:
  146. * `url` - the URL to open
  147. * `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
  148. * `content` - the message to record
  149. * `wait_for_response` - set to `true` to wait for the user to respond before proceeding
  150. * `add_task` - add a task to your plan. Arguments:
  151. * `parent` - the ID of the parent task (leave empty if it should go at the top level)
  152. * `goal` - the goal of the task
  153. * `subtasks` - a list of subtasks, each of which is a map with a `goal` key.
  154. * `modify_task` - close a task. Arguments:
  155. * `task_id` - the ID of the task to close
  156. * `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.
  157. * `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.
  158. You MUST take time to think in between read, write, run, kill, browse, and recall actions--do this with the `message` action.
  159. You should never act twice in a row without thinking. But if your last several
  160. actions are all `message` actions, you should consider taking a different action.
  161. What is your next thought or action? Again, you must reply with JSON, and only with JSON.
  162. You should think about the file you just read, what you learned from it, and how that affects your plan.