Step-By-Step Advanced CrewAI Setup 🤖

19.06k views16177 WordsCopy TextShare
Matthew Berman
Let's build agents with CrewAI's founder! Vultr is empowering the next generation of generative AI ...
Video Transcript:
all right we're back for part two of let's build with crew Ai and this time we have a very special guest Joe the founder and CEO of crew AI welcome Joe hey there thank you so much for having me so excited to be here yeah so if you've watched my Channel at all you've seen Joe he's been on a number of different videos a number of different live streams uh I'm an investor in crew I absolutely love crew AI what do I always say bullish on agents crew is my favorite framework by far uh and
we've been building something really cool so in this video Joe's going to help us extend it and build it out better than what I probably could by myself so first let me just explain what we've built so far to you and to Joe as well and then we'll start building again so what I have built is I had this need where I'm thinking about creating an educational content portal all about artificial intelligence and it's all going to be written content articles tutorials uh very thorough on a plethora of different topics and so I thought great
let me put a crew together to help do the research and at least create that first draft of the article of the piece of content of the tutorial and it worked incredibly well Joe Not only was it easy to install although of course I struggled a little bit with python environments which I always do but I know you have some tips for me so we'll get to that in a moment but overall it just works so so well I'll also once we get into it I'll tell you I've tested a bunch of different models uh
and I can see which ones worked better which ones worked worse you probably already know which ones worked best we'll see and by the way I'm going to be pushing all of the code that uh we're writing today to GitHub it'll be a public repo and I'll drop that link in the description below so here first is an example report so the research topic was basics of fine-tuning a large language model and I'll show you the definitions of the agents and Tas in a moment but it did pretty well and this is using GPT 40
I believe currently maybe mini I can't remember I'll show you in a minute but like decent decent not very long not very thorough I've tried many different ways to try to get it to be more verbose and more detailed more comprehensive but it I can't get it to do that now I have tested the 01 models and those Crush I mean they just come up with the most comprehensive detailed well-written uh report possible and I suspect there's a way to kind of coax um the non1 models to do this because they are the 01 models
uh exponentially more expensive so I'll note all of these things I'm going to be asking you all these questions Joe so let me show you now I have my agents I have my researcher and I'm my educational content creator now I was thinking about adding a reviewer agent so that's maybe something we could do together today um but basically senior researcher give it a topic do thorough research on the topic using the serper Search tool so that's something that I added I'm using serper signed up grabbed the API in the previous video uh and it
is doing the research well it seems to be working very well then I have the educational content creator basically create the content create a detailed thorough and compelling educational content based on the topic research and research findings provided to you make sure you explain everything in great detail as you could see pretty much on every line I'm saying comprehensive extensive detailed and I just can't seem to get the non1 models to do that but we'll come back to that so those are the agents then for the task I have the research task then I have
the reporting task so the research task conduct thorough research and then for the reporting task review the context you got and expand each topic into a full section for educational content piece so I even said right here each section should be a minimum of five sentences long a minimum actually that should be different of five sentences long then I also started just putting a placeholder for the reviewer tasks so I'm going to stop talking for a moment Joe I want to get your thoughts on all of this one great use case I love it two
so many ideas yes 01 is definitely way more expensive and that's the reason why a lot of people design not to use it just because it takes a long time as well and what I found is honestly it hallucinates more often than regular models uh on their gtic behavior and the reason why it does that is the normal agents don't have much option other than use the tools that you provide them but the old models because they have chain of to they they Tred to come to the conclusion before want to use any tools they're
like well you know I think I can interfer if I do this that and this other thing so I think we can very much replicate this Behavior so we have seen use cases like this where you want to produce more long format content in the past yeah there's usually um there's there's a concept usually that works very well that is you separate your crew into a a planning stage and then a writing stage ah so it's almost like you do you do the research then with the research you have an agent to think through all
right given that I understand this topic now what would the ideal way to present this what would be the topics the titles the subtitles what are the things that we going to zoom in so you get a plan out of that and then after you got that plan then you go into actually writing it that usually works way better and you can have a reviewer at the end as well ah that that makes a lot of sense and in fact that would probably enable the agents to work more collaboratively because right now it's just one
agent doing the research passes the research off to the reporting agent or or the content writing agent I should say and then it just writes it instead it could be like well here are all the different section okay go get that section let's write it go get the next section let's write it and so on is that right that is right and for that use case let's like what I was referring to was even like uh one step earlier where we just have one extra agent kind of like doing the plenty but while you sted
is where I would get next and that is where like you have two Crews you have one crew that is focused and coming up with a plan and you have another crew that is focused only on writing each paragraph or page and we have soon this for people that are trying to produce 50 page lungs report and things like that so you can definitely do it that way and we can use one of the CI new features for that that is actually uh that is actually flows and uh this would work pretty well with that
let's do it and so Joe one last thing um I'm using Lang Trace AI to track the traces and they have a nice crew AI plugin I know you know this already uh they are not sponsoring this video just an awesome some partner I've worked with in the past and uh I really like being able to see all of the information including the cost and the uh the time taken right here really easily so I I usually reference this uh as I'm going through it I love it honestly observability is a big thing on the
Bing and building AI agent so I think you're doing right awesome thanks to the sponsor of this video vulture reap the benefits of the world's largest independent cloud provider when you bring your GPU workloads over to vulture they have the latest Nvidia gpus spanning 32 locations across six continents vulture delivers industry leading price to Performance and serious accessibility and reliability vulture's Global fully composable Cloud infrastructure moves your applications closer to your users and frees you from vendor lockin allowing you to bring your own networking and database Solutions and if you need to scale Beyond just
a single cluster vulture's kubernetes engine allows you to take full control over your deployment offering up a 100% free control plane so if you're tired of waiting for gpus from other providers make sure to use vulture you can deploy at any scale immediately and they have h100s l4s and more available right now and you can get a fraction of a card or fully dedicated bare metal systems which gives you full control over your hardware and your throughput they also have oneclick installation of all the applications you might need for advanced machine learning workloads allowing you
to get up and running in minutes not hours so experience the vulture difference don't get bogged down by severe weight times or limited locations try it free today with a $300 credit for your first 30 days when you visit get vulture.com Burman and make sure to use code Burman 300 checkout to get that credit thanks again to vulture for sponsoring this video so uh Joe where do you think we should start I would say that probably uh just set the screw aside for a second we're going to bring it up uh I would open a
terminal and go into a folder for us to use a new CLI from CI for flows and we're going to bring this screw into a flow in a second okay so this is functionality that I have never used before I'm very excited about it let's uh let's give it a try so new terminal let me get back into the right folder ah I think I'm already there let's see VM base edu yep all right I'm in the right place what do I do all right so you want to do crei create flow and give it
a name um is there any standard that I should think about when I'm creating the name uh I would say for a case like that you would probably say like um educational content or something like that but there's no right or wrong here okay can I name it the same as my crew or should I try to name it something different something different yes all right I'll call it since my crew is named edu I'll call this EDU flow anything else that I need to do no you should be good to go all right let's
hit enter and maybe Joe you can as we're doing this explain what a flow is and and how we should think about using it yes so flows is something that we came up with because we realized there's a lot of use cases where you might want to have Crews to collaborate with each other or you want to have some regular python code like you want to pull emails from somewhere and then pass that to a crew and we needed to provide people a way for them to easily have this data move from one to another
in a way that made sense got it and this is how we came up with flows but it's a very thin layer but very simple and easy to use that allows you to do some of that awesome so just by running this command crew aai create flow and then I gave it the name it created a folder within my main edu folder for This Crew Source test uh bunch of stuff let's see what's within Source we got Cruise tools so feels very familiar what do we do now I would say let's start by moving your
existing crew inside that cruise folder to make sure that we can use it okay um and which files folders do I move in to do that the entire Source assuming this is the base for and I can you close that just to see what what is in there no I think you want to everything El so you probably want the main like the the main folder with everything within it the main folder oh so I see on the left there on the on your terminal there I see you you were inside of the Ado yeah
folder that that Ado folder is the crew right yes that is the crew yes so what I would say is you probably want to move out the flow folder to somewhere else because you want everything inside Ed flow ah okay okay good to know okay so let's do that I'm going to uh move the edu FL folder to my desktop then I'm going to take the edu folder the entire thing and then move that into edu flow is that right exactly into the searce cruise of Ed flow okay so now let me reopen it because
I don't think it looks right in cursor all right so we have edu flow with the edu crew within it yes and you can move now that to SRC uh in Cru right here so Theo yeah the whole edu folder inside the cruise folder okay so I have in Source edu flow Cruise so the P crew which is a sample I assume so I'm going to move the edu crew into there uh and let's just make sure it gets reflected over here crew edu crew and there's uh where is it Source config there's our definitions
okay great yes okay so everything's in there now so you have a flu and you have a crew on it uh one thing for us to do real quick for admin uh is you probably want to copy your environment variables from BN into the main crew flow. end absolutely okay let's do that okay so yeah we got it so you got a crew now let's step back and check how the flow works if you're going to the flow main file and that's towards the bottom okay FL main file right here yeah so you can see
the flow is very simple as I said it's a very thin layer in here it has a poem flow and you can see there's a a function there on line 19 that is annotated with a star uh they start thing that annotates that function indicates that that's the initial function of your flow and then what happens is you have an event based system so anything that is listening to generate sentence count is going to be executed afterwards so online 23 you see that you have another function that is listening to that one so once that
one is done then it's going to gener is going to it's going to call the generate poem and then once generate poem is done you're going to call stve poem right there uh and this is a very simple flow but the way that we can use this is we can have a start function that basically triggers one crew and This Crew does all the research on the topic gets pretty deep into this and creates a plan and then you're going to have another crew that's going to be listening to that once that's done that actually
goes in and in the loop writes the content for every single chapter or paragraph depending on how big you want this to be okay so we are going to have if I understand correctly one crew doing the research and the prep and then another crew actually creating the content yes and this is the most advanced setup that we can get we could try to do everything on one crew but this kind of like how you want to get them for real okay let's do it I I like Advance it's so funny I would have probably
just been trying to do it with one crew but it's nice to know that uh flows are available now yes so let's change a few things here real quick let's remove that state from the poem you can just drop that whole thing um like this whole thing I would say let's let's delete from line 10 to 13th at first okay yes and then we can rename some of the classes instead of poem flow to be your actual flow ad do flow and also importing our right crew in there so yeah so I I it says
poem crew is the crew part of it or I guess what I'm asking is it should just be edu crew right yeah I think it's Ed in your case yeah it might not even be crew it might just be edu right yeah I think for your case yes that's it I think cursor has got that right so if you if you go back into that line and you I think the last one is e you if you delete one character real quick there yes try to just yeah there you go that sh works if you
just Tab and then this should be edu so the cool thing is one of the cursors does is kind of like the Alo completes thing so if you go back to the edu first and you just start like typing something like a DOT you can see that it suggested to you so if you press tab it autocompletes the line for you I don't know if that is necessarily oh that seems to be right you can see that they color Chang so it was able to so it was able to improve cw.edu source. ed. crew so
it's really it's trying it's getting it all the way from the the nested directory here yeah we can double check in the end if it's working but yeah we're GNA there's a way to import it for sure you don't need to pass an attribute in there you can basically delete the PO stay you can you still I think you still need the flow in there we just don't yeah you can drop the brackets yeah and then I'm going to rename this to edu flow yeah okay and then same thing here let's just get that fixed
yeah so I would [Music] sayl content uhuh online 13 let's rename that generate sentence to uh research like research uh content or research topic okay yeah so now let's just drop line 14 and 15 for now and just add a comment so that we know that that's where our first crew is going to leave nice and now we can do a similar uh thing with the second um function but now it's the is going to be listening to the generate researched content right and then we can rename that as well and yeah do the the
whole thing and this should be renamed to that yeah yep and we can drop the content and replace with a comment for now just that we know like all right this is where like the second crew is going to come uh sorry just leave it like this I know I mean it's up to you how you name the function uh I meant that we can delete the content of the function from 18th to 26 to just have it as a comment for now okay can this be the same name uh as as the this function
up here uh not the same but in the the way that they're doing there like it's pretty good there are different names oh I see I see yes yes it is oh my god I didn't even notice okay and then the problem the problem that you're seeing in there is because a function with only a comment with it doesn't work so if you want to just get rid of this from now you can type pass in the next line within the function yeah then you can do the same thing for the first one as well
yeah there you go lovely uh we can drop the line 22 to 27 we don't need that and just rename some of the later ones edu flow right there we'll also do edu flow right there obviously let's rename all of these edu flow all right so now before we actually do the cruise and anything if you want to in your terminal you should be able to to type um crew AI flow plot okay what and what is that going to do I'm gonna show you in a second we notice a new you know maybe you
can help me with this I see this new environment has been created and I never know whether I should be selecting yes or no um I think I always get it wrong right now it's on basea which does doesn't seem oh well it disappeared great uh do you usually select that uh I don't get a lot of that because I pref fixated a specific python version but I got to say that I'm the way that I set things up is a little unusual like I have a natural python installed in the in the computer I
don't I don't use much of like virtual environments myself okay okay uh all right so I think it's done yeah so uh open up on finder real quick and then you should have create a flow HTML that you can render in there hey look at that oh this is awesome I'm G to move that zo in on it you click and expand and again this is a very simple but by some of the labels like uh below you can see that it can get quite complex with routers triggers NS and rs and everything w wow
this is so cool okay okay obviously it's still a very simple use case but this is awesome yeah but when is example here is like let's say that you didn't want to push this into a CMS automatically right you don't need to get out of this to do that you can basically create another function that like listens to generate educational content and then you can write regular python code that does an API call and pushes this into a CMS now you have a more complex flow that's exactly what I'm going to need to do eventually
I want to push this to a CMS so I'm definitely going to take you up on that when we get there okay very cool all right so now let's add our true crew and we're going to probably reuse your uh your let's start creating a new one for uh the research so you can type uh and let me see if I remember this from top of mind is crew AI flow create Das crew I think that's it oh by the way cre that crew is one single thing and then you can give a crew name
you can see edu research for example all right all right let's see so create AI oh sorry C what uh yeah try to do the best help I think I I remember that wrong so create flow D help let's see what the command is ADD crew there we are all right so what we're doing is we're creating a new crew within the edu flow our current flow um and the command will be crew AI flow at Dash crew and then the name of the crew ed- research let's hit enter and see what we get yes
okay it went ahead create a crew for you inside the folder that you have in there so if you um yeah if you close the edu folder there you go now I have Ed your research and you can drop the poem crew by way yeah let's get rid of that right now because we're not using that anymore great now we have edu research beautiful and just like normal we have the agents definition in a yl file the task definition in a yo file yeah very nice you can see you can see though that these are
way more compact setup like especially if you compare with your old one because that other one was a crew in isolation it has that own environment fbl It's On Tools folder a bunch of different things this one because it's leveraging the whole setup that is going on in the flow it's just kind of thinner and zimer version of the crew got it okay cool all right so we have a research crew should I also create a basically I think the edu crew the old one is there just for reference I'm going to guess like going
for we're going to create a research crew and then we also need the actual content writing crew is that right yeah I would say that's go ahead and create the new one as well all right so edu content writer and so same thing crew AI flow add- crew then the name let's hit enter so we should see yep look at that beautiful beautiful um so we have these two Crews the edu content writer the edu research um we also have the old edu uh which we're just going to use for reference yeah so now we
should be able to just add agents and tasks to ouro files as we use normally and setting them up as a crew on that crew file same way that we would and we can keep it simple for now we can just like get some going and then we really improve uh some of those um agents okay so I'm going to open up the edu folder for now let's grab the old definition so I don't have to rewrite some of this stuff uh agents so this is what I used before uh whoops we don't need both
of them we just really need the researcher for now so I'm going to grab that by the way can I give you some cursor tips oh please please I'm so Rusty by the way with coding I haven't really been coding much uh please no worries so going to your agency Amo the old one yep that one yeah you copy the whole thing uhhuh so the both agents just select everything and you're good to go okay yes now going to your new one for research for example uh yep let's see agents. ammo now you can select
all this and what you want to do is you want to typee command K and now you can say I want to create agent for doing research and the topic describe your use case and after that you say here's an example and you paste the content that you just copied from the other one interesting okay um let me see so do you usually use llama 3.1 versatile for this or should I be using like Cloud 3 .5 Sonet I'm a huge fan of Sonet for for cser so I usually I usually side with course both
Sonet which one do you use by the way I think the the new I think the other one is a cut I'm using the regular 3.5 the one in the top all right let's use that one okay so create agents for creating educational content based on uh this uh information from my previous agent definition okay and by the way before you press enter I would add a few things so I would say what exactly do we want to take out from this so you can say the final resuit from the final agent should be a
complete uh plan on how to write a long form content with titles uh subtitles uh and why each like uh topic matters what is important by it and maybe even include sources where information came from okay so the final goal for the researcher agent should be uh a let's see how do I want to do this the final goal for the researcher agent should be to collect all of the information necessary including doing a web search with serer tool um to I would say like to find out the relevant information about a given topic and
then I would definitely add at the end of the thing that you run you want a plan out of this and this plan should have a few things and just be very descriptive about what are the things that you want to have the resulting how do you how do you say that though like because it's is it it's part of the goal right yes it's gonna be part oh you're right these are the agents right so maybe we save some of this to the tasks maybe this should be good enough so you should be able
to pressenter now and this is the part where cursor really shines now when you're ready you can just press come and enter and it's gonna accept the suggestions did it fin yeah it finished okay senior researcher accept Okay but it had both of the agents which we don't need both of them in this crew right we only need the researcher I would have both because what I would say is we can have the researcher really focus on finding out so the way I'm thinking is the first agent in the research phase is gonna find all
the like all the different information it's gonna go wide and Broad the second one I want them to create a plan I want to like a very structured thing out of this I want to say like all right it's going to have five sections these are the sections from everything that the researcher found these are the main things that I want to have in each section so I would go that route with two agents okay uh so in my previous version I had a Searcher and then the educational content creator was the agent that was
actually writing the content but that's not quite what we want here it should be Ed educational content plan plan maybe yeah okay oh and by the way whenever you Sange we change one thing do you notice how um the tab thing is showing up yeah jeez you can just cre pressing Tab and it's going to complete the thing oh my gosh yeah I started paying for cursor today totally worth it it's so good so good all right so how does that look uh let me check it out um all right you're keep your ability to
turn complex Research into clear I think for the agents this looks great I think on the tasks though we're going to be more descriptive of the counts of the plan that get should I be a little bit more descriptive with the researcher's name like educational content I guess it's it's really just for internal use it doesn't really affect uh how okay so let me let me let me I'm gonna make that more simple then I'll say that's the Planner yeah all right cool now let's open up the task oops uh no this is the old
one though so I don't need that we need task here here we go uhhuh okay so resource task reporting Tas so let me grab the old information now and copy paste nope don't paste uh hit command K yep ah cool okay so uh edit these agent tasks to include information from The Following okay so we got that and then from the following snippet of older code then maybe we'll do something like uh the you know what I I just want to see what it does and I I want to edit it in line so let's
let's just see sure and by the way you can keep doing like common K and there's one feature that um I didn't tell you about that is the common L and that is for more like a longer check like come K is more like ad hoc change this the come L is going to open like a chat menu on the right for you to constantly chat with it okay um so we have the research task that seems right I think this instead of being reporting it should be planning task yeah okay um so let's look
at the research task first so conduct a thorough research uh let's just clean that up conduct thorough research about topic make sure you find any interesting and relevant information given put that on the same line given the current year is 2024 um should I explicitly tell it to use the serper tool here you don't need to uh what I would do though is I would add some flavor to the research right for example if I'm trying to produce material that is talking very much about the future I would say we're looking for the weding Edge
content the most relevant information or if I'm trying to do something for executives I would say I'm trying to find things that are meant for exactive decision makers to understand the market or understand the topic okay so what I'm looking for is content um yeah I I I'm looking for Content that is beginner friendly but also comprehensive I think it also will depend on how I Define the topic so if I I say intro to fine-tuning large language models versus Advanced fine-tuning of large language models uh I can I can kind of adjust it in
the topic right there right yeah that right there I think that's good but if one thing like it seems that what you're trying to get is you want to get uh you're gonna get information from basic level to kind of like an intermediary level because the idea is to kind of like bu a y up the content right so I would say I would say might be worth adding something like this but again we can always come back and change it we don't to get it right on the first one so good point if you
feel like this is good enough maybe yeah let's see let's see what happens I like testing it along the way so expected out output a thorough research report is it a report though um really what I wanted to do is gather information so I guess it's a report is that is that a good word for it do you think would use a report I think a report's good and then the second like the key for the second like task is is a plan more than like more than anything okay so a thorough research report on
topic with relevant information that oops that it can be turned into that can be turned into an educational piece of content afterwards the uh research report should also incl include references to the sources you use to create the content perfect yeah one thing that I would add as well is instead like saying that it can be turned I could say that will inspire educational content and what's the reasoning for that change it's just that I don't want it to kind of like stray away and start to actually writing any pieces I wanted to give like
as much of raw information as we can into our next planning agent because the next agent is the one that's going to try to find out those all right how do I make this like interesting or edgy or like explainable in a different way uh and I think the raw the rawest information that we get for the second agent the better it will do okay awesome awesome all right so then for the planning task review the context you received and expand each topic into a full section for an educational content piece yeah we want to
change out that I would say review the content you received and get inspired uh and get not get inspired let's say and come up with a plan for an amazing educational content that is aimed at and then you can use another variable Persona in there yes I'm going to I'll call it audience very uh audience audience level yeah so beginner intermediate Advanced yeah that's so cool maybe I should put that up here as well yeah for sure okay so but I guess it doesn't matter like for the researcher grab everything I mean honestly it might
matter because it might change some of the searches that we will it will do okay uh an ex a thorough audience level research report on topic yes I mean maybe because if you use beginner dat it might be it might do a beginner research so maybe you want to put that later in the sentence like a thr a research on our topic um that would Inspire locational content afterwards aim it towards audience level okay a aimed at audience level great yeah and then I would say lines 13th to 15th there we're want to replace them
with like what is the actual plan so in here is where you can even interpolate more variables or like you can say like oh I want this to be Edy I want this to be insightful um and then you go into uh what what exactly is the plan that you went and I think that sorry sorry go for it the plan should be highly detailed and comprehensive um so uh let's see the plan should be highly detailed and comprehensive maybe just that uh okay and then and now I would say uh I would say you
return a list off and then can do a series of bullet points and you can say uh T subtitles and that would be in the description not in the expected output uh that would be an expected output I think it would be better in there yes okay so let's try that um okay so formatted as marked down make sure to include any references sources you use to create the cont to create the plan we don't need I I guess we don't need that for the plan huh yeah no markdown whatsoever because we're actually going to
be using a ptic object there got it okay uh fully fledged educational no that's not it so this whole thing needs to go okay so a detailed plan for Content level or audience level I should say a detailed plan um how else should I Define this my take is if you want to one single page what do you want is a plan for each section so I would say the plan should be a series of sections each section with a subtitle a high level goal each section with a title subtitle I level goal and I
would say one thing that I worked from me in the past is why this section matter why it's important and a detailed breakdown of the section might be worth it might be worth it to add the the SE material like the The Source soures where the comp could be sources reference and I guess do we need the detailed breakdown of the section no I would save that yeah and I would remove tile because remember you're going to have one title this is only about like each section your article okay so with a subtitle and and
sources referenced okay and then educational content planner let me just make sure no it's called planner now so I got to change that okay how does that look looks pretty good so can we can we just try this and see what comes from it yeah go back into your main.py file and let's import This Crew okay uh edu flow this is it yep okay okay yes so you can go online nine there and try to import uh doing from Point cruise there you go research crew geeez all right oh no that didn't work let's see
try to lead line number eight for a second I think that's thre cursor off um and I think think what you went in there is there let me get what would be the right path one second oh there you go no that didn't work so Cruise edu edu research yeah that's I don't think you need the crew crew thing maybe that oh you don't okay research maybe that is oh and then you got to do edu research again uh edu search crew sorry edu search crew there you goore crew all right yeah so now on
the on the first and by the way this is all what we just did is to find this file right here exactly okay so now online 14th you can actually call edu research crew kof and for for now because we're testing it we can just pass the inputs in there on the kickoff and we're going to pass audience level and topic okay uh audience level beginner topic let's say finetuning LMS the one thing though is that the audience level and topic should be a dictionary with um a parent key called inputs so there we go
oh my God I wouldn't have known how to do that that's so cool I'm sorry I'm so blown away by all this all right uh except that looks right that looks right yes so we should be able to uh you can delete that pass line on 19 uh that is not required anymore and you should be able to do crei flow kickoff okay so cre AI flow kick off let's see cross fingers running the flow okay all right has no attribute kickoff oh I think what it is oh there's a couple things so the first
one is I think what is missing is you're calling kick off as if it was a class function you need to instantiate so we need to do the two uh parentheses on the crew before calling Ki off okay that's it I think that's it let's give it a try right so that's not a class method now it's an instant method instance method yeah or you're calling it on an instance yep okay uh there you go so if you're going to edu research crew um that file that we created within the cre all right so can
I show you another interesting thing from cser yes please and look it already knew it already knew the change before it does that uh you can do common L now uh I want to say you can do at and type tasks it find the right tasks emo for this I think it's the second one yep you can press enter and now you can type change this file to use the right agents and tasks so what is it doing is it's pooling from your agents and tasks files and it's updating uh it did something wrong in
there it didn't work because it's updating the yo file so maybe what you do is go into the Ado research file again click on that one now try to do come and L for a second let's see if it Clos it right now yes now it's right now you can add agents and tasks uh with the at and you can say update this uh crew file to use the right agents and tasks definitions okay so uh Ed research update this file to use the right agents and task definitions and by the way might be worth
like just mentioning like the screw python fire or something so we the right one yeah you see it's updating the emo but you can update it so if you click back on where you wrote on your prompt on the chat side uh on the up right you can update it so you can say uh make sure that you're updating the research crew file python file and now you can do it and then there we go there we go all right so once it finishes you can click on apply in there okay we can see the
diff interesting it changed it removed that okay that's fine I guess uh planner planning task plan. MD yeah oh my gosh this is so cool yeah and then all you got to do is do come and enter or click on that and you can accept all the changes there we go man where have I been and as a side note uh in the chat if instead of enter when you send a prompt you had done common enter it would then do a semantic search through the entire repository to find any other sources of information that
is helpful all right I see why everybody's using cursor all right so there's one thing in there that we uh we don't have is we don't we don't we don't import our serper too so we probably want to ENC comment that line eight um and then pass that on to our researcher there we go like so so easy yep okay great flow kickoff running the flow all right wrapped class object has no attribute kickoff all right so let me double check while you do that I'm going to see if I could just get cursor to
tell me what's going on I'm just going to highlight and say fix this uh the error message indicates a key error for the key planner okay so check agents configuration yep that's already no changes good Tas I think it's good verify the python code let's do apply entire five any changes I don't see any changes maybe I made it without a diff okay check initialization let's just see what I don't know if anything actually changed but I'll run it again let's see oh I see it now so it's uh we need to do after you
create an instance of the crew you need to do a DOT crew on top of that my bad I forgot about it yeah no problem let's see uh so that would be in main.py do crew. Ki off just like that uh just make sure that it's calling crew as a function so the parent the parentheses after that um how how do I do that so so do crew open and close parentheses and then kick off yes there you go got it okay okay let's see let's try it again all right so it's kicking off there
we go there go hey link found a YouTube video okay okay I like that so here's all the serer results uh huh okay so now that's working now I'm going to switch over to Lang Trace see we should be getting some new information in here okay maybe I'll wait till it's all finished okay agent review the content you receive come up with a plan I love it and there's the references right there nice there there's one final thing that is missing on the screw and that is the the ptic setup so that we get an
actual object out of it but that should be very easy to do and we can use uh we can use cler to help us with that okay and can you explain like what exactly that means and why we would want a pantic object so a lot of these agents they're taking text in and putting text out and that's good for a lot of the use cases but if you think about what we're trying to do here we're trying to get a very specific spe kind of plan we know that we want specific Keys specific values
we know the types and everything so we can use function calling from this agents to get us an actual object and what it means is that we can use that object to do any programming things for example a loop so if we say hey before this agent wraps up the work now it already has the plan let's convert that plan into an actual object that has all the sections on it so that we can Loop them so that we can call another crew for executing each item on that Loop got it okay okay so it's
it'll allow us to have an object that is easier for other Crews to work with exactly and for us to use for anything in in the code that is not a string okay so we have the plan let's just take a look let's see how that came out so educational content plan for beginners love it section one understanding large language models high level goal why it's important everything we asked for Content outline Define llms and their application to real world scenarios explain the architecture of llms discuss the training process beautiful sources reference I skipped over
that but there's sources reference data cam for example section two what is fine-tuning section three the fine-tuning process step by step content outline there it is section four technique section five challenges this is fantastic this is fantastic okay I I think this is a an absolute win I think right now the one thing that we need to squash before we move to the next crew is just making sure that we're getting a identic object so okay let's use cursor for that do one thing copy the first section of the plan copy the first section so
basically all of this okay yes now let's go into our edu research crew okay and then outside off the crew Bas around one nine you can break a line do come K and uh and basically say create me a penic object to support this structure I'm so blown away by this um by the way did you see Sundar pin the CEO of Google said 25% of all of their code is now written by AI I gotta say I I think in C AI is probably higher good as it should be I mean this is so
cool uh okay so let's see let's see what it does yes so there you go the right Imports right there create the object for us and create an accountant outline all right this feels very good uh I would say it even went a little overboard and make things like a little oh this is just if you accept accept the yeah okay all right so I like this it went a little bit more than what I that I would want to go for example the content outline I think we can replace line 21 with basically uh
just list string similar to line 14th yeah does it hear you is that's what's it's so cool okay and and then you can drop line 12 to to 14 yeah we don't need that anymore and then educate and this is perfect so you see there's two objects in there and this is regular python by now like hey you're going to have a section a section we always have title high level go why important CES and content outline you have types for what every single attribute will be and then it create another object called an educational
plan that will have a list of the object above so there's going to be many sections so now what we're going to do is copy that name educational plan because that's the object that we want no just the name educational plan as the object uhuh go into your final task so if you scroll down it can be directly in there or in the emo the like doesn't really matter by now and on instead of output file you can say output uh let me double check I think it's is that it right there it's not I
think it is let me double check it's output pent so output uncore pent and then you can paste that same name oh oh not output identic educational plan yes perfect all right all right so now what this means is that if you go into our main file there we can like after we call the keyof we actually can call a DOT penic and that will give us exactly that object and that object now is going to be automatically passed into our next function so right on the next function we will no longer get the plan
do markdown right no we we could if we want to but no in the current setup we don't okay uh and then what are we going to do on line 21 after South you want to add a coma in in say plan because you're now getting that exactly that object in there uh and you don't need to have like the type in there you can just delete the type and the the two the yeah there you go just like that all right exactly now we have the plan so what we can do is we can
call plan do sections because we know that our object have section where is this defined so this is actually coming up from the function above do you see how you have listening on line 20 so on line 20 we're saying listen research content and then when that function gets done its return gets piped into the next one so a good catch is on line 18th we need to do return uh before before the whole crew execution we just do return beforehand oh exactly as c y y y of course it's exactly what curs is saying
yep okay sure so now what it's doing is like it's passing dad as the as the argument for your next function so as we're passing only one we can call that plan and keep in mind that because we know what that object is we know that plan has an attribute called sections so on line 22 we can do plan uh I think what is the syntax we can do four section there you go cursor exactly uh but instead of printing as we have on the 23d that's where we're going to call our crew that is
going to actually WR that section but we don't have that yet so we need to go Define that so exactly do call crew here and one thing that I would add before the four let's create one uh variable that we're going to call uh final content and make it an empty string for now or actually let's make an array for now yeah and then as we call the cruise inside the for loop we're going to be appending the results into that final content yeah awesome okay so before we do that let's now uh we we
actually have to create the content creation crew EXA I think we already have done it we just need to find their agents and tasks yep okay so let's see edu content writer config let's just make sure these look good Yep this is what we need okay uh we did already do it do we need to update this at all based on I think we do I would I would and what one thing if you want to get more fency is we can copy the agents definition from the research and then use cursor and say like
hey we had this other agents the research now we want agents to do the write up and the review yep I gotcha all right so writer research agents let's start with agents so I'm going to copy that uh then I'm hit command K paste we have this agents definition no uh oh yeah from the edu research crew now create a Content writing crew based on this that uses the information the research crew found all right let's see what it does yeah educational content writer educational editor oh quality reviewer okay okay got a little fency there
right yeah all right um the only thing I don't see is it referencing the skill level the audience level so let me let me do that yeah we can add out that make sure to reference the audience level as well yeah beautiful beautiful except I mean boy okay my mind is blown okay now we probably can copy this one and go into tasks and say like all right now help us figure out the tasks now take this code from from agents. and help me create the associated task for each agent one thing that I would
say is probably might be worth it mentioning well I think it's gonna get yeah there well let's see you tell me oh it did okay oh expected output yeah right is that where you're going yeah that's great yeah okay amazing amazing okay um I I'm I'm like smiling ear to ear I'm Blown Away by cursor I'm Blown Away by crew I I need to code more uh I'm going to do more of these long style videos where I'm just coding and building I really enjoy these so expect more of these for sure and I'm I'm
very grateful Joe that you're helping out ah no worries I'm having a lot of fun honestly like things have been so busy I don't get to be mini Cruise myself anymore so I I love this all right uh cool so I think we're good here let's uh let's go back to main Pi I think you're going to have to help me understand how to like place all these sections 1,000% so the first thing is let's make sure that we are importing the crew online n the same way that we do with the educational research yes
there we go perfect is there a reason this is gray out no you can no no just because you hav't being using it yet as soon as you use it go back yep yep yep yep okay there we go oh my gosh uh the one thing that I would say though the section thing that it's passing there remember that this section is actually a penic object so what do we want and I'm going to keep it simple here uh we can get it more complex but I think you can call two Jon on section and
that's going to convert the section into a Jon object I might be wrong but we can we can figure it out okay let's run it yes and then you oh you don't need the do identic in the end of this one and another thing that I would say is in the end you can do do a PRI a print final content uh be yeah and you can do that uh out of the four yes there we go yep and is this going to store to a a file or or it's just going to print out
here it's going to print out here but remember you can create another function that listens to that that gets the final content and then you can save the file push to the cloud do whatever but this should work again we didn't spend much time on the agent on tasks so we don't know what's going to come out from that but this should run let's see let's see what it does uh kick off I'm going to clear all right so we there's a you can stop the extion because I think I see a problem in there
uh so we're not passing um and by the way we're going to clean this up in a second but for now we need to pass inputs into the educational content crew as well we are not passing the audience and the topic into that so similarly we need to we need to do it as well in there one of the way that you could do is you could just break the line above um and start typing inputs and cursor do it for you there you go audience level as well uh I think it don't need content
plan I think you just need topic and research but not the way that it's doing you can hardcode it as your did on line 15 16 and 17 for now and we're going to clean it up in a second okay okay and right we want we don't want to basically type these things twice uh so I I'll fix that right now edit yeah there's extract the inputs input variables don't Ty it twice so I think the one thing that I'm GNA say is I don't like how I did that I'll stop yeah the problem is
because with common K it only will change on the that he selected so for this you might want to do come and L all right so um extract the input variables so it is dry there we go that looks right okay accept a that's so much better cool cool okay run it let's do it he crew AI flow kickoff all right so the first crew should works fine because we already did that all right striking gray well there's one thing that we didn't had before that was the penic object so let's see how that would
go so I think one thing that I learned from the first video and now working on this with you is that even though in the first video 01 did pretty well it was very expensive and very slow and by using more of Cru functionality we can actually easily not only replicate but probably exceed 0 one's capabilities uh but we use any model right a much I mean much cheaper much faster model uh and then of course we can always continue to try 01 to see what it gets and then I think like my basic approach
to all AI development is start with the best model and then as you find efficiencies as you find different ways to build what you need to build you use uh kind of the the low less expensive you know quote unquote lower quality models because you have all of this framework helping you yes and again like the good thing is that we could change the whole models that is powering the screw changing one line of code in your n n file so that is pretty good all right so the eor that we got in there is
if you go into the ad do research crew piie file another the research sorry the the content writer crew P file m we need to change this to use our agents and tasks definitions this is using the full ones right now so I'll just do uh command L fix this to use the to use the definitions in at um agents uh and at pass gosh you got it this is this is cheating [Laughter] I gota say it's pretty good entire file does this doesn't feel right ah no it doesn't you don't need to do any
of that importing but again you can accept certain pieces of it if you want to okay so you can say for example you don't accept the line yeah that you don't need import ammo we don't need this we don't need this we do Yep this we do this we do yep I see I see I mean do you know one thing like I'm noticing that there's like a few things that hurrying out so maybe let's try to reject the whole thing all right and what you can do is on your chat there you can reference
back the other file so on your chat you can see um make sure that we we are working we're doing it similar to a do research crew okay let's see if that works now n same thing no uh let's see no need to load yaml right what it thinking do what is it trying to do here I'm confused I think it's trying to manually work around a lot of the things that crew already does okay let's let's just fix it manually sometimes you got to do that um so IDU content writer crew so that's not
right um now I'm so dependent on cursor I'm like wait how do I use cursor to do this so I think the only thing that I want to do is uh I want to get the agents names from agento and replace them in there correctly um and then the same thing for the tests okay so agent yeah agents EML so it's content writer editor and quality reviewer okay so um I'll try one more time adjust the names of the agents and tasks to match at agents. edu content writer and at task. okay there it is
editor writing task Ed yeah so that's that that looks right yeah okay apply close that accept let's see does this look right now yeah I think it's only missing one agent I think we have a reviewer agent in there as well yeah uh there to add the reviewer agent Yep looks good and also they're reviewing task I I would guess yeah the reviewing task as well okay assuming the names are right this should work okay let's see run in the flow so uh we actually uh used this back in the day to simulate a test
of having a crew to write a whole book and it's basically there and steroids where like you would have the the crew PL chapters and then you could have a crew write a whole chapter for you and yeah you can produce way longer Farm content this way so that's that's really the trick the plan up front and then have the agent or the crew kind of go through each section and build out the section rather than trying to have it do it all at once yeah I we we found that that usually produces way higher
quality content if it's kind of like a chain of Top on steroids right we're going even wi step like higher yeah so cool okay so while that's yeah so that that looks like it's going I'm going to switch back to Lang trace and let's just see how we're doing if we go to traces let's see how much these are costing by the way per run I'm always curious so three cents I mean so good so cheap right so cheap I think it's I think it's using far Mei maybe I hope so it's far it is
that's the default yeah actually we can we can tell let's let's take a look no it is using GPT 4 o and so we could use GPT 40 mini I think I actually manually specified 40 mini somewhere I don't think let's see it's it would be on the end it would be either on the agents or the end files um it's one of those um and agents or the m files right uh the crew right I don't specify it here no it would be on the agency ammo or on the oh you put it in
the yaml you can choose to right you can put it in the yaml if you want to set per agent different llms or if you want to said overall you s the m in that broadcast r one the way that I was doing it previously was like right here I would just say comma llm equals this also works but I found the emo to be a little easier yeah it's it's cleaner to have all the definitions in one place definitely so I'm not actually saying it anywhere uh GPT 40 there it is okay oh but
this was in your old one was it oh no I don't think so yeah here so but yeah this is yeah this is your old crew yeah this is the old crew by the way we should just we can get rid of that now right yeah okay so let's get rid of the old crew where is that edu right this whole thing can be deleted yep and by the way one thing that I'm seeing that I heard that we got there is probably because if you go on the content writer crew tasks zmo file we
can see that the name of the task is quality review task so we should update the Ed edu content writer crew to use that one instead I think it's using uh if you SC it's using a yeah review task okay and also line 52 line 52 as well okay let me before I run it again make sure all definitions match naming in TAS and agents is it is it saying to change anything quality reviewer yeah so it did find another one that was wrong I I think yeah got right quality reviewer amazing okay okay let's
save that I think we're all saved so should we try again uh before we do let's just double check the tasks file and make sure that's referencing the right agent as well uh so you see that the tasks don't have an agent within them and we should probably yeah should probably add this one does this one does so okay so let's do this uh add agents to each of these tasks based based on agents. Yo there there you go you're a pro en cursor already you got this I'm addicted it's so good it's so good
all right uh apply yeah that looks good all right save good to go yeah let's do it I gotta say the one thing that is bad about corser is that you got very used to it like I gotta say like coding on planes became way harder now yeah although you can get it all running locally um so I tried to do it but I I struggled with it maybe I need to make a video about it I'm pretty sure you could do it with cursor I know that there are plugins with vs code that you
can get it working it's probably not going to be as clean but um yeah yeah you don't if you don't have access to the internet it's going to be tough uh okay so crew AI flow kickoff let's see hopefully we got this one working okay so fine-tuning lm's educ educational content planner reviewing oh look at this yes I'm going to make this a little bigger so we can see more of it all right second crew is working second crew but it's it's wait so this was was the right so the the the writer crew is
going to write it's going to essentially kick off multiple times for each section is that how I should think about it exactly it's going to run once for every section and by the way there when we created the agents and tasks for the rider crew we didn't spend too much time on it one thing that why be worth doing is just kind of like tuning in because now it's going to probably write two long sections and we don't that was like hey write like a shorter section like we want to one our two paragraphs because
in the end everything's going to come together right so I would say that now that's probably what I want to do when spend some time later on the content writer crew just to kind of like make those prompts in a way that it works great for writing sections off a greater article all right that sounds good we may save that for another video uh cuz this one's getting long already um but that that sounds like a good Next Step yeah but they're ready I think this is this the third or four thing that it's it's
writing already so we should have a final one within like the next few seconds I think we I think we forgot something super important in here so all right stop this real quick there's one thing that we missed okay go into our flow the main.py file so if you see the second crew when we exit uted that you can see that we are passing those uh inputs variables right so we are passing the uh the topic and the audence laavo but what we're not passing is the section so we need to append the section into
that uh before we pass it and we need to I think you can probably do that in another I don't know if that works I think it might um no I think I think that won't work okay yeah I think what you want is on the line above you want to create um writer inputs uh above the four or within the four within the four okay writer inputs yes that's going to do a copy then you can tab that and then the next line you want to add the section exactly as it suggested yeah and
then section here I think you can call two js on on it two J on all right and then the only one thing that is missing is I don't think that our agents in tasks especially the tasks I don't think our tasks in the content writer crew expect the section variable so we want to make sure that we add it to there and do I need to uh pass in the input variables as well here oh no it did it it did it already never mind yep yeah got it so on the tasks for the
rider crew you want to make sure that you add a spot for the section right here yeah on probably on I would say on probably on the three I would add them uh so you can go at the final like for example on the line five on the description and you can break maybe a couple lines and you can do uh section and then there you go something like that yes and you can add that probably to all the tasks uh eventually once that we like get to spend more time on this on this agents
and T definitions uh we can probably uh we can probably make it better but that way now we're actually telling what is the section that it's writing about before we're we're not doing it got it got it okay cool cool cool that makes sense all right so let's try again ready to go yeah yes I think so yeah all right all right no so it's not two Jon maybe we ask curser to do it for us like what is the method that converts penic to Jon all right I don't even remember where we were it's
it's right right there on line 27 that other file um yeah there you go uh what's the right way to convert identic object to Jon yeah ah model dump Jon yes classic all right so dot two let's just make sure we don't have it anywhere else cuz I thought I remember we do no I guess not okay okay let's run it again all right nice and by the way notes for the future for maybe the the the follow-up video that you do is I think there's space for some of this agent for the second crew
to also have certain tools in case they want to expend on things or fact check things because they're going to have the refences so you could add serer to them as well that would be another thing Co other thing that might be helpful is you can set up a custom tool that allows them to search for previous documents and content that you wrote that you like so they can like check examples that's something that we also have seen work out in the open so there's a few different things that you can definitely uh definitely true
at it so I have I have something Advanced that I really want to do and I'll throw it out there we're not going to do it today but maybe just get your your uh your thoughts on it I want to be able to create images Graphics diagrams based on this content that seems incredibly difficult but maybe it's possible with crew it is possible uh yes we did that recently for a use case where uh basically we were analyzing support data consistently and what we want is basically for it to draw insights out of it and
kind like plot charts do the math plot lead so we creating coding agents that would actually write the code uh to do it oh my God this is so cool this is so cool um okay so it did finish yes I don't know why we got known in there but if you look at the final ones we should have all the sections in there so um if you start for example From The Bottom the last one that you're seeing is the final section oh oh oh right right just one section so how do I see
the whole thing so I thought we were printing it out but for some reason it didn't uh I I think I see do you see that online 28 we call point. pentech yeah we we don't need that we can drop that point p and maybe what we can do is we can do raw and I I think that should work if I recall correctly yeah okay it might not necessary you might not even need that but again and you know what can can we just put it to a PDF for now how would I do
that um oh yes let's do this create oh go ahead create a new function after this yeah just break the line and uh create one function like similar to the the generate thing yes and you can say save to PDF or save to text file to keep it simple uh you want to make sure that you bring that function one level deeper so it's inside the flow ah yeah of course okay you want to annotate that with the listening annotation so listen annotation similar to what we have there you go uh and then you can
basically uh you can drop that pass and actually uh basically save it to a text file and if you start like if you do Comm K and say save content to a text file what going to do for oh yeah to text file yeah I'm going to change it to actually being a text file I don't really need a PDF to be created every time to text okay accept and then one thing I would say on Line 39 what you want to do is break the line and do a return final content got it so
now data return is going into the content variable L 33 and doing the whole thing okay let's go all right let's do it do we want to use GPT 40 mini let's let's use gbt 40 mini all right where where where would that be set or why would it be using actually let's go back to Lang trace and yeah so it is using GPT 40 multiple versions why would it not be using GPT 40 mini uh I I don't the only reason I can see for that is if you have an environment variable set on
your system level that would be pointing out for that um that said let me get you what is the inar that you could use to set it for uh om me uh one second just because it'll also be a lot faster too yeah all right so this is what you w to do you want to sat on your uh nvar and I'm going to send you here in the chat that environment variable with that setup got it okay so we're going to switch over to the environment variable Alex is uh going to cut this part
all right so here we go now let's run it one more time cre flow kickoff go all right now it's going to be fun to see like uh a link traing works but it should the one thing that we're not doing as well and we should do because it's honestly has no cost associated with it is this agents can search the web but they're not scraping the pages so you can add the two on the researcher ones that U scrape web pages um and and they were allowed to now go deep into those pages and
learn more because now they only have the the research res to work with Okay I need to take notes on what we're going to do next this is all really cool uh let's remember to do that okay so we got our sections good yes there you go so now we they're they're basically writing the content for the first section and you can see the section information in there it says Jon but it should be fine so it knows that an introduction you know the high level goes you know everything that we said including the references
so basically now it knows like what it needs to write so it a root initial section why llms are important you can see that right in there and now it's going to the Quality assuance specialist beautiful this is so cool it is going I wonder like what is the what is the section that it's working now it's techniques for Effective fine-tuning so it's it's going deep yes yeah yep yep there it is overall the content uh effectively align so that is the review viewer essentially saying what the feedback is yeah but you see that's already
the thing like one thing that I'm noticing is because the final agent is a QA agent and the expected output is the review what is happening is the review is being considered the actual like final section yeah so it's something for us to look into I think we're still going to be good enough but um but yeah we're it's something for us to tune in on the agents and T from the rider crew got it just because we didn't spend much time on it yeah because if you look into that for example let's expand the
terminal there real quick so you see let's scroll for the the one above like if you see there go just a little more above that all right so this was the first one right no this was the QA doing performance quality assessment so the one above that maybe yes this one is the editor so they went above that there we go all right so this is the output from like one of the sections like it wrote a bunch of things yep and then it passed that on to the next one that is the ad to
change it so what we should have said the answer like hey whatever you change in the end of your execution we still want the final section like the whole section but if you scroll it's going over and kind of like giving you suggestions and everything that going to get interpolated so we have the educational content text file in the in the left if you want to open that up yeah so you see it's it's adding the quality assessment report as the actual content and that's the problem ah yeah if you don't mind can we fix
that real quick yes let's do that so let's go into the tasks real quick for the content writer um edu content writer tasks edu research no edu content writer task right there yes okay so let's spend some time on this so the first thing is we want to make sure that on the editor uh we say on the expected output from the editor we say a polished version of Education comp we've improved CLA and then we can add to that we only want the the section content back nothing else exactly do not include the feedback
I'll just be extra explicit perfect and then for the quality review task we probably want to do something similar where on the expected output it's saying like I want to detail quality assessment like no no no I want you to update I want an updated version of the r so you can probably drop that whole expected output and replace it with I want to uh an improved version of the section that incorporates all your feedback yes there we go incorporates the feedback do not include the feedback itself itself yeah just the improved content okay and
now one thing on the first task uh I would change that so it know that it's only writing like a paragraph worth of text right so I would say is instead of well structure educational content piece I would say a well structured paragraph or two paragraphs about this section that will be part of a longer form content or something there you go I think now this will produce way better results all right okay cool so let's run it one more time great kickoff and I think after this one we're going to call it cuz Joe
I know your time is Super valuable and you spent a lot with us already uh no module named Lang Trace yes my favorite let let's fix this now just you trace uh I think it's python STK I'm not sure might be pretty sure that's it there go look how easy that was there we go let's this I think you might need a link Trace package isn't it I don't know I might be wrong just this no it's yeah never mindon SDK oh because I'm in VM I don't have UV set up uh so let's just
try pip install uh L Trace python SDK I don't know if that's going to work I'm just guessing right now uh uh all right so the module L Trace doesn't have a net oh by the way look at your GitHub real quick that file that you copied this from oh so you see you import from link Trace DB so that's the import that you want on your main file there we go yeah there you go that was it okay sweet all right now it's tracking the Lang Trace now we have Lang Trace in place now
we can double check this run and the good thing is we're using far mini so we're going to be able to also check the cost as well and that's going to be pretty cool yeah what's your favorite model for your agentic workflows far mini for mini I guess that's why it would be the default huh do you ever see a need for using 01 or do you do you feel like if you are robust enough with the agent definitions you could get 01 level quality from any model I believe right now we can get o
O Level quality or even above on any model and you have more control as well with 0 you don't have as much control right they might produce like a good content but like with the r setup you can control so much about how it reasons about all these topics um and we could get away thing things way more complex than this as well if you went to but yeah I don't find it need to use one and I find that the latency Mar than than cost is like is very prohibitive yeah for sure uh especially
like look if when I ran it in the previous video a single run and a very basic use case like we didn't even have a lot of this robustness that you've helped me set up now it was 50 60 cents per run so imagine when we add that robustness when we run this potentially dozens hundreds of times I mean that that definitely adds up and then it also slows it all down a th% I think like there's use cases like that that might justify using it but I honestly I think uhu we had to do
some changes within crew to make sure that we could kind of like like support the model just because it behaves so differently from all the other models so I don't know I I have yet to find a use case that would require that level of like reasoning um maybe something with math would justify it right yeah yeah that's what I found and I've talked about this a lot 99 98% of use cases can be done with the Cutting Edge non1 models you know the the best of the CLA and and even to be honest let's
say 90% of use cases can probably be done with llama 3.2 um no problem so the majority of use cases are are just going to be accomplished by cheaper smaller more efficient models and I I love that and then especially especially when you wrap it all with agentic workflows uh it maybe instead of 90% it's 95% or 98% of all use cases can be handled by an essentially free model yeah exactly exactly and yeah I mean you might need to change some of your agent and task definitions but like once that you get the hang
out of it it works like a charm and you can definitely see it and the good thing with like these open source models is that you can host themselves so you don't need to feel like you don't need to worry as much about exposing it to certain kind of like data um because you know that it's all in house that's right I'm sure you're hearing that a lot talking to Enterprises out there yeah tell me about a finance and Healthcare like it's all they talk about yeah I bet all right so it looks like it's
working yeah it's getting to the p and I can already see a few things that we could improve like more in the future for example this whole idea of using bullet points we can kind of dismiss it and say like just write a paragraph yeah um the other thing is I'm noticing that for every section it tries to wrap up saying like oh in summary or in conclusion we could say like hey you don't need to do this like this is a paragraph in the middle of a section it doesn't need to say like conclusion
or summary just get like get it done so it's a few minor improvements that we could add on the initial writing task yeah so uh no need to always use bullet points just use them if it makes sense and then also um yeah node need to include summaries of each or conion yeah summar conclusion or conclusions of each section just the content all right I'm not going to run it again but I'll save that for later when that you could add as well is if you want to can kind of limit like hey I do
like three or two paragraphs in most and that could also help all right I'll I'm going to before I add that I want to actually read over one of these in in depth I want to check it for accuracy check it for completeness is it Tu verbose uh and then I'll come back and I'll iterate on these uh tasks and agent descriptions yeah as I said I think there's a lot of next steps that you can take this like from I think adding the scraper to the research alone already make a huge difference yeah uh
you can also add in there scraper for the second agent like the second crew because now the agent in This Crew can look into the references and making sure that the data is valid and do QA so there's no alucin or anything uh so there's a few different ways that you can take this for sure it looks like it's wrapping up um one last thing is uh oh go ahead it's done actually you should be able to open the educational cont so I also think to speed up this entire process kind of once you really
tighten up all the definitions and your crew and the workflow swap in Gro just have you know 100x speeds why not exactly okay so let's look at educational content educational content yep all right let's get rid of that here we go um let's see data collection yep qualitative combining assessment yeah this looks really good so I'm going to spend some time I'm going to read over this it's definitely I would probably want to make it a little bit longer but it shouldn't be longer for longer sake I need to read it and understand what it's
saying what it might be missing and then I could just clean up the agent and task definitions yeah and you know the one thing that would be cool is like you can go a little crazy with kerser and you can copy is output or like a section and go into the task definition say like this this cont of like this group of tasks gave me this section I actually would want this to be longer or to be deeper or anything and can you rewrite this agents for you or these tasks for me and it's going
to try to tweak some of those definitions if you don't spend too much time on it awesome I think we're good for now Joe thank you so much I really appreciate all your help I'm I'm uh I'm so excited for all of these new features I'm going to be playing around with it probably the rest of the day uh and then I'm going to make a part three of this video uh why not this is so much fun and this is actually a real world use case I am going to use this in uh creating
educational content for everybody and uh I'll push all the code so if you want it if you want to check it out you'll see it it's it'll be uh GitHub in the description below Joe thank you again thanks for joining us thank you so much it was great have a good one everyone all right if you enjoyed this video please consider giving a like And subscribe and I'll see you in the next one
Copyright © 2025. Made with ♥ in London by YTScribe.com