n8n Tutorial: How I Teach Beginners to Build AI Agents (No Code)

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this tutorial, Bart Slodyczka walks beginners through the process of building their first AI agent using n8n, a no-code automation tool. The video covers the basics of AI agents, the components necessary for building one, and provides a hands-on demonstration. Viewers learn to set up a customer support AI agent with specific instructions, integrate it with tools like Shopify, and manage inputs and outputs. The tutorial also delves into integrating a chat model for the agent's brain, setting up API calls, and adding memory for better context understanding. Overall, the tutorial offers a comprehensive guide to constructing versatile AI agents.

      Highlights

      • Bart introduces AI agents and their role in automating tasks with n8n. 🤖
      • A thorough breakdown of essential components for building AI agents. 🛠️
      • Creating a customer support AI agent integrated with Shopify. 📦
      • Transition from traditional automation to intelligent AI solutions. 🌐
      • Step-by-step creation of an AI agent on a blank n8n canvas. 🎨
      • Detailed explanation of integrating OpenAI GPT models for decision making. 🤯
      • Incorporation of memory into AI agents for sustained conversation. 🔁
      • Practical tips for configuring API calls in AI workflows. 🛠️
      • Conclusion with motivational advice to build successful AI agents. 👍

      Key Takeaways

      • Learn to build AI agents without coding using n8n! 🚀
      • Understand the essentials: AI agent's brain, instructions, and tools. 🧠
      • Integrate AI agents with platforms like Shopify for seamless operations. 🛍️
      • Explore the power of APIs and how they enhance AI capabilities. 🔌
      • Master adding memory to AI agents for improved conversational context. 🗂️
      • A step-by-step guide to setting up chat models for enhanced interaction. 💬

      Overview

      In this engaging tutorial, Bart Slodyczka captivates beginners by teaching them how to construct AI agents using n8n, a no-code tool that simplifies automation. He begins by elucidating the foundational components required for AI agents, like the agent’s ‘brain,’ a set of clear instructions, and access to necessary tools. This initial understanding sets the stage for building a robust system capable of handling tasks traditionally managed by human agents.

        The tutorial guides viewers through constructing a customer support AI agent that can access Shopify to fetch order details. Bart effectively demonstrates how AI agents, integrated with platforms like Shopify, can automate and streamline workflow processes by executing tasks like tracking orders and responding to customer inquiries. This represents a significant leap from older automation methods, showcasing the advancement AI brings to digital operations.

          Further, Bart walks through setting up an AI agent from scratch on the n8n canvas, including assembling nodes for chat triggers, brains powered by OpenAI, and memory features for continuity in conversation. With practical insights, he explains the setup and management of API calls to enhance the AI agent’s versatility. This comprehensive tutorial equips viewers with the know-how to initiate their journey into AI automation, making complex technologies accessible and exciting.

            Chapters

            • 00:00 - 00:30: Introduction to AI Agents In the 'Introduction to AI Agents' chapter, the video begins with a promise to guide viewers in building their first AI agent using a platform called Nan. The instructor outlines the basic elements of an AI agent: its 'brain,' or decision-making core, the set of instructions it follows, and its integration into a workflow with defined inputs and outputs. As a practical application, the chapter focuses on constructing a customer support AI agent capable of interfacing with a tool like Shopify. This agent will be programmed to understand and respond to typical queries, such as order status inquiries, by providing detailed information.
            • 00:30 - 01:00: Overview of Traditional Automation vs AI Agents This chapter explores the transition from traditional automation to AI agents. It begins by reviewing how automations were previously built, particularly for customer support, using predefined routes such as receiving requests through Gmail and generating responses. The focus then shifts to demonstrating how a similar workflow can be efficiently executed using a single AI agent that operates multiple tools. The explanation concludes by preparing to apply this understanding in a new context, referred to as a 'blank N canvas,' suggesting a fresh start with these insights.
            • 01:00 - 02:30: Starting from Scratch: Building Your First AI Agent The chapter guides on building an AI agent from scratch, starting with placing the first node on a canvas. It includes various steps such as prompting the AI, integrating prompts, linking to a tutorial on prompt creation, connecting a brain, obtaining an API key for OpenAI's ChatGPT, setting up memory, and making the initial tool call. The chapter begins by explaining what an AI agent is and how it can be compared to other systems.
            • 02:30 - 03:30: Understanding AI Agents' Functionality This chapter delves into the functionalities of AI agents, comparing them to human agents tasked with specific objectives. AI agents have the advantage of using large language models (LLMs) like ChatGPT, enabling them to think, make decisions, and generate responses. They follow precise instructions, which are outlined through specific processes, ensuring they know exactly what tasks need completion. Furthermore, AI agents are equipped with various tools that empower them to execute actions effectively, such as accessing platforms like Shopify to retrieve order tracking information. Building an AI agent fundamentally requires understanding the type of input it requires and the tools and instructions it needs to function optimally.
            • 03:30 - 05:00: Building a Customer Support AI Agent The chapter discusses the creation of a customer support AI agent. It focuses on defining the AI's role and tasks, which include responding to customer inquiries. The AI is provided with tools to access necessary information, such as tracking an order via Shopify, and is instructed to respond in a professional and polite manner.
            • 05:00 - 05:30: Introduction to the Website Chatbot System The chapter introduces a website chatbot system that relies on AI, specifically chat GPT, to function effectively. It describes how the AI agent is equipped with a framework that allows it to understand and execute a set of instructions, such as identifying itself as a customer support assistant. The AI is programmed to respond to customer inquiries, like order tracking, by using specific tools such as Shopify, leveraging its 'brain' to interpret and act upon these instructions accurately.
            • 05:30 - 07:30: Setting Up the Chat Interface The chapter titled 'Setting Up the Chat Interface' discusses the process of creating AI agents capable of handling tasks such as order tracking requests. It emphasizes the importance of integrating tools like Shopify to fetch necessary information, such as order details, which the AI can then use to generate professional and courteous responses to customers. The example provided demonstrates how an order query is addressed, with the AI assuring the customer of the delivery and providing tracking information. The underlying message is the importance of clearly defining the AI's task when building such systems.
            • 07:30 - 09:30: Installing the Brain for AI Agent This chapter discusses the foundational steps in setting up an AI agent. It begins by identifying the types of input and output necessary for the agent's function. By comparing the input and output, a set of instructions is devised to guide the agent's operations. Additionally, the chapter highlights the need for the AI agent to possess cognitive capabilities—to think, understand, make decisions, and generate appropriate responses. To perform actions, the AI agent must also be connected to various tools, forming its 'brain.' The chapter provides an overview of the basic conceptualization of an AI agent and its operational framework.
            • 09:30 - 15:00: Configuring Tools and API Calls This chapter discusses the configuration of tools and API calls necessary for integrating an AI agent into a workflow. The focus is on building a website chatter system that answers user questions about the company's products or services. It highlights the need to equip the AI agent with the necessary information and instructions on accessing and understanding the business's offerings.
            • 15:00 - 18:00: Testing the AI Agent In this chapter, the process of setting up a website chat assistant is discussed. The speaker explains the initial steps required for the chat assistant to begin handling user inquiries. They highlight the need for an input step, which involves adding a chat node to receive messages from users. Using a simple search for 'chat', they identify and select a 'chat trigger' to enable the assistant to receive messages. The settings are left at their default as they proceed with the setup. The chapter underscores the foundational steps necessary to prepare a chat assistant for interaction with website visitors.
            • 18:00 - 21:00: Implementing Memory for Contextual Responses The chapter discusses the initial steps in implementing memory for contextual responses in a conversational agent. It starts with the introduction of a node on a canvas, which is triggered when a new chat message is received. This node acts as the initial interaction point, allowing users to 'tap' the agent to begin a process. It emphasizes the importance of the chat trigger, which allows interaction by typing into a text box. The described setup is foundational for engaging with the conversational agent as it processes input and eventually responds contextually.
            • 21:00 - 22:30: Optimizing AI Agent Speed The chapter focuses on optimizing the speed of AI agents by building a workflow. Initially, we witness a successful execution indicated by a green status, but with only a chat trigger, it doesn't perform further actions. To enhance the workflow, the reader is guided to open the sidebar using a plus icon, which provides various tools necessary for workflow construction. By selecting a tool from the toolbar, it connects directly into the chat node. It concludes by leading into the advanced AI section, where the AI agent operates.
            • 22:30 - 25:00: Recap and Additional Tips The chapter 'Recap and Additional Tips' provides instructions and insights into setting up and visualizing an AI agent on a virtual canvas. It emphasizes selecting the settings panel for the AI agent, understanding its components, and adding functionality via various options. The main components include plugging in a large language model (LLM) to give the AI agent cognitive abilities and integrating tools and actions for enhanced interaction. The canvas also allows the addition of a chat model, which acts as a cognitive 'brain', plus additional memory aspects to support functionality.

            n8n Tutorial: How I Teach Beginners to Build AI Agents (No Code) Transcription

            • 00:00 - 00:30 Hello legends. In this video, I'm going to show you how to build your very first AI agent in Nan. We're going to start by breaking down all the different components of an AI agent, like the brain, the set of instructions, and how an AI agent fits into an overall workflow where there's a specific input and then a specific output. will then build on that diagram by actually building out a customer support AI agent that has a specific brain, a specific tool like Shopify, and then a specific set of instructions so that it can answer a question like where is my order with detailed information back to the
            • 00:30 - 01:00 customer. We'll then take a trip down memory lane and look at how automations used to be built before AI agents. So, what you're seeing here on the screen is actually a customer support agent that will receive a request from Gmail. We'll categorize it and then we'll take one of these predefined routes to then generate a response back to the user. Then we'll take a look at how that exact same workflow can be built out using just this one agent that has access to these three tools. And then with that understanding of how AI agents are built and how they interact with an overall workflow, we'll move across to a blank N canvas, which means we'll start with
            • 01:00 - 01:30 absolutely nothing. And then we'll have to figure out, you know, how to place our first node on the canvas and then we'll work together to build out our very first AI agent. So, I'm going to show you how to get all of these separate nodes and blocks onto the canvas. I'm going to show you how to prompt up your AI agent. I've also got a hack for how to create prompts in another video that I made, so I'll link that as well. I'll show you how to plug in your brain, how to get the API key so you can actually have a chat GPT agent, how to set up the memory, and then how to make your very first tool call as well. So, let's start by looking at what an AI agent actually is. And a simplest way to do this is just to compare an AI
            • 01:30 - 02:00 agent to just a regular human agent that has to complete a specific task. So the AI agent has access to an LLM, something like chat GPT, which gives it the ability to think, to make decisions, to generate responses. It then has access to a set of instructions. So this is like a specific process that explains exactly what needs to be done. And then the AI agent has access to tools, which gives it the ability to complete actions. So for example, it can go into Shopify and get someone's order tracking information. So now when you're building an AI agent, all you really need to know is, okay, what kind of input does the
            • 02:00 - 02:30 agent get? and then what's the task that it has to complete in order to give us some kind of output and this example is going to help us understand that. So we've just built out a customer support AI agent and we're giving it the set of instructions and we're telling the AI agent exactly what it is and what to do. So we're saying hey you're a customer support assistant and you're going to get a bunch of questions from customers. You just need to help us uh respond to them. You're going to get access to different tools like for example if someone wants to track their order you can go directly to Shopify and get that information for them and then please just create the response in a professional and polite way. And now to
            • 02:30 - 03:00 bring these instructions to life, we actually have to give our AI agent some kind of frame. So over here, we're just going to be plugging into chat GPT. And now with this brain, the AI agent is going to be able to understand a set of instructions like, okay, this is who I am. This is what I meant to do. So then when the AI agent gets a new question from a customer, it's able to use its brain to understand, okay, this customer wants to track their order. It can then review the set of instructions that it has, which is, hey, you're a customer support assistant. Please respond to customers questions. Oh, and if they want to track their orders, please use the Shopify tool. And again using the brain it's able to interpret it's an
            • 03:00 - 03:30 order tracking request. We must use the Shopify tool. So it can go across to Shopify. It can get the order tracking information back and then it can understand okay I need to generate a response back to the user in a professional and polite way. And then finally the AI agent is able to get that response and send it back to the customer. So now the question that said hey where is my order? Will now have a response back from this AI agent that says hey your order will be delivered tomorrow. Your tracking information is ABC123. So now we can see from this template that when we're building AI agents, it's first important to understand what's the task of the AI
            • 03:30 - 04:00 agent. So for example, what kind of input does it get? What kind of output do we want to get? Now based on the difference between these two, so the difference between the input and the output. We're able to create a set of instructions and tell the agent exactly what it has to do. We also understand that okay, well, we need to give the agent the ability to, you know, think, to understand, to make decisions, to generate these responses for the output. So it has to have some kind of brain. And then finally, in order for the agent to be able to complete certain actions for us, we've got to tap it into different tools. Okay, so that's part one of the video. Now we have a pretty good idea of what an AI agent is, how it
            • 04:00 - 04:30 fits into an overall workflow, and then all the different components that we need to be considering when we want to build one out. And now for part two of this video, let's actually start building out our very first AI agent. So for our example, we're actually going to be building out a website chatter system. So our input is going to be a question from the user about our company or products or services. Then the agent somehow has to get that answer. So we need to give it a brain. We need to give it ability to actually understand what are our you know what's our business what's our products and services. So we have to give it an access to a tool so we can get that information but then we have to get a set of instructions so it
            • 04:30 - 05:00 understands hey you're a website chat assistant you're going to get questions please use this tool to generate a response for that question and then send it back to the user. So now with that information and on a blank canvas the very first step we need is some kind of input step and that input step because it's a website chat assistant is just that we need some kind of chat node. So, I'm going to go into search and I'm going to type in chat. And I have this chat trigger. I'm just going to click this open. And now, this chat trigger is going to let us actually receive messages from users. So, I'm going to leave all these settings exactly as it is for now. I'm just going to click out of the screen. Okay. Awesome. So, we
            • 05:00 - 05:30 have our very first node on the canvas. So, this node says it's going to be triggered when a chat message is received. So, in order for our agent to actually get kickstarted and, you know, run some process, we need some way of tapping it on the shoulder and saying, "Hey, here's a new input." And in order for us to interact with that agent and you know right now it's not built out yet, but to interact with that agent, we can just click on this open chat step. We have that open chat step specifically because we are using a chat trigger. And to interact with our agent, we can just go into this little text box and type in hi there. And then on this right hand
            • 05:30 - 06:00 side, I'm going to click this arrow and I'm going to hit send. Awesome. So everything was executed correctly. We have green that denotes success. But because we only have a chat trigger, we don't actually have any other steps. nothing really happened for us. So the next step for us is to click on this plus. And this plus is going to open up the sidebar. And the sidebar contains all the different tools that we might need in order to build this specific workflow. And now when we choose a tool from this toolbar, it's going to be plugged in directly into this chat node. So let's go into advanced AI cuz this is where our AI agent lives. And let's go into AI
            • 06:00 - 06:30 agents. So I'm going to click this. And now immediately we have the settings panel for the AI agent. But actually I kind of want to look at visually what we have going on. So I'm going to click out of the settings. And now we have our AI agent on the canvas. And if we can remember from our initial diagram, we have a brain. So we need some kind of LLM to plug in to give it ability to think and to reason. And then we have some ability to add tools. And then some ability to add actions. So in our nan canvas, we have the ability to add a chat model. So this is the brain to add some memory which is also part of that brain ecosystem. And then to add some
            • 06:30 - 07:00 tools. And now if I click into the AI agent, double click and I go on add option and I open this up and I go on system message. Now I have a space for us to actually give the AI agent some custom instructions. So just like we had over here with our customer support agent, we have these custom instructions. Now let's go back onto the canvas and let's try that chat step again. So I'm going to send a message into our AI agent. When I send the message into the agent, it's actually going to knock on the door of the agent and say, "Hey, here's a brand new input. Can you please process it?" But right now it's completely blank. Let's just
            • 07:00 - 07:30 see what happens. So, I'm going to go back into this window. I'm going to type in pi there, and I'm going to hit send. Okay, so we've got a problem in the node AI agent. A chat model subnode must be connected and enabled. So, what that means is we need to plug in something into this chat model. Right now, it doesn't have a brain, and it cannot respond. So, I'm going to go back onto the canvas. I'm just going to click X over here. I'm going to X this out as well. Okay. So, let's go ahead and add a brain for our AI agent. So, I'm going to click this plus. And now on the right hand side toolbar, we have access to a bunch of different language models. Now, it's interesting to note that when we
            • 07:30 - 08:00 clicked the plus button, when we had just the chat node before we had the AI agent, we had a different toolbar that showed up. And that's because we're actually clicking the plus button from the chat model. So, n understands that, hey, we need some kind of language model over here. So, you have a bunch of different models that you can choose. You can plug in Claude from Enthropic, you can plug in DeepSeek, Google, but pretty much everyone's going to be using OpenAI chat model. So, let's open this up. And OpenAI chat model is like plugging in chat GPT into your AI agent. And as we're familiar with, whenever we add a new node into the canvas, it automatically opens up the settings panel so we can start configuring it.
            • 08:00 - 08:30 But I'm going to take a step back and just go back onto the canvas to see what we've done. Okay. So now visually we can see that we've just connected a brain into our AI model. Now I'm going to go back into the settings here so we can actually configure it and access the brain. So I'm going to go double click. So this is the first time you're plugging in OpenAI brain into your AI agent. You need to click on here and click on create new credentials. So credential is just a user account. It's kind of like a username and password that gives you access to a specific account. And in this case, that combination is typically an API key. Now, N is a provider that lets us build
            • 08:30 - 09:00 out automations. It also lets us plug into things like OpenAI or Anthropic or LinkedIn or, you know, whatever other tools that you want. But in order to use those tools, you actually have to plug them into your account. So, you can't just go ahead and have AI for free included in N. You actually have to plug in your own credentials. So to get your credentials, you can go to open docs and you're going to get information on actually how to create an account from scratch. So what we need to do is create an openi account. So let's click on openai. So just so you know, openai is the creator of chat GPT. So one thing
            • 09:00 - 09:30 you're probably familiar with is using chat GPT in this interface. Now if you're already paying for an account on chat GPT and you're able to chat here like you're a pro or plus user, this is a totally separate account to be able to use the API in N. So that means if you want to use a chat GPT and plug it into your AI agent, you actually have to go to the OpenAI back end. So you have to go to OpenAI platform and create an account. To create an account, just enter your email address, click continue, and then follow the steps until you've logged in. The first thing you want to do is go across to this settings button over here. Then you want
            • 09:30 - 10:00 to go into the billing section and then you want to actually add some payment method and some credit to your account. So when you first open this up, it's going to be at zero. And if it's at zero, you actually won't be able to access the brain in N. So just add like five bucks of credit and that's going to last you yeah a couple of weeks a month maybe depending on how much you're using it. Then the next step is to go across to API keys and then go and click on create new secret key. And from here just give this a name. And I think a really good idea is just to put your name and then dash and then n. But I think I've got a couple of these. I'm just going to go 01. And now just go and
            • 10:00 - 10:30 create secret key. Then click on copy the secret key and hit done. And then back in n just paste in your secret key here. So, I'm going to paste it in and I'm going to hit save. Now, N is going to verify that the API key was actually correct and it's valid. And then you're going to get a message like this. It's going to say connection tested successfully. So, now that means we actually have AI plugged into our AI agent. Once you have your account connected, you can go ahead and choose different models. So, I think GPT40 is the default model that you can always choose. The one that I always go for is
            • 10:30 - 11:00 GPT4.1. This is one of the newest models out. It's one of the smartest as well. So, now that we have that chosen, I'm just going to click back out of here and go onto the canvas. And now I can still see that we have some error in this AI agent. So if I just double click this and we see this message over here. The chat model sub node must be connected and enabled. So that just means that hey you need to plug in a brain. But since we've plugged in a brain, it's actually still using the previous run that we've had where we didn't have a brain and that's why it's staying red. So let's just fix that up. So I'm going to go to open chat and now I'm going to say hi there. And I'm going to hit send. And
            • 11:00 - 11:30 now there we go. We have a successful execution. So we have our AI agent. It's fully in green. It actually used the brain as well and it had a response back to us. So, hello, how can I help you today? Awesome. So, that's really, really good. Now, the next thing I want to do is actually go into here and just start giving this AI agent some instructions. So, over in system message, I'm going to start writing out exactly what I want this agent to do. All right. And these are the instructions I'm going to start with. You're a helpful website assistant. You get questions from customers, and your job is to answer them simply and clearly. And if you're asked a question
            • 11:30 - 12:00 about a product or a service, please use the tool answer question. Okay. Okay. And since we don't actually have this answer question tool enabled, let's go back onto the canvas and let's click on plus next to this tool over here. And cool thing about N is whenever you click that plus from a specific section, it only shows you the relevant tools. So the next tool that we want to get is this HTTP request tool. This is going to be a super common tool that you're using and this gives you the ability to interact with different APIs. So for our agent, we want to give them the ability to search the web and actually answer questions about our company, our products or our services. So, back in
            • 12:00 - 12:30 OpenAI, the same place that we actually initially started off by adding some credit to our account and getting the API key, OpenAI also gives you a bunch of different API calls to do a bunch of different things. So, that's super super cool. That's why I recommend actually using Open AI for your brain and for a bunch of different things. And then I've just gone ahead and clicked on create a model response. So, this specific API call gives us the ability to search the web. We can actually go ahead and search the web for our business, for our products, or our services, and then return that information to the AI agent. So, back in Nan, here's all the settings for this API call. We've got
            • 12:30 - 13:00 description, which is just a description of when the AI agent should use this tool. We've got a method, and a method is just all different ways we can interact with this API call. We've then got the URL. We've got authentication. We've got some settings here around headers and a body. And all that information is over here for us. So, whenever you're working with API calls, it's the exact same format as this. Doesn't matter if it's OpenAI or if it's LinkedIn or if it's WhatsApp. Any other tool that you're using always has this kind of information about API calls. Now, the best way to work with API calls in N is to always make sure you're
            • 13:00 - 13:30 actually using this curl language over here. It's the easiest way to just copy and paste things across. So, the first thing we need to do is just highlight this URL. So, let's click copy. And back in N, let's paste that into the URL. And while we're here, this method is going to be post. Now, it's a little bit confusing sometimes to find which method you need to use. Most API calls will be the post method. And typically, the API call will say over here what method to use, but it's not here. If you can't find it, you can just go through some of these options to try and see, okay, if it's in JavaScript language, do they
            • 13:30 - 14:00 have an idea of what API call it is or if it's in Python or if it's in C. So, in this case, it's not, but I know it's going to be a post method. And uh anyway, if you build out the entire API call and using the wrong method, it'll just let you know that, hey, there's an error. You have to use a different method. The next thing for us to do is to build out our headers. So, there's two H's over here, which denotes header, which is what's over here. So, we have send headers, which is what we need to do. So, now to send headers, we can configure this information into here. We have a name field. Then we have something here by model or as required. We're just going to click down and click on use field below. So now we have the
            • 14:00 - 14:30 ability to add a header name and then a header value. So over here our first header that we need to add is content type as the name and then the value is application JSON. So I'm going to copy content type, paste it in here. Copy application JSON and then paste it into value. And then we can add another parameter. So it's going to add us another header for us to use. So now the next header we need to input is the authorization header. Now the authorization is basically putting an API key into that API call. But we've already created our credentials earlier in this video. So now what we can do is actually go to authentication and then
            • 14:30 - 15:00 click on predefined credential type. Then click on select credential type and then type in OpenAI. So let's choose OpenAI. And then we have the credentials that we defined before. So now with the authentication over here and then our content type header, we've actually got both of these headers completed. So all this stuff is completely done. And the next thing for us to do is to create a JSON body. So JSON body is literally just copying all this stuff in between these quotation marks. So squiggly bracket to squiggly bracket. Let's copy this. And then back in nan, I'm going to scroll down and I'm going to go to send
            • 15:00 - 15:30 body. And I'm going to scroll down a little bit more. And I'm going to go using JSON below. So here I can literally just paste in the exact same thing that we just had. And now we have the settings for this API call. We're using the GPT 4.1 model. We have the tool defined over here which is web search preview. And then we have input. But the input is what was the positive news story from today. The only issue with this is it's static. We actually want some kind of dynamic question to be asked. So I'm going to backspace all of this inside these quotation marks. And then I'm going to open up a squiggly
            • 15:30 - 16:00 bracket and I'm going to write ask question and end the squiggly bracket. And now I have this variable that I've installed into this API call. And this ask question, we're going to go down to here, click on add definition. I'm going to paste this placeholder into here and give it a description. and a description is the question to ask the search. So all I've done is I've inputed a dynamic variable into here and now the AI agent understands that hey when you actually use this API call, please replace this ask question variable with the actual question you need to search.
            • 16:00 - 16:30 And the final thing for us to do is to scroll to the top and now we have to write the description of when the AI agent can use this tool. And we're going to go with use this tool to answer questions about products or services. And a final thing I want to do is actually change the name of this tool to be the exact same name that I used in the prompt in the agent. So, I'm going to go onto the canvas, go back into the AI agent, and we're using this tool name. So, for consistency, I'm just going to copy this, click onto the tool, and now in this section here, I'm just going to rename this backspace and paste. And I've renamed the tool. So, now on a canvas, you can see the tool is
            • 16:30 - 17:00 called answer question. And that's the same as what's in this prompt. So, now with everything configured, let's actually test this out. So, I'm going to go and open up a new chat. And let's ask a question. And my question is, hi, what products does Julka sell? So, Juka is an outdoor conference brand that looks to sell portable toilets, portable showers, and a bunch of different accessories. So, let's ask this question and let's see what comes back. Awesome. So, now the input was sent across to the AI agent, which means the AI agent has our question. It used the brain to understand, all right, what's the question? And the instructions said, hey, use the answer question tool to get
            • 17:00 - 17:30 information that you can answer a customer's chats with. So, now let's give it a few more seconds to finish processing and to see what kind of answer we get back. Wicket. So, now this is our answer. So, Jooko specializes in portable hot water systems and outdoor gear. The main products are the hot tap, the shower tent, and a bunch of different accessories. All right, really cool. So, now let's actually test something out. So, I'm going to be asking the AI agent in the same conversation thread, hey, what was my last question? Now, I'm asking this question to the AI agent because if it's going to be a website chatbot, it actually has to understand what was my previous questions in case I want to
            • 17:30 - 18:00 build off of them and ask new ones and it has to remember that previous context. Okay, so it's telling us the last question was what was my last question? And that essentially means that everything that it sent us before in this interaction, it actually doesn't remember. So in order for us to give it more context of this entire conversation. So as a customer speaks to us in a regular chat window, it's actually going to remember everything that was said. So to do that, let's go and click on memory. And then we have a bunch of different memory options that we can configure for our AI agent. I'm going to click on simple memory. And now we have the settings for our memory. Now the memory for our chat sessions is
            • 18:00 - 18:30 actually using something called a session ID. Now, as we can see from the previously sent node, which is the chat trigger, we have a session ID, we have an action, and we have the chat input. So, the chat input was just a question that we're asking. But then there's also a uniquely generated variable which is called session ID. So, this is a consistent variable for the entire chat session. It doesn't change with each message. It stays the exact same for the entire chat session. So, the settings are already preconfigured to use that information. We don't actually have to do anything. The only thing that we can do if we want to is just change the context length. So this setting over
            • 18:30 - 19:00 here says, okay, if there's a really long conversation, how many of the previous messages do you want to send back into the AI? Because all we're doing here is you're sending all the previous messages as context for the conversation. So you can either leave this at five or if you think you're going to have really long conversations, you can bring it up to 10. And now the entire conversation history is going to be sent into the AI as context. So that if we ask the same question as before, what was my last question, it'll actually be correct. So now we've added memory into our AI agent. Now before I actually test the memory out to show you how it works, I'm going to go into OpenAI chat model. So, I was actually
            • 19:00 - 19:30 waiting quite a long time to get responses from the assistant. And if it is going to be a chat model, I need something that's going to be faster. And that speed is going to be controlled by a couple of different elements, but one of them is going to be which model we're using. So, GPT 4.1 is the smartest model, but it's also the biggest, which means it takes the longest to respond. But, I still want to have really good responses. So, I'm going to scroll down and I'm going to find 4.1 mini or 4.1 nano. So, as you go to mini, it's going to be faster, but a little bit less smart. And then nano is going to be the fastest and also the least smart. So now our AI agent is going to be very very fast. And back on my canvas, I'm going
            • 19:30 - 20:00 to click on open chat. And we can see here I've got a blank chat and I've got the session ID which is 63 A ending in E. Let's send a message into the agent. And let's just kind of zoom out here and see how everything looks. And I'm going to say hi there. Let's hit enter. And now the agent literally processed that response that quickly. So it used the brain and then hit the memory to initially add the message that we sent in which was hi there. And then it generated the response for us, sends it back to us and then added the response back into the memory as well. And then over here we have hi there, hello, how
            • 20:00 - 20:30 can I assist you today? So now I'm going to be asking another question and I'm saying what products does dual car offer. So let's hit enter. So now the model is immediately understood the request immediately added to memory and it's now executing the API call. The speed of the API call is not dependent on which model we're using over here. But that entire thing was very very fast. And our response is it sells the uh Jooka sells the hot tap, a shower tent, some accessories, and some different things. Awesome. And I'm going to say, what was my last question? Let's hit enter. And the response we get back
            • 20:30 - 21:00 should say, what products does JUKA offer? And there we go. What products did Juka offer? And that's all thanks to us adding the memory into our AI. Okay, so congratulations. You literally just built out your very first AI agent in NAN. Uh, just to recap, we figured out that we can use a chat trigger node as an input for our AI agent and that it's going to be able to wake him up and actually get him to do something for us. We then installed the brain for the AI agent. We jumped across to the open AI account. We added some credit into our account. We also got the API key so that this brain actually works. We then looked at how to create an API call. And
            • 21:00 - 21:30 this is going to be extremely useful for you guys going forward. I'm pretty sure that pretty much every automation that you're going to be making with an AI agent or an N will need you to make an API call. So, this is going to be a massive help. And then we added some memory into our agent. So it actually has context of all the previous conversation. And finally, if we click into our AI agent, we also added some basic system instructions. So a quick hack with the system instructions. So these are pretty important when it comes to complex AI agents. So I recently built out an AI agent that you can interact with and you get quizzed about what kind of agent you want to create. It'll ask you a bunch of questions about
            • 21:30 - 22:00 what's the role, what tools it has access to, what's the intended outcome, and then at the end of the conversation, it just gives you a prompt that you can copy and paste, which means that this part is going to be so so easy for you. So yeah, that video is going to be linked below. All righty, legends. Thank you very much for watching this entire video. I appreciate you sticking around to the end. Uh please drop a comment below if you actually found this insightful and maybe what was your most insightful or the most challenging part of this entire experience. Uh if you do want to see me make a bit more of a comprehensive tutorial kind of going a little bit slower, going into more of the different tools, how to set up more of the different credentials, um yeah,
            • 22:00 - 22:30 just drop a comment below and I'm happy to make a bit more of a guide on this. Otherwise, congratulations on building your first AI agent and good luck with the journey.