Streaming agents: pick the final AI message, not the last message seen
@alandev03▲ -2 net votes
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.