AI Agent Architectures: The Ultimate Guide With n8n Examples
8 AI Agent Configurations. 9 Best Practices. 11 Agent Prompting Principles. 3 Agentic RAG Architectures. No Coding.
Hey, Paweł here. Welcome to the premium edition of The Product Compass Newsletter.
Every week, I share actionable tips, templates, resources, and insights for PMs.
This is the #1 AI PM newsletter for those who want to quickly learn by doing rather than listening or studying theory. No coding.
Here’s what you might have recently missed:
Consider subscribing or upgrading your account for the full experience:
2025 is the year of AI agents.
I see many abstract agent architectures on social media. But no one explains how to build them in practice.
So, here's a complete guide with examples prepared in n8n. It will help you learn by doing.
We discuss:
Five Single AI Agent Architectures
Three Multiple AI Agents Architectures
🔒 Nine Best Practices When Building AI Agents
🔒 Eleven AI Agent Prompting Principles
🔒 Three Essential Agentic RAG Architectures
We don’t discuss:
Fancy terms to memorize
Things irrelevant when working on AI products
Let’s dive in!
1. Five Single AI Agent Architectures
A picture is worth a thousand words. I prepared 5 configurations you can analyze:
AI Agent using tools (based on a chat message, it can plan its actions: access my contacts, send emails, or send invitations)
Mixing tools with MCP servers (initialized by another app through a webhook with an MCP server for Atlassian and ready-to-use tools for other interactions)
Agentic workflow with a router (a fancy name for a condition)
AI Agent with a human in the loop (asking for a Slack approval)
Dynamically calling other agents (an agent autonomously decides whether it needs to call another AI)
Posts with step-by-step examples:
J.A.R.V.I.S. for PMs: Automate Anything with n8n and Any MCP Server (here, I also explained how to install a free n8n locally and in the cloud)
You can download the above configurations as a single n8n workflow template here:
Enjoy this post? Why don’t you share it with others?
2. Three Multiple AI Agents Architectures
Selected configurations you can analyze:
AI Agents working sequentially (the first agent reads my contacts to clarify the prompt, another one sends an email to the identified person)
Agents’ hierarchy with parallel execution and shared tools (Twilio)
Agents’ hierarchy with a loop and shared RAG (they perform search in parallel, next the data is merged)
You can download the above configurations as a single n8n workflow template here:
3. Nine Best Practices When Building AI Agents
Here’s what works best for me:
Best practice 1: Add memory so the agent can track its progress
When building agentic workflows, the first thing we often want to do is to ask the agent to prepare a plan. For non-reasoning models to follow it, you need to add a memory.
I encourage you to review the “Simple Memory” node configuration in n8n. It can be shared between user requests and even between agents.
Best practice 2: Use a loop to better control complex processes
I have found that for complex agentic workflows, creating a loop with a direct split of responsibilities works much more reliably than asking a single agent to plan, perform the work, and inspect its progress.
Best practice 3: Suggest common tool usage patterns
Some MCP servers offer dozens of tools that need to be executed in a specific order. I have found that in those cases default tool descriptions are often not enough.
An example agent with multiple tools:
Instructing the agent how to use Trello:
Keep reading with a 7-day free trial
Subscribe to The Product Compass to keep reading this post and get 7 days of free access to the full post archives.