All right. So let's start by adding the boiler plate code getting warnings out of the way. And now what you can do is import your crew agent and tasks classes. So now that you have imported your agent, crew, and task classes, we can shatter environment variables. So in order to do it, I'm going to copy this code here. Keep in mind that we are also going to use serper in this example. So you're going to need to serp API key that's going to be provided to you. But you can also find it going on their website. And they do offer free credits. So now that we set up the keys and the model that we're going to be using, let's go ahead and import our tools. We're going to be using two tools in this case the scrape website tool, and the serper dev tool. So think about how those tools will fit together. The Serp dev tool will allow you to search the internet using Google and getting results back. And then the scrape website tool will allow your agents to go into those websites that it finds and getting their contents, so that it can use that during the execution. So you can see here how planning out the tools goes a long way on how your agents are going to behave. All right. So let's create your first agents now. Let's first create venue coordinator. And that gives away what we're building here. The example for this lesson is a crew that is able to organize an event or a meetup for us. This first agent has one single go, identify and book an appropriate venue. So giving an event circumstances and requirements. It's going to search the internet for venues that can support that and find these venues for us. Now we can create that agent. All right. So our next agent is going to be a logistic manager agent. So this agent makes sure to think through the logistics of the event. Now they have the first agent already found a few options for the venue, it's going to think about how will this work out in making sure that the venues appropriate it for us to do whatever we're trying to do with this conference or this meetup. So let's go ahead and create this agent as well. Our third agent is kind of different, it's a marketing agent. It's supposed to work on top of the venue and the logistics, in figuring out how can we market this event, how we can market this meetup so that we can get as many people as possible showing up today? So this agent are going to try to be creative in thinking about the event that we're putting together in the venue and the location, and bring all this together into something that we can use for marketing. So let's go ahead and create that agent as well. You can see here how this can be a pretty interesting tool. We basically have a system now that is not only finding things We have a system now that is not only finding things about the event, but thinking about logistics and also thinking about marketing, everything in one go. And this would be extremely hard to pull it off with conventional programing if you're not building and AI application. So, now that we have this three agents, we're going to do something else, something differently that we haven't done yet. We are going to create a pydantic object that is going to hold our venue details. This is interesting because it's going to show off a new feature for tasks that we haven't discussed yet. So in here you can see that we are importing the pydantic Base model and we are creating a class called venue Details that it inherits from the base model. And we're saying that this venue details is going to have four different attributes: a name, address, a capacity, and a booking status. The reason why we're creating this model is so that our agents can work with it and populate this model, create instances of this as they work. So this is a very interesting use case, and how you can use agents to transfer the fuzzy outputs into actual strongly typed outputs that you can use in your regular code. So before we start creating our tasks, I want to spend a few seconds to talk about pydantic. Pydantic, It's a library that has been getting a lot of attention. Allows you to create models in work with strong typed up variables in a very easy way. So you can see here that instead of like what you would do with classic Python, where you would declare a class and then you would need to declare a niche method and in that method you would need to receive a bunch of arguments and then set a bunch of variables. It gets away from all of that and creates this syntactic sugar that allows you to create models in a very simple way. So now it's not only a class that you're creating, but you're creating a model or research that has attributes without having to go through the hassle of creating a niche method and setting them up individually. Pydantic is a huge library and goes way beyond that. So if you're curious about it, you can check it afterwards. But for the purpose of this lesson, we're going to be using that in order to transform some of the fuzzy outputs that we get from our agents into strongly typed outputs that we can use in code. All right. So let's get ahead and create our first task. So this task is pretty interesting. It's a task responsible to find a venue for our event. So you can see that it expects a few inputs in here. It expects an event city and expects an event topic. And look at how you're using a few different attributes that we haven't used before. So in here you can see that we are seeing that we want to output a json in in order to output this json, we're passing or pydantic object. So, what is happening behind the scenes, our agents are going to converge their for the output into this very strong type of model, and then convert that into json. And then we are outputting data results into a file, a json file that we can actually use. So this is just to showcase some of this attributes that you get on the task class that you don't use very often, but are super powers in certain cases. People use this a lot when you're trying to integrate agents into existing systems without doing it through APIs. So instead of having an API that is going to kick off your multi-agent system, if you want to have this agents within your code, this would be a great way to get an output out of them that you can already use on like function or anything else. So now let's create our second task. Our second task is pretty interesting. It's a logistic task. This task is responsible for coordinating catering to equipment for the event. and you can see that in this, it's expecting a few different variables. looking for what is the number of participants and what is the tentative date for this event to happen. You can also see using a few different attributes in here. So you can see that we are using human input in here. This means that before this task is completed, the agents are going to stop and ask us, the operator, if we want to give an input. If we like the task result or If you wanted to change anything with it. You can also see that we are doing a synchronous execution. So that means that this task is going to be executed in parallel with any other tasks that comes after that. So this is a very good use case because if you think about it, this logistic task depends from the result from the venue task, because the location is going to influence how you're going to coordinate the catering, the equipment and everything else. But as you're going to see in a second, it has nothing to do with our final task. So our final task is going to be or marketing task. It's the task responsible for creating the marketing campaign that will help us promote this event. So you can see in the description here that again, we are talking about the event topic, the expected participants. And we want to report on all the marketing activities that we can use in order to promote this event. And you can see that this task is also allowed to execute in parallel. So what that means is that the first task, the task that selects the venue, it's going to be executed by itself, alone. As all the other tasks that it have been that we have seen so far. Then after that, the logistics tasks and the marketing tasks are going to be executed in parallel. Because if you think about it, one doesn't rely on the other. The output of the logistic task doesn't necessarily matter for the marketing tasks to occur. So we can have them run in parallel without too much trouble. And here we can see that we are outputting the result of the marketing task into a file, and in this case is a markdown file. And because in the expected output, we are mentioning that we expect the result to be formatted as markdown. Now this should work just fine. All right. With that, we created our three tasks. We are using a bunch of new attributes for the tasks, and you can see how you can leverage a lot of those for different use cases. In here we are kind of like forcing ourselves to use some of these attributes, just as a way to showcase how useful they might be in the real world. But you're probably already thinking about all the use cases that you can support, thanks to some of these attributes that crewAI brings into the table. So now that we have our tasks, let's make sure that we create our crew. And creating a crew is pretty straightforward. It's the same thing that we have done so far. We have a set of agents, a set of tasks. We set the verbose mode to true and everything is ready and we can now kick it off. So let's keep in mind that there is a bunch of variables that we use throughout the tasks in the agents that needs to be interpolated. So let's start by setting those up. So this is the event that we are organizing. It's a tech innovation conference trying to gather tech innovators. It's going to happen in San Francisco. It has a date. We expect to have 500 people and we have a $20,000 budget on it. We would love to have a conference hall that we could use for this. So these are all the inputs that this crew needs in order to do its research and actually fulfill its tasks. So let's kick it off and see how that goes. So from the get-go, you can see that the venue coordinator kicks things off. And it starts by trying to find a venue in San Francisco, because that's where we mentioned that we want this conference to happen. that meets the criteria for making a tech innovation conference. So in order to find out, you can see that it decides to search the internet. So it searches for tech conference venues in San Francisco. So it finds a bunch of results, as you can see here. And then it decides to scrape one of these results, among these results, it found tagvenue.com specifically mentioning listing conference venues for rent. So, it decids that it's a good call to kind of scrape that content. And here you can see the whole content that was scraped from that website. It's quite large, but now it's ready to give its final answer. The detail content from the tag venue website helped it that you can understand of what would be the options. So the selected venues have different sizes and types and wants us to see what is your feedback? If we agree that for a large conference like this, it should go for the main hall at Trellis or the second floor at Dogpatch Studios. I'm going to keep it simple, and I'm going to say, "yeah, I like these Options." So, now that I gave it the input, it's going to move on from that. And I'm going to keep executing the code. So if we look at what happens after this, it's going to pass on to the next agent that is now going to figure it out on how to come up with not only the caterering, but also the marketing from this. So you can see the final answer in here. Nw that it took into account what we said. And look, how cool is that? The output from our task is now a valid json. It's not a text any longer. So you can see how our pydantic output there is working its charm. We could use this to integrate with anything else. We could save this into a database. We could save this into a file. There's just so many options here. The ability to convert like agents output into regular objects that we know in programing, is super helpful, and allows us to bridge the gap between AI applications and regular applications. And you can see that even though this is jason, this is being sent as jason to our next agent, the logistics manager, to try to coordinate gathering and equipment for that. So you can see that this agent now kicks off together with new agents. So you can see there's two crew agent executer running here, because we told that the last two tasks could be executed in parallel asynchronously. So while we have one agent kind of looking into the catering, the other one is looking into how to promote this. And what would marketing look like for a conference like this. So again, they're both searching the internet and trying to come up with everything that they need. All right, let's skip to the end and see what we end up with. So now let's look at some of the outputs of these agents. As they are wrapping up their work and coming up with their final answer, we can actually look at some of the files that got generated during the execution. First of all, you might remember that we asked the venue details to be outputted as json and written in thejson file. So this is the json file. This is the name of the place. This is the address, this is the capacity and it seems to be available for rent. And now we can also look at what the marketing strategy could be because it also got reading in here. So in here we can see that is a fully fledged marketing campaign. Thinking about the digital marketing, the content marketing, the partnership, the networking, the onsite, the tools and even doing some budget allocation and how we could use our budget to actually market this. So think about how amazing this is. You basically created a multi-agent system that is capable of not only finding, like a good venue and figuring out how to organize things and bring the equipments and everything, but also capable of thinking about a marketing strategy and planned it out for you so that you can act on it. This is just the tip of the iceberg on what you can achieve with multiple agent systems in a great use case example on how these agents can be deployed outside in the world, and not only in engineering.