Skip to content

Commit bf14b47

Browse files
assertionaaren.xzhrbrenli-boxuan
authored
feat: make other agents support asking user input in MessageAction. (All-Hands-AI#1777)
* feat: make other agents support asking user input in MessageAction. * Update agenthub/micro/_instructions/actions/message.md Co-authored-by: Robert Brennan <[email protected]> * Update agenthub/micro/_instructions/actions/message.md Co-authored-by: Robert Brennan <[email protected]> * feat: make other agents support asking user input in MessageAction. * Regenerate test artifacts --------- Co-authored-by: aaren.xzh <[email protected]> Co-authored-by: Robert Brennan <[email protected]> Co-authored-by: Boxuan Li <[email protected]>
1 parent 8172220 commit bf14b47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3990
-135
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
* `message` - make a plan, set a goal, or record your thoughts. Arguments:
1+
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
22
* `content` - the thought to record
3+
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding

agenthub/monologue_agent/utils/prompts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
* `branch` - the name of the branch to push
4545
* `recall` - recalls a past memory. Arguments:
4646
* `query` - the query to search for
47-
* `message` - make a plan, set a goal, or record your thoughts. Arguments:
47+
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
4848
* `content` - the message to record
49+
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
4950
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
5051
5152
%(background_commands)s

agenthub/planner_agent/prompt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@
8282
* `command_id` - the ID of the background command to kill
8383
* `browse` - opens a web page. Arguments:
8484
* `url` - the URL to open
85-
* `message` - make a plan, set a goal, or record your thoughts. Arguments:
85+
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
8686
* `content` - the message to record
87+
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
8788
* `add_task` - add a task to your plan. Arguments:
8889
* `parent` - the ID of the parent task (leave empty if it should go at the top level)
8990
* `goal` - the goal of the task

tests/integration/mock/MonologueAgent/test_edits/prompt_001.log

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ Here are the possible actions:
360360
* `branch` - the name of the branch to push
361361
* `recall` - recalls a past memory. Arguments:
362362
* `query` - the query to search for
363-
* `message` - make a plan, set a goal, or record your thoughts. Arguments:
363+
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
364364
* `content` - the message to record
365+
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
365366
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
366367

367368

tests/integration/mock/MonologueAgent/test_edits/prompt_002.log

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,20 +334,21 @@ This is your internal monologue, in JSON format:
334334
},
335335
{
336336
"source": "agent",
337-
"action": "read",
337+
"action": "run",
338338
"args": {
339-
"path": "bad.txt",
340-
"start": 0,
341-
"end": -1,
339+
"command": "pwd",
340+
"background": false,
342341
"thought": ""
343342
}
344343
},
345344
{
346345
"source": "agent",
347-
"observation": "read",
348-
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
346+
"observation": "run",
347+
"content": "/workspace",
349348
"extras": {
350-
"path": "bad.txt"
349+
"command_id": -1,
350+
"command": "pwd",
351+
"exit_code": 0
351352
}
352353
}
353354
]
@@ -378,8 +379,9 @@ Here are the possible actions:
378379
* `branch` - the name of the branch to push
379380
* `recall` - recalls a past memory. Arguments:
380381
* `query` - the query to search for
381-
* `message` - make a plan, set a goal, or record your thoughts. Arguments:
382+
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
382383
* `content` - the message to record
384+
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
383385
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
384386

385387

tests/integration/mock/MonologueAgent/test_edits/prompt_003.log

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -334,39 +334,40 @@ This is your internal monologue, in JSON format:
334334
},
335335
{
336336
"source": "agent",
337-
"action": "read",
337+
"action": "run",
338338
"args": {
339-
"path": "bad.txt",
340-
"start": 0,
341-
"end": -1,
339+
"command": "pwd",
340+
"background": false,
342341
"thought": ""
343342
}
344343
},
345344
{
346345
"source": "agent",
347-
"observation": "read",
348-
"content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n",
346+
"observation": "run",
347+
"content": "/workspace",
349348
"extras": {
350-
"path": "bad.txt"
349+
"command_id": -1,
350+
"command": "pwd",
351+
"exit_code": 0
351352
}
352353
},
353354
{
354355
"source": "agent",
355-
"action": "write",
356+
"action": "run",
356357
"args": {
357-
"path": "bad.txt",
358-
"content": "This is a stupid typo.\nReally?\nNo more typos!\nEnjoy!\n",
359-
"start": 0,
360-
"end": -1,
358+
"command": "ls",
359+
"background": false,
361360
"thought": ""
362361
}
363362
},
364363
{
365364
"source": "agent",
366-
"observation": "write",
367-
"content": "",
365+
"observation": "run",
366+
"content": "bad.txt",
368367
"extras": {
369-
"path": "bad.txt"
368+
"command_id": -1,
369+
"command": "ls",
370+
"exit_code": 0
370371
}
371372
}
372373
]
@@ -397,8 +398,9 @@ Here are the possible actions:
397398
* `branch` - the name of the branch to push
398399
* `recall` - recalls a past memory. Arguments:
399400
* `query` - the query to search for
400-
* `message` - make a plan, set a goal, or record your thoughts. Arguments:
401+
* `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
401402
* `content` - the message to record
403+
* `wait_for_response` - set to `true` to wait for the user to respond before proceeding
402404
* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working.
403405

404406

0 commit comments

Comments
 (0)