⚡ Quick verdict

We may earn a commission if you buy through our links, at no extra cost to you.

n8n is the automation platform that AI-agent builders graduated to. It started as an open-source Zapier alternative, but its AI support is now its headline feature: a dedicated AI Agent node with tool-calling, memory, and several agent types, sitting inside a visual workflow canvas where every other node — HTTP requests, code, databases, 400+ app integrations — becomes a tool the agent can use. That combination is why n8n dominates "build your own AI agent" tutorials in 2026.

This is a researched setup guide, not a live lab test. Every step below is verified against n8n's official documentation, its AI-agent tutorials, and current setup guides from September 2026 (sources at the bottom). UI labels shift a little between n8n versions, so if a button says "Create workflow" instead of "New workflow" on your screen, you're in the right place. Where pricing appears, treat it as a snapshot and confirm at n8n.io/pricing before buying.

What you'll need

Step 1: Get n8n running — cloud or self-hosted

You have two honest options. n8n Cloud is the path of least resistance: go to n8n.io, click "Get started free," sign up with your email, and you land in the workflow editor with a 14-day trial on cloud plans. No server to manage, no Docker, no certificates. Start here unless you have a reason not to.

The self-hosted route is free forever under n8n's fair-code (Sustainable Use License) Community Edition, with unlimited workflow executions. The verified quick path from current setup guides is a single Docker command:

docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n

Then open http://localhost:5678 in your browser and create your owner account. The trade-off is yours: cloud costs money but removes infrastructure; self-hosting costs nothing but makes you the sysadmin. For a first agent, cloud wins.

Step 2: Create a workflow and add a trigger

Click the create/new workflow button in the top right — you'll get an empty canvas with a trigger prompt. Every workflow needs a starting point, and for an AI agent you want one of three:

Select "Add first step," search for Chat Trigger, and add it — defaults are fine for testing. (Thinking production already? The Webhook trigger gives you a URL callable from your site, a form, or a chat widget.)

Step 3: Add the AI Agent node

Hit the add-node connector on the trigger, search for AI Agent, and connect it. The key choice is the agent type:

Start with Tools Agent. The honest insight from n8n's docs: simpler tasks often don't need an agent at all (a plain LLM chain is cheaper), while content-heavy or multi-tool tasks are where agents earn their keep.

