Welcome to this n8n multi-agent tutorial — a complete project guide for beginners. Multi-agent AI systems sound like something only engineers with PhDs can build. But that's no longer true. In 2026, n8n — the open-source workflow automation platform valued at $5.2 billion — introduced native AI Agent nodes that let anyone design, connect, and deploy teams of AI agents without writing a single line of Python. This no-code AI agent builder guide walks you through a complete project: building a Research Agent, a Writing Agent, and a Supervisor Agent that coordinates them both.
Why Multi-Agent Systems Matter
Single AI agents are useful, but they hit a ceiling fast. A single prompt has limited context, a single model has fixed strengths, and a single agent can't parallelize tasks. Multi-agent architecture solves all three problems by splitting work across specialized agents with different instructions, tools, and LLM backends.

According to n8n's official blog on multi-agent systems, "multi-agent architectures allow you to break complex tasks into smaller, specialized sub-tasks — each handled by an agent optimized for that specific job." A supervisor agent routes incoming requests to the right specialist, collects results, and returns a unified response. This is the same pattern used by OpenAI's Swarm, Microsoft's AutoGen, and Google's Agentic Framework at scale.
Why n8n Instead of LangChain or CrewAI?
CrewAI and LangChain are powerful but require Python knowledge, API key management, and manual deployment. n8n gives you the same architectural patterns — agents, tools, memory, routing — agents, tools, memory, routing — in a visual drag-and-drop canvas with 400+ pre-built integrations. It's self-hostable (Docker, npm, or their cloud tier), supports OpenAI GPT-4o, Anthropic Claude 3.5 Sonnet, Google Gemini, and local Ollama models, and logs every agent step in its execution history.

