feat: Implement interactive agent feedback and confirmation #638
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 commit introduces two major interactive features to the DeepResearchAgent:
Confirmation Before Synthesis: I now pause before generating the final report and await your confirmation via the UI. This allows you to review the process before committing to the final step.
Error Feedback Mechanism: When I encounter critical errors during task execution (e.g., in
research_execution_node
), I pause and request your feedback. You can choose to:These features enhance your control and allow for better error recovery and guided research.
Changes include:
DeepResearchAgent
to manage new states (awaiting_final_confirmation
,awaiting_error_feedback
), handle pause/resume logic using LangGraph's checkpointing, and process your feedback.request_final_confirmation_node
,request_error_feedback_node
,process_error_feedback_node
) and updated routing logic.DeepResearchAgent
(provide_final_confirmation
,provide_error_feedback
) to receive your input.WebuiManager
to manage my lifecycle across paused states and relay UI commands.deep_research_agent_tab.py
to display status, error details, and provide interactive elements (buttons, radio choices) for your confirmation and feedback.DeepResearchAgent
andWebuiManager
.Summary by cubic
Added interactive feedback to DeepResearchAgent so users can confirm before report synthesis and provide input when errors occur, allowing retries, skips, or aborts directly from the UI.