L

Learn AI

Track progress · learn offline

Open

Lesson 4 of 6

The AI Agent node

7 min read

Most nodes do exactly one fixed thing. The AI Agent node is different — you give it a goal and some tools, and it decides what to do.

A node that decides

The AI Agent node is n8n's brain-in-a-box. You attach three things to it: a model (the reasoning engine), some [tools](glossary://tool-use) (things it can do — search the web, query a database, call another workflow), and a memory (so it recalls the conversation so far). Give it a goal, and it reasons about which tool to use, uses it, looks at the result, and keeps going until it's done.

An agent node isn't one fixed step — it's a small loop that chooses tools and adapts, all inside your workflow.

Tools and memory

Tools are what make the agent useful beyond chatting — each one is a power you plug in, like a search, a calculator, or a lookup in your own data. Memory lets it hold the thread: ask a follow-up and it remembers what you said two messages ago. Together they turn a text generator into something that can actually get a job done.

Tools give the agent reach (things it can do); memory gives it continuity (what it recalls). Both attach to the one node.

An agent that can act can also act wrongly. Keep a human in the loop for anything that spends money, sends a message, or can't be undone — n8n lets you add an approval step for exactly this.

The shape of it

You attach a 'search my company docs' tool and a memory to an AI Agent node. What can it now do that a plain text node can't?

Continue in the app

Take the whole n8n for AI course — tracked

Get your personalized path, progress and streaks in the app — this lesson and every next one, in order.