Kavvo Agents

n8n First Agent Tutorial

November 29, 2026 · 5 min read · By the Kavvo Agents team

What you will build

In this tutorial you will build a small order-status assistant in n8n. A user asks about an order in a chat panel, the agent looks up the order with a tool, and it replies with the status. You will use four nodes on a canvas: a Chat Trigger, an AI Agent node, a chat model, and at least one tool, plus Simple Memory so the agent remembers the conversation.

This tutorial follows n8n’s official docs. In n8n’s own words, you connect a chat model and one or more tools to the AI Agent node, and the agent decides which tools to call to complete a task. You must connect at least one tool sub-node. From n8n version 1.82 onward, every AI Agent node works as a Tools Agent — the older agent-type dropdown is gone, and the docs say the older types will be removed in n8n 3.0.

What you need

You need an n8n instance and an API key for a model provider, such as OpenAI or Anthropic. You can use n8n Cloud, which offers a free trial — check the official pricing page for current terms — or self-host the Community Edition. n8n now recommends Docker Compose for new installs, and n8n 3.0 runs only in Docker. Check the official docs for current install steps before you start.

You also need a tool the agent can call. For this tutorial, start with a safe, read-only tool: the Wikipedia Tool for facts, or an HTTP Request Tool that calls a public API. Do not connect a tool that changes data until the agent works.

Step 1: Create a workflow and add a Chat Trigger

Open n8n and create a new workflow. Add a Chat Trigger node as the first step. The Chat Trigger gives you a built-in chat panel inside the editor, which is the fastest way to test an agent while you build it. You can swap the trigger later — for Slack, a webhook, or a custom UI — and keep the agent cluster.

Save the workflow. The Chat Trigger needs an agent or chain connected after it, which is the next step.

Step 2: Add the AI Agent node

Add the AI Agent node after the Chat Trigger and connect it. The AI Agent node is a root node: on its own it does nothing. You plug sub-nodes into the connectors along its bottom edge, and each one gives it a different ability. Leave the prompt setting on its default when you use a Chat Trigger, so the agent reads the user’s text from the chat input field.

Write a short system message for the agent. For this tutorial, try: “You are an order-status assistant. When a user asks about an order, use the available tool to look it up, then reply with the order status in one short paragraph. If you cannot find the order, say so clearly and ask for the order number. Do not invent an order status.” Keep the message short and specific.

Step 3: Connect a chat model

Click the Chat Model connector under the AI Agent node and add a model node, for example the OpenAI Chat Model or the Anthropic Chat Model. Add your API credential for that provider when the node asks for it, and pick a current chat model. This is the brain: without it, the agent cannot plan or reason.

Step 4: Connect at least one tool

Click a Tool connector under the AI Agent node and add a tool. n8n requires at least one tool sub-node. Start with the Wikipedia Tool, which is simple and read-only, or an HTTP Request Tool that calls a public API you control. Give the tool a clear name and description, because the model picks tools by name and description. A vague name such as “doStuff” will lead to wrong choices.

Step 5: Add memory

Attach Simple Memory to the Agent’s memory slot. Set its session key to the Chat Trigger session ID, so the agent remembers earlier messages in the same conversation. Without memory, the agent will treat every message as a new conversation, and it will not remember what the user already told it.

Step 6: Test the agent

Open the chat panel and ask a question that should trigger the tool, for example: “What is the capital of France?” if you used the Wikipedia Tool, or a question about your public API if you used an HTTP Request Tool. Watch the run: the agent should think, call the tool, read the result, and reply using it.

Test three more times: ask a follow-up question that needs memory, such as “And what about its population?”, ask a question the tool cannot answer, and ask a question that is unclear. For each test, check whether the agent called the right tool and whether the answer used the tool’s result. If the agent answers without calling a tool, the tool’s description may be unclear, or the system message may not tell it to use the tool.

Step 7: Make it real, carefully

When the test agent works, replace the demo tool with a real one, such as an HTTP Request Tool that calls your order system. Test it with a real order number, then with a number that does not exist, and check that the agent says it cannot find the order instead of inventing a status.

Only then replace the Chat Trigger with a real trigger, such as a webhook, and activate the workflow. Remember that every message to a Chat Trigger executes the workflow, so a long chat uses many executions on a paid plan — check the official pricing page for current limits. Add a Max Iterations cap — the default is 10 — and keep a person in the loop for any action that cannot be undone.

Sources