Home › n8n lesson 2: Your first AI agent
n8n lesson 2: Your first AI agent
The AI Agent node lets a chat model decide which tools to call to complete a task. You connect a trigger, a model, at least one tool and, usually, memory.
Step by step
- Create a workflow and add a Chat Trigger.
- Add an AI Agent node and connect the trigger to it.
- Attach a chat model sub-node (with credentials for the model provider you use).
- Attach at least one tool sub-node; the agent needs one to run.
- Add a memory sub-node so it remembers the conversation, and set a system message describing its role.
- Open the chat panel and test it.
Try it: example prompts
- System message
You are a helpdesk assistant for a small office. Answer only from the tools you have. If you are unsure, say so and suggest emailing IT.
Good to know
- A Chat Trigger must connect to an agent or chain root node.
- All AI Agent nodes now work as a Tools Agent; update old v1 nodes, which will be removed in n8n 3.0.
- You can connect MCP servers as tools.
Sources (official pages, read Oct 27, 2026)
Written from the vendor's official documentation; we don't run hands-on tests. Menus and features vary by plan, country and device.