Blog · September 21, 2026 · 15 min read

n8n AI Agent: What I Learned Building One

Graphic title card for the article “n8n AI Agent: What I Learned Building One” with a stylised organised inbox.
Grafik: HumanITy

Building an n8n AI agent means connecting six building blocks on a canvas: a trigger that starts the run, the AI Agent node in the middle, a Chat Model node that supplies the language model, at least one Tool node the agent may call, optionally a Memory node for the conversation history, and credentials with which n8n is signed in to your mailbox, calendar, or model provider. The docs put it in one sentence: “Connect a chat model and one or more tools, and the agent decides which tools to call to complete a task.” Add to that a place where it runs: either the vendor's cloud or your own server with updates, backups, and hardening. I ran n8n in my own Kubernetes cluster for a long time and for a while used Claude Code as the trigger for n8n processes. What I learned: the agent is built quickly, the work lies in the workflow afterwards, and that is exactly why my employees are folders today.

My AI agents run as a workforce of fourteen employees, each a folder with a personnel file, rules, and skills, executed by Claude. I did the pricing and hosting comparison between n8n and Make in n8n, Make, or Claude: What For? and will not repeat it here. This post is the n8n tool post from my series Building an AI Employee: Six Ways Compared, and as there I take Frieda's inbox sorting, once thought through as an n8n workflow.

What an AI agent in n8n is: the building blocks

n8n calls agent, model, tools, and memory together a cluster node: a root node in the middle and sub-nodes that extend it. The docs describe the AI Agent node as “an autonomous system that receives data, makes rational decisions, and acts within its environment to achieve specific goals” and require: “You must connect at least one tool sub-node to an AI Agent node.” What the individual parts do, in one table:

Building block What it does per docs What you need for it
Trigger starts the workflow; “All production workflows need at least one trigger” a trigger: schedule, webhook, new email, or the Chat Trigger for chat interfaces
AI Agent (root node) takes input, decides which tool to call, returns the result the instruction to the agent as a system prompt in the node
Chat Model (sub-node) the language model; the docs list nodes for OpenAI, Anthropic, Google, Mistral, Ollama, OpenRouter, and more access to the provider, or a locally running model
Tools (sub-nodes) functions the agent may call; at least one is mandatory one connection per tool: mailbox, calendar, HTTP, another workflow, an MCP server
Memory (sub-node) keeps the conversation history; “Simple Memory” stores it in the workflow data, for persistence there are Redis, Postgres, and others nothing for Simple Memory, a database for the others
Credentials “store authentication information to connect with specific apps and services” created once per service, encrypted in the n8n database

Two things matter here. First, the agent node is not an employee but a node with a system prompt; what it knows about your business sits in that prompt and in what the tools deliver. Second, the docs warn that Simple Memory in queue mode, that is with several workers, “doesn't work in an active production workflow”. If you run the agent permanently, you end up with a database for its memory.

n8n AI agent example: Frieda as a workflow

At my place Frieda sorts the inbox into four piles, Now, Today, Can wait, Trash, plus a judgment pile for everything my rules do not clearly cover. For the Today pile she drafts replies and never sends. The method is in Sorting Your Inbox: The Pile System, the employee is on Frieda, my office employee. This is what she would look like in n8n, as a thought experiment:

  1. Trigger: a mailbox trigger that fires on every new email, or a schedule twice a day.
  2. AI Agent: the three questions and the rule lines from the pile system as the system prompt. That is Frieda's rulebook, copied into a field of the node.
  3. Chat Model: an Anthropic Chat Model node with my API access, or an Ollama node if the model should run locally.
  4. Tools: one that labels an email, one that creates a reply draft, and none that sends. The limit “never sends” is not a rule text in n8n but a tool you simply do not connect.
  5. Memory: none needed for sorting; a Simple Memory for follow-up questions in chat, a database for permanent operation.
  6. Credentials: mailbox and model provider, stored once each in n8n.
  7. Judgment pile: a branch that does not process unclear cases but files them and sends me a message.

That works, and for a mailbox with high volume and fixed rules it works well. What appears on the canvas, though, is a workflow in which Frieda's knowledge is spread across a system prompt, seven nodes, and connections. If I change a rule, I change a node. If I want to give Frieda to someone, I export JSON.

What you operate afterwards: cloud or your own server

The n8n docs are pleasantly honest here. For the cloud version they say: “Fully managed, no setup or maintenance required”. For self-hosting, the same table says: “Requires setup (npm, Docker, or server)”, maintenance “Your responsibility”, and the hosting guides carry a box that says it plainly: “Self-hosting n8n requires technical knowledge, including: Setting up and configuring servers and containers, Managing application resources and scaling, Securing servers and applications, Configuring n8n.” And further: “Mistakes can lead to data loss, security issues, and downtime.”

I did exactly that. n8n ran in my own Kubernetes cluster for a long time, self-operated, and I built processes in it. I like n8n and I am a developer; the work that comes with it is still work, and the docs list it: updates “at least once a month”, check the release notes for breaking changes, take a backup before every update. A complete backup, per docs, consists of the .n8n folder with the config file that holds the encryption key for the credentials, plus the external database if you use Postgres instead of SQLite. Without the key, restored credentials are unusable.

Then there is hardening the server, because the access to mailbox, calendar, and model provider lives on it. At my place Falk, my employee for security testing, checks my own applications in stages and only after written approval; how that works is on Falk, my red teamer. If you do not want to run a cluster, take the cloud version and pay per execution. Both are legitimate; neither is free, not even the Community Edition, because a server and your own time cost money.

Claude Code as the trigger, n8n as the executor

