Quick answer You can build a basic AI agent in n8n without writing code by connecting a Chat Trigger, an AI Agent node and a chat model, then adding memory and tools. Test it in n8n's built-in chat window. n8n's Community edition is free to self-host, and n8n Cloud offers a 14-day free trial. What an AI agent is A normal workflow follows fixed steps. An AI agent is a workflow in which a language model decides what to do next, such as which tool to call, based on your instructions and the conversation. One tutorial describes an agent as having four parts: a model, a prompt, tools and an output. What you need before you start An n8n account or install. n8n Cloud has a 14-day free trial with limits on executions. The Community edition is free to self-host, but you pay for your own server. An API key for a chat model. n8n's tutorial uses OpenAI, and other providers also work. Some providers offer a free tier, so check current limits and costs. A simple goal. For example, an assistant that answers questions about your course notes or helps you draft emails. Keep in mind that every message sent to a Chat Trigger runs your workflow, so each message counts towards your execution allowance. Step by step Create a workflow and add a Chat Trigger node. This gives you a chat box to talk to your agent. Add an AI Agent node and connect it to the Chat Trigger. n8n's current agent type is the Tools Agent, which replaced the older OpenAI Functions Agent. Attach a chat model to the agent, such as OpenAI, and add your API key as a credential. Test it in the built-in chat window with a simple message, and check that you get a reply. Edit the system prompt to tell the agent its role, tone and limits, for example to answer in simple English and to say when it is not sure. Add memory so it remembers the conversation. The Simple Memory option uses n8n's own memory and is usually enough for a first agent. If you want the chat to reload earlier messages, connect the same memory to both the Chat Trigger and the agent. Add a tool so the agent can do something, such as search the web or create a Google Calendar event, as the freeCodeCamp tutorial does. Check the execution log in n8n to see what the agent did at each step, then adjust the prompt. The official tutorial is older than some of n8n's recent updates, so button names may differ slightly. Follow the labels you see on screen. Common beginner mistakes Writing vague instructions, so the agent behaves unpredictably. Adding many tools at once. Start with one and add more when it works. Forgetting that model calls cost money. Watch your usage while you test. Trusting every answer. Agents can be wrong, so check results before you act on them. Typing API keys into the workflow itself. Use n8n's credentials instead. Where to go next Once your first agent works, give it a real job, such as sorting incoming emails or answering questions from a document, and add one tool at a time. If you want guided practice with workflow automation, take a look at our n8n Automation certification. Frequently asked questionsDo I need to know coding to build an AI agent in n8n?Not for the basic steps above. You connect nodes and fill in settings. Coding becomes useful later if you build more advanced workflows.Is n8n free?The Community edition is free to self-host, with your own server costs. n8n Cloud is paid after the 14-day trial.Which chat model should I use?Any supported model works for learning. Compare answer quality and cost, and start with a model that has a free or low-cost tier.What is the difference between a workflow and an agent?A workflow runs the same steps every time. An agent lets a model decide which tools to use and in what order.Why does my agent forget what I said?You probably have not connected memory yet. Add a memory node to the agent, and connect the same memory to the Chat Trigger if you want earlier messages to reload. Sources Plans, trial terms and screens were checked in November and change often. Confirm them in n8n before you start. n8n Docs, Tutorial: Build an AI workflow in n8n: docs.n8n.io/advanced-ai/intro-tutorial/ n8n Docs, Chat Trigger: docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.chattrigger n8n Docs, Tools Agent: docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/tools-agent n8n Docs, How memory works: docs.n8n.io/build/integrate-ai/understand-ai-components/how-memory-works n8n Docs, Choose how to use n8n: docs.n8n.io/choose-how-to-use-n8n n8n, Plans and pricing: n8n.io/pricing/ freeCodeCamp, How to build AI workflows with n8n: freecodecamp.org/news/how-to-build-ai-workflows-with-n8n/ Hostinger, How to build an AI agent with n8n: hostinger.com/tutorials/how-to-build-ai-agent-with-n8n/ How TGC can help Want to go further? Our n8n Automation Certification turns this into hands-on skills, with projects and mentor feedback at every step. Explore the course