"AI agent" has become a catch-all term. In this tutorial it means something specific: a program that receives a request in plain language, decides on its own which tools to use (read a price list, look up a piece of information) and returns a result that you review. If you first want to see what an agent can do in a small company, start with my AI agent use cases for business.
Here we get practical with n8n, an automation tool where you connect blocks with the mouse. The running example is a quote assistant for a trade business. It asks the client the right questions, checks the price list and drafts a quote. It sends nothing on its own: you approve it.
What will the AI agent we build actually do?
Take a painting contractor who gets requests every week along the lines of "how much to repaint a living room?". To price the job, the same details are almost always missing: wall area, condition of the walls, ceilings or not, preferred timing. The quote assistant handles that collection work:
- it asks for the missing details, one or two at a time;
- it reads the company's price list (a spreadsheet);
- it drafts a quote with line items and the assumptions it made;
- it clearly flags what it doesn't know and what needs a site visit.
The draft goes to you, not to the client. That's the rule I apply to any first agent: it prepares, a person decides.
| n8n building block | Role | Starting setting |
|---|---|---|
| Chat Trigger | Receives the person's messages | Chat not public while you build |
| AI Agent | The coordinator that decides what to do | Prompt taken from the previous node, system message filled in |
| Model (e.g. Anthropic Chat Model) | Understands and writes | Low temperature, capped answer length |
| Simple Memory | Remembers the current conversation | About ten exchanges |
| Tool (e.g. Google Sheets) | Reads the price list | Read only |
What do you need before you start?
- Access to n8n. Either the cloud version (n8n offers a trial with no credit card) or a self-hosted version on your own server. I compare the options in n8n vs Make vs Zapier.
- An API key from a model provider (Anthropic, OpenAI or another). You create it in the provider's console. Keep it in n8n's credentials manager, never in a shared document.
- A clean price list: one row per service, with the unit (square meter, hour, flat fee) and the price. If that list only exists in your head, the agent won't do better than you: that's the real first job.
- 10 to 20 real requests received in recent months, anonymized. You'll use them for testing.
How do you build the agent in n8n, step by step?
Button and option names come from n8n's interface and its official documentation (checked on October 17, 2026). They may change between versions.
- 01
Create an empty workflow
In n8n, create a new workflow and name it ("Quote assistant"). On screen: a large empty canvas with a button to add a first node.
- 02
Add the chat trigger
Add the Chat Trigger node. Leave Make Chat Publicly Available off: while it's off, the chat is only reachable from the editor, for your own tests. A chat button appears at the bottom of the screen.
- 03
Add the AI Agent node
Connect the Chat Trigger to an AI Agent node. Under Prompt, pick "Take from previous node automatically": the agent receives the typed message directly. Three connectors appear under the node: Chat Model, Memory and Tool.
- 04
Connect the language model
On the Chat Model connector, add for example Anthropic Chat Model, create the credential with your API key and choose a model. In the options, lower Sampling Temperature (the higher it is, the more answers vary and the higher the risk of made-up content) and set Maximum Number of Tokens to cap answer length. The Prompt Caching option caches the instructions and history for 5 minutes or 1 hour, which lowers the cost of long conversations.
- 05
Add memory
On the Memory connector, add Simple Memory. The Context Window Length setting controls how many previous exchanges the agent keeps in mind. Without memory, it would forget the wall area you just gave it with every new message.
- 06
Give the agent a tool
n8n's documentation is clear: you must connect at least one tool to an AI Agent node. Here, on the Tool connector, add a node that reads your spreadsheet (Google Sheets, for example), read only, on the price list tab. Give the tool a clear name and description: "price_list: returns services, their unit and their price before tax". That description is what tells the agent when to use it.
- 07
Write the system message
In the AI Agent options, open System Message and paste the instructions (template below). Keep Max Iterations at its default value (10) at first: it limits how many rounds the agent can take before answering.
- 08
Send the draft to yourself
After the agent, add a step that hands you the draft: a row in a "Quotes to review" sheet or an email to your own address. No sending to the client at this stage.
What should go in the agent's system prompt?
The instructions are what makes the difference. They tell the agent who it is, what it must collect, what it may not do and what shape the result takes. Here is a starting template I wrote for the painter example, to adapt to your trade:
You are the quote assistant for Martin Painting. Your job: collect the information needed to prepare a draft quote for interior painting, which the owner will review before anything is sent.
Information to collect: type of room, wall area in square meters (or room dimensions), ceilings included or not, wall condition (good, cracks, wallpaper to remove), preferred timing, postal code. Ask one or two questions at a time, no more.
For prices, use only the price_list tool. Never invent a price, a discount or a deadline. If a service is not in the list, write "to be priced by the owner".
Make no promises to the client: tell them the owner checks the quote and will get back to them. If the request is out of scope (emergency, dispute, specialist technical question), offer a callback.
When you have everything, return a structured draft: contact details, line items (service, quantity, unit, unit price before tax), assumptions made, points to check on site.
Three things matter in this text: the ban on inventing prices, the single source of truth (the tool), and the escape route to a person. Without them, a language model fills gaps with plausible numbers, which is the worst outcome for a quote.
Which tests should you run before going live?
Using the chat button in the editor, replay your real requests one by one and write down the result. Here is the grid I recommend:
| Case to test | What the agent should do | Warning sign |
|---|---|---|
| Complete request | Read the price list and return a draft | A price that isn't in the list |
| Vague request ("how much for a living room?") | Ask for the missing details | A price given without a wall area |
| Service not in the list | Write "to be priced by the owner" | An invented amount |
| Discount request | Refer to the owner | A promised discount |
| Off-topic question | Politely steer back | A long unrelated answer |
Turn on Return Intermediate Steps during testing: you'll see when the agent called the tool and what it took from it. Each mistake gets fixed in the instructions, in the tool description or in the price list itself. Repeat until the whole set passes.
Only then, go back to the Chat Trigger: turn on Make Chat Publicly Available, choose Hosted Chat (the chat page provided by n8n) or Embedded Chat (to put it on your website), set Authentication (None, Basic Auth or n8n User Auth) and write the first message in Initial Message(s). That first message should say the person is talking to an automated assistant. If you serve people in the EU, the AI Act (Regulation (EU) 2024/1689, Article 50) requires telling people they are interacting with an AI unless it's obvious.
How much does an AI agent built with n8n cost?
Two cost items, to check on the day you read this:
- n8n. On its pricing page, checked on October 17, 2026, the Starter plan was listed at €20 per month and the Pro plan at €50 per month, billed annually, with 2,500 and 10,000 workflow executions respectively. A self-hosted version is available on GitHub: you then pay for and maintain the server.
- The language model. You pay for the volume of text processed, counted in "tokens". On Anthropic's pricing page, checked the same day, Claude Haiku 5.5 costs $0.10 per million input tokens and $0.50 per million output tokens (for requests up to 100,000 tokens). Sample calculation, based on an assumption you should replace with your own numbers: a conversation that sends 10,000 tokens in total and receives 1,000 costs $0.001 + $0.0005, so $0.0015.
The full calculations, with several cases and models, are in how much does an AI agent cost for a small business.
What are the limits, and when shouldn't you do it alone?
- Simple memory has limits. n8n's documentation states that Simple Memory doesn't work in production if your instance runs in "queue mode" (several worker processes). For serious use, you need memory stored in a database.
- The model can be wrong, even with good instructions. Hence the draft reviewed by a person, and a log of every conversation.
- Personal data (client name, address, phone) passes through n8n and the model provider. Check the provider's terms, where your data is hosted and how long it's kept.
- Real channels (WhatsApp, email, phone) take more work than n8n's chat: accounts to verify, each platform's own rules. I cover the WhatsApp case in how to build a WhatsApp AI agent with n8n.
Doing it yourself makes sense for a first internal trial. I suggest getting help when the agent has to talk to your clients, handle sensitive data or connect to several tools (CRM, calendar, quoting software). That's what I build in my custom AI agent projects, including the n8n setup when needed. If you want to know what your case would look like, book a 30-minute call.
Sources checked on October 17, 2026
- n8n, Chat Trigger node documentation
- n8n, AI Agent node documentation and its options
- n8n, Anthropic Chat Model node documentation
- n8n, Simple Memory node documentation
- n8n, pricing page
- Anthropic, API pricing
- Regulation (EU) 2024/1689 on artificial intelligence
Frequently asked questions
Can you build an AI agent for free?
Almost. n8n offers a trial of its cloud version and a self-hosted version available on GitHub, but you still pay for the server. The language model is billed by the volume of text processed: for a small volume the bill stays low, but not zero.
Do you need to code to build an AI agent with n8n?
Not for a first agent: everything is done by connecting nodes and filling in fields. The useful skills are elsewhere: writing precise instructions, preparing clean data and testing methodically.
What is the difference between an AI agent and a chatbot?
A classic chatbot follows a script written in advance. An AI agent receives a goal and decides which tools to use, for example reading a price list before answering. It's more flexible, which is exactly why it needs guardrails.
Which language model should you pick for a first agent?
Start with a fast, low-cost model, and move to a more capable one only if your tests show reasoning mistakes. The choice matters less than the instructions and the quality of the data the agent reads.
Can an AI agent send quotes on its own?
Technically yes, but I advise against it at first. A quote commits your business: the agent drafts it, you review it and you send it. You can loosen this later for simple cases, once the agent has proven itself.