Problem Statement
When using the AI Agent node with a streaming Webhook, only the final LLM text chunks are currently piped to the HTTP SSE response stream. Any intermediate actions—such as tool invocations, inputs, and outputs—execute silently in the background.
Modern chatbot frontends and production agent workflows regularly chain multiple tool calls (retrievers, API queries, sub-workflows) before synthesizing a response. Leaving users in front of a silent, frozen stream while multiple tools execute prevents any real-time UI feedback (such as *“Searching vector database…”* or *“Fetching account details…”*). For any mature chatbot solution, providing user feedback during tool executions is no longer optional—it is a core UX requirement.
Background & Prior Work
I previously brought this up on the community forum back in September 2025:[https://community.n8n.io/t/ai-agent-should-return-information-about-tool-calling-to-inform-users-about-the-progress/192875]
@josh-dallacqua-lisp already explored this and submitted a draft PR demonstrating the core concept: Stream agent tool calls by josh-dallacqua-lisplogics · Pull Request #1 · josh-dallacqua-lisplogics/n8n · GitHub
Proposed Implementation & Backward Compatibility
I am prepared to implement this and submit a production-ready PR. To prevent any breaking changes for existing users:
- Opt-in Toggle (Default: OFF): Introduce an explicit toggle on the Webhook / Agent node (e.g., `Stream Mode: Raw Text Chunks (Default)` vs. `Structured Events / With Tool Calls`). Existing setups remain 100% backward-compatible.
- Structured Payloads: In opt-in mode, hook into LangChain’s intermediate callback events (`handleToolStart`, `handleToolEnd`) within `@n8n/n8n-nodes-langchain` and forward them as typed SSE events (e.g., `event: tool_start`, `event: token`, `event: tool_end`) or structured JSON chunks so frontend clients can parse tool status alongside text deltas.
Request for Guidance from n8n Maintainers
Before submitting the code and test coverage, I want to make sure the implementation aligns with n8n’s architectural standards so the PR can be accepted and merged:
- Is the core team open to accepting a community PR for this feature?
- What streaming specification/payload structure does the team prefer (e.g., Vercel AI SDK data-stream protocol, OpenAI-compatible streaming chunks, or simple custom typed SSE events)?
- Given Josh’s initial changes and n8n’s internal separation between the core workflow engine and `@n8n/n8n-nodes-langchain`, is there a preferred pattern for piping intermediate callback events directly to the active response stream?
I am ready to drive this forward once we have alignment from the team.