Investigate how to integrate Human in the Loop confirmation strategies into hayhooks
As a follow up to https://github.com/deepset-ai/haystack-experimental/pull/369 we should investigate if the BreakpointConfirmationStrategy can be used to help enable a human in the loop integration into hayhooks.
As per offline discussions with @mpangrazzi this is a complicated topic since this feature is tightly related to what front-end you choose to use, and there is not yet a widely adopted standard for this communication between backend and front-end.
@mpangrazzi please feel free to add more details
More details in this comment https://github.com/deepset-ai/haystack-experimental/pull/369#issuecomment-3389254842
It should be possible, but IMHO the best way to be sure that this works would be to try it out and check how clean is the output implementation.
We may want to try to e.g.:
- Execute an agent in a pipeline wrapper
- Catch and handle breakpoint exceptions
- Send (via websockets using AG-UI?) tool approval data to frontend and receive result
- Based on received feedback, resume the execution
We can also skip using AG-UI on point 3, but we still need to have websockets support on pipeline wrappers (to be able to do a bi-directional communication). I'll try to find some time next week to try it out.