Skip to content

feat: Implement interactive agent feedback and confirmation #638

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

noureldinemam1
Copy link

@noureldinemam1 noureldinemam1 commented Jun 14, 2025

This commit introduces two major interactive features to the DeepResearchAgent:

  1. 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.

  2. 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:

    • Retry the failing task.
    • Skip the current task.
    • Abort the entire research process.

These features enhance your control and allow for better error recovery and guided research.

Changes include:

  • Modifications to DeepResearchAgent to manage new states (awaiting_final_confirmation, awaiting_error_feedback), handle pause/resume logic using LangGraph's checkpointing, and process your feedback.
  • New graph nodes (request_final_confirmation_node, request_error_feedback_node, process_error_feedback_node) and updated routing logic.
  • New methods in DeepResearchAgent (provide_final_confirmation, provide_error_feedback) to receive your input.
  • Updates to WebuiManager to manage my lifecycle across paused states and relay UI commands.
  • UI enhancements in deep_research_agent_tab.py to display status, error details, and provide interactive elements (buttons, radio choices) for your confirmation and feedback.
  • Improved handling of my state and resource cleanup in DeepResearchAgent and WebuiManager.

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.

  • New Features
    • Agent now pauses for user confirmation before generating the final report.
    • On critical errors, agent pauses and lets users choose to retry, skip, or abort via new UI controls.
    • UI updated to show status, error details, and interactive buttons for feedback and confirmation.

This commit introduces two major interactive features to the DeepResearchAgent:

1.  **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.

2.  **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:
    *   Retry the failing task.
    *   Skip the current task.
    *   Abort the entire research process.

These features enhance your control and allow for better error recovery and guided research.

Changes include:
- Modifications to `DeepResearchAgent` to manage new states (`awaiting_final_confirmation`, `awaiting_error_feedback`), handle pause/resume logic using LangGraph's checkpointing, and process your feedback.
- New graph nodes (`request_final_confirmation_node`, `request_error_feedback_node`, `process_error_feedback_node`) and updated routing logic.
- New methods in `DeepResearchAgent` (`provide_final_confirmation`, `provide_error_feedback`) to receive your input.
- Updates to `WebuiManager` to manage my lifecycle across paused states and relay UI commands.
- UI enhancements in `deep_research_agent_tab.py` to display status, error details, and provide interactive elements (buttons, radio choices) for your confirmation and feedback.
- Improved handling of my state and resource cleanup in `DeepResearchAgent` and `WebuiManager`.
@CLAassistant
Copy link

CLAassistant commented Jun 14, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic reviewed 3 files and found no issues. Review PR in cubic.dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants