For AI Agent nodes, when “Enable Streaming” and “Return Intermediate Steps” are enabled, intermediate steps are only returned in the final output of the node, but are never streamed so the streaming client can’t actually access it.
The idea is:
I understand that we don’t want to send the intermediate steps in each chunk sent, but we could attach the intermediate steps to the data of the “end” chunk sent by the node (see processStreamEvent.ts:86). This would need some refactoring and runAgent.ts file should also be updated to get the steps earlier and use them in the processStreamEvent() call.
I think it would be beneficial to add this because:
Currently, the caller listening to the AI Agent stream does not have an easy way to identify the tools used by the AI Agent. This would allow to better track the used tools by the caller when streaming is enabled.