One setup from my n8n days shows where the line between the tools ran for me: for a while I had Claude Code as the trigger for n8n processes. Claude Code decided in conversation with me what needed doing, and then kicked off an n8n workflow that executed the fixed part. The agent with judgment sat in the terminal; the process with fixed steps ran in n8n.

I still consider this split right when both are in place: the workflow does the assembly-line part, an employee with a personnel file does what needs context and decisions. But I also noticed why the workforce should not live in n8n: what Claude Code should trigger and why lived in files with me. How the process ran lived in the workflow JSON. Two places, two formats, and only one of them was text I could read, change, and hand to another model.

Why I use the folder today

Not because n8n could not do something, but because of where my work lives. An n8n agent is a system prompt in a node plus connections; an export is JSON in n8n's format. At my place Frieda is a folder: a CLAUDE.md with task, rules, limits, files, and approvals, plus skills as Markdown and a mailbox for handovers. What that file looks like word for word is in CLAUDE.md: Claude Code's Memory, and what skills are is in Claude Skills: How to Create and Use Them.

Three things follow from that for me. First, I can read the file without opening a tool, and I change a rule by changing a sentence. Second, everything sits locally with me as files, in an Obsidian vault, not in a database whose key I have to back up. Third, the fallback plan: if I cannot or do not want to use Claude, I switch to Codex or to OpenCode with local models, and they work on the same files. Within the Claude family I switch the model via /model; across vendors I switch the tool, and according to its docs Claude Code also reads AGENTS.md, the format other coding agents use.

To be fair: n8n is more convenient at switching models. There you swap the Chat Model sub-node and the logic stays, with nodes for many providers and for Ollama locally. In Claude Code I only choose between Claude models. I have the more portable files, n8n has the freer model switch; if you need the second, do not trade it for the first.

Five checkpoints: n8n and folder side by side

Checkpoint n8n (per docs) Folder plus Claude (at my place)
What you operate afterwards a cloud instance or your own server with updates, backups, hardening; inside it workflows, credentials, a database a folder of Markdown files, a Claude subscription, in my case Claude Code
How it is billed cloud per execution, tiered by plan; self-hosted without a license fee, but with a server and your own time one subscription for everything; amounts in Claude Pricing and Plans Explained
What happens when you switch models swap the Chat Model sub-node, the workflow stays; many providers, also local /model within the Claude family; across vendors a different tool on the same files
Where your work lives in nodes, connections, and system prompts; export as JSON in files you can read without n8n and without Claude
When it is the right choice fixed processes with volume, triggers without humans, local models, model mix tasks that need context and judgment, one to a few people, employees that should belong to you

When n8n wins

I like n8n, and there are three cases in which I would prefer it to a folder.

  1. Fixed processes with volume. Form in, row into the sheet, email out, a thousand times a month: that is a workflow, and n8n bills per execution “regardless of complexity”. An employee with a language model is more expensive and less predictable for that.
  2. Triggers without humans. An n8n workflow starts by webhook, schedule, or app event and runs around the clock. An employee in Claude Code needs a start, which at my place is deliberate, because my approval gate sits in front of every effect on the outside world; where that line runs at my place is in What Can an AI Lead Role Decide?. If you do not want the start, n8n is the right place.
  3. Local models and model mix. If you want to run a model on your own hardware via Ollama or combine two providers in one process, n8n gives you that as a sub-node.

And the fourth case is the one I had myself: both. An employee with a personnel file decides, an n8n workflow executes the fixed part. If you want to build that split, you are not alone with it: bring your process to the community, to a call or a post, and we look at it together.

Frequently asked questions

Does n8n require programming skills?

Not for a first agent: you connect trigger, agent, model, and tools with the mouse, and the instruction is text. As soon as data has to be reshaped between nodes, expressions and JSON come in, and at the latest with self-hosting the docs call for knowledge of servers, containers, and hardening.

How do I give an n8n AI agent memory?

Through a Memory sub-node. Simple Memory stores the conversation history in the workflow data per docs and is the easiest start; for permanent operation with several workers the docs name Redis, Postgres, and other services. Rules and experience, the things that sit in the personnel file at my place, belong in the system prompt and attached files instead.

Which tools can an n8n AI agent use?

Everything connected as a tool sub-node: app nodes such as mailbox or calendar, HTTP requests, other workflows, code, and per docs also MCP servers. At least one tool is mandatory. What the agent does not get as a tool it cannot do, and that is exactly how you build limits: Frieda gets a tool for drafts and none for sending.

Can I use n8n with Claude as the model?

Yes, per docs there is an Anthropic Chat Model sub-node you attach to the agent node; for that you need API access at Anthropic. That is a different billing from a Claude subscription: per token via the API instead of a fixed monthly amount.

Learning n8n: where do I start?

n8n has its own learning paths with exercises, quizzes, and a certificate per docs. My advice: do not start with the course but with a real task like the sorting above, and look things up where you get stuck. We do that on your own task in the calls of my community.

Where to go from here

If your task is an assembly line, build it in n8n along the list above, in the cloud or on your own server. If it needs context and judgment, start with the folder: Creating an AI Employee: How to Start shows the process, and I wrote down the whole idea behind it in Building AI Agents Without Code: My Way. How the same question turns out with a platform for organizations is in Langdock vs Claude: What I Use and Why.

In the calls of my community we rebuild your Frieda in your tool, in n8n or as a folder, and you see the difference on your own task: Claude Practitioners.

Kevin Welter

Kevin Welter

Developer, IT architect, author of technical books (Kubernetes, cloud infrastructures) and speaker. Runs his business with an AI workforce of fourteen AI employees and shows solo business owners in his community how to hire their first AI employee.

More about AI employees

Your first AI employee up and running within an hour

Join the community