Add ability to define custom agent action and instructions + example#12
Open
derekmeegan wants to merge 1 commit intobrowser-use:mainfrom
Open
Add ability to define custom agent action and instructions + example#12derekmeegan wants to merge 1 commit intobrowser-use:mainfrom
derekmeegan wants to merge 1 commit intobrowser-use:mainfrom
Conversation
Member
|
Have to think for a few minutes if this makes sense. I LOVE the idea behind it but right now it's kinda ugly to do this way. This would go hard with some proper |
Contributor
Author
|
Yeah, I agree that the piecemeal approach for the agent inputs is not ideal. Are you imagining the user could define their own fallback agent directly? Or maybe a WorkflowAgent class is needed that would wrap the user's custom instructions with the fallback prompt template and set other parameters. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR provides an initial POC for a fallback agent with custom actions, such as notifying a Discord server when an action fails with the error details and the agent's plan.
I am not sure if providing individual agent params or instantiating the agent and passing it into the workflow obj is the best route ultimately, but figured this is a good start. In the example workflow.json, I intentionally added the "XXXXXXX" prefix to the selectors, XPath, tag, and text of step 2 to make the action break and trigger the agent to step in. The custom instruction is also necessary for the agent to decide to use the action.
More to come 🚀