As of July 2026, n8n has over 180,000 GitHub stars and is backed by SAP at a $5.2 billion valuation — double the $2.5 billion valuation from its Series C in October 2025. The platform processes millions of workflow executions daily across self-hosted and cloud deployments.
What You Need to Get Started
Before building your multi-agent system, set up these prerequisites:
- n8n instance — Cloud (n8n.io) or self-hosted via Docker (
docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n). Self-hosting is free and recommended for experimentation. - LLM API key — OpenAI, Anthropic, Google Gemini, or a local Ollama instance. This tutorial uses OpenAI GPT-4o, but you can swap any provider by changing one node.
- n8n AI Agent nodes — Built into n8n 1.85+. Verify by checking for "AI Agent" in the node panel.
- A web browser — n8n's editor runs entirely in the browser.
That's it. No Python, no virtual environments, no cloud infrastructure setup beyond the n8n instance itself.
The Architecture: Three Agents, One Supervisor
Here's what we're building:
- Research Agent — Takes a topic, searches the web (via SerpAPI or a custom HTTP tool), and returns a structured summary with key facts, statistics, and source URLs.
- Writing Agent — Takes the research summary and a content brief, then drafts a formatted blog section or article outline.
- Supervisor Agent — Receives a user request, decides which agent(s) to invoke, collects their outputs, merges them, and returns a final result.
This is the supervisor-worker pattern — the most common multi-agent architecture in production for n8n workflow automation AI systems. n8n's sub-workflow node lets each agent live as its own workflow, making them independently testable and reusable.
Step 1: Create the Research Agent
In your n8n instance, create a new workflow called "Research Agent":
Configure the AI Agent Node
- Add an AI Agent node to the canvas.
- Set the Agent Type to Tools Agent — this lets the agent decide which tools to call based on the user query.
- Under LLM, add a Language Model sub-node. Select OpenAI Chat Model, choose GPT-4o, and paste your API key.
- Under Memory, add a Window Buffer Memory sub-node with a window size of 4. This lets the agent retain context across tool calls within a single session.
- Under Tools, add a Web Search Tool (or use an HTTP Request node pointing to SerpAPI or Tavily). Name the tool "web_search" with description: "Search the web for current information on any topic."
Add Output Instructions
In the AI Agent node's System Prompt, paste:
You are a research specialist. Your job is to gather accurate,
up-to-date information on any topic. Use the web_search tool to
find at least 3 different sources. Return a structured summary
with: key findings, relevant statistics, source URLs, and the
publication date of each source. Be thorough — the writing team
depends on your research.
Save the workflow. You now have an independent Research Agent that can be called from other workflows.
Step 2: Create the Writing Agent
Create a second workflow called "Writing Agent":
- Add an AI Agent node, also set to Tools Agent.
- Under LLM, connect an OpenAI Chat Model node (GPT-4o or Claude 3.5 Sonnet).
- Skip the web search tool — this agent writes, not researches.
- Add a Code node or Set node for structure enforcement (optional but recommended).
System Prompt for the Writing Agent
You are a professional tech writer. Given a research summary
and a content brief, produce a well-structured blog section
with: a compelling hook, H2 and H3 headings, bullet points
for scanability, and a clear conclusion. Use plain, direct
language. No hype. No jargon without explanation. Write for
a reader who's curious about AI but may not be a developer.
This agent receives input as JSON: {"research": "...", "brief": "..."}. You can pass data into the workflow via n8n's Workflow Tool node (used by the supervisor).
Step 3: Build the Supervisor Agent
Now create the main workflow — this is your multi-agent orchestrator. Name it "Multi-Agent Supervisor":
- Add a Webhook node as the trigger. This lets you (or your app) send requests via HTTP POST.
- Add a Switch node to route incoming requests based on content type (e.g., if topic contains "analysis" → Research + Writing; if "simple Q&A" → single agent).
- For complex topics: add a Workflow node pointing to "Research Agent" → a Code node to format the output → a Workflow node pointing to "Writing Agent" → output.
Supervisor System Prompt
You are a supervisor agent managing a team of specialist agents.
Analyze the user request and decide which agents to invoke.
- If the request requires research + writing: invoke Research Agent
first, pass results to Writing Agent.
- If the request is a simple generation: invoke Writing Agent directly.
Return the final output with a note on which agents were used.
Connect Everything
To call a sub-workflow as a tool in n8n, use the Workflow Tool node. This node makes any n8n workflow available as a callable tool that the supervisor agent can invoke. Configure it with:
- Workflow ID: The ID of your Research Agent workflow.
- Credentials: None needed (self-hosted); for cloud, ensure sharing permissions.
Add two Workflow Tool nodes to the Supervisor Agent — one for Research, one for Writing. In the Agent's tool list, add both with descriptive names.
Step 4: Test the System
To test your n8n AI agent workflow, send a POST request to your webhook URL with this payload:
{
"topic": "AI coding tools comparison 2026",
"format": "blog_post",
"audience": "developers"
}
Here's what happens:
- The Supervisor receives the request and analyzes it.
- It decides: "This needs both research and writing."
- It calls the Research Agent with the topic, which searches the web and returns a structured summary with facts, statistics, and source URLs.
- It passes the research + your content brief to the Writing Agent.
- The Writing Agent produces a draft blog section.
- The Supervisor collects everything and returns the final result.
n8n's execution history logs every step — you can see exactly which agent called which tool, how many tokens each LLM call consumed, and the full input/output of every node.
Step 5: Add Memory for Multi-Turn Conversations
To make your multi-agent system stateful across multiple user interactions, add a Postgres or Redis memory node to the Supervisor Agent. Window Buffer Memory (the default) only remembers the current session. Postgres memory persists across restarts and is shared between agents, enabling workflows like:
- "Research this topic and write a draft" → user reviews → "rewrite it in a more technical tone" (the agents remember the original research).
- Multi-session research projects where the Research Agent builds knowledge over days.
Avoid Simple Memory in production — it uses an in-memory store that does not survive an n8n restart.
Troubleshooting Common Issues
Agents not calling tools
Check that your Agent Type is set to "Tools Agent" (not "Conversational Agent"). Tools Agents are designed to invoke external tools. Conversational Agents are optimized for chat without tool use.
Sub-workflow errors
Ensure the sub-workflow has a Webhook node as its trigger (for Workflow Tool) or that you're using the Sub-Workflow Execution node introduced in n8n 1.85.
Token limits exceeded
Multi-agent systems compound token usage. Set token limits per LLM node under the "Advanced" section. Use Claude 3.5 Sonnet for long-form writing tasks — it offers a 200K context window, significantly larger than GPT-4o's 128K.
Memory not persisting
Switch from Simple Memory to Postgres or Redis. Simple Memory is fine for demos but does not survive n8n restarts.
FAQ
How is n8n different from LangChain for multi-agent systems?
LangChain is a Python framework for building LLM applications — powerful but requires coding. n8n provides a visual workflow editor with native AI Agent nodes, making multi-agent architecture accessible without development skills. You can use both together: n8n workflows can call LangChain agents via HTTP nodes if needed.
What LLMs can I use with n8n AI agents?
n8n supports OpenAI (GPT-4o, GPT-4-turbo), Anthropic (Claude 3.5 Sonnet, Claude 3 Haiku), Google Gemini (1.5 Pro, 1.5 Flash), HuggingFace inference models, Cohere, Azure OpenAI, and local models via Ollama (Llama 3, Mistral, Phi-3, Gemma). You switch models by swapping one node — no workflow redesign needed.
Can I run this multi-agent system on a budget?
Yes. Self-host n8n on a $5/month VPS with Docker. Use Ollama for local LLM inference with open-source models like Llama 3 8B or Mistral 7B. For cloud LLMs, GPT-4o mini costs about $0.15 per 1M input tokens — a full multi-agent workflow typically uses 5,000-15,000 tokens, costing roughly $0.01 per run.
Conclusion
Multi-agent AI systems are no longer the exclusive domain of AI labs and well-funded startups. With n8n's native AI Agent nodes, you can build a production-ready team of specialized agents — a research agent, a writing agent, and a supervisor that coordinates them — entirely in a visual interface. The supervisor-worker pattern covered in this guide scales from simple two-agent setups to complex, multi-team architectures with dozens of agents, persistent memory, and enterprise integrations.
Try This Project Yourself
Deploy n8n via Docker, create the three workflows above, and send your first request through the supervisor webhook. Once it works, extend the system: add a Social Media Agent that posts drafts, a Data Analysis Agent with Python code execution, or a Translation Agent for multi-language output. The architecture stays the same — you're just adding more specialists to the team.
What's the first multi-agent project you're going to build with n8n? Drop your ideas in the comments — I'd love to feature the best ones in a follow-up post.