Step 4: Connect a chat model (the agent's brain)

The AI Agent node has sub-node inputs for model, memory, and tools. Click the + on the model input and add an OpenAI Model node. When it asks for credentials, open Credentials → Add credential and add your OpenAI API key — credentials live separately from workflows, so never paste secrets into prompts or nodes.

No OpenAI key? Anthropic and Gemini credentials work the same way, and Ollama covers local models. While iterating, use a cheap fast model — you'll burn dozens of test calls.

Step 5: Give the agent tools (its hands)

An agent without tools is just a chatbot. Click the + on the tool input and attach what your agent actually needs — each tool becomes something the agent can call while it works:

The discipline: add only the tools the task needs. Every extra tool is another decision the model can get wrong, and every tool call is another step in the billed loop. Start with one or two, watch the agent's reasoning in the execution log, and add more only when it demonstrably needs them.

Step 6: Add memory so it remembers the conversation

Without memory, every chat message is a fresh stranger. Click the + on the memory input and add Simple Memory — a window buffer that keeps the last N messages as context. Set the context window to something modest (5–10 messages) to start; longer memory is better conversation at the cost of more tokens per call. For persistent memory across sessions, n8n supports vector stores and database-backed memory, but Simple Memory is the right default for a first agent.

Step 7: Set guardrails — system prompt and loop limits

Two settings separate a demo from something you can trust. First, write a real system prompt: who the agent is, what it's allowed to do, what it must never do, and the answer format you want. "You are a helpful assistant" is not a system prompt — a good one names the role, the tools, and the boundaries.

Second, set a max iterations limit so the agent can't spin forever if it gets confused — five to ten cycles is sane for simple agents. This is the cheapest insurance you'll ever buy: one stuck agent in a loop burns your LLM budget while you sleep.

Step 8: Test in the chat window, then activate

With the Chat Trigger in place, n8n gives you a chat window inside the editor. Talk to your agent: ask it things you know the answers to, try to confuse it, and watch each execution in the log to see which tools it called. When the output is wrong, fix in this order: (1) tighten the system prompt, (2) fix the tool descriptions, (3) reconsider the tool set, (4) change the model.

Once it behaves reliably, save the workflow and toggle it active. On recent n8n versions, workflows sit in draft mode until you explicitly publish/activate them — a welcome safety net. From here, swap the Chat Trigger for a Webhook or Schedule trigger for production, and watch the Executions view for the first few days.

What it costs

n8n bills per workflow execution — one full run counts as one, no matter how many nodes it touches. That's a genuinely agent-friendly model: a 20-node agent run costs the same as a 2-node one, unlike Zapier and Make where every step burns usage. The catch: your LLM API calls are billed separately by the model provider, and an agent looping through tools can make a lot of them.

PlanPriceExecutions / monthBest for
Community (self-hosted)FreeUnlimitedDevelopers comfortable running a server
Starter~€24/mo2,500Freelancers, first agents
Pro~€60/mo10,000Growing teams, real workloads
Business~€800/mo40,000Mid-size companies, SSO/Git
EnterpriseCustomCustomLarge organizations
Community (self-hosted)
Price
Free
Executions
Unlimited
Best for
Developers comfortable running a server
Starter
Price
~€24/mo
Executions
2,500 / month
Best for
Freelancers, first agents
Pro
Price
~€60/mo
Executions
10,000 / month
Best for
Growing teams, real workloads
Business
Price
~€800/mo
Executions
40,000 / month
Best for
Mid-size companies, SSO/Git
Enterprise
Price
Custom
Executions
Custom
Best for
Large organizations

Pricing snapshot from September 2026 reporting — confirm current figures at n8n.io/pricing. Cloud plans include a 14-day free trial; paid plans add unlimited users and unlimited active workflows.

Next steps

Once your first agent runs reliably: swap the trigger to a Webhook so your site or app can call it; go multi-agent with the Workflow Tool — an orchestrator delegating to specialist workers; start from a template in n8n's library; and add observability — our LLM observability tools roundup covers tracing agents in production. Prefer code over canvas? See our Claude Agent SDK guide; want the no-code route? Our Make AI agents guide. If a managed platform fits better than self-hosting, see our AI chatbot builders comparison.

Frequently asked questions

Do I need to code to build an n8n AI agent?

No. A basic agent is point-and-click: Chat Trigger, AI Agent node, a chat model, a few tools, and memory. You only need code — JavaScript or Python in the Code node — when you want custom logic the ready-made nodes don't cover.

How much does running an n8n AI agent cost?

n8n's self-hosted Community Edition is free with unlimited executions — you only pay for the server. Cloud plans start around €24/month for 2,500 executions. Your LLM API usage is billed separately by the model provider. Treat figures as a snapshot and confirm at n8n.io/pricing.

What's the difference between Tools Agent and the other n8n agent types?

Tools Agent is the default all-round type — the model decides which tools to call. Conversational Agent focuses on dialogue, ReAct Agent does explicit reason-and-act loops for complex reasoning, and Plan and Execute Agent plans first then executes. Start with Tools Agent.

Can I self-host n8n for free?

Yes. The Community Edition is free under n8n's fair-code license with unlimited workflow executions. The verified quick path: docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n, then open http://localhost:5678 and create your owner account. You pay only for the server.

Which AI model should I use with n8n?

OpenAI models are the most documented path — add an OpenAI credential and pick a chat model. Anthropic and Gemini credentials also work, as do local models via Ollama. Any model supporting tool calling works with the Tools Agent; use a cheap fast model while iterating.

Is n8n better than Make or Zapier for AI agents?

For technical users, yes: native AI agent nodes, full code access, local-LLM support, and per-execution billing make n8n the strongest agent platform of the three. Make is easier to learn; Zapier is simplest but bills per step, which gets expensive for agent loops.

Sources

AT
About Aitopkit

We research AI tools in depth before recommending them — official pricing, public docs, and real user reports. If you buy through our links we may earn a commission at no extra cost to you. Read our disclosure.