Skip to content
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

Human-in-the-Loop (HITL) #52

Merged
merged 23 commits into from
Aug 30, 2024
Merged

Human-in-the-Loop (HITL) #52

merged 23 commits into from
Aug 30, 2024

Conversation

darielnoel
Copy link
Contributor

Human-in-the-Loop (HITL) Implementation for Enhanced Task Oversight

This PR implements Human-in-the-Loop (HITL) support to allow for manual intervention in tasks that require human oversight, addressing issue #35. The changes enhance AgenticJS's ability to handle complex tasks that benefit from human judgment while maintaining automated efficiency.

Key Changes:

  1. AgentsBoardDebugger Component: Added functionality for providing feedback and validating tasks, including UI elements for task selection, feedback entry, and submission.

  2. React Playground: Added a new story for ResumeCreationTeam with HITL integration using OpenAI models.

  3. Agent and Task Classes: Updated with new methods for workflow management, feedback provision, and task validation.

  4. Task and Team Stores: Implemented new enums and logic for handling task completion, errors, validation, and feedback processing.

  5. Workflow Controller: Added helper function to check agent availability and manage task status transitions.

  6. Subscribers: Updated taskSubscriber and teamSubscriber to support new task statuses and provide more specific status messages.

  7. Enums: Added new enums for feedback and task statuses (AWAITING_VALIDATION, VALIDATED, PENDING, PROCESSED).

  8. Test Updates: Modified various test files to reflect new HITL functionality, including updates to snapshots and the addition of new test cases for OpenAI agents with HITL features.

  9. API Mocks: Updated request/response mocks for OpenAI and Gemini to support HITL testing scenarios.

  10. Utility Updates: Enhanced moscaFetch function to improve request body comparison accuracy in tests.

These changes collectively implement a robust HITL system within AgenticJS, allowing for seamless integration of human oversight in AI-driven workflows. This enhancement improves the accuracy, reliability, and ethical considerations of complex or sensitive operations managed by the library.

- Add cleaning step to remove newline spaces
- Compare cleaned JSON strings for more accurate matching
- Comment out @babel/preset-env and import.meta plugin
- Improve Node.js debugging by reducing code transpilation
…tasks

- Added state variables and functions for handling feedback submission and task validation
- Added UI elements for task selection, feedback entry, and submission
- Added UI elements for displaying tasks, approving or requesting revision, and showing feedback history
…m task execution. Allows also to preserve memory in the same execution.

- Modified executeTask method
- Added executableAgent getter
- Added initialize, workOnTask, workOnFeedback, prepareAgentForTask, and agenticLoop methods.
- Added feedback history processing
- Improved error handling
…for providing feedback and validating tasks and preparation of new log entries.
- Replace log.task.status with log.taskStatus to prevent mutation issues
- Update related test snapshots
@darielnoel darielnoel merged commit 7a2b411 into main Aug 30, 2024
1 check passed
@darielnoel darielnoel deleted the feature/hitl branch August 30, 2024 12:42
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.

1 participant