-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AgentRejectAction across multiple modules #1615
Add AgentRejectAction across multiple modules #1615
Conversation
This commit introduces the AgentRejectAction class and integrates it across various modules and actions. It includes updates to READMEs, action definitions, and agent controllers to handle the new 'reject' action. This functionality will allow agents to properly signal task rejection.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1615 +/- ##
=======================================
Coverage ? 39.05%
=======================================
Files ? 92
Lines ? 3731
Branches ? 0
=======================================
Hits ? 1457
Misses ? 2274
Partials ? 0 ☔ View full report in Codecov by Sentry. |
@@ -105,6 +105,17 @@ def message(self) -> str: | |||
return "All done! What's next on the agenda?" | |||
|
|||
|
|||
@dataclass | |||
class AgentRejectAction(Action): | |||
outputs: Dict = field(default_factory=dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should have an arbitrary dict of outputs, the way finish
does. All we want is a reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see where you are coming from, but I have a few counter-arguments:
- An agent can choose to have more than just a
reason
attribute. For example, it can suggest how to fix the task in addition to a reason. - Both AgentRejectAction and AgentFinishAction are termination actions, so it's better for them to have the same interface IMO.
- By design, a micro-agent has a schema for
inputs
andoutputs
. We don't really enforce it at the moment (i.e. a micro-agent can finish with whateveroutputs
type), but I feel like we should do it sooner or later. IfAgentRejectAction
andAgentFinishAction
could have different schema for outputs, things will become trickier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will create a follow-up to enforce the schema for micro-agents. We could discuss if we want to continue this approach there.
Very cool! Agree this will be useful |
{ | ||
'action': AgentRejectAction(), | ||
'observations': [], | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The agent_controller will stop after the previous action AgentFinishAction
. If this action is placed before, the same will happen. So, is this action needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not needed
This commit introduces the AgentRejectAction class and integrates it across various modules and actions. It includes updates to READMEs, action definitions, and agent controllers to handle the new 'reject' action. This functionality will allow agents to properly signal task rejection.
===========BELOW COMMIT MESSAGE IS GENERATED BY OPENDEVIN=============
Yes, again I am too lazy to write a commit message by myself. So I asked OpenDevin to do me the favour:
Why this PR is needed?
CommitWriterAgent
never finishes when running in a non-git folderThere is no diff in the staging area; no changes to commit.
output fromCommitWriterAgent
really means there's no change to commit, OR the output itself is literally the compiled commit message.TODO in this PR:
UpdateThis should be a separate issue.backend_architecture.puml
Future work: