Mastering Agentic AI with CrewAI: Build Your Own AI-Powered Newsroom!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome back to the channel so in today's video we're going to go ahead and begin a simple crash course on agentic behaviors in large language model applications so you're going to be doing this using uh a framework called crew AI so crew is a framework that Ed to build agents like you can build multiple agents and these agents can cooperate with each other to do different variety of things so don't worry about what a what are agentic behaviors or what are agents in AI this is something that is really really trending and I feel like the future of AI will be in towards this direction of having athentic behaviors in llm based applications so in this cash crash course we're going to go over how to build an agent agent multiple agents that can work together to cooperate together to achieve a certain objective that we set for them in an using llms or large language models so you're going to be using crew AI for this and it's going to be a very short course you're going to go into the very Basics and build a very build a really good good uh good project at the end of a Time okay so we're going to this are the out you're going to the outline that you're going to go over what is cre AI a simple demonstration of what you're going to build at the end of the uh tutorial you're going to look at some terminologies what what is an agent what are tools you're going to look at uh project set up how to set up a project and then finally build a simple project and add a a grad your UI at the end of the time okay so now let's jump into it so what uh basically let me just give you a simple demonstration of what you're going to be trying to build or basically give you a simple understanding of what agents are and what are agentic behaviors in large language models okay so let's say that Amed I'm a user right so I want to create a bunch of uh agents right LM applications LM uh tools or let me just say that I want to create a basically an LM program that has multiple agents in it right so one agent can help me act as a supervisor or another agent can help act as a correspondent this basically uh a scenario where we going to to be having uh an airm application that's going to be able to generate news reports right so in a news in a news company or a news room they come their supervisors they correspondents they news editors their ads writers who write ads inside of the news and then all of these guys communicate back to supervisor the supervisor now communicates to us who who are basically prompting the model to do something right so basically uh basically I can have different personas inside of my LM application instead of having just one Persona with one prompt I can have multiple personas that supervise each other and the AI do this automatically so you can think of it having different persons instead of a room right and that are working together to achieve a certain goal and these are each of these uh persons is called an agent and a collection of this become become a whole collection of this agent become a crew and that's we have the term uh crew AI come comes from right so you can think of it from that okay so if you don't really understand it just stick around and I'll explain this to you in more details okay so now what uh is crew AI so crew AI this is just uh the information I got from the page right so this is a cutting age framework for orchestrating a role playing autonomous AI agents so basically these agents are basically autonomous and they can work together in an orchestration to achieve a certain goal so by for by fering collaboration uh collaborative intelligence crew AI empowers agents to work together seamlessly tackling complex taxs when you have different a very complex TX like in our case here we basically we want to have right basically create a news room full of AI agents that are cooperating to gener news right we have a correspondent that can search on the internet for latest news we have a news editor that's going to write the news editor you're going to have the ads right that's going to take the the news the the final report from the news editor and write ads in it and we have a whole supervisor who supervises all these other agents and see hey how are this agent cooperating behaviors of this AG agent good uh is the news is the final report good if not good it you ask the agent hey can you modify this can you change this can you change that just like the way a human work right so we have a collection of this working together to form basically a crew of AI agents right and this is going to be the future of AI we go along because you can have really really complicated task and sometime having only one AI do all the stuff with one single prompt can become really really difficult so having multiple agents which each delegated to a specific task and that does that task really really well is better than having one agent that knows everything right right just like a uh Swiss knife right instead of having a Swiss knife kind of agent who knows everything we have an agent that is specialized in each specific area so it's really good in the area is specified in so a collection of these guys working together a collection of experts working together you get a better performance for uh your LM applications so let's look at what are agents agents basically signifies indiv members of a team of your team each are distinguished by their uh specific functions their personal history their objectives and the experiences so personal history like each agent has his own chch history has its own memory and is able to manage itself but can also collaborate other agents we have tasks so represent concise and precise assignments design designated to each agent so each agent can be given a task to perform so each agent can be given a task perform like in our case you have an agent that deals with uh news editor so it's going to be only it's Tas only to edit news information that is the task of that agent we also have tools so agent can have collection of tools that they can use to accomplish their task so for example we have a correspondent in our case right the the correspondent need to get the latest news on the internet so you can provide it a tool that can enable the the agent to be able to browse the internet and get real time information or you might have your own R system and this agent can basically uh talk to your own document and grab the relevant document and use that document within generating reports right so you can have like kind of like a daily report kind of agent collection of Agents whereby One agent basically gets the latest data from your private or corporate data and then another agent analyzes the data present it to a supervisor the supervisor prepares a final report and then present it to you who is a user right so those are basically the things that we have so tools are just things that the agents use to accomplish their different tasks okay now let's look at how we're going to go ahead and set up this project again I don't want to go into terms explain everything into dep everything little little by little I think the best way to learn is through practical experience right so we're going to go jump straight into coding and once we we are coding I'll explain to you more stuff as we code why we are doing everything line by line okay so let's get started into it so I'm going to be using poetry to set up my project if you don't have poetry or know you don't know what poetry is that's fine you can use the python normal the normal python virtual environment and if you don't want to use Python virtual en enironment feel free to install this in the global python environment that will have no issue okay so let's get into it so but basically I would advise to create a a python virtual environment if you don't know you can just Google online how to create a python virtual environment or you can watch some of my other videos where I create python virtual environments okay so in this case I'm going to be using poetry and actually this is the first time I'm using poetry on any YouTube tutorial but yeah let me just use poetry for this okay so let's get St into it so I'm going to go into my terminal so once I'm into my terminal I mean I'm in a folder called tutorials I have all my tutorial folders so I'm going to say poetry poetry and let me just look at the command poetry new and I'm going to call a folder called crew aore tutorial and then I have name and then give it a name okay so I'm going to say a poetry new and I'm we call it crew aore tutorial and then finally name and then give it an app so this to create a folder within so it's going to create a folder called cre AI within it you're going to have run the folder called app okay so run that and that's going to go ahead and create so you can see created package app inside of cre AI tutorial okay so I'm going to go ahead and simply change directory into my crew AI tutorial folder and if I look at it I have this content right in here so let me just go ahead and open uh open up vs code okay so if I open up vs code this is what I'm going to see right so let me just open a vs code make this larger and basically this what we have inide for vs code so if I look into app right now we only have uh we don't have anything you should have only one file in there which is theore init file init P file and in here we have our Thal Thal file that you're going to use again you don't have to know all this okay this St is not about poetry so I'm not going to go ahead and go into depth about this so once I have that let me just go ahead and uh close this for now we'll come back to you just in a second so let's go ahead and with the other installations that we need to do so I need to go ahead and run this command to to export the virtual environment into a project so that vs code can pick it up and then you don't have any uh hint hint warnings and other stuff like that so going say poetry config virtual environments okay let me write write that down so poetry uh config and then uh we go ah send virtual uh envs so virtual uh virtual envs Dot and then finally we say uh in iph Project say in iph project and then let's look at the last command and to say that going to be true and then run that so that's going to basically uh add in so if I do LS lsph La a it's going to show now a DOT folder right there so I can I cannot see this right now so let me just go ahead and you open vs code again let me open our vs code one more time and we should now see an EnV file in here so let's just give it a bit of time okay you can see an EnV file uh right here so it doesn't actually show the EnV file for some reason uh let me see doesn't show it but for now let's just ignore it basically that that's the command that you're going to use so let me just make sure that we wrote that command properly and then you don't have to worry about it okay so poetry config and then virtual envs do in project and then true that's basically it so uh yeah that's it and that's all we need to do to create a uh to export our virtual environment inside of our project folder okay so once we have that done now you're going to go ahead and install a couple of things you're going to install uh crew AI you're going to install on the C you're going to install grad you're going to install beautiful soup okay so let me just go and add that in there so I'm going to say poetry uh add and you're going to say going to add crew AI you're going to add beautiful uh soup for you're going to add a python decouple hyen decouple you're also going to go ahead and add in gradio that you're going to use to build our UI component so once we have that running we just press enter and that's going to go ahead and install all those library that we specifi right here so let me just check and make sure that I have all the librar specified there so I save crew AI correct uh byon decou correct gradio correct and then beautiful for good so once we have that done we can go ahead and wait for this to get installed and once this is installed we can just go ahead and jump into the coding so this can take a bit of time depending on your internet speed of how fast your CPU or your computer really is so this can take up to about 2 minutes to 1 minute depending on your speed of the internet and also your computer so let's give this a bit of time and uh because I'm recording the video so this might be a bit slow on my end uh because recording video takes more resources but basically let's just wait for this to get installed okay so uh basically we done right we have all those installed okay okay yes actually a bit faster so don't worry about other this other library that is installing the back ground the just dependencies that the librar that you're installing actually uh need to work so yeah so that's basically should get done in no time okay looks like it's done so we done and we can just go ahead and open now uh vs code good so let open up my vs code or feel free to use any edit that you comtable working with okay so I'm going to go ahead and close this up and now you can see we have the EnV file folder right here so there the folder I was looking for to show you earlier on but now you can see it's right here EnV folder so that basically helps vs code pick up all the libraries and Depends that we have installed so that it can avoid giving us like this linting errors and other stuff like that warnings stuff like that okay so now that we have that done let's begin to code so I'm going to go in here and I'm going to create a file and I'm going to call this file let me just call it just uh basics _ 01p okay so uh this my looks like my system is a bit slow because I'm have my video being recorded So it's a bit slow but bear with me I'm just going to go ahead and import all the things that we uh we need to get started with this okay so I'm going to go ahead and import all the followings I'm going to import W I'm going to import uh requests I'm going to go ahead and uh let me just close this guys up okay so I'm also going to go ahead and save from bs4 beautiful 4 import uh beautiful uh beautiful I'm also going to go ahead and say from uh crew AI uh I'm going to go ahead and import the following so I'm going to import what you call agents so agent that's going to help us to create an agent we are going to create a task we talk about task and you're going to create a crew and a crew is a collection of multiple uh agents and an agent can be anything and the task an agent can be basically a b with a prompt and also a bunch of tools that it can use that's is basically what you want that agent to do and it cre is a collection of multiple agents okay let say also going to say from uh L chain do tools okay you're going to going to import uh tools okay so one thing I didn't explain to you earlier on is that uh crew AI is built on top of L chain right has a lot of component bu on top of L chain so it's basically easy very very easy easy to integrate the two L chain and crew AI work perfectly together so anything can almost anything you can do in L chain you can you can probably do with crew AI right so that's basically it so also I'm going to import tools and these tools going to help us to create own tool okay so it's actually tool and not tools okay so once I have that I'm also going to save from uh decouple I'm going to import config this is going to help us to read our environment variables and you're going to create environment variables just in a second because we need the open AI API keys to work with this okay so you can also use other LMS but for now I'm only using open AI because it's just easy to plug in and play and so I'm going to use open AI okay so I'm also going to save from uh dark dark dark go it looks like I didn't I think I didn't install dark dark go let's just say dark dark go uh Dore search I'm going to import the dark dark go search sorry this is actually the dark dark go search just like this so I actually need to install d d go so let me just go ahead and install it inside of my terminal so I'm go back in here I'm going to say poetry uh add and I'm we say dark uh dark dark go andore hyen search okay that's going to war and add in uh the D that go search for us okay so that's something I forgot to uh install that's so let let just go ahead and okay I have an issue right here so now you can see it doesn't allow this to work so it can give you a suggestion that you need to change the python version so let's go ahead and actually change that python version inside of our toal file so go back into your vs code uh this is my vs code right here and then go inside of your Tomo file and in here just go ahead and change the python version right here so just change with what the you got suggested from the terminal so once I have that done I'm going to go back in here clear this and then rerun that command to install d. go okay so D go to install D go you need to have the python version change a bit okay so that's going to go ahead and take a bit of time and going to install D code so once this do installed uh while this is being installed we can actually go back into uh vs code right here I can close this noral file and then fin I can go ahead and just keep on importing the things that I need to import so I going to save from uh L chain _ open AI I'm going to go ahead and import chart open AI just like that okay so that's it that's all I need from longchain openi I'm going to go ahead and import open AI that way good so once we have this done now let's go ahead and now get an open AI key because we need to use open AI so I want to go ahead and create a a python uh sorry a virtual environment file right here just like this and now go online and get your uh get basically get your open AI key so this is basically this is a g story of uh cre and I'm going to leave this link in the description of the video for you guys so you guys can follow and read the documentation in case you have any issues again I'm also going to leave the gab repos code for you so you guys can have access to it so uh yeah so just go online and Google open.com and once you're in here just log into your account and it will bring you to this page right here okay so once you're in here you go into the API sections and you can get your API key from here so you can actually generate a new API key if you want okay so so that's basically what you need to get an API key okay so once you have the API key say you have the API key so you're going to go ahead and simp say open uh aior API uncore key and then you're going to go ahead and paste your API key is going to be something like SK s and then finally some G that's follows right that's basically API key okay so let me just go ahead and get my API key and add it in here because I don't want you guys to have access to my AP key so let me just add in my AP key in here and I'll be back recording okay guys so I'm back recording and I just added my API key into my uh EnV file right so you guys cannot see that API key okay so once we have the API now let's go ahead and add our AP ke instead of our environment uh variable so environment you're going to go ahead and simp at defa say open okay this this going to be uppercase open aior API underscore key and then finally say equals to and then you're going to say config and then you're going to pass in uh open a a iore API uncore key so this whatever you pass in here must be whatever you specified inside of your EnV F remember remember we said that uh open AI uh something like this open Ai and then equals to and then you fin put in our open AP key right so something like this so whatever value you put in here is what to specify in here okay so keep that in mind okay so once you have that done you're going to go you're good to go now let's also create an LM I'm going to be using the gp4 model because if uh whenever I'm working the G B3 model sometimes I exit the context window because uh the crew that you're creating something can be a big large and has a memory a large memory so we need a larger context window so some sometimes you might get the context window being overflown so in such cases what you can simply do is just go move on to dpt4 Turbo uh preview model or you can actually just make sure that you reduce the complexity of your AI crew okay so let's just keep that in mind in case you get any error so when to use chart open AI I'm going to the model and the model is going to be uh basically the GPT for uh turbo and then finally uh preview just like that so that's basically it so say GPT 4 Turbo hyphen preview that's going to be our model name that's it so once we have all that done now let's go ahead and begin to create our crew our agents that basically a collection of Agents forms a crew right so now I'm going to first start by creating the tools that this agent to use right so when we are creating the agent you can specify the tools that they should use so now first of all let's go ahead and create the tools that these agents need so when say class and I'm going to say I'm going to call it web uh browser uh tool and this is going to be an a class for now in this class you're going to have a couple of methods I'm going to say Def and you're going to say internet _ search so internet search uh internet search just like that so the internet search you're going to pass in a query and a query is going to be of typ string and and this is going to return to us a string at the end of the day and this is going to be simply you're going to need to now for for this uh for this method to be a tool there are a couple of things that we need to do the first thing you need to do is to pass in a dock string so you need to add in a dock string right here so I going to say uh useful uh for quering uh quering uh content on the internet just like that on the internet okay uh using you can ify using uh dark dark dark go okay so basically what you the reason we providing these doc strings is that it's going to be used by the llm to decide which function to use depending on which task is is at hand okay so that's very very important that you pass in the dock strings right here so once you pass in the dock string I'm going to use the pass method pass keyword right here I'm also going to add in a decorator to this so uh The Decorator I'm going to pass in the name of this it going to be internet uh basically underscore Search tool internet search and fin you can pass in uh return underscore redirect uh return Direction direct so return direct and it's going to be false uh false so return direct basically specifies that this tool cannot return results back to us as the final output of the crew right so basically this result must go through must go back through must go back to an agent inside of the crew and the agent makes use of that data and then the agent can return to us the data we don't want the tools returning data back to us we want the agent returning data back to us right that's why specify return redirect equals to H sorry return direct false okay so now what are this two going to do so I to use the d d go so I'm going to Simply import you're going to use that D go you're going to have it uh going to say go go search basically just write the spellings okay go search what you're going to Simply go ahead and do going to say results is going to be equals to I going to create a list say r for r in go search do text going to pass in text to say query is going to be equal pass in the query and going to say maxcore result and you're going to limit this to be maybe five or three or two so let's say for now let's say two to reduce uh the size of the context windows in case for you guys are using GPT uh gp3 model which is the free version you can reduce the number of suchar results that you get back in order to avoid flooding the context window and overflowing it in case you're using a smaller model so going to say uh return result uh if results else you're going to uh going to return no no uh results that's basically it so return result results if results okay let me get that if results else you're going to return no results okay that's basically a one line if and L statement in Python okay that's it so that's basically how what this uh tool basically does that's Bally how you can create your own tool again you don't have to actually use these tools like this you can actually there a lot of custom tools that uh L chain provides you can use any of these custom tools that longchain provides us I'm just showing you how to create your custom tools and I think it's a best practice because in most cases you are trying to do something that maybe L chain didn't think of or didn't provide a tool for right so it's best that you understand how to create your own tools so that's I'm having my own tools so let you say processore uh search underscore content so this is let me say search results right so this going to basically provide uh ability to process the search results that you get back to URL it's going to be of type string and you're going to return uh python string at the end of the time okay so what you're going to go ahead and do I'm to again you need to add in a doc string so do string right here you say process uh content from uh web pages so this basically telling the LM what this tool can be use for again to make this a tool we have added a do string we also need to go ahead and add in The Decorator so tool you're going to Simply say uh processore search let me get that right so search underscore result that's it and I'm going to say return again I'm going to say return direct I'm going to say to false and explain to you why I'm setting this be false okay so once I have this I'm going to go ahead and say response it's going to be equals to I'm going to say request uh request request let me get that right so request do uh V get and I'm going to pass in url sorry URL and it's going to be equals to the URL that we uh the URL that we pass into this uh method method call you're going to say soup and the soup is going to be equals to beautiful soup you're going to use beautiful soup right here you're going to say dot beautiful soup and you're going to say uh passing the response you're going to response. content you're going to pass in finally the the proc to use the HTML do prer prer just like that okay that's all we need to do and once we have that done so let me just say response okay response content and once we have that done you're going to Simply go ahead and return okay I press the wrong key right there so I'm going to go ahead and return uh sup uh soup. getor text so I hope you guys know how beautiful soup work if not that's uh doesn't really matter so that's basically how we can just process content from the web using beautiful soup and the HTML proc so once I have this done I'm going to go ahead and create a collection of tools and going to say tools going to be uh this going to be web uh browser and I'm going to Simply say do internet uh internet search tool you're going to say again web uh web browser uh call create an call an instance and say process uh processore uh basically search results so that's basically my tool right here so once we have my tools at list basically a list of tools now you can go ahead and create the agents so to create an agent you're going to have let's go back in here and let's look at agent that you're going to have in our case okay so in our case you're going to have uh just leave the user alone this you can think of it as not been part of our crew our crew is basically this right here a supervisor which is an AI agent a correspondent which is an AI agent that's an AI agent that's going to be able to Google things online to get for us facts then it's going to present the facts to the news editor that's going to be able to edit the news and then the the findings will be send to the news adds right that's going to add add some ads to the news okay and then fin go go ahead and send back supervisor and the supervisor can then communicate with the other agent to make any changes if necessary good so now let's go and start with the correspondent so I going to say uh newscore correspondent uh correspond uh correspondent just like that and I'm going to say equals to and say agent just like this and then go ahead and pass in the agent right here so now to I create an agent you can pass in the role of the agent the role and then the RO is going to be uh basically a roll is going to be equals to and then you can pass in a string this going to be uh News correspondent just like that that's the role of the agent and then you're providing the the goal of the agent what are the goals of this agent and you can pass in the go right here Advanced uh Advanced news publisher correspond just like that and then specify the go we can go and specify the back back back story so back story basically is just like a basically acting like a a system prom that you provide the the LM okay for this specific agent can find in the system prompt right here which I'm also going to add to it just in a second you can say Vos whether you want to see the veros output or not soose for now I'm going to leave it to be true just like this and also I can go ahead and pass in the tools a list of tools that I want so I'm going say tools right there and I'm also going to pass in llm and LM that I want to use is LM that you created above here so this is the LM right here okay so you can also use o l to to work with mistol or any other open source model out there so you can use all L from L chain and then use that in here to create your own llm and then pass it in here so LM so actually call LM instead of llm so llm right here okay so now what is the back drop sorry for this so I'm it's going to be a bit long of a text so I'm going to go ahead and simply copy this from online okay online so I have my GitHub repost story uh in here and I'm going to share the link with you to this uh GitHub R so you you guys can have access to this right here so once I have this right here I can just go ahead and copy this right here this is the backdrop story I'm going to copy this right here copy this and go back in my uh vs code and simply paste it in here okay so I don't I don't have to waste your time doing that so that's basically it so let's make sure that we have that there okay so now the errors are solved so now you also need another another agent which is going to be a news editor once the correspondent can go ahead and basically search things online so you can see you can read The Prompt right here function as intelligent uh news research assistant adep scoring the internet for latest information and how does it search the internet using this tools so using the tools we pass this into the LM the LM can use this the doc strings to decide which tools to use so you can say Okay I want to search something on the Internet what tool can can I use you can say this tool is good for certain things on the internet so you're going to use that tool to create the internet to get the latest information and then can use this to process the latest information if necessary and then finally proceed with this other activities right so good that's basically how an agent is and then you also need to use edit agent so I'm going to go ahead and simply copy this from here so that we avoid saving uh we save on time I don't want this video to be extremely extremely long okay you also go ahead and pass in this other agent which is just ad writer agent that's going to write ads after the news uh editor has created the final publication and then finally we also have the supervisor that's going to oversee all the other agents that we have okay so good so once I have I'm I'm going to have that bed there as well so you can read all this prompt if you have your time can I I just don't want to waste a lot of time going through uh this one line by line okay so once we have now we have all our agents now we're going to go ahead and specify a bit of task to each of these agents so I'm going to copy this and then uh let me just copy that properly copy all these task that we have right here copy all the task and then simply bring it back here and paste in all the task right here so we have three different tasks so task one task two uh task three and task four so you say this is the first task and is being uh news let me say News correspondent okay let me I think I got the spelling right here so I'm just copy that and then replace it here good so that's it basically so you can see we have the first task right here which is uh conduct a comprehensive search on the internet uh on the current trends in space technology specifically focusing on uh uh Space X and the Mars mission uh your final response should provide a detailed explanation of the approximate cost and timeline of the mission summarize into three paragraphs also include any advancements made in the space uh industry make sure you include links to the sources or websit from which you obtain the facts right so that's basically the task that we give to the News correspondent and it's going to go ahead and see okay I am I'm an agent and I have this bunch of tools so I need to sech things on the internet which tools am I going to use when I use this tool and how does it know through this doc string right so uses that and search things at the internet get back the response and then pass the response back and you can see this one right here using the uh the the the research findings of the News correspondent WR the publication for the news uh newsleter AI news the publication should contain references link to resources stated by the correspondent your final answer must be a full blog post of at least three paragraphs long right so you can limit this depending on which model you're using to avoid overflowing your context uh window so we have also tcri using the final uh report from the news editor include ads in the final publication and that will help advertisers advertise their product uh to potential customers uh I want you to include images that you can get from the website blah blah blah and all that so you can see all that instructions right there and then finally we have the supervisor to meticulous meticulously uh review them harmonized review and harmonize the final output from both the editor and the News uh as writer ensuring the coherence and excellence in the final republication for AI news that's it and that is being assigned to the supervisor agent so you have different task and the task are being assigned to different agent within our our crew so you can see you have the supervisor that's going to sorry the correspondent that's going to resite things online pass those findings to edit that's going to write the final publication pass this to the uh right that's going to write the ads for this publication and then pass supervisor the supervisor can then supervises the work and then makes any changes if necessary right so that's basically what we have right there so this the agent and how they can collaborate to do to do the final work so now let me just go ahead and simply copy this right here so now we're going to go ahead and create our crew and our crew consists of multiple agents right so we provide the list of all the agent that we have the news editor the new arrer the supervisor these are all the different agents that you have right so pass all of them into a list of agents and you create a crew passing in agents as a list of all the available agents you passing the task that you want perform so this task going to be performed asynchronously so right now uh crew AI does not support asynchronous n like parallel running to different task at the same time it goes sequentially so task one gets finished get task task two gets finished task three gets finished task four gets finished finished right and then fin get back the final response so you can see that's basically it right there you can specify the boss and you can change this number to see how intense you want ver bothos so if you want more ver BOS you can increase this number or reduce the number okay and fin we have we simply get your cre work you just say c. kickoff and then finally reprint the result so kickoff get for us all the results and finally we printing out those results so good that's Bally how you can create basically this kind of agentic behaviors using an LM application okay so now let's go ahead and run this and make sure that our code is working so go back into my terminal now we have uh that was the installation for D search so now I have that I'm going to go and simply run the code so I'm going to say LS and CH into my app folder I can see I have the file say poetry run python uh three and then finite Basics and and run that so that's going to take a bit of time and all the agents you can see the agents will be communicating with each other uh doing the necessary changes until now the supervisor approves the final report and then the final reports will be presented to us so that's going to go ahead and do all that for us okay so now we just give it a bit of time right now my it looks like my PC is a bit L sluggish because of U I think I'm recording so whenever I'm recording my B my PC becomes a bit sluggish that's B you can see uh this is now starting okay okay comprehensive research on the current trends in space technology that's task one so you can see we have it right there so you can see you can't find a builder you requested HTML person do you mean okay so I think I need to HTML so let me just see uh HT okay I got the spelling there wrong so let me go ahead and correct that spelling so it is HTML p and know HML H MLT so H HTML okay so make sure I get that right okay so once I have this done now let's go back and and uh clear this and then let's run this again so hopefully I have no more errors in there and that should now basically work fine so HTML person everything should work fine okay now as we run this uh this should now go ahead and uh okay now you can see specifying the different task Mission your final response and then there basically the instructions the prom that you've read it okay so now you can see what the correspondent is starting this task task one because we assign task one to correspondent and this is basically the promt that we provided it right here so now the correspondent is going to take this task and begin to use the tools the necessary tools that it has to perform uh the necessary action to accomplish this task that we gave it right so it's going to take a bit of time use the different tools this going to be use it's going to use the internet search tool that's going to use D go to browse the internet to find missions as find details about space X missions and the m mission okay so basically you can provide anything that you want in there so let's give a bit of time and let's see how this goes yeah so you can see I TK just got completed this can take a bit of time depending again on your internet speed and how fast your computer is mostly on the internet right and the number of like how many requests are being sent to the open AI servers okay so now uh so if you have your own local server this should be much much faster okay now so let's see what it has done so we went ahead uh basically we started with a news edit okay this a news Ed let's look uh start from from the News correspondent which went online Google something so you can see Elon Musk is there because this guy is really the founder of Space X and is really popular when it comes to uh space industry in Mars and all this so you can see go back all the things uh the links right here New York's time Mark says with eg should landn on mass in three to four years and you can see all that information right there and then the adrer picks it up so the crew basically the editor the news editor that basically wrot the editions right wrot the final report the adds editor editor then add add a different uh it own work to it and you can see all that right there then finally you can see the conversation ads right there right ads and then finally we get the a supervisor the supervisor examines the work and then finally uh we go on from there so examine the work we get back the supervisor again uh task output the ad commer uh the ads are conceptually strong and I like approves the work of the of the ads publisher and all that and then finally publishes the final report right so you can see the this the final report right here okay so this is the chain right here okay so you can see the review of eyes and then all that output uh the information then comes out right here okay so you can see all that information right here so that's it and uh I think that's basically what we need to do so you can see right now you're not getting back the final uh ad so you can see get back is just getting back uh a report of that information he just analyzing the information giving us uh uh giving us a report of how that publication is either good or bad so now we should actually just change our prompts a bit and then ask it to return towards the final uh the final publication right so we can add that to it and then uh we can add that to it right here so we can say once done uh once done return uh publish publish the final uh report that's it so then that's basically how you can set up and use uh grad sorry set up and use crew AI this Bally guys that's that's bring us the end of this video thank you guys so much for watching if you enjoy the video make sure that you like the video subscribe the YouTube channel and you share this video with anyone who you think might find is helpful thank you guys for watching so much and see you the next one keep safe
Info
Channel: Code With Prince
Views: 3,048
Rating: undefined out of 5
Keywords: codewithprince, programmingchannel, python, python devs, funcoding, crewai, agentic AI, AI agents with crewai, crewAI Project, CrewAI crash course, CrewAI for beginners, Agentic AI behaviour, Future of LLMs, LLM based Agents, Langchain, langchain and crewAI, LangGraph, AI Innovation, Collaborative AI Technology, AI Educational Content, Crew AI Tutorial, Tech Insights
Id: uJEpiBysTu0
Channel Id: undefined
Length: 41min 25sec (2485 seconds)
Published: Wed Jan 31 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.