-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Summary
Implement Human-in-the-Loop (HITL) functionality through Kasal's existing chat interface, integrating with CrewAI's backend HIL support and providing an engine-agnostic framework for future AI engines.
Current State
- CrewAI backend has human_input support in Task model
- Kasal has assistant chat panel for user interaction
- No integration between CrewAI HIL and chat interface
- HITL functionality limited to CrewAI engine only
Proposed Solution
Core Features
- Chat-based Interventions: Human input/approval through chat messages
- Real-time Prompts: Chat notifications when human input needed
- Inline Feedback: Approve/reject/modify responses directly in chat
- Engine-Agnostic Framework: Adapter pattern for future engines
- Execution Control: Pause/resume workflows via chat commands
Chat Integration
- Display intervention requests as special chat messages
- Collect human responses through chat input
- Show execution status updates in chat timeline
- Support rich input formats (buttons, forms, file uploads)
Technical Implementation
- Extend existing chat WebSocket connection for HITL events
- Create EngineHITLAdapter abstraction for different engines
- Enhance CrewAI integration to emit chat intervention events
- Add chat message types for HITL interactions
- Implement execution pause/resume through chat interface
Key Components
- HITLChatService: Chat-based intervention handler
- CrewAIHITLAdapter: Integration with existing CrewAI HIL
- Chat message extensions for intervention UI
- WebSocket event handlers for real-time HITL
- Execution state management for pause/resume
Benefits
- Leverage existing chat interface familiarity
- Seamless integration with current user workflow
- Support for future AI engine integrations
- Real-time human oversight and control
- No additional UI complexity
Priority: High
Metadata
Metadata
Assignees
Labels
No labels