so today I wanted to come in here and talk about the most powerful AI agent Tools in nadn nadn is getting smarter every day the whole AI space is getting smarter every day everything's moving and shifting so fast so I wanted to come in here and show you guys a new method that I've been working on when I build AI agents that is just a lot easier to set up to be honest make sure you guys stick around to the end of this one because I'm going to get into NN and just do a live build of showing off this new method so when it comes to building AI agents in nadn one of the things that's so powerful is that you're able to build a workflow as a tool and then have the agent call that so here's the old method let's say for example we're having this AI agent send emails for us as we talk to it so we talk to it and then the agent figures out what it needs to do and then it's going to send off the query to the send email tool which is actually a workflow that we've built within nadn so here's that tool that I was just referring to it's going to get called by the agent and it's going to have that initial query that's going to say something like can you send an email to blank saying blank all this kind of stuff and so then after that it's going to pass it through an open AI node or some sort of code node or something just to structure it the way we need to feed it into Gmail and I'll get all into this in a sec this is just a high level overview and then finally we have the information we need in Gmail different parameters like um who's the who is this email going to what is the subject going to be what is the body so that is sort of what's going on here is we were taking the query and then making it you know assigned to certain parameters that would feed correctly into the Gmail node so that we could send it off and then tell our agent that we did that so this is the open AI node or whatever you want to use to sort of structure the query correctly as you can see it comes through over here um with different parameters like who it's going to subject that kind of stuff and then within here we just needed to make sure that it was feeding in exactly how we wanted it so we wanted it to take the query and output the parameters separately over here so we can see exactly send to is going to be Nate herk 88@gmail. com we'd have a subject we'd have an email type message and then we'd have all this other stuff if we needed it to come through and it had to come through exactly like this so now we're in the Gmail node that actually sends the email as you can see we have our variables here that's going to feed in with the actual information and this is how it used to work because we had to have send to had to always be send to with a capital T any changes like that and the automation would break because it would know who to send the email to same thing with um do subject we needed it to always be subject and then you guys get the point it just had to be filled in exactly like this otherwise the automation would break so this new method like I said I think it's a lot more efficient it's also a lot less of a headache to set up and test um and it's basically just using a function within the specific tool like Gmail or calendar where you can use this function called um from Ai and then you can fill in different parameters so this is basically baking in that open AI node where earlier if I go back real quick we would have open AI figure out what the query was saying and then fill in the correct parameters as you can see send to subject all this kind of stuff but using this function now it pretty much is one step that combines everything that we just did in that send email workflow flow because the AI is going to be able to figure out dynamically in those parameters what to put so like I said the old method was the agent sends it off to a new workflow and this workflow goes through the process of parsing the information out and then putting it in the Gmail node and then sending off the email but now we have this new method where the agent can just send it to one tool it doesn't leave it it doesn't go to a different workflow it stays in this workflow and this node right here is able to figure out who it's going to the subject and um what the message is going to say real quick just wanted to plug the free school Community the link for that is down in the description we're almost at 1,000 members which is super super exciting and really appreciate all the support so far but yeah a lot of people ask me for you know templates from the videos or different code Snippets or whatever um so that's where you're going to find resources like this YouTube resources you'll have information here about how to download the the templates and plug it into your NN so you're good to go and obviously a great place to be if you're learning nadn and you want some support with um figuring out stuff that's going on in your specific workflows o wanted to quickly announce this paid community that I just launched here's some modules that we're working on um still need to pump out more content but this will be a great place to start off if you want to succeed in the world of AI in this paid Community you're always guaranteed to get a response you're guaranteed to make some meaningful connections and have some good opportunities to collaborate in the future and also everything that I learn as soon as I learn it whether it's nadn or different tools I'm pretty much going to talk about that kind of stuff in this community and you know we also have live calls and stuff like that so that's all I really wanted to say let's get back to the video so how that works is with the function dollar sign from Ai and in a sec I'm going to break down the function parameters and it's really really simple it may look a little intimidating when you see the different you know parameters and the different things you need to fill in but it's super super simple so as you can see this looks like a normal Gmail send email node nothing has changed the only thing that changed is that instead of using you know json. message.
content. send to anything like that the hard-coded variables we have in there it's going to be dynamic because all we're saying is from AI it needs to figure out what the email is AI needs to figure out what the subject is and AI needs to figure out what the email body is going to be and so just zooming in a little bit I have a couple typos in this query so you can even just see that it works really well send an email to Michael Scott asking him how if he wants to get lunch today his email address is at Michael Scott dundermifflin. com so then all we had to do was tell AI for the two field in the Gmail node AI needs to figure out what the email is to send to so we told an email and it grabbed Michael Scott from the query and it also left out that at in the beginning which is super cool and then the subject based on this query it had to make a subject and the subject as you can see is lunch plans with a question mark and then finally the message we gave it from AI needs to figure out the email body and we can see the email body came back hi Michael I was wondering if you'd like to get lunch today let me know what you think best Nate so like I said normally you get the query and you'd have to run it through some sort of open AI node or you know custom code node to put these in the different parameters to feed into Gmail but now Gmail node can just figure it out by itself based on this super cool JavaScript function from Ai and then real quick just another comparison to show you guys the value in this function this is the old method we'd have send to subject email and like I said if you didn't map it correctly or if open AI decided to change this to send to without a capital T it would break and it wouldn't send over that Gmail but now over here we have the query and then the actual Gmail node over here is going to be smart enough based on these from AI functions because like I said it just it's like you're asking Siri could you send a text to Mom saying hi I miss you um that way Siri knows who mom is Siri knows what the text is going to say all that kind of stuff it's pretty much like an assistant that will be able to figure out the query and just interpret what to put here okay so now we're going to get into just setting up this function this shouldn't take too long it's really really simple if you have used Excel before it's pretty much the same way you sort of do an Excel formula a simple Excel formula not something like a crazy V lookup but so there's different parameters in the from AI node um you would do dollar sign from Ai and that's how it knows obviously you need the curly brackets so it knows that it's JavaScript but then you just need to put a key and a key is the only thing that's required these question marks are optional Fields but a key description type and then a default value so let's break this down really really simple so you guys can get in there and start playing with these tools okay so the first parameter like we said is a key the most important one because it's the only one that's actually required so the key is basically just what is the AI looking for so in this case let's say you wanted to fill in and get the name of a person automatically every time you would just put from AI name and then the AI knows that it's looking for a name super simple then you have the option to add a description so if it's not as simple as a name or a time maybe you could put a description so that the AI doesn't get confused in this case we're sticking with the example of a name and then description could just be the name of the person we're emailing so super simple there too then we have the type once again it's optional this is just what kind of data the AI should be looking for to make it easier um in case it was looking for a number rather than a string string is just basically a word so the type same example with get the name of a person we would be expecting a word coming through a string not a number or a Boolean or Json then finally we have default value this is pretty cool too if the AI can't figure out what you're looking for so if the AI couldn't find a name in this case it would just reply with unknown so it's a nice little backup option in case the AI can't figure out exactly what you're looking for um it won't break the automation the node will still run and you might just get um unknown rather than a name or something like that I'll go through two quick simple examples just to make sure everything's pieced together correctly in our minds so the first example let's say we're getting a customer's name and obviously this wants to go into some sort of node we would use the function two curly brackets dollar sign from Ai and then we fill in our parameters so we're looking for the name the description is the customer's name um the AI should be expecting a string and then if it can't find the name it will just return the value of guest so what this is going to do is ask for the customer's name if theant doesn't know it'll say guest and it's useful because even if the a doesn't know the name you still have something to call the person let's say it's sending through an email and you want to um say hi to them you would maybe it would just say hi guest rather than their name here's another example this time we're doing a number so counting completed tasks we would tell the AI that we're looking for completed tasks this means how many tasks are done um if maybe if a task is marked off a certain way within a database you could say when task equals one that that's how you know it's completed um and then you're looking for a number and if the AI can't find out how many tasks are completed it will return zero right here so why this is useful is because you can use it for tracking progress without worrying about missing data so I know in these slides I mainly just talked about the Gmail tool which is right here as you can see but these are all the other ones that you have access to give a AI agent in nadn so we have air table we have um you know calendar docks you can also do stuff dynamically in um you telegram or Outlook whatever you want to you know get in there and play around with but I believe that they're going to keep continuing to expand on these tools but just super cool pretty much all of these you can use that function from AI in there and it's really going to save a lot of time as far as not having to configure more workflows and all that kind of stuff I definitely still think it's important to not give an AI agent like 30 different tools because you know within Gmail you could have different options as far as um you know getting messages sending messages labeling stuff making drafts replying all this kind of stuff so that's a good use case where you you still probably want to have a dedicated email agent that would have these tools but just super cool all the options you have you know slack all this kind of stuff so um yeah let's get into nadn and just look at a few examples of this okay so we're just going to do a live walkthr of having an agent call a couple different tools and using the functions Within the tools so let's grab an AI agent um we'll leave it as a tools agent for now obviously we're just going to connect the brain real quick I'm just going to keep it as foral mini that should be good and so that's all we're going to do as far as the agent setup we'll give it a quick prompt um actually we'll just do that right now so pretty much all I want to throw in here as far as a prompt is just giving it um the current date and time so here's the current date and we will just do of course we need to make this an expression so that we can call the JavaScript and do dollar sign now so now it's got the current date and time which is good in case we want to make calendar events so yeah actually we'll do a calendar tool first because the example pretty much always did or the examples from the slides we ran through email so we're going to be creating an event first um sync up the calendar and now we have start time end time obviously we need that information for a calendar event and then we just want to add um a summary because that's going to be be the title that comes through in in Google Calendar so if you guys watch my personal assistant video personal assistant 2.
0 you probably noticed that I used some of these tools to help the calendar agent or the email agent and one of the things that I did is said like if a if an end time isn't specified because sometimes you want to just be like can you throw down a meeting at noon and in that case it I don't know what exactly would happen but we specified if there's no end time then just assume that it's going to be 30 minutes or however long so let's first start off with an example where we will give it start time and end time so we're going to fill out these parameters we don't want to make it fixed we need to make sure it's an expression otherwise if you go to type in the curly brackets nothing's going to pop up so make sure you hit expression curly brackets you can see right here we've got from AI down at the bottom so we'll just click into there and so if my slides weren't good enough for you guys you can always see right here how to set this up you've got your key your description your type your default value it's going to show you an example and it's going to show you um for each of the parameters sort of what you should be doing and how it works and some examples at the bottom of course so for this node we're going to try this without using any descriptions we're just going to do keys so this key is start time let me just copy this down to the end time make sure it's an expression of course and then we just want to call this one end time rather than start time so we've got our start time our end time and then for summary we are just going to do um maybe like event we'll just say event yeah okay so we got start time end time and event and it's already pretty much configured that's so much easier than if we were to you know from the agent gets the query and then we'd have to put something here to make sure that it's going to pass into the the parameters of the Gmail or sorry the calendar node properly but now we just have the a AI smart enough to figure out what needs to go where so we'll chat with this guy and make sure it's working let's say can you create an event from 2: p. m. to 400 p.
m. called or not called we'll just say for a meeting and see if the AI can figure out what we're asking for here obviously it's going to hit the calendar tool it's the only tool it's got It's Already Done It said meeting has been successfully created and let's check right there in the calendar we've got meeting from 2: to 4:00 p. m.
as you can see um so perfect that was maybe like 2 minutes that we are already pretty much set up a calendar agent we can say um let's just see what happens if we don't specify a end time so can you scheduled dinner for 6:00 p. m. tonight see what happens here I love watching the the stuff happen in real time I think that's so cool the visual aspect of it but um we've got dinner from 6:00 to 7:00 so that's nice it said to us I have scheduled dinner for you tonight at 6 p.
m. you can view the event here and it just made it an hour and we didn't even specify um all we gave it was current date and time we didn't say you know if an end if an end time isn't specified make it an hour so that's sort of how that works let's go into the execution and see what it filled in here so as you can see it got the start time end time and the event called it dinner so yeah hopefully you guys can see already how quick that was and how easy that was to set up a tool that does something um very intelligently I guess is a good word to say so I guess we did an email example we might as well just do that and I've already got my um stuff configured in here so I'm just going to sign in real quick again to make sure that we're good to go okay okay let's turn green Perfect all right so sure we'll send a message so we need the two we need the subject and we need the message of course let's see let's do something cool with like um let's CC somebody okay so we'll CC somebody the two is obviously going to be um oh forgot the dollar sign okay so from Ai and two we don't want to just say like a name because this has to be an email address because it's you know what who the Gmail node is going to send email too so I will say I will just say email address in this case and we'll try once again without doing descriptions because it really should work um most of the time without needing a description unless it's something more complicated so oops we'll grab from Ai and we will say subject for this one um make sure you always close it off in the parenthesis and then for the message we will grab make an expression we will call this um just message super simple okay and then CC I haven't really tested out a cc so we'll see what happens here but honestly let's just see if we just leave it as CC um and see if it understands if I just say can you copy blank so test out the email tool um let's see anything we need to do in the prompting for this guy we shouldn't really have to let's just say you send an email to herk 88@gmail. com asking him how the project panda is coming along and reminding him to bring the brief [Music] tomorrow can you make sure to copy um I'm going to need like a okay bit digital gmail.
com on the email okay let's see it's hitting Gmail perfect that was quick um let's go into the execution real quick and then I'll pull up the email make sure everything worked here okay so it filled in nerk gmail. com project Panda update was the subject the message coming through can we see how this came through hi Nate I hope this message finds you well I wanted to check in and see how project pan is coming along also please remember to bring the brief with you tomorrow looking forward to hearing from you soon best your name so we didn't prompt in a sender name or anything so that's why I came through like that um and it's CCD up digital gmail. com so pretty cool it understood how to do that and that's like I said it's super powerful obviously the AI understands what a cc is and you didn't even have to give it a description so that's pretty cool come into here I got a security alert let's see if we got an email though there we go project Panda update to me with the CC of upid digital gmail.
com and we didn't turn off the attributions so we get the message email was sent automatically with nadn um so yeah that's pretty much how it works I hope you guys can see the value in this um obviously like I said there's tons of more tools to explore so um will definitely be cool to you know play around with maybe doing that as an HTTP request or you know stuff like air table seeing how we could do stuff with a um Ser API that sort of thing even seeing how it's going to work in like um a vector store would be cool so let me know what else you guys want to see based on these sort of tools and obviously um I utilize this kind of stuff in the personal assistant 2.