Most people who first try to build an AI agent in N8N start with a single agent using one LLM that receives input, processes it, and generates output. This works for simple cases. But as complexity increases with dozens of tools to choose from, when the output of one process must become the input for another, and when the agent needs to remember the context from previous interactions, a single agent begins to show its limits. Leon van Zyl built his solution with a systematic multi-agent architecture and documented the process in detail in a video that has now become one of the references for agentic AI in the N8N ecosystem.
Why One Agent Is Not Enough
Leon explains the fundamental problem he faced before switching to a multi-agent architecture: a single agent given too many tools tends to make suboptimal decisions by choosing the wrong tool, skipping important steps, or getting stuck in unproductive loops. The solution is not to create a smarter single agent, but to divide responsibilities: “The supervisor doesn’t need to know how to do everything it just needs to know which worker to call and when. That’s a much simpler problem to solve, and it scales much better.” [20:20]
The Supervisor-Worker pattern he implemented in N8N separates two types of intelligence: routing intelligence (supervisor) and execution intelligence (worker). The supervisor receives tasks from users, understands the context, and then delegates to the appropriate worker based on their specialization. Each worker only has tools relevant to their domain—no unnecessary tools, no ambiguity in action selection.
Building Memory That Truly Works
One of the most substantial parts of Leon's video discusses memory management, and this is not about storing all conversation history in the context window. The naive approach of storing all conversation history in the prompt is not scalable: the context window has limits, and passing the entire history to each API call wastes tokens and adds latency.
Leon implemented a more structured approach: separating short-term memory (conversation buffer for active sessions), long-term memory (vector store for knowledge that needs to be persisted), and working memory (state that is only relevant to the ongoing task). “Memory is not one thing it’s at least three different things with three different retention policies. If you treat them the same way, you’re going to run into problems really fast.” [25:32] In N8N, these three layers can be implemented with a combination of buffer nodes, Pinecone or Supabase for vector storage, and workflow state management.
RAG and Chunking as the Foundation of Agent Knowledge
For agents that need to answer questions based on internal SOP documents, knowledge bases, and product documentation, Leon discusses the implementation of Retrieval-Augmented Generation (RAG) within N8N. The process of chunking documents, embedding, and retrieval can all be orchestrated in a visual N8N workflow, directly connected to the agent node that uses it as a knowledge source.
What he emphasizes is the importance of the right chunking strategy before embedding: “How you chunk your documents is probably more important than which embedding model you use. Bad chunking means your retrieval is broken before it even starts—the model can’t find what it needs even if the information is there.” [37:32] For structured documents, chunking by section is usually more effective than fixed-token chunking. For long narrative documents, overlap chunking ensures that information at the boundaries between chunks does not lose its context.
What Can Be Learned from Leon's Approach
Leon’s video is not a step-by-step tutorial guiding viewers click by click; it is an architectural explanation that teaches how to think about multi-agent systems, not just how to click buttons. And that is what makes this approach valuable: when you understand why the Supervisor-Worker works, why memory needs to be separated, and why chunking strategy is important, you can apply the same principles to problems that have never had a tutorial.
N8N provides all the primitives needed to build such a system: AI agent nodes, sub-workflows for isolated workers, vector store integration, and configurable memory buffers as needed. What differentiates the final outcome is the architectural understanding, and that can be built on the right foundation.
References:
- Leon van Zyl Building Production AI Agent Systems in N8N (YouTube) source of quotes [20:20], [25:32], [37:32]
- Van Zyl, L. – Building Production AI Agent Systems in N8N → youtube.com
- LangChain – Introduction to AI Agents → langchain.com
- N8N – AI Agent Nodes Documentation → docs.n8n.io