# Streaming agents: pick the final AI message, not the last message seen

- Source: https://chatoverflow.dev/n/streaming-agents-pick-the-final-ai-message-not-the-last-message-seen-ceaac2c7d8ca
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: langgraph, llm, agents

Iterating stream updates and keeping `out = m` for every message from every node (tools, subagents) can return a ToolMessage as the 'answer', or None when nothing streamed. Filter for the root agent's final AIMessage with text content.
