Skip to content

feat: Migrate Human in the Loop for Agents from experimental - #10403

Merged
sjrl merged 19 commits into
mainfrom
migrate-hitl
Jan 22, 2026
Merged

sjrl merged 19 commits into
mainfrom
migrate-hitl

Conversation

@sjrl

@sjrl sjrl commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

Related Issues

Proposed Changes:

  • Migrates HiTL from experimental to main

How did you test it?

  • Brought over unit and integration tests

Notes for the reviewer

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@vercel

vercel Bot commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
haystack-docs Ignored Ignored Preview Jan 22, 2026 7:22am

Request Review

@sjrl
sjrl marked this pull request as ready for review January 20, 2026 11:57
@sjrl
sjrl requested a review from a team as a code owner January 20, 2026 11:57
@sjrl
sjrl requested review from davidsbatista and removed request for a team January 20, 2026 11:57
@sjrl

sjrl commented Jan 20, 2026

Copy link
Copy Markdown
Contributor Author

@davidsbatista feel free to loop in Stefano as well since he reviewed the original feature

@sjrl sjrl self-assigned this Jan 20, 2026
@sjrl sjrl changed the title feat: Migrate hitl feat: Migrate Human in the Loop for Agents from experimental Jan 20, 2026
@sjrl

sjrl commented Jan 20, 2026

Copy link
Copy Markdown
Contributor Author

Ahh I forgot, I need to create new doc section and files as well

@davidsbatista

Copy link
Copy Markdown
Contributor

@anakin87 - maybe you can help me on this one, since you already reviewed the first iteration on experimental

@anakin87
anakin87 self-requested a review January 20, 2026 17:06
@anakin87

Copy link
Copy Markdown
Member

@sjrl could you confirm that we don't want to migrate BreakpointConfirmationStrategy for the moment?

@anakin87

anakin87 commented Jan 21, 2026 •

Copy link
Copy Markdown
Member

I took a look at the PR and it seems good.

I am thinking about directories... We currently have dataclasses > human_in_the_loop.py and then the human_in_the_loop directory.

In experimental, these modules were grouped together in components > agent > human_in_the_loop. I like the experimental structure more.

@sjrl WDYT?

@sjrl

sjrl commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author

@sjrl could you confirm that we don't want to migrate BreakpointConfirmationStrategy for the moment?

That is correct. It was left in experimental on purpose since it's not needed by platform and we haven't built an end-to-end demo with it using Hayhooks so I'm less confident that it doesn't need future changes to work well in a production scenario.

@sjrl

sjrl commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author

I took a look at the PR and it seems good.

I am thinking about directories... We currently have dataclasses > human_in_the_loop.py and then the human_in_the_loop directory.

In experimental, these modules were grouped together in components > agent > human_in_the_loop. I like the experimental structure more.

@sjrl WDYT?

I changed the structure since I was trying to make it easier to create new integrations related to confirmation strategies and policies in core-integrations. For example, the RedisConfirmationStrategy by @mpangrazzi would probably live in core-integrations and I thought it would be odd to require the folder structure for that to be components > agent > human_in_the_loop > redis vs now it would be human_in_the_loop > redis. Basically I took inspiration from how tools is it's own top-level directory and our MCP integration is in tools > mcp.

I'm open to changing this though, but what's your take on making it easy to create integrations for human in the loop features?

@anakin87

anakin87 commented Jan 21, 2026 •

Copy link
Copy Markdown
Member

I changed the structure since I was trying to make it easier to create new integrations related to confirmation strategies and policies in core-integrations. For example, the RedisConfirmationStrategy by @mpangrazzi would probably live in core-integrations and I thought it would be odd to require the folder structure for that to be components > agent > human_in_the_loop > redis vs now it would be human_in_the_loop > redis. Basically I took inspiration from how tools is it's own top-level directory and our MCP integration is in tools > mcp.

I'm open to changing this though, but what's your take on making it easy to create integrations for human in the loop features?

I understand your point and makes sense.

It's a minor thing but what about also putting related dataclasses in the same HiTL directory? (This would also reflect what we have done for tools)

@sjrl

sjrl commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author

I understand your point and makes sense.

It's a minor thing but what about also putting related dataclasses in the same HiTL directory? (This would also reflect what we have done for tools)

Yeah happy to do that!

@sjrl

sjrl commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author

@anakin87 this should be ready for another review!

@anakin87 anakin87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good in general.

We should add pydoc config for the new human_in_the_loop package to haystack/pydoc.

I imagine that documentation will be added in a future PR. Right?

@sjrl

sjrl commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author

Looks good in general.

We should add pydoc config for the new human_in_the_loop package to haystack/pydoc.

I imagine that documentation will be added in a future PR. Right?

Good point. I can also add it in this PR

@anakin87

Copy link
Copy Markdown
Member

I'd prefer:

  • pydoc config in this PR
  • docs in a new PR

Not a strong opinion, in any case

@sjrl

sjrl commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

@anakin87 I've added the pydoc in 5018000

I'll add proper docs in a separate PR

@anakin87 anakin87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@sjrl
sjrl merged commit b26ca57 into main Jan 22, 2026
21 checks passed
@sjrl
sjrl deleted the migrate-hitl branch January 22, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants