hey guys welcome to this crew AI crash course by the end of this video you're going to learn everything that you need to know to go off and create an army of your own AI agents and to help you get there I've actually broken up this video into three key Parts first we're going to cover what is the crew AI framework second we're going to cover how it works and its four key components and then finally what we're going to do is go off and create our own crew from scratch so that you can see
how everything works together but real quick I just want to mention that if you want to grab the source code for this project and the rest of my other full stack AI projects all you have to do is just scroll down in the description below and click the link and you'll be able to download everything and other than that I just want to mention that if you have any questions all you have to do is just drop a comment down below and I'll do my best to get back to you guys as fast as possible
or you can actually schedule a quick one-on-one call with me where we can actually dive deep into whatever you're working on and help you get to a solution but enough of that let's go ahead and dive back into the video so at this point you might be wondering what is crew aai and what can it do well at its high level crew aai is a framework that allows us to create AI agents where each agent has its own expertise and set of instructions and together these agents will work towards solving one large complex problem for
example we can use crew AI for tasks like helping us pick stocks planning vacations building python games and much more in fact let me actually show you three quick examples of crew AI in action so you can get just as excited for this technology as I am so the first example I want to show you guys from the crew AI is going to be the stock analyst and what this analyst is going to do is go off and research a company for us and put together a super nice concise report letting us know whether we
should buy it hold it or sell it so let me show you what the actual output from this crew would look like so as you can see this crew goes off and researches the internet to find reports for us from there it's going to slowly start building up an internal memory bank of what's been happening and then from there it's going to go off and research quarterly reports keep doing more research keep building up its inbank memory on what needs to happen and then finally at the very end it's going to create a report for
us that tells us exactly what we should do in this case it says hey you should hold on to the Tesla stock here are some positive indicators about the stock here are some concerns I have and here's some upcoming events that may change our outlook for the stock going forward so this is awesome this would have taken us hours to do manually but with crew AI it took 7 and 1/2 minutes that's insane the amount of work that this just saved us so let's go ahead and move on to the next amazing example so the
second one that's my most favorite out of all the examples is going to be the trip planner crew now the way this one works is you tell the crew hey I'm traveling from here I want to go to here I want to do this trip sometime in the future and while I'm traveling I like to do these things and then from there this crew will use three different agents to plan your trip one of the agents is going to go off and pick cities for us the other agent is going to find cool things to
do while we're in each one of those cities and the third agent is going to be the Mastermind itinerary planner that's going to connect all the do s and it's going to go off and research everything for us and put together a budget looking at flight tickets and everything and at the very end it's going to generate us this final report that you can see right here where it's going to say hey here's your 7-Day itinerary for November and here's what you need to do each day this is amazing this would normally take people hours
upon hours of research to come up with an awesome itinerary like this and the part that's even the coolest is it found that there was a great Festival going on in Thailand during November so it actually helped plan our entire trip around this Festival to basically maximize our time while we're there so all around this is awesome and let's go ahead and move on to example number three and the third example that I'm super excited to show you guys is the game builder crew now the way that this crew works is you type in a
description of what type of game you would like the crew to go off and build my case I'm trying to make the pong game so I briefly describe how it works and how I would expect the game mechanics to behave and then from there three different agents go off to code the game review the source code and continually approve it over and over and over again till we actually get some valid source code so as you can see it just keeps going over and over and over again as they slowly iterate through all the code
and at the very end we end up getting this code right here which is the code that we'll need to run the pong game so what I've done is copied and pasted this code over here and as you can see we're not getting any big bright red squiggly so we're pretty confident that's going to work so what I did is I actually just come over here to our terminal and I'm going to run our game and it's just called Python and I named the file pong. py so whenever I try running the game what will
happen is it'll actually open up a Pi game instance and as you can see we can actually come over here and actually play the game of pong and it actually works which is amazing cuz this would have definitely taken you know any of us way more than four minutes to code up this game especially if you're not familiar with how P game works so all around this is awesome and now that you've seen a few different examples of how crew AI can work let's actually dive deeper into understanding how it works so after that we
can go off and go on and create our own Crews ourself so now it's time for us to start diving into how crew AI actually works and in this section we're going to cover the four core components of crew aai and talk about how they work together to solve complex problems so this is where we're going to be covering agents tools task and processes so let's go ahead and dive into each one of these one by one so the first core component we're going to look at our agents and agents are basically like employees who
belong to a business who are designed to do a specific job so think writers researchers and managers now these employees are able to make choices on their own and they're able to work together by sharing information and assigning tasks to one another and as a part of the business these employees are working together to solve one specific problem and as programmers we're able to assign properties to each one of these agents meaning we're able to assign a role a goal Back stories and tools to help Orient how each one of these agents should behave and
to help this all make sense let's actually look at the trip planner crew that we looked at the beginning when we're looking at all the different examples now as you can see the trip planner had three three different agents to help plan our trips they had a city selection agent a local expert agent and a travel coners agent as you can see each one of these agents was assigned different properties you know roles goals Back stories and tools to help us plan our trips so now that we know that agents are specialized employees who help
us solve bigger problems let's go ahead and move on to the next part and talk about tools and talk about how they're going to help our agents and the second core component of crew aai is going to be tools and tools are something that agents can use to perform a specific task so if this was the real world you know think of a builder can use a hammer to hit a nail well in our case agents can use tools to go search on the Internet or they can use it to start actually performing calculations and
there's two types of tools there are built-in tools that have already a part of Lang chain so as you can see this list of Lang chain tools is pretty huge and these are all different tools that we can connect with and the second option is we can use custom tools now let's just go over quick three custom tools that we've already seen in previous examples so the first tool is going to be the calculator tool now this comes from our trip Planner tool where it was adding up our expenses for getting flights getting tickets and
going out on excusions a little bit more complex tool that you might not have seen is going to be the Search tool now this is what was running behind the scenes in our trip planner and it was also running behind the scenes in our stock analysis this is what we were using to go off on the internet gather information for us so that we can come to an answer and a more fancy one that I thought you guys would think it's pretty cool was a part of the stock analysis and what this tool was designed
to do was to actually search up for quarterly reports from different companies they're looking for 10 Q forms and this was actually using a custom API which was called the SEC API to go off and grab this information so those are examples of three custom tools and you can obviously create whatever kind of tools that you want to and we'll actually go off and create our own custom ones later on but enough of talking about tools let's go ahead and dive on to core component number three and the third core component of crew AI is
going to be task and task are essentially jobs or assignments that AI agents need to complete and these task will Define what needs to be done and it can also include additional information such as like which agent needs to go off and do the work and it also might explicitly call out which tools the agent needs to use and once again with these task we're able to define a few core properties such as a description the agent and the tools like I just mentioned so let's go ahead and look at some example tasks so that
you guys can see what these look like in the real world so I went ahead and pulled up the stock analysis crew so that we can see the four underlying task that were used to run this job so the four tasks that we have are the research task which goes off and collects and summarizes news articles and everything you can find on the internet outside of that we had the financial analysis task which was to basically go off and look at the underlying fundamentals of the company then we have the filings analysis who was going
off and actually looking at the quarterly reports and annual disclosures released by the company and then finally we had the recommend task which is where we were synthe izing all the data down into one task and producing our final answer now what you'll notice is each one of these tasks specifically called out which agent was going to perform this duty but what you'll also notice is that we did not specifically call out which tools the agent was allowed to do now this is where it comes down to some of the underlying magic of cre AI
where these agents will figure out on their own which tools they should use in order to complete their job so crew AI is doing a lot of the heavy lifting for us but I just want to show you guys that this is what it is looking like under the hood whenever you want to go off and complete and do some work with agents this is how you actually Define the tasks that need to get done and the fourth and final core component of crew AI is going to be the process and the process is by
far the most important part because it defines how agents are going to work together how task are going to be assigned to each of the agents and whenever the agents need to work together it's going to handle all that glue to make sure that all the proper work gets done and in the future there's going to be multiple ways that these processes are going to handle work but just for now all you need to know that the process make sure that works get done sequentially meaning each agent does the job and then all the work
from that agent gets passed along to the next agent in the future they're going to add hierarchical processes and a bunch more but for right now I just want you to know stick to sequential so now that we've covered the four core components of crew AI separately let's go ahead and tie them all together and I think the best way to do that is to look at the stock analysis crew example so what I've done is I pulled up the main run function of this crew and let's go through this line by line so right
out the gate you can see we're taking in our agents which Define which types of employees we're going to have then we decide pull in which task we need to perform so these are the jobs and then from there we actually go ahead and specifically pull out the actual agents and task within each one of those and then from there what you might be missing is where are all the tools that we defined well those are actually tied to the agents so if we dive into one of the agents you can see that these are
the specific tools that they can use and then now we need to look at the fourth core component which is going to be be the process which defines how the work it's all going to get tied together so what we do is we add that to our main crew file which connects everything together our agents our task our tools and our processes and we task it and put it all together and then we go off and kick off our crew so that's how all these four major core components of a crew work together to help
us complete our complex task so now that we've talked about all the theory let's go off and start making our own new crew so that you guys can see it in action and so you can go off and create your own Army of AI agents later on all right so welcome to the fun part of the video where we're going to start coding up and building our own Crews and in this portion we're actually going to recreate the trip planner from scratch and as we do this we're going to cover common pitfalls and tips that
I want to share with you guys because I've made multiple Crews and it's very easy to make Crews that don't work so I'm going to be sharing everything that I've learned with you guys and the reason that we're going to recreate the trip planner with a few improvements is because this crew exemplifies the ideal crew workflow and what I mean by that is we give this crew one highlevel goal to achieve and this goal can actually be broken down into Min many subtask and from there once we have our 10 to 100 subtask the crew
will work together to synthesize all of the different data it just gathered into one single output and in our case this is going to be a 7-day trip so it's important to remember the ideal crew workflow is one large goal that can be broken down into a bunch of small subtask that eventually come right back and condense to one final output and then I also want to give a huge shout out to Xiao who's the creator of crew aai and all the examples that we just looked out I'll put a link down to his repositories
below so you can check them out on your own but outside that let's go ahead and start building our own crew from scratch I'm excited let's go so the very first thing that we need to do to create our new crew is to start building out our new project and the easiest way to do that is to head over to xiao's create examples repository and the reason we want to do this is because we can go ahead and use his starter temp template to help us jump start this process so all we need to do
is come over here and click the code button and we're going to copy that URL to this repository and once we've done that we're going to head back over to our terminal and we're going to go ahead and clone this repository with get clone and paste in that URL now from there it should take a few seconds to go ahead and download everything but we can actually see that it works and that it has our proper starter template right over here so what we're going to do next is go ahead and move out this starter
template and we want to go ahead and give it a name so in our case we're just going to call go ahead and call it our trip planner from scratch great so it's going to take a few seconds but now what we can do is go ahead and open up that trip planner from scratch and this will open up a new Visual Studio code instance that we can start typing in now let me give you a quick overview of what this repository looks like in all of its current folders and then we'll actually dive into
making it more usable for our use case so the main file is obviously where we're going to start and you can see that J has already populated it with some initial tools for example he has us using duck. go search and what you can see from a highle overview is we're able to import our agents we're able to import our task and then from there we just kind of connect the dots of our agents are going to be used in these task and then we go ahead and symbol the crew and then kick it off
and then at the very end you can see whenever we start this main function what we're going to do is take in a few input variables and then run the criw so that's how it all works but now what we're going to do is start going through this part by part and building it out and the way I would like to flow you guys through this is first by building out the agents then we're going to build out the tools then we're going to build out the task which are actually the most important part in
my opinion and then finally we're going to connect all the Dots here on our main dopy so let's go ahead and get started working on these one by one but before we dive into building out the core components of our crew we need to quickly set up our python environment so that we will have all the proper dependencies and we're able to run our python script and the easiest way to do that is we are going to set up our PI project. Tumo file this is basically just going to turn all of our requirements for
this project into code so that we can just run our install script basically to package and build all the necessary dependencies to run our python application now I will say this is the boring part so we're going to speed through it as fast as possible so that we can get you up and running with your Python scripts so all we need to do to create our python project is we're basically going to define something that looks just like this to where we you know basically just Define here's our project here's what's included in it here's
our dependencies so you'll see this in action in just a second I just want to show it to you but the important action items for you are you first need to basically install poetry now what poetry is going to do is allow us to install all of the dependencies that we mentioned in our Tomo file and in order to install poetry you'll just need to run this Command right here pipex install poetry and just for you users who don't already have pipex installed what you'll need to do is come over here and go ahead and
install pipex now if you're on a Mac you'll run these instructions on Linux these instructions and if you're on Windows you're just going to install these so I'm not going to dive into too much of that just because that's a little too in the weeds but once you've installed pipex and poetry let's go ahead and hop back over to our code so that we can start building out our own Tomo file so the first thing we're going to do back over in Visual Studio code is we're going to make sure we have poetry installed if
you just follow those few steps so all we have to do to check to make sure it working is working properly we just type in poetry D- version and whenever we run it you should get back the version number and this will probably change based on the time you're watching this video and if you had any issues getting this set up to feel free to drop a comment down below and I'll do my best to provide some help as quickly as I can so enough of that let's go ahead and move on to the next
part now what we're going to be doing is going ahead and creating our own P project. tommo file so all we need to do is just say p project. tommo and like I said this is where we're going to be describing our package now there's two key components that we want to set up in here so the first one is going to be tool. poetry and this is where we need to define the core components such as like the name description everything like that the other core component that we're going to be working on is
our dependencies now our dependencies are where we're going to specifically call out and outline which package numbers and versions We need to use to set up crew so I'm going to go ahead and just paste into the dependencies just because it's not fun watching me type in boring stuff like this but the important part is we need to be using python between version 310 and 312 we need to be using crew AI outside of that we want to be able to handle un structure data and this will come in more to play later on we'll
get there whenever we get there but the other few things are important we need to be using Pome and this is just allows us to access and manage weather data this is going to be important when scheduling out our different Crews and make basically our event planners and city planners to make sure that we're going to locations when it's not too rainy and it's actually going to be enjoyable outside of that we want to set up tools now this going to be for L chain and we want to make sure that we are able to
decorate our tools so that they are usable by L chain and the final thing is we just want to be able to use python. because we need to eventually start using our open AI keys and this is going to allow us to do it okay okay the next part is we need to set up our just generic part of the application basically our package so we're just going to call this trip planner. youube cuz I'm making this for you guys on YouTube then we're just going to set up version 0.1.0 cuz this is our first
release and then we're just going to set up a description and we're just going to say this is a simple AI trip planner and then finally what we're going to do is just add the authors so what we'll do just feel free to put your name here yeah we're also just going to put Xiao cuz he was the creator of this and his name was Xiao let's just make sure I get this right I don't want to spell his spell his name wrong and we also got to give credit where credit to do so Xiao
and MD m o u r a probably spelled that but he's the uh yeah I think it's this one there we go so yeah he's he's the Creator and then I'm editing it so we'll put Brandon fantastic enough of that but let's go ahead now that we've set up these two core components what I also want to do is just let you know that we also need to do a few other things inside of our pip poetry file what we can do in here in our P project is I'm just going to walk you through
these real fast the first thing is we can go ahead and set up pyite now pyite is going to allow us to check our python code for type errors and like I said just make sure that we're writing good valid code the next tool that we can set up to run inside of our Pi Project is called rough and this once again just makes sure that we don't have any errors and it also checks for styling issues and then finally there's the build system and this just defines and lets us know that poetry is going
to be the tool for managing our python project dependencies so it's going to package and everything up and make sure it works so so like I said feel free to copy and paste these parts but I just want to walk you through setting this up because this is how we're going to be creating our python environment and we'll go ahead and start working on that now so all we have to do next is just open up our terminal and then we can type in poetry install D- no root now what this going to do is
go off and install all the proper dependencies and everything else that we need to to create our new python environment and you can see that it works if you type in poetry and list you'll see our new python environment which actually has our same name here and it calls out the specific python version that was used fantastic and you can actually go ahead and enter in your poetry environment and you just type in poetry shell and this will activate the current environment whatever folder you're currently inside of so this is opening up our new python
environment you can see it gets called out right here so give yourself a pet on the back you just did the first most important step to where you now have a actually a python environment that you can start using what we're going to do next is actually go ahead and start working on our agents and we're going to move over to the fun stuff so now it's time for us to start building out our own agent for our trip planner and all we have to do is go ahead and first open up our agents. py
file and to help make your guys' life as easy as possible I went ahead and made a cheat sheet for you guys to help you as you progress and start building your own custom agents and the reason I did this is because there was nowhere on the internet where I found that defined how to make a good Agent there were just a bunch of tutorials that said oh this file works there's a bunch of Agents just copy and paste it to your own code but there was not a template that I could use to go
off and create my own agents so that's what I want to share with you guys right now so I'm going to go ahead and paste this so here's our the cheat sheet that I've created for you guys so we're going to work on filling this out first before we dive down in here and actually start coding up our agents we need to make sure we have a solid grasp on what we're building first okay so let me read you what we're going to be doing in this cheat sheet so in order to create a great
agent you need to be thinking like a boss and what I mean by that is you need to be working backwards from the goal that you were trying to achieve and you need to think of which employees you need to hire to help get the job done and the best way I like to start off by doing this is going ahead and defining a captain and the captain is basically going to be the main manager who is working towards achieving the main goal so yeah they're going to be orienting the other agents towards the goal
as well and then what you need to do from there is once you defin your you know Captain you need to figure out which expert that Captain needs to communicate with or delegate task to in order to basically help achieve the hierarchical goal so and the like best way to approach this is to really build a like top- down structure where you have like a manager and then that manager has someone that they talk to and then you have a worker so basically just think of like a traditional business that's very hierarchical all right so
let's go ahead and actually start defining these different areas for our trip planner with the end goal of once you've done it once for our trip planner you can go off and start building your own agents for your own projects so the first thing that we want to do when it comes to creating our goal is we want to say that we are trying to create a 7-Day travel itinerary with detailed perday plans including budget packing suggestions and safety trips so now that we know what we're trying to do well who would be a great
Captain manager or boss to help steer the ship that we could hire to make sure that we're able to achieve this goal well I think a expert travel agent would be a great person who could go go off and accomplish this goal you know that's in real life that's exactly what travel agents do they they do this for a real life job so now we have to keep thinking in our top down structure and think of well who does our expert travel agent need to talk to well our agent you know they're going to be
able to kind of do some of the higher planning but we need to take in our users feedback on where they want to travel to so let's just say we wanted to go to Thailand or we wanted to go to Italy well what we need to do is this travel agent needs to talk to someone who can find all the good places to visit in such a country so that's why the next option that you want to hire for your small business and for your crew is going to be a city selection expert that way
whenever we know we want to go to Italy or Thailand our city selection expert will tell us all the great spots that we need to go to during our 7-Day travel and then the final thing is well what do we want to do and who does this city selection expert need to talk to well let's say the city expert tells us three cities that we need to go to now what we need to do is actually work on the perday plant It's always important to go back to our original goals so how do we know
what we want to do on a perday plan well it sounds like we need to talk to a like local expert or a local tour guide to talk to our Master travel agent to help plan out what we're going to be doing per day in each City so that's why our final employee that we're going to be hiring is going to be a local tour guide so this is basically how you go about building out a crew like this and now what we can do is go off and actually start filling in what each one
of these agents is going to be doing inside of our code so and I hope this makes sense and I also wanted to give you guys some extra Notes too and these are going to become applicable as we go down here and start creating our agents so yeah let's go ahead and start doing that we're going to start filling in each one of these new agents we made and turn them into actual codes so we can start actually using them in our crew so let's start working on that now so the first thing we're going
do is go ahead and Define our agents as you can see there's two right now that are just boiler plate agents but we're going to fill them in so I'm going to go ahead and say the first agent we want to make is going to be our expert travel agent and it's kind of funny cuz like we're building agents but travel agent is already a real world the next thing that we want to do is go ahead and create our city selection expert this is the person who's going to tell us all the great places
to go inside of a country and then finally what we're going to do is go off and create our third agent which is going to be our local tour guide so let's go ahead and do this local tour guide fantastic so we have that working let's get all of everything indented properly so now what we're going to do is go per agent and actually start filling out what this agent needs to be doing so when it comes to making rolls Back stories and goals I went ahead and made some instructions for you guys so let's
scroll up to the top so as you can see whenever we're trying to make an agent we need to make sure that this agent is always results driven anytime you don't make an agent that's result driven you'll be like get very frustrated because when you go off and run R your crew you're going to get back some garbage so I've run into this plenty of times myself so I'm trying to save you a ton of headache and the other thing is this agent also needs to have a clear goal in mind like you need to
produce blank the other thing is going a little bit deeper the role is really just going to be their job title the goal or really obviously the goal we're going to Define here this is where I'm saying we need to be results driven and have a clear goal in mind and then the backstory really it just needs to be the resume so for example I was ask you what you do for your job and you were an expert at something you would just say I an expert at this and I help people achieve blank so
hopefully that's enough for a quick crash course and hope these notes really do help as you go off and create your own agents but let's actually put this new knowledge to test so the first thing when it comes to creating our expert travel agent let's go ahead and Define our role so like I said it's basically just going to be the same name that we had up here so we're just going to be an expert travel agent now when it comes to our backstory this is going to be our resume so in our case we're
just going to say that um I'm actually going to pause on this I like to do the backstory at the end because the backstory should support the goal so let's go ahead and actually just knock out the goal real fast so when it comes to creating our goal I just want to say that our goal is to create a 7-Day travel itinerary plan that's half the story we're going to keep going there so we're trying to create a 7-Day travel plan let's go and open this up so we can yeah there we go so we're
trying to create a 7-Day itinerary with travel plans we also want to include budget packing suggestions and we also want to include safety tips so that's what we're trying to do and that's our goal and just to reiterate what we're trying to do here is we want to have results driven and a clear goal in mind so and this is all action like we are create creating here's what we're trying to create so I hope this making sense I'm not going to keep diving back into it but it's just it is you'll be very frustrated
if you don't do what I'm telling you uh here because it's uh it fought me for a very long time whenever I was trying to do this by myself so the next thing like I said what we want to do for the backstory is we just want to reiterate basically our goal and rephrase it so I always just like to say like for example I am an expert in travel planning and Logistics and then I also just want to say after that I have Decades of experience making travel itineraries basically what we're trying to do
here is just help our agent get in character fantastic there we go let's just do that okay cool so life is looking good and what we're going to do is we are going to come back to this later when it comes to setting up our tools also it's important to note if you just hover over the agent you usually can go ahead and it's not doing it right now but you normally can go ahead and see all the other options and the default values that they're said to so right now when it comes to like
allowing delegation I prefer to leave that to false and false is the default option so we can actually just go ahead and delete all those and then what we're going to do next is we're going to go ahead and just leave it how it is right now but I do want to put a pro tip here for you guys if you actually go over to your open aai usage you'll notice that there were some days where I was racking up like A5 or $6 bill and that's from just running one of these trip planners using
GPT 4 and I did it like five times so it's almost like a dollar almost a dollar more like 75 cents per run so you can quickly quickly rack up a bill if you're testing with this so hopefully all these notes I'm sharing you save you some money as well as you're going through and doing this so if you're trying to save money and during testing I definitely recommend using gbt 3.5 and as you go on eventually to maybe like building out a real production application or you happy with the results move over to chat
gbt 4 because it's going to give you much higher quality results so but I'm going to go ahead and update it to four for you guys just so y'all can see it in action so open a GPT 4 Fantastic we're just going to do some cleaning up Okay cool so now let's go ahead and move on to the next agent and we're going to start speeding through these just because there's there's a bunch of other stuff that we also need to start working on next so uh for this one our role is just going to
be a city selection expert and then for our goal what we're trying to do with this one is we just want to select the best cities based on weather season price and our traveler's interest so I'm just going to go ahead paste that in and then our backstory once again what we're trying to do is just reiterate what we have decided we want to be our goal so I'm going to open this up for you guys so our backstory like in this case we're just going to say we have a great track record of picking
such interest and um and destinations Based on data fantastic and the very last one that we're going to start working on is going to be our local tour guide now for this local tour guide basically let's go a and type it out for you guys local tour guide for their task and goal what we're just going to say is we want them to provide the best insights about a specific City selection cuz they're going to be the one that's going to go off and find all the cool things for us and they're actually going to
start you'll see later they're going to start searching the internet for us but enough of that in the later section we start building up tools and task and then finally once again per usual when it comes to backstory we're just going to reiterate what we have defined in our goal so we're just going to say once again that we have a ton of experience and a bunch of extensive knowledge about cities so and what's cool is a local tour guide is a very generic term think of it like in normal python or just normal functions
this tour guide is reusable so this same local expert could be used for you know just a random City out in California or it could be used for something out in China like it is it could be used for anything it's reusable that's the cool part about the way we have structured this all of our agents so all right so what we're going to do next now that we have this set up we're going to go ahead and actually move on to the next part of this where we're going to start setting up our tools
that our agents are going to use to help them achieve their goal so let's go ahead and start working on that now so now it's time for us to start building out our tools that are agents are going to use so just to help guide where we're going to go next all we need to really make so that all of our different agents can work are two separate tools the first tool is just going to be a Search tool that's going to allow the agents to go off and explore the internet so that's going to
help with you know Finding how much things cost what to pack safety tips looking up cities on the internet looking up we basically everything is going to be looked up through the internet we'll talk how we're going to do that and the tool we're going to build actually before that is just going to be a simple calculator and the reason why we want to do that is just because we need to be able to add up how much things cost and so that's going to be the first tool that we're going to work on so
what we need to do whenever we're going to create tools for our crew we're just going to make a new folder and we're just going to call this folder our tools folder let's go ahead and create our two different files in here so the first one is going to be our calculator calculator tools and it's name it like that and then the other one is going to be our search tools so we'll just type in search tools. P fantastic so now that we have our two tools what I'm going to do for this part is
actually just copy and paste the code but walk you through why it works line by line just because I found this very confusing the first time that I saw this okay so here's what's important whenever you look at a tool so first off what you'll notice is we're going to go ahead and Def find our class in our class is just going to have a calculate function this calculate function can perform operations using the evaluate operation where we'll basically pass in you know we'll really just pass in a string and we'll convert that so as
you can see in the example if you passed in something like this we would go off and this function would perform that operation so that's what's happening at a high level but let me talk about what's actually happening under the hood using the tools functionality so anytime you want to make a function accessible to a crew what you need to do is go off and add the tool decorator so anything with an at sign and the word tool after it basically says yep I am usable by uh the crew so I thought this was very
confusing the first time I saw this because what you'll notice is we just say hey make a calculation and somehow the crew is automatically going to know what to pass in here so I found this very confusing it does work the first time I guess the basically the tool decorator has some intelligence and working with the crew to go off and figure out like what we need to be passing in here but what I want to show you is actually a more basically robust version because this is overly simplified if you are going to go
off in the future and you want to basically add in some like higher level stricter rules on what you want to create with your tools this is a more in-depth example I'm going to comment it out but I'll leave it in this file for you guys but basically here's what you need to know whenever you're making a tool that has stricter arguments that you need to pass into it is you can actually Define an argument schema and that's just going to be using done using pantic models so what you'll do is just go off here
and say well whenever we calculate using this like smarter or more strict calculator I need you to pass in two things the operation and then we Define what the operation is so you know 2 plus 2 and then factor is going to be well what is the factor that we're going to be multiplying by the operation and what's cool is that's actually what they eventually do down here in code so you can see they're multiplying the operation by a factor so I just thought this was helpful because I was just like eh it seems a
little too magical just to say oh passent operation and crew will know exactly what an operation is and what to pass into it so just know if you ever need to go a little bit deeper and provide some stricter guidance on what the crew should do with a function know you can do this so I'm going to comment this out but I'm going to leave this in the code so that you guys can see it and potentially access it yourself so okay let's go back UNC comment all this because that is everything we need to
do for our calculator so let's go ahead now and move back over to working on our search tools so setting up our search tools is going to be a little bit more involved but once again I'm just going to for the time sake copy and paste and then walk you through this line by line so okay once again what you'll notice is we're going to create a class which is going to contain the function that we want to run per usual we are going to add a decorator so that crew AI knows that it can
use this tool and also basically give it some instructions on what it can do so in this case obviously it's going to to go off and search the internet now how is this going to work well what's going to happen is we are going to be using a service called serer now if you haven't heard of server before basically what they allow you to do is go off and do Google searches they're an awesome service definitely recommend checking them out and in fact what you'll need to do if you want to actually enable search you
need to come over here and sign up and once you sign up you'll get 2,500 free queries so definitely recommend it it's even worth paying for they have great deals now the next thing is once you've signed up what you'll do is you'll be able to go over to the dashboard so you can see exactly how many queries you've been making on each day and what's pretty cool is like you can actually see kind of a log of what's been you know which queries you performed so far so as you can see I've been performing
this to look up stuff in Thailand but the important thing that you need to do is go over to the API key section and you want to generate an API key so I'm just going to go ahead and copy one just so you can see what's going to happen because we need to save this a API key to our application so I'm showing you this because I'm going to go reset mine immediately afterwards but it is very very very important that you do not show this API key to other people because they'll be able to
use your request and obviously spend your own money so make sure you keep this secret and I'm going to show you how we're going to do that so you're going to come over here click copy let's come back over to our application and we'll come back to the tools in a second but we need to do this first what we're going to do is go over here and we're going to create a new file and this is going to be aemv file so that's the first thing we're going to do the next thing do is
come over here and you need to make sure that yourg ignore file is specifically calling outv cuz what this will do is it'll make sure that you are not saving your environment variables off to GitHub where people can see them fantastic so now that we have this set up what we're going to do is go ahead and paste our serer API key and let's head back over to our Search tool to see what they call it so from our environment variables we need to grab the Ser API key so we're just going to go ahead
and call it like this fantastic so we now have our key set up so that our serper tool and Search tool can go off and actually start making requests to the internet on our behalf so that's how all that works but all right let's keep chugging along so you guys can see what's happening so the main thing like I said we're going to go off and make quick Google searches and the way we're able to make our request off to serper is by passing along our API key and our headers and what we're going to
do is we are going to pass along the payload which is going to be our query so what we're doing is saying hey I would like to make a post request to this endpoint with these headers which has our API keys and I want to query for this data we're going to get back a response and what we're going to do is just do some generic validation to say like well did we get back a good response yes or no the next thing we're going to do is if we did get a valid response we're
going to start pulling out the information that was gathered for us and what we're going to do is basically start building up a little repository of data that was passed back to us so we're going to look in the top four results we're going to look at the title of the web page the link and then we're also going to grab apparently a short snippet about what that search result said so that's how we're going to go off and explore the internet and like I said I know that was kind of a lot and we
went through it quickly but just know that um these are the only two tools that you need to get up and start working with our trip planner so now that we've covered that what we're going to do next is go off and start working on our task which in my opinion are the most important part of setting up the whole crew so let's go ahead and start working on that so now it's time for us to start working on creating our task for our crew so all we need to do is go over to our
task. folder open it up and once again I couldn't find a ton of good documentation online to Define what made a good task so once again I made a cheat sheet for you guys to make your lives easier as you are going off and creating your own AI Army after this video so I'm going to go ahead and paste it and then we're going to walk through this step by step so that we can go ahead and create our own task because like I said past I've gone off and done this and my crew just
ran into circles and gave out garbage results so I think this is going to save you guys a bunch of time so let's go ahead open it up and get ready to start answering from the top so the purpose of our task so when we're creating task we want to keep the end mind and um the end goal in mind and what we want to do is be very clear on the specific outcomes we want our task to achieve and then from there we're just going to keep breaking down our outcome into actionable task and
then once we have these smaller actual task we're going to start assigning them to each of our agents that we created earlier and then from there we're just going to make sure that when we're defining those tasks to those agents we're going to be super descriptive and provide clear instructions and like let's just take a step back from AI from a second like if we were thinking about hiring a you know someone to mow your lawn or someone to do a job for you what you would do is if you wanted to make sure that
you got everything that you needed to get done you would write out exactly step- by step desired outcome I want you to do clean this part then this part and this part that way there's nothing nothing left up to the you know the agent to figure out on their own they know exactly what they need to go off and do so like I said just think like you're hiring an employee and give them Crystal Clear instructions okay so this is this will normally be blank for you guys but I went ahead and copied it in
just to save us some time so in our case we need to figure out what our overall ideal goal is so in our case what we're trying to do is create a detailed itinerary including City selection attractions and practical travel advice so what is the high level outcome desired goal that we're looking for in our case I'm just going to go and answer this and like I said this is the exact basically practice or cheat sheet that I would expect youall to fill out before you start diving into the code so in our case what
we want to do is our key task is to create a detailed 7-Day travel itinerary okay simple enough well how does one go about creating a 7-Day trial itinerary well what you'll notice is a lot of these task kind of come back to what our agents were doing so if you ever get stuck figuring out what needs to be done you can actually go back over to your agents file and figure out well what does agent number one need to do what does agent number two need to do because that's how we're going to be
signing task so that's actually what we're going to work on next so let's go ahead and just think for our itinerary planner well what this person needs to do is go ahead and actually you know develop a detailed travel plan for each day of the trip the next part is for our city selection person they need to go off and analyze and pick the best cities for us so City selection analyze and pick the best cities to visit and then finally for the local tour guide they need to basically basically do that just find a
local expert and provide insights and recommendations okay so now what we're going to do is we need to assign task to agents and that's kind of what we've done already up here but just note sometimes you're going to work on bigger task where you just might have a general worker B and that worker B can go off and do a bunch of tasks so we're going to go ahead and skip this right now cuz each one of these is going to be tied to the person basically who it matches Okay cool so now here comes
the part to where a lot of what we have planned is going to start going into action so what I've done is I've made a template for you guys to go off and basically paste down into here into each one of the task so to make your life easier and to make sure that your task are actually going to help move your crew towards a goal so here's what an ideal template will look like you'll provide the task and you'll say exactly what the basically what the agent needs to work on then you'll provide a
more detailed description of what the agent's expected to do and actionable steps if you can provide any examples this is where you're going to do it and then finally what you're going to do is tell the task what parameters it has to work with and a brief description of each of the parameters so for example you could think of like explore a city well a city name could be a potential parameter or the weather or the a specific date so these are just things that you can pass in here basically an unlimited number of parameters
just Define them here to help provide your agent whenever they're performing the task they'll have context of what's going on and then finally you'll notice in a lot of the code that there's this self unor tip selection and basically it just it we're telling the agent hey if you do your best work I'll give you $10,000 commission I've just known this notice that this was a lot included in a lot of the examples and it seems to be a way to basically help align the goal basically the agents are basically aligned with making money so
if we tell it it'll get a big commission it apparently tries its best to do a great job so okay enough of the high level overview let's go ahead and actually start turning in this template into actual task so we're going to go ahead and start working and creating our task now based on our cheat sheet so the first thing we want to do is scroll down and what we're going to do is just go ahead and rename the first task and and we're going to be making this task the plan itinerary task because this
is what we want to make sure that our travel agent is working on the whole time so put in our trip itinerary now here's what we're going to start doing this is where you and I are going to start defining which parameters we want to pass into our itinerary so what we want to do is first we want to pass in the city cuz we want to know where we're traveling and for our task we also need to have some general information of like travel date so like kind of like when are you thinking about
going and then that's just going to be a string and the next part is just going to be the interest so like basically what is our main customer interested in doing whenever they are traveling that way we can help cater it to them okay so what we're going to do next let's go ahead and get rid of all this what we're going to do next is go ahead and go on top and start pasting in everything that we had set up from the get-go so let's go ahead and copy and paste this scroll down come
in here and this is where we're going to paste it now we're obviously going to clear a lot of this up and clean it up but it is important that we're working from the same starting point that way it makes your life easier when you're going off and doing this yourself okay so what is the main task that we want to do well in our case what we want to work on is developing a 7day travel itinerary all right so what we want to do next is we want to make a description that could be
basically handed over to anyone for them to start working so we want to be clear direct and provide Specific Instructions so that's what this looks like right here so I'm going to read it to you guys just so you can go ahead and you know type it up yourselves if you want or just pull on the search code and you know use it yourself so the main thing we want to do for our plan itinerary task is we want to expand the city guide into a full 7-Day travel itinerary with detailed perday plans including weather
forecast places to eat packing suggestions and a budget breakdown you must suggest actual places to visit actual hotels to stay and actual restaurants to go to so this is being very clear this is what we expect from you this itenerary should cover all aspects of the trip from arrival to departure integrating the city guide information with practical travel Logistics so that's what we're going to go ahead and do is say is our task what we want from our main planning our itinerary and the next thing is we want to go ahead and say what are
our parameters that we can work with so we're going to go ahead and get rid of these and we're going to paste in the new ones and these tie exactly to what we have up here to where we're going to have our city these are our trip dates and our travel interest so I hope this is going to make it easier for you guys as you're working on this on your own and the last thing what we can do is go ahead and provide a note so we're just going to say like delivering your best
work be greatly appreciated but what we're going to start doing actually is getting rid of this and we're just going to go ahead and always just use the self tip section for this Okay cool so that's what we're going to do for the first task now let's go ahead and start working on the next task and for this one what we're going to do is start working on Gathering identifying which city we want to work with so we're just going to call this our identify City task now this one is going to be pretty straightforward
what we want to do is we want to have our agent go ahead and figure out where we're at we want them to know where we're going uh what what cities we're interested in looking at what interest The Traveler has and once again their travel dates so this is what we need to know in order to go off and identify cool cities to travel to so once again let's go ahead and delete this and what we're going to do once again come up here paste our template go ahead and come down here and start working
with it fantastic so I know we're jumping around but this is going to make it nice and easy for us great okay okay so what do we want to start doing for our identify City well the main overarching task that we want to do is going back to earlier is we want to identify the best cities then when it comes to our description we just want to analyze which cities are the best to go ahead and travel to so we're just going to say analyze which cities are the best to travel to based on our
criteria from our weather research earlier travel cost and from there what we want to do is compare it to other cities and make sure that we're picking the ones that best fit with what we're trying to do and once again we have to be very clear on our output so we tell it your final answer must be a detailed report on a chosen City including flight cost weather cast and attractions so once again you need to say what your outputs are and then for here what we're going to do once again is paste in our
parameters just so we are able to access them in our code and this going be our travel dates and then finally for our notes once again we're just going to do this tip selection right here fantastic okay so now we're going to go on to the third and final tab task so we're just going to copy and paste this one come down here now this task if you remember this is just going to be for our local tour guide expert he's the one that's going to be executing this so what we're going to do for
this one is well this agent is going to have a few different parameters to work with he is going to know exactly which city we're at he also needs to know where we're traveling like what dates cuz you know different things are happening different times of the year and the last one is interest that way he can go oh you like to do yoga or hiking you must try out these different locations so what we're going to do down here is briefly update our task to make it specific for this person so for this agent
so we're just going to say hey you need to gather an in-depth city guide information and the next thing is we completely need to change up the description to fit this new agent and in this case what we want to do is just go off and compile an in-depth guide for the city selection so like hey we went to Thailand here's all the cool things to do in Bangkok Thailand and you know like I said just go ahead and dive deep into that specific City then from there what we're going to do is just update
our basically update our parameters down here make sure they match things look good we're going to include our note per usual and fantastic so we have so far went ahead and checked off all of our tasks and what I would like to do next is go ahead and tying everything together inside of our main.py file where we're going to put together our tools our task and go ahead and put together our agents so let's go ahead and start working on cleaning this up next so right now we're about to tie everything together so that we
can start running our crew and what I'm going to do is we're going to actually start working with our main function down here or what calls our main function and then we're going to work our way from the top down and start cleaning everything up but what we need to do is in the very beginning is we need to go off and actually Define which parameters we're going to pass into to our application cuz this is going to be a command line interface where we're going to actually you know prompt the user to let us
know like where it be traveling from where the cities where they're going to go what the date range is that they want to travel or what month or whatever and then also their interest so these are all the different variables that we're going to pass in like you saw earlier in our task this is where all this is coming from okay fantastic so this is what is going to happen and this is where as you can see we're going to pass everything into here okay so what we need to do next is like I said
we're just going to work from the top down so we're going to clean up some of our Imports at the top and we're going to make sure everything's installed in just a little bit but right now let's go ahead and keep it looking like this okay and like I said this is just because we're working with the boiler plate code that came from the starter pack all right yeah let's just keep getting rid of everything just a lot a lot of deleting right now okay so what we're going to work on is is go off
and what we're going to do is start defining our custom crew and in our case he's this is going to be our trip crew actually and what we're going to do is go ahead and create our Constructor file so in our case what we want to do is accept those variables we created at the very bottom of the screen down here our location cities date ranges and so forth so what we're going to do is just go ahead and say origin then we're going to say cities date range and interest just so make sure we
did do origin yeah so this will be we'll just go ahead and call this our origin just just to make sure we're saying the same names okay cool and then what we're going to do is just go ahead and assign those so we're going to go ahead and say this is our origin and we're going to go ahead and do the next one and say our cities and then we're going to just keep going down the list for our date ranges and then same for our interest okay fantastic so once we have all of our
information saved locally what we want to do next is go off and actually start creating and updating our run so this is what we're going to do here um what we're doing right now you can see it has we're importing our custom agents let's be a little bit more clever with this and these are going to be our travel agents just to better update and provide better naming practices so let's go ahead I'm just cleaning up as we're typing so what we're going to do update this real fast to be our travel agents update that
and travel agents fantastic and then same for our task over here what you'll notice at the top of the file this is going to be our custom task and these really need to be our travel task great so we're cleaning up as we go so this is going to be our travel task fantastic all right so now that we have defined our task what we need to do next is actually start defining our agents so in our case remember we had three different agents so I'm going to go ahead and pull up our agents file
so you can see exactly what we have over here on the right and you can see why we're pasting it in so the first one coming from our agent is going to be our uh expert travel agent so that's the first one and we're just going to paste it I'm going to zoom out a little bit just so you guys can see everything at the same time the next agent we're going to work on is going to be our city selection agent paste that and then finally what we have is our local tour guide so
let's paste this too grab both these update all right fantas fantastic so now that we've defined all of our agents what we want to work on next is identifying our task and what we're going to do in here is let's go ahead and scroll down just a little bit we're going to work on these so the first task that we need to work on let's go ahead and scroll down just so you can see exactly why I'm copying pasting stuff so the first one is going to be the plan itinerary so paste it and paste
it and then what we're going to do is Define the first thing we're going to Define is the agent that we want to work on this so in our case when it comes to working on planning our itinerary we want to make sure that our expert travel agent is the one doing this and then we're going to pass in everything else it's asking for the city travel dates and interest so the next one is cities then it's going to be self. dates self. dates and then last one is self.in fantastic paste those in format it
so it's nice and clean for us great so now we have to find the first task let's keep going so the next task we're going to work on is going to be gathering City info I'm just going to paste it and then pass in the proper variables so once again who do we want to be working on this well in our case that's going to be our city selection expert so right here and then what we want to do next is to find the cities and then we're going to work on the travel dates and
then finally we're going to work on the interest and all this information is just coming from right over here when we initially decided what information we want to pass to the task and then third what we're going to do is work on our final task which is going to be I think I might have passed in the wrong thing yeah gather City info uh that was my bad I made a quick mistake this should have been identified cities yeah fantastic now we're going to copy and paste this and work on the final task which was
gather City information okay so that's what we're going to work on for this one and if you look at what variables we need to pass in here well the first one is who needs to do this well this is going to be our local tour guide and our local tour guide needs to know the city travel dates and interest so cities travel dates travel dates and then finally our interest great let's go ahead and move everything down so it's looking clean awesome so now that we've defined all of our agents and all of our task
we need to go ahead and Define our crew so that's what's going to be happening down here and we're not quite out of the woods yet too there's a few other things we have to clean up outside of this but let's go ahead and paste in our agents so expert travel agent City selection and then we're going to have our local tour guide so it auto completed it for us that's awesome let's Zoom back in and then I'm a big fan of like spacing around like this way just so it's it's easy to see and
then for our task this is going to be pretty straightforward here too we just identify our plan itinerary identify and we're also going to do our gather City information fantastic so now that we defined our crews and our agents what we need to do is actually come back over to our agents real fast because if you remember we have a few things that were left uncommented so the first one is what do we want our agents to do well let's work on these real fast when it comes to setting up our expert travel agent they
need to have access to two specific Tools in our case they want to go off and look at the internet and then the other one is they need to be able to do all the budgeting and calculating so first we need to make sure that we have access to our search tools and um more specifically our search internet function and we'll go ahead and do this in just a second internet so you might be wondering why is it not working well that's cuz we haven't imported it yet so what we need to do up top
is just say from our tools folder I want to use our search tools file and I want to import search tools so that's going to get it working for that one but let's go ahead and import our calculator to cuz that was the next one so what we're going to do for this one is our calculator tools and we want to import our calculator tools class so we can come back down here and use it so we're just going to pass in next we just want to go ahead and say calculate fantastic now what we're
going to do is go ahead and actually update this for our city selection expert 2 and all they need access to is actually looking up on the Internet so we're just going to give her the search tools and search internet and then finally what we're going to do for our local tour guide once again update our tools and we're just going to say hey you're allowed to go search the internet so this is how we're able to give our agents the ability to go off and do things and once again allow delegation let's clean that
up all right great so this is looking fantastic we have all of our agents updated life's looking good um we're also going to clean up some of our Imports at the top of the file what you'll notice is um we're actually going to go off and import some of these in just a little bit but the other thing that we are missing just to tie it all together is we need to go off and actually import our open AI keys so if you remember earlier when we were defining which llms we're going to use we
said we're going to use chat open AI so in order to do that what we need to do is go ahead and give it our open AI keys and if you come back over here what you'll notice is we don't have our open a keys yet so what we need to do is go ahead and hop back over to openi real quick and once we're over here what we're going to do is go over to API keys and as you can see these are all my API Keys what you're going to do is you want
to create a new secret key once again you're going to want to make sure that this gets kept secret but I'm just going to call this trip planner YouTube we're going to go ahead and save it it's going to show you the keys copy it put it back over in our environment variable file and we need to name this a very specific way so in our case what we're going to name it is just going to be let's go ahead and come back over here we're going to say open AI API key and the reason
why we have to do this is because open AI by default is going to look for this key value name so so that's all we need to do and now that we have that tied up what we can do is actually go ahead and actually start working on running our agents so let's go ahead and start doing that and we'll probably need to clean up just a few dependency and one of them is actually going to be first actually loading in our new environment variables so let's go ahead and start working on that real fast
and real fast before we start working with dependencies I just want to call out that this isn't 100% accurate cuz right now you'll see it's like oh you haven't installed crew AI but if you go back to our Pi Project you'll notice we have so the reason why we're having this error is because when we're using visual studio code it's pointing to the wrong spot so here's how we can fix that well what we're going to do is we need to add our interpreter path which I've done just a second ago but let me show
you how I added this trip planner to our environment so what I'm going to do is just go down here to our terminal and all you have to do is just type in poetry shell and once you do that it will actually show you where this virtual environment is activated at so in our case it's activated in my library cache poetry virtual environment and it's mentioned right here so all you have to do copy and paste this up here when it says your interpreter path you're going to come in here paste it hit enter and
whenever you get done you can come back over here and actually click it and what you'll notice is crew aai is currently squiggly cuz we don't have it installed in our current M but when I switch over to the proper one you'll see that it's like yep you have it all right fantastic so now that we have that set up let's go ahead and resolve a few of these missing dependencies that we need to get sorted out so the first one is we just added our open AI keys so we need to start working with
them so we're going to start importing EnV import load. EnV we're just going to load all of our environment variables so that's the first one that we want to work on and then what we're going to do next is if you actually hop over to our agents file you'll notice that we're missing our Lang chain open AI so what we're going to do for this is we're going to come down here and we just didn't add this in the beginning that was my mistake and we're just going to type in poetry add type it in
right here it's going to go off and update our Tomo file for US fantastic so that looks good and these will get resolved in just a few seconds we'll come back to them but outside of that let's go to our task file everything looks good here same looks good in our main file fantastic so let's go ahead and we're going to start trying to run this and we're just going to debug live together so whenever I try and run make sure you have your shell open but let's just go ahead and type in Python and
we're type in main because this is our main.py file and it's going to go off and start running and we might get a few errors yep like it says our search file isn't found so let's go ahead and work on that real fast so I went ahead and fix the tools eror but I just want to show you guys why we were having it in the first place so you'll recognize right now it's saying tools. search tools cannot be resolved which is on because we have our tools folder right here with our search tools file
so like this is this is spelled correctly but the reason we were getting this error is if you go back to our Pi Project you'll notice that there was a tools dependency that we installed so we need to actually go ahead and undo this so what we can do is using our terminal we can just type in poetry remove tools and this will go ahead and uninstall it Life's good so it removed two things it also removed it from here so that works great now and if we head back over here you can see we
actually get a no longer get the squigglies so we're making progress so let's just go ahead and continue keep debugging this is good practice so now if we once again now that we're in our proper environment if we just run Python and we type in run or python main let's go ahead and try running our code real fast so as you can see things are looking good so what we can do is just go ahead and say we're just going to be traveling from Atlanta Georgia what cities we're just let's go ahead and say we're
going to go to Thailand what date range let's just go ahead and say November and then from there what are some high level interests so we're just going to go off and say that we like to do hiking my wife's interested in yoga and [Music] sightseing so let's go ahead and run it and we are running into to a few more errors so let's go ahead and quickly knock these out so as you can see for this bug it's saying that we accidentally messed up and didn't put all the proper parameters inside of our identify
City task so let's go ahead and go back over to our main Pi file and you can see on line it says 80 uh 35 actually yep line 35 it's saying that this doesn't have all the proper parameters let's go ahead and split them up look side by side so we can actually see what's going on so we're missing so we have our agent we have oh we don't have origin that's that's literally all it was so self. origin okay good check and let's just check real fast so this has 1 2 3 4 5
for our identify cities 1 2 3 4 5 for City info what we're going to do is just go ahead and have 1 2 3 4 great and then for our first one for plan itinerary what we want to have is 1 2 3 4 okay life looks good let's close it out Zoom back in and our main P file try running it again what we're going to do this time is what we traveling for from Atlanta Georgia once again we'll say Thailand and then what date rang is November and then we're just going to
say site seeing yoga food all right let's run it off so what it's going to do now is go off and actually start running the crew and go off and actually plan our trip for us so now this takes a few minutes to do but we already covered this in the examples so I'm not going to wait too long but as you can see it is continually working we're searching the internet life's looking good so I'm going to let it run and then I'm going to show you the result here in just a few seconds
but let's go ahead and wait all right guys so it's been about 4 minutes or so and we finally had the crew put together our full 7-Day travel itinerary and you've already kind of seen this before but you know hey you made this one so it's working but as you can see it has us take off from where our origination source is and it has us go over to our destination and as you can see our city selection expert has us going to different areas inside of Thailand and then eventually takes us back home when
we go back to Atlanta and then finally from there what we're going to do is at each stop it tells us what we need to be doing and and that's cuz of the local tourist expert and outside that we're just going to know note what the weather forecast is what we should pack and how much it's going to cost going back and forth to Thailand to Atlanta so all around this is super cool so I hope you guys have loved what we've been able to put together so far but that's wrap for this video guys
I hope youall enjoyed it and I hope you're ready to go off and make your own Army of AI agents and I want to mention if you did like this content you're definitely going to like some of the other videos I have on this channel we have full stack AI tutorials I teach you how to make SAS bus business is pretty much everything if you can think of it I have it on this channel so you'll definitely want to check out whatever videos get recommended right after this and I can't wait to see you in
the next video see [Music] you