you've probably seen YouTube videos on building AI assistance but what I'm about to show you in this video takes things to a whole new level I refer to this as the mother of all AI assistants because this is truly a Powerhouse this AI assistant can pretty much handle every single task you throw at it from tasks like getting email sending email getting calendar events setting new calendar events updating records and databases creating new records and databases getting tasks accessing the internet access ing Hacker News accessing additional workflow tools that you can build to add more functionalities to this accessing private data via Vector databases all within the same AI agent stay with me till the end because I'll show you how to build this AI agent that will practically automate every single task you need giving you more time and less hassle if you're not familiar with this tool don't worry about it I'm going to walk through step by step over everything you don't have to know how to code I'm going to show you exactly how to build this and on top of that for those of you who are in my school Community I'm going to build this live on Friday at 4:30 p. m. so that way you can follow me a step by step and ask any questions during the call and if you can't make the call that's fine I'll also record that and post it on the classroom section so that way you can have access to it anytime and then obviously you will have access to this template as well for those of you who are new to the channel my name is Zar my YouTube channel and my school Community is all about building incredibly practical and useful AI agents for personal or business use cases we have really great community memb members who are always active and helping each other lending a hand and also providing great questions and answers so that way you can update your skills and building no code AI agents using naden and other tools as well in my school Community you'll have access to exclusive things such as this custom GPT that I built that is only available for my school community and then also I have on daily calls so that way if you're building an AI agent or you following one of my tutorials and you get stuck somewhere you can jump into one of the calls and ask your questions or you can post your questions in the ask and assist Channel myself or somebody will be able to get back to you and provide that answer all right so let's get started so the initial interaction for this is going to be done via telegram but it's up to you if you want to use some other uh tool like a chat bot you can certainly do that as well but telegram is great because you will have the ability to actually ask a question either via message or also via voice as well so we can practically use this like Siri and ask it all of the questions or give it instructions and then we'll go ahead and update everything so let me quickly give you guys a demo of what this looks like and then I'm going to show you the different noes that I used and the different techniques and parameters so that way you can build a version of this of your all right so let me pull up the telegram here so let me go to the bottom so let's start first of all with getting emails right so to show you right now let's say I have three emails that are unread so I've said that only provide the emails that are unread to me so when I'm asking the AI assistants to give me my emails it should only provide me a summary of the unread emails that are in my inbox only I'm going to use my phone but you'll be able to see this on the telegram VI right here but let me go ahead and click on the test workflow here so I'm going to click on test workflow and right now this telegram uh trigger is saying waiting for you to create an evented telegram so let me go ahead and say hi Mia do I have any emails today so it's going to transcribe my voice text to speech and it's going to reach out to the proper um tool which is the read email and it's going to summarize all of the emails that I have which are the three unread emails as you can see right there and if I go to my inbox these are the three only uh unread emails that are there so getting emails getting calendars they're all pretty much the same they're simple task but let's go ahead and test out getting uh some details from our database so in this case I've used air table so I'm going to go ahead and try to retrieve the um contact information that's sitting in my database so let's go ahead and do that so this time I'm going to type instead of uh sending the message via voice so I'm going to click on testing again pull up the telegram app you can see so I'm just going to type can you get me John Do's contact information if I press send so now this time it's going to reach out to the contact database which is the correct one and it's going to give me the contact information for John do which the email is John and the phone number is 114 668 so let's double check to make sure it's correct John do John Gmail 1114 668 so as you can see it reached out to the proper table because we have two tables there's another one called the task table which now let's go ahead and see if we can pull up the task summary from this particular table so same thing I'm going to utilize the voice message again let me get rid of this click on test flow again hi Mia can you get me my task for tomorrow so I'm going to submit that again it's going to create the test it's going to reach out to the proper uh table record and it's going to provide me a summary of all the tasks as you can see right here I have F five tasks setup School Community create YouTube content calendar as as you can see right here on my table here set up school Community create YouTube content calendar so all of this data is being retrieved from the proper database and same thing I have access to Ser API which means that I have access to Google all from here um I have access to calculators so if I need to do any kind of problems that requires or any kind of tasks that require mathematics it's going to utilize that weather data tool so this is just an example meaning that I can attach a separate tool here so I've attached this workflow which is an open uh weather map API I can even create contacts so for example if I go back to this uh table right here and if I go to my contacts I can tell it to create a new contacts so I can also have access to the latest news about a particular topic using The Hacker News tool here and then also I can attach a vector database meaning that if I have sensitive data that's sitting on my own Vector database datase I have the ability to access that information as well so as you can see this thing is extremely valuable and extremely useful because you can pretty much attach anything and give it any tasks and it'll be able to retrieve that very easily and again it doesn't have to be a telegram you can utilize the chat you can utilize Siri there's a lot of notes you can input here so let's go ahead and walk through now step by step into the different notes and I'm going to show you how to exactly build this and how what kind of prompts and what kind of parameters I to put in here in order for this to be able to have access to this all right so the first thing is I added a telegram node so let's go ahead and take a look at this um incoming event right here so this is going to be our trigger obviously if you don't have a uh telegram account you have to create a telegram account and then once you go and create the telegram account you'll be able to create a new bot and you can chat with it using the bot father so if you're not familiar with how to create that please make sure you follow this step by step so that way you can create that bot that you can interact with and in my particular case I have a I have created this bot called zbot and that's what I'm sending these messages to and interacting with this AI agent so once you do that and get your access token you're going to come back attach your account and then the trigger is going to be on message right because you can have other triggers as well but we going to utilize our message because we can have we can attach a voice message or a regular text message in there as well so once that's done I'm putting a switch node here because I need to make sure I am sending the proper data to the proper location so if it's a message that is just a text right here I've put that um if it's just a text message just go ahead and grab the json.
message. text I've also put this little snippet of code that said that if the text message doesn't exist meaning if the user did not send the message by typing I put this little snippet of code so that way it doesn't throw any error but again you can just copy and paste this you don't have to worry about changing the data in here um and then same thing right here on top so this is going to Route the file if it's a voice message what it's going to do is grab that file ID and this is going to go ahead and send this to this node which is again a telegram node this time the res resource is going to be file and the operation is going to be getting the file meaning that we will download the file that's coming in from our trigger and this is going to download so if I switch this back to fixed here you can see right here you have this option to toggle this so if you toggle this it's going to download the file and this is the file that is being downloaded and this is the voice message uh file that's coming through so then what I'm doing is attaching an open AI node to be able to grab that data file and in this case our voice file and transcribe that recording into text so as you can see right here this file I said hi Mia can you get me my task for tomorrow so that's what it did and then it outputs it as a text so this is going to be just json. text and then in my AI agents I'm grabbing both of these and parsing it to see what the user is asking after the text so I've put a set field here to be able to grab that text and convert it into json.
text because I want to make sure that both of these outputs are similar cuz otherwise if you have two different outputs if you don't put this node right here what's going to end up happening is from here the output if it's a message is going to come at json. message. text instead of just json.
text so that's why I'm unifying and giving the output from both of these regardless of whether it's a voice message or a text message as json. text so that way inside my AI assistant I'm only grabbing the json. text that's coming out regardless of it's coming out from the speech to text or the edit field and you see the output right here is json.
text right all right so my AI agent here is just a tools agent um so when you add your AI agent from um from right here if you go ahead and click on Advanced ai ai agent you can add a tools agent and instead of taking from previous you're going to say Define below because we need to define the task for this particular agent with our prompt so let me go ahead and get out of this and delete this so let's go ahead and jump inside this AI agent and take a look at my prompt so inside the prompt if I maximize this this is the entire Prime that that I'm giving this and the reason why I'm giving this prompt and it's so large is because I'm attaching several tools so I'm instructing this AI agent that hey for different tasks or for different queries that the the user is asking it needs to access a different tool and therefore you want to make sure you provided a really good prompt here to be able to grab or access what tool for what purpose right so this is kind of an uh statement that you're putting a logic statement to give this AI really good instruction and it's very important to give it also a date because a lot of times if you're asking things like getting email or setting calendar event or getting calendar event you want to make sure that it knows what day it is and the great thing about nen is has its own native formula which is basically now I mean if you just put this in copy and paste this it will know this AI agent will know today's date and in this case as you can see right here today's date is November 3rd which is correct so now it has access to what the current day is and then I'm providing it these guidelines things like hey email management use the read email tool to fetch andrate emails for sending emails use the send tool and as you can see all of these instructions are provided based on the particular tools that I have um attached to this AI agent and again for you whatever your use case is whatever you're putting for your AI assistant this is going to be different but this will give you a good foundation so that way you can access this and just change it and again as I mentioned for those of you who in my school Community you can just grab this and import it to your workflow and then you can change the prompt here for whatever use case you have but this will give you a really good foundation anyway so let's take a look at our so that's pretty much it we just provide our system message here the prompt and then now we can go ahead and take a look at the different tools we are adding here okay so the first one is obviously the chat model so I'm using um open AI gp4 mini I suggest using a really good powerful large language model here so I would suggest sticking with uh open AI gp4 um and Al maybe um entropic because the more tools you provide to this AI agent and this AI assistant the more powerful it's going to be and therefore it's going to require a very good large language model so therefore I would suggest sticking with those two major ones and obvious if you're using this locally and you have a really good machine or if you're running and then um on a virtual machine then you can utilize the AMA models as well but use a good model all right so let's take a look at the different tools we have available so all these tools that you see right here I'm sure if you've used NN before you had the option to use this separate workflow meaning that you could have attached a separate workflow like this one again this is just an example um I have a another workflow that I've created using the open weather map API but this is just for examples to show you that it still has access to a separate workflow that you can call but the thing is this is very slow so recently nnn released this uh tools AI agent node meaning that now you have access to all these nodes as tools which is really great but one catch is that you need to make sure you're using this function which is called from AI otherwise none of this is going to work so let me explain what that is so let's go back to our personal assistant here and if we click on the tools right here so now you will see before you don't have all this option available and again make sure your NN is updated otherwise this this might not show so now you can see Google Docs tool Google Drve tool Google Sheets tool and all of these great Gmail tools so all of these great tools are available for us to directly attach to our AI agent where before you had to attach a separate workflow in order for you to be able to access a calendar tool for example or a Gmail tool but now this makes it extremely fast because because if you have provided this AI agent a really good prompt it will be able to grab the right data or the right task based on the tool that you have given it and again obviously the instruction has to be clear in order for this to work so that's why you have all access to all these things now so let's go ahead and take a look at our tools that I've attached here so all of these tools again they are an existing node as well but when you attach it as tool it has a separate parameter now called the tools description ion and this is what differentiates these noes as tool versus a regular note that you attach it and again I'm going to show that a little bit but for example let's look take a look at the first one this is the read email tool and the way I did this again is just clicked on tool here or just grab that and you just grab this Gmail tool here so when we click inside this we can obviously you have to attach your credentials so the tool description this this is what's added now extra so you would do set automatically here the message Source the resource is going to be message and the operation is going to be many because obviously we're not sending an email we're having this agent read our emails that are unread and then as far as the limit you can set a limit I highly suggest setting a limit because if something goes wrong you don't want it to return all of the messages cuz that's going to utilize a lot of your large language models so set something like I mean 50 might be a little too long too so maybe I'm going to put like 20 um and then simplify it obviously and you need to make sure you're putting filters so you need to have labels in there so that way this AI agent knows that it only grabs the emails that are unread and then also from your inbox so make sure you select those particular charact categories or if you have labels in there that you uh want to utilize same thing just make sure you're selecting that the read status I'm saying unread emails only so make sure you select that as well and then also so this is what is going to be different with these tools they have this new formula called from Ai and if we go back to this tools agent here this is what I'm talking about so it's called a dynamic parameters for tools so when it says when configuring tools connected to the tools agent you can use now you can use this from AI function to dynamically populate the parameter values using the AI model so now what this means is that with these tools that are available to this AI agent now it will be able to access all these different tools dynamically through the large language model that's attached right so that's why you have to identify you have to provide this PR AI functionality and this prom AI functionality function only takes uh one parameter that's required which is the key and then it takes description type and default value but those are not required you want to make sure you provide at least the key cuz otherwise this won't work and this key could be whatever right I've put set date here and I'm going to show the rest of them as well um so that way you see how this works but make sure you go ahead and read this thing because this will give you a good understanding of what this from AI function is and how it works and as you can see right here it says the key parameter which is a string representing the key or the name of the argument so you want to make sure you're providing that on the bottom they give you examples so for example it says you could use an expression to dynamically populate a field with a name for example right and this is what it's doing you use from AI you put name and then the these three are obviously not required but it's good to always put that in there so that way you understand what's going on so anyways read that and make sure uh that you understand how this function works but it's very very simple right uh so let's take a look at another 10 this might become easier so let's take a look at our um contact tool for example right for air table so this one I didn't need to put any uh from AI functionality because all we're doing here is reading the uh the contacts right so here you'll just do the same thing use your air table account the operation you'll do a search the record The Source will be record and then you're you're grabbing your base from the list here and then obviously if you have your air table account connected properly all of this will uh will show up and that's all you need to do and then make sure you're clicking on return all so that way it's giving you all of the has access to all of the contact but let's take a look at for example creating a contact right so if I click on creating a contact so now you'll be able to see see how to implement this PR AI thing so when we create an air table record using this air table 2 you would put the source as record again and the operation this time will be create and you'll select the base you'll select whatever table you're going to create this so now to map each column now you will say from AI right and again if you just you want to make sure you're on expression right so you'll say from Ai and name and I'm not giving it a description but you could but I've literally just put name here you could put whatever you want you could say name of the contact or uh name of the person or whatever it may be same thing for the email I've just said email from AI email right very very simple the same thing for the phone number from AI phone number and if I go to my contacts air table here as you can see inside this contacts table within my NN base I have these three uh columns name email and phone number so the last one is Bob Smith right so let's go ahead and add a new record so that way I can show you this in real time so let's get out of this let's go ahead and delete this and I'm going to pull up my telegram so you can see this live actually hold on second click on test here all right now it's listening okay so let's go ahead and add a new contact okay so I just said add this to my contacts and I'm uh giving this a contact information as you can see right now so it reaches the create contact automatically and it says that Robert King has been successfully added to your contacts here are the details so let's go ahead and check to make sure that it added uh the proper contacts and refresh the page there you go Robert King King gmail. com and then it provided all these data points to the particular um columns and it made sure that everything was set in the right place right so that's the great thing about this um AI agent and this functionality of this tool because you can utilize this from Ai and it will it will use the large language model to access the correct tool that's attached to it and then therefore it will also within that tool give you the correct information to put wherever you need right okay so now let's take a look at so same thing you can add this to your Google sheet as well you can add something to Google sheet you all of this uh will be the pretty much the same I love using air table because of the user interface and everything is great but you can use uh Google sheet or whatever uh database you're using so let's go ahead and actually test out the hacker new use um so this is a tool that now has access to this tools uh AI agent as well and for the limit I'm just for those of you are not familiar with Hacker News if you have used the node before it basically provides you um the news articles with the keywords that you specify with the regular node but in this one we're going to dynamically specify the keywords and the amount of articles that coming into US based on the user's query right so that's why here the operation is going to be many get many the limit I'm setting as from AI amount of Articles meaning that whatever the user is asking it needs to provide those so if a user says Hey provide me the last 10 articles about a particular keyword then that's what it's going to do it's going to grab that amount of article number from the user query and the same thing the keywords is search query again the keywords could be whatever as long as it makes sense so you can change this instead of search query you can just say query or article name or whatever it may be right so as let's go ahead and test this thing out now so now and then as a backup I've also added Sur API because now it has access to um the all of research in um search engines uh but if I want to particularly specify that I want to utilize Hacker News so what it's going to do is based on the prompt that I provided it's going to go ahead and take a look at this first if there's any kind of error then it's going to use Sur API as a backup so let's go ahead and say um get me the last three articles about for example Nvidia right so let's go ahead and test that out I'm going to test workflow again pull up the teragram here so I'm going to say hi Mia can you get me the last three articles about Nvidia so I'm going to send that again it's a speech so it's going to go ahead and now access Hacker News as you can see it's going to go back to open AI large language model and it's going to provide me these three articles all nice and summarized and also the link to those particular articles so as you can see this is a great um assistant actually very very useful and now you can ask it you know anything related to um you know a search engine so that if you do that then it's going to access Sur API so let's go ahead and do that actually so this time I'm going to try to ask at something that is non haacker news related so let me pull that up again so I'm going to say hi Mia can you provide me a quick summary of the latest election results so let's go ahead and put that so now it's going to Sur API use the Sur API tool and it's going to give me the summary of uh quick summary of the latest updates on us selection right perfect see it is incredibly useful so now you can use this pretty much with any tool that's available so if you just click on the tools here all of these different tools are available for you and I'm going to make some more tutorials on this because this is a great um addition that nadn did so stay tuned for that I'm going to make some really great AI Agents from this because now you have access to all these great tools that you can directly attach and then same thing like I said now you can also attach a vector database so I have my Vector database tool here um I'm not going to use that because otherwise like this video is going to go way too long but you can essentially prompt your AI agent to make sure that it's accessing the correct tool for whatever purpose you want to use this for right and also as far as the uh the guide itself so I've just said it you are a helpful assistant who responds to users requests in a fun friendly but professional way so feel free to change this as well because this is the prompt that's going directly to the system so you can you know make this as professional as possible as fun as possible depending on what your use case is so another thing is for this particular AI agent you also want to make sure you attach a buffer memory because this will give it the ability to remember the previous uh chat history so that way you can go back and forth put it very easily uh as far as the buffer memory you want to make sure that you are putting um the ID of the message that's coming in from a telegram in this case so I'm just saying listen for incoming events. first.
json. message and again I'm just grabbing the message from my Telegram and it's the same thing I'm just copying pasting this into also uh the message that comes out of this eii agent because you want to be able to respond back to the user via the telegram app or whatever app you are using right so you want to make sure that you're sending a message adding another telegram note that says send a message and you want to provide the chat ID same thing this is going to be that ID and it's going to listen for that um um json. massage.
fromom ID that we're receiving and then the text is going to be json.