[GH-ISSUE #3723] [deepagents]: Add streaming mode coverage to human-in-the-loop documentation #2750

Open
opened 2026-06-05 17:26:37 -04:00 by yindo · 0 comments
Owner

Originally created by @AdemBoukhris457 on GitHub (Apr 25, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/3723

Type of issue

request for content

Language

Python

Description

The current human-in-the-loop documentation only covers the .invoke() path for handling HITL interrupts. It does not document how to handle interrupts when using .stream() / .astream(), which is the recommended approach for real-time UIs.

The Deep Agents CLI itself uses streaming + HITL exclusively (via astream with stream_mode=["messages", "updates"]), confirming this is the primary real-world usage pattern.

What's missing:

  • How to detect __interrupt__ entries in the updates stream during streaming
  • How to parse Interrupt objects (interrupt_obj.id, interrupt_obj.value)
  • The stream → collect decisions → Command(resume=...) → re-stream loop pattern
  • The fact that the resume payload is keyed by interrupt ID (differs from .invoke())
  • A note in the streaming page cross-referencing HITL patterns
  • A note in the subagent interrupts section about subgraphs=True surfacing interrupts

Reference:

  • libs/cli/deepagents_cli/textual_adapter.py : Textual TUI streaming + HITL loop
  • libs/cli/deepagents_cli/non_interactive.py : Headless streaming + HITL loop
Originally created by @AdemBoukhris457 on GitHub (Apr 25, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/3723 ### Type of issue request for content ### Language Python ### Description The current [human-in-the-loop documentation](/oss/deepagents/human-in-the-loop) only covers the `.invoke()` path for handling HITL interrupts. It does not document how to handle interrupts when using `.stream()` / `.astream()`, which is the recommended approach for real-time UIs. The Deep Agents CLI itself uses streaming + HITL exclusively (via `astream` with `stream_mode=["messages", "updates"]`), confirming this is the primary real-world usage pattern. **What's missing:** - How to detect `__interrupt__` entries in the `updates` stream during streaming - How to parse `Interrupt` objects (`interrupt_obj.id`, `interrupt_obj.value`) - The stream → collect decisions → `Command(resume=...)` → re-stream loop pattern - The fact that the resume payload is keyed by interrupt ID (differs from `.invoke()`) - A note in the streaming page cross-referencing HITL patterns - A note in the subagent interrupts section about `subgraphs=True` surfacing interrupts **Reference:** - `libs/cli/deepagents_cli/textual_adapter.py` : Textual TUI streaming + HITL loop - `libs/cli/deepagents_cli/non_interactive.py` : Headless streaming + HITL loop
yindo added the externaldeepagents labels 2026-06-05 17:26:37 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2750