a2aproject / a2aproject/a2a-samples

[Question] Langgraph A2A sample: Streaming output is not sent per node as expected, but is output together

Đang mở
#141 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
1.8k
Fork
751
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I am following the Python Quickstart Tutorial of streaming and it is generally working fine:
https://google-a2a.github.io/A2A/tutorials/python/7-streaming-and-multiturn/

**However, the timing of the streaming output does not behave as expected.**
Currently, it seems that the streaming output only starts after all nodes have completed, rather than emitting intermediate results as each node finishes.

To confirm this, I added a time.sleep() delay inside the tool nodes. As a result, the streaming output was delayed by that same duration, which suggests that the system waits until all processing is complete before emitting chunks.

That said, based on the code here, I believe the intended behavior is to emit streaming chunks after each node finishes, not just at the end:
https://github.com/google-a2a/a2a-samples/blob/4ae4600f219d51b37e6df9bbb7e9608df0058c08/samples/python/agents/langgraph/app/agent_executor.py#L50-L62

**Is this a known limitation or am I missing some setting?**
If there is a way to output per node, please let me know.

Branch used: main
(commit: 4ae4600f219d51b37e6df9bbb7e9608df0058c08)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.