a2aproject / a2aproject/a2a-samples

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

Aberta
#141 1 comentário 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
Jupyter Notebook
Estrelas
1.8k
Forks
751
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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)

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

The issue points to agent_executor.py lines 50-62. Start by running the streaming tutorial to reproduce the delay. Examine the LangGraph execution flow and the streaming callback mechanism. Check if the stream is being buffered or if there's a configuration to emit per node. The 'done' state is when streaming output appears after each node completes, not at the end.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
jupyter-notebook, python
Domínio
ai-infra-agents
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Claramente especificada
Facilidade para iniciantes
40/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.