I'm a retired neurologist - very interested in all of this, but from an entirely different background (and era). I'm absolutely fascinated at how these processes are similar to neurobiology. Of course, as humans we are building AI to "think like humans" (which has its strengths and weaknesses). However, it is fascinating to watch this arena "evolve" in real time - developing function elements just as brains developed function elements over hundreds of millions of years. In this case, specifically, I'm fascinated by the "backstory" element. It is essentially programming a "way of thinking" that functions somewhat similar to how our own "personal stories" program our ways of thinking. Thank you. It is a fascinating time on this planet!
@@markdkberry Indeed. We actually have lots of "coded programs". The old (and surprisingly naive) idea was that we were born with "tabula rasa" - the empty slate, no inherent programs. Antoine de St. Exupery wrote: "more wisdom is latent in things as they are than in all the words men use". Indeed, a lot of ideas about behavior are just stupid if you simply look around at the whole planet of living creatures providing commentary on the antecedents of behavior - to those willing to look. Indeed, pain behavior is highly complex. It has the ability to both turn up and turn down the perception of pain from a given source of pain (the nociceptor). Within adaptive reason, pain is turned down during sleep. (Not to say it can't wake us up, but it does tend to be less perceived when we sleep - thus allowing sleep, a necessary physiological time.) Pain behavior is a long story.
@johnbarbuto5387 Very interesting information, thanks. I've been imagining that advanced ai, with tools like this and "flow engineering" and architecture, will end up being like hybrid of human brain/mind organizational structures and organizational structures we have developed with people. Which will further develop in a distributed way, like an ai internet, or ai being deeply integrated with the internet. Seems like developers aren't up to speed with the workings of the human mind! They might consider studying more in neuro and psych.
Yes I've thought a few times that with how complicated and intricate these systems become the more we could be faced with AI "mental health" issues when destructive processes go unnoticed 😅
Oh...my...goodness. I have been waiting for a walk-through of crewAI and not just people talking over code screens. This worked for me on the first try which is a miracle. Agents are the next big thing and I am grateful for the video and the time I spent learning this was well worth it!
Hey brandon! It's great to hear this. Yeah, I had seen many videos showing some code generated by CrewAI's GPT and i thought it was not really clear what was going on behind the scenes. For real projects, I would be using their CLI and their GPT to create the crews because it's more efficient, but it is super useful to know how the system is designed!
@@alejandro_ao Yep! Since the code is so modular, I have found it quick to do. Just copy, paste, edit, etc. I have also been using LLMs to create backstories, tasks, etc. Maybe a next step would be to create a simple UI on the main script...hint...hint. :) Keep up the great work as always!
crewAI is a good tool, but if you consider it from multiple perspectives, for example: 1. Self-awareness, such as: Who are you? What can you do? What's the date today? 2. MySQL database query, such as: how many data in the table? What is the highest temperature in 2024? etc. 3. Vector library (This may include some basic knowledge, and it is not necessary to query MySQL. Of course, self-awareness can also be included here to simplify things.) I think it's difficult to achieve the three aspects simultaneously, as they have different dimensions, which makes me excited. If you can publish a video on this, I believe it will be viewed by many people because it is very practical. Thank you. Wish you well.
An excellent tutorial, and the materials were also very well done. Looking forward to additional videos on: - crewAI memory (this is not that well documented in crewAI, but I'm intrigued by the possibilities) - crewAI hierarchical processes - crewAI and advanced uses of Langchain (e.g. reasonably sophisticated RAG)
Bro you should use Gemini pro for your testing its just as powerful as gpt 3.5 but its free to use all you want it what I used in this video for testing . Hopfully in the future more large llm will be free to use. Ps - Thank you so much for this as a high school kid you made it so easy for me thank you
Bro this tutorial was amazing!! Thank you for breaking it down in such detail. I feel confident about using CrewAI in the wild. Trying to get a custom crew for content creation made by the end of this week. Let's gooooo!
Another great content bro! This is definitely more structural and abstract way to create a agent team :) Also thanks for the notes on costs, it's definitely a ROI question.
no worries mate. sure! i mean, usually, i would use their CLI and their GPT to set all this up. but i figured it was useful to see what was actually happening behind the scenes :)
Can this be made to work with Ollama and local LLM's? Would it be possible to demo this please? Reason I ask is when I follow the above I get the following error: Agent stopped due to iteration limit or time limit
This video is particularly beneficial I have already begun to think about using crew AI to automate tasks in the HR department this video will help me a lot to achieve that once I wrap into a front end UI thanks Alejandro for making these tremendously helpful videos ❤❤
Overall, a fabulous, clear, detailed examination of CrewAI use with agents. Inclusion of cost issues at the end was very, very helpful for real-world analysis. Now here is a final question. I have near-zero knowledge of programming Python, use of GitHub, and programming CrewAI. I'm reasonably smart but this is not my area of expertise. Presume I wanted to hire you to do a task similar to what you did here. Ballpark, how much would that cost? Or, how would I correctly ask someone about programmer costs for this kind of function? (I'm building a neuroscience-and-theater based educational tool with a colleague and this kind of research could be useful to us.)
Amazing tutorial. It would be great if a new one can be done using Local Models. Besides the differences in capabilities of local LLM against Chat-GPT, the main issue is getting tools to work, which severely limits what you can do with local models
Next, I'd like to see something similar using Llama 8b API, or Groq API? Not sure how to change the code to get that functional and working tbh. But I'd like to see how it works. Any idea on how I can start experimenting with it. I get lost where you create the tools because you are using Exa, if that makes sense. I know you said you'll be looking at different Llm's below. Keep up the great work, very comfortable following along with you. Thank you so much!!
Thankyou for your video. It´s easy to understand e very objective. Could you make one video adapting it to use local LLM agents like llama3 using Ollama or LMStudio. It will be great!
Hello Alejandro, please implement this OS-World, this can be the solution for a lot of use cases in which agents have to work with the compute OS-WORLD
Exciting predictions for AI's future! It's worth exploring alternative tools that can help you stay ahead of the curve in AI development. #FutureTech #AI
Hi Alejandro, Can you please tell me how I can evaluate my agents or is there any framework or tool like RAGAS for evaluating agents, also it would be helpful if you can make a video on that.
Could a workflow be created that could interact with an OS X Audio software (for example logic or cubase) to carry out tasks? For example grouping audio files, dropping those files into the app, colour coding, sorting into folders and maybe even using the application to assess audio files to determine volume levels. I'm keen to speed up the mundane part of my work
Have I missed a step? ERROR: Cannot install -r requirements.txt (line 1) and python-dotenv==1.0.1 because these package versions have conflicting dependencies. The conflict is caused by: The user requested python-dotenv==1.0.1 crewai 0.22.5 depends on python-dotenv==1.0.0
Very good presentation. How is this different from an AI app built using RAG? Does this mean that we can replace all the AI apps with Agents? How can we use Agents within an LLM-based app using RAG? Can you show it in a diagram or, even better, in a demo? What UI frameworks (React, Streamlit, etc.) could we use to build the front end for agents? Thank you for your clarification.
hey jessica! while agents can perform rag, i wouldn't say that crewai replaces regular rag applications. agents operate at a higher level of complexity than regular rag apps. and i am an advocate for the simplest possible solution that delivers the job. that being said. there is one thing called "agentic rag" which can enhance the results of a rag application with an agent that oversees the retrieval process. however, i don't think you would necessarily use crewai for that one!
I wish you would give an example that is more useful rather than one taken from the documentation. For instance, you could prepare and send an Instagram post once a week. Or, I don't know, you could examine Google ads and prepare a more effective ad campaign to surpass competitors. The ones in the documentation are certainly very helpful, but they contain information that is not useful to anyone. Maybe they are ideal for understanding the basics, but if you are going to teach how to build an agent from scratch, wouldn't it be great if it was something more useful and something people would want to use?
How do you host this in production. No data can be sent externally. CrewAI is a non starter in enterprises as aSaaS only model. Any other recommendations
Hello, Alejandro! First of all, thanks for the great content you bring to our community of AI fans. /Question: How can I make this example work using an Azure OpenAI API Key along with its endpoint? Any help will be appreciated. Thanks!
Amazing, simple, clean and well explained. Thanks! I got confused in one part though, do I need to give contexts for tasks considering the agent working order? Basically does it follow task order or agent order?
great, thanks! so since we are using a sequential process, it follows the task order. this means that the tasks will be executed one by one in the order that you specify them when you create your crew. there is, however, a possibility of creating a crew with a "manager" that decides by himself the order of the tasks and the agents to assign them to. this would be a "hierarchical" process. i will make a video about it soon!
This is all nice for a single crew. But what if you want to switch between multiple crews? What if I have two different crews in the AI needs to decide which task is most appropriate for which crew
Hi, I am adding the gemini model to the agents using the llm parameter, but the model does not begin executing, after showing " Entering new CrewAgentExecutor chain..." two times there is no further steps being taken after that. Can you help me resolve this issue?
hey there, i use Hugo (Go-based static website generator) for the static website and a theme called Blowfish. i love the set up. i might make a video about it, even though it is not very AI
Very well done introduction, as always. Is it better to use this or LangGraph? I'm curious to know if you have an opinion about the best framework for working with agents.
It should be used in conjunction with LangGraph, together they are an amazing ecosystem where you can use LangGraph as the control flow between different Agent Crews. And they are completely compatible since under the hood they are all LangChain Agents. 👍
Is it possible to have an orchestration layer that call different crews that solve specific tasks and pass back results?If so can you do a video about it in the future?
hey Jim! so good to hear from you! this would be so awesome, and it is not super hard to build. all you would need is a crew that creates and tests crews based on a user's input. i will try to make a video about that, maybe even with a GUI
Awesome tutorial and I'm getting ready to explore crews myself. Sorry if I missed but can you give the total cost for the Crews using 3.5Turbo vs. GPT4? I think 3.5T was 4 euros, but I didn't catch the total cost for the GPT4 crew
hey there, actually after tweaking a little bit the crew (especially after removing the tools from some agents who didn’t really need them), the final cost with GPT-4 was less than 1 USD. GPT-3 might be slightly cheaper but not too much because it tends to make more requests (it makes more mistakes and tries to correct itself time after time). also in general, for agentic behaviour, results are pretty bad on GPT-3. I’d go for gpt-4 all day long
Thanks for the great content, a quick clarification, can we use open-source LLM like Mistral, LLAMA 2, etc. instead of OPENAI also any alternative to EXA. This is to control the cost while testing.
absolutely. there is not a very flexible way to do it so far, but i will be making a video about more llms and other tools. in the meantime, you can do the following for mistral: OPENAI_API_KEY=your-mistral-api-key OPENAI_API_BASE=api.mistral.ai/v1 OPENAI_MODEL_NAME="mistral-small" more info here: docs.crewai.com/how-to/LLM-Connections/#configuration-examples
Hello, First of all, thank you for your video! I am getting repeated errors while using the search tools. I think it is related to EXA API: "I encountered an error while trying to use the tool. This was the error: eval() arg 1 must be a string, bytes or code object. Tool get_contents accepts these inputs: get_contents(ids: str) - Get the contents of a webpage. The ids must be passed in as a list, a list of ids returned from `search`." Could you help me please?
def get_contents(ids: str): should actually be def get_contents(ids: list): Note that the docstring even says 'The ids must be passed in as a list, ' Also the line 'ids = eval(ids)' should be deleted.
do you mean, something like generating crews on the fly depending on the list of tasks (or the project) specified? this is a great idea, a bit more complex to implement though. I’ll see what I can do!
@@alejandro_ao I'm developing an AI-driven educational assistant that uses a multi-agent system to personalize learning for students. It begins by gathering detailed information to create a student profile. Then, the system assesses the student's knowledge with targeted MCQs, generates a learning summary, and creates a personalized roadmap to enhance their understanding. The system also provides dynamic explanations and Q&A support, all powered by advanced AI to ensure a tailored and effective learning experience. Need Your help :)
sure, they have an integration with ollama. and with a bit of tweaking, you can use any model that langchain has an integration for. coming up in the next video!
Thanks for the work. I reran this and modified it to use gpt4-o, and on review (I used AgentOps Dashboard), the cost was $3.24. That seems to be very high. Are you seeing a similar charge? Thanks
hey there, yeah that seems a bit high, especially for gpt-4o, which is supposed to be cheaper than gpt-4. are you sure that the crew is actually calling this model?
@@alejandro_ao Yes. If you're interested, I can send you the run results from the AgentOps Dashboard. It shows 118k prompt tokens and 14k completion tokens.
Hey there! Thanks :) CrewAI is actually built on top of LangChain agents. It allows you to create a team of LangChain agents that work together and interact with each other. You could achieve the same thing (a team of agents) by using LangChain agents alone, but you would have to code the entire framework of how they interact with each other and organize their tasks. Effectively, you would be coding your own version of CrewAI by doing that... I would say that if you need a single agent, LangChain alone is the way to go. If you want a tea of agents that would replace an entire departmemt in a company, then maybe CreaAI is for you :) A more direct comparison of two products that do the same thing would be CrewAI vs AutoGen, for example!
hey there. it is not necessary for the app to work, but it is needed to not leak your api keys to github (or other repo). when you push your code to github, the gotignore file tells your system which files NOT to include. this way, you can use the files locally but not push them. for example, in this case, our api keys are inside the .env file. so i added “.env” to .ignore so this file is not sent to github :)
what version of python are you using? are you using conda environments? you can let me know with a bit more detail on the discord server. you can post your code there and maybe i can help you out: link.alejandro-ao.com/discord please tag me there when you post your question to be sure that i see it!
so far i have tried mixtral8x7b with groq and was working pretty good too. but that requires a bit more tweaking behind the scenes. i might do a video with benchmarks, actually...
You can pass in the LLM you want to use in the Agent() constructor, so you could use a different model based on the Agent requirements. Even local models are possible to be used as long as they are able to handle functions (there are quite a few that support functions) The default LLM that is being used is set up in the Agent source code as: llm: Any = Field( default_factory=lambda: ChatOpenAI( model=os.environ.get("OPENAI_MODEL_NAME", "gpt-4") ), description="Language model that will run the agent.", ) So the default is GPT-4 and you can change that by setting a variable in your .env OPENAI_MODEL_NAME=gpt-4o (or any other model)
yeah, but the language models are not all free, especially the ones with which this works correctly. you can try to run this with ollama or groq, but they don’t work as well as GPT-4. the problem with groq is the rate limit, not the models they have
@@moroccanguy1957 i may add that groq is amazing. the only reason why agentic behavior does not work with them right now is that they have not released a paid plan. they only have a rate-limited free tier. and the agents eat up on that rate-limit pretty fast. as soon as they release their paid options, they will be probably the best way to run open source LLMs that are great for creating agents
I am no programmer... yet... maybe that is why it doesn't work. I have installed crew ai and I get no errors. However, when I type "from crewai..." I don't get creai autosuggested, not Tasks... I suppose that I am doing something seriously wrong, but I can't figure out what.
hey there! are you sure you have created and activated your conda environment before installing and importing crewai? that might be the source of all your trouble!
hi!! i’m Korean salesman of medical AI software. so i’ve wanted to learn AI programing or something. Can i use your picture of your blog on my blog? i want to write a process of studying AI . also i will mention that this pic is captured from your blog.
@@alejandro_ao thanks~ but.. i didnt post on my blog yet because i dont understand CrewAI.. if i can post i will remain my blog url. i always watch your video. thanks.
hey mate, it is usually super hard to answer this question because it depends on each person. but i will try my best in a few lines: i would say that you should become a software engineer first, and then specialize in AI. become good at solving problems, applying algorithms and implementing APIs. backend development should be your main specialization. while you're at it, try to apply all your learning projects to AI-applications and learn the generative-AI stacks (langchain, llamaindex, crewai, vectorstores like chrmadb or qdrant...). but definitely aim at software first, Ai second. it will come naturally ;)
hey michael, please let me know what exactly caught you off guard. i am trying to make my videos as beginner-friendly as possible, even though these are quite sophisticated frameworks
hey there, if you are talking about Exa, they have 1000 queries/month for free, so that should be enough for most projects and i found that their search api is the best for LLM-apps. if you prefer to use a google wrapper, you can use Google Serper (although they only give you 2500 free queries total): serper.dev/
Will do I'm just going to have another go. Will start from scratch, just new to python and environments and API keys and everything else. I won't give up till I get it working. So I was thinking if I had something working then I could understand subtle changes I make or bots I've designed and repurpose the agents to do what idea I've got. But when I load in the code it's got loads of errors so I'm doing something wrong or is it the code I download, I'll make step by step notes on my next attempt. Just to stress I'm 100% noob to this so if I can learn this, we'll then anyone can, I'm a good advert if it works 😄.
Hi, what is the purpose of this in the get_contents() tool? contents = [content[:1000] for content in contents] as in, why specifically 1000 characters? Also, saw this error during execution: "I encountered an error while trying to use the tool. This was the error: eval() arg 1 must be a string, bytes or code object. Tool get_contents accepts these inputs: get_contents(ids: str) - Get the contents of a webpage. The ids must be passed in as a list, a list of ids returned from `search`." But overall, nice work!
hey there! thanks for pointing that out. Actually, there is no need to run the `eval` command as the LLM identifies the input in JSON automatically. So you can comment out that line and it should work. Sorry about that!
I'm a retired neurologist - very interested in all of this, but from an entirely different background (and era). I'm absolutely fascinated at how these processes are similar to neurobiology. Of course, as humans we are building AI to "think like humans" (which has its strengths and weaknesses). However, it is fascinating to watch this arena "evolve" in real time - developing function elements just as brains developed function elements over hundreds of millions of years. In this case, specifically, I'm fascinated by the "backstory" element. It is essentially programming a "way of thinking" that functions somewhat similar to how our own "personal stories" program our ways of thinking. Thank you. It is a fascinating time on this planet!
Thank you for the input. How about you make a 10min video with your thougs and comments on this?
@@markdkberry Indeed. We actually have lots of "coded programs". The old (and surprisingly naive) idea was that we were born with "tabula rasa" - the empty slate, no inherent programs. Antoine de St. Exupery wrote: "more wisdom is latent in things as they are than in all the words men use". Indeed, a lot of ideas about behavior are just stupid if you simply look around at the whole planet of living creatures providing commentary on the antecedents of behavior - to those willing to look.
Indeed, pain behavior is highly complex. It has the ability to both turn up and turn down the perception of pain from a given source of pain (the nociceptor). Within adaptive reason, pain is turned down during sleep. (Not to say it can't wake us up, but it does tend to be less perceived when we sleep - thus allowing sleep, a necessary physiological time.) Pain behavior is a long story.
@johnbarbuto5387 Very interesting information, thanks. I've been imagining that advanced ai, with tools like this and "flow engineering" and architecture, will end up being like hybrid of human brain/mind organizational structures and organizational structures we have developed with people. Which will further develop in a distributed way, like an ai internet, or ai being deeply integrated with the internet.
Seems like developers aren't up to speed with the workings of the human mind! They might consider studying more in neuro and psych.
Yes I've thought a few times that with how complicated and intricate these systems become the more we could be faced with AI "mental health" issues when destructive processes go unnoticed 😅
Oh...my...goodness. I have been waiting for a walk-through of crewAI and not just people talking over code screens. This worked for me on the first try which is a miracle. Agents are the next big thing and I am grateful for the video and the time I spent learning this was well worth it!
Hey brandon! It's great to hear this. Yeah, I had seen many videos showing some code generated by CrewAI's GPT and i thought it was not really clear what was going on behind the scenes. For real projects, I would be using their CLI and their GPT to create the crews because it's more efficient, but it is super useful to know how the system is designed!
@@alejandro_ao Yep! Since the code is so modular, I have found it quick to do. Just copy, paste, edit, etc. I have also been using LLMs to create backstories, tasks, etc.
Maybe a next step would be to create a simple UI on the main script...hint...hint. :)
Keep up the great work as always!
What a delightful voice; I could listen to it all day long. Thank you for the course.
crewAI is a good tool, but if you consider it from multiple perspectives, for example:
1. Self-awareness, such as: Who are you? What can you do? What's the date today?
2. MySQL database query, such as: how many data in the table? What is the highest temperature in 2024? etc.
3. Vector library (This may include some basic knowledge, and it is not necessary to query MySQL. Of course, self-awareness can also be included here to simplify things.)
I think it's difficult to achieve the three aspects simultaneously, as they have different dimensions, which makes me excited.
If you can publish a video on this, I believe it will be viewed by many people because it is very practical. Thank you. Wish you well.
You’re getting better over time! Thanks for sharing your knowledge!
thank you man! i appreciate it :)
An excellent tutorial, and the materials were also very well done.
Looking forward to additional videos on:
- crewAI memory (this is not that well documented in crewAI, but I'm intrigued by the possibilities)
- crewAI hierarchical processes
- crewAI and advanced uses of Langchain (e.g. reasonably sophisticated RAG)
i'm working on it! 🫡
Love these videos on CrewAI, and I feel I've learned more in this video than hours reading thru the docs..... please make more videos on this topic 💛
Bro you should use Gemini pro for your testing its just as powerful as gpt 3.5 but its free to use all you want it what I used in this video for testing . Hopfully in the future more large llm will be free to use.
Ps - Thank you so much for this as a high school kid you made it so easy for me thank you
great job!! I've dabled with this already, but loved the step-by-step approach. Much appreciated 🙏🏻
Bro this tutorial was amazing!! Thank you for breaking it down in such detail. I feel confident about using CrewAI in the wild. Trying to get a custom crew for content creation made by the end of this week. Let's gooooo!
I've been waiting for a video like this. Thank you!
great! i will be making a series about this actually
Heading over to Patreon this morning. Killer tutorials 🙏🏼🙌
awesome man, thanks!
Another great content bro! This is definitely more structural and abstract way to create a agent team :) Also thanks for the notes on costs, it's definitely a ROI question.
no worries mate. sure! i mean, usually, i would use their CLI and their GPT to set all this up. but i figured it was useful to see what was actually happening behind the scenes :)
parabéns, perfeito, traga novos usos para estudo, estou impressionado com isso, obrigado por ter nos mostrado.
muito obrigado !
Nice Tutorial,
One question - how to share the output of 1 task with another task, is it possible to share the context? if yes then how?
Can this be made to work with Ollama and local LLM's? Would it be possible to demo this please? Reason I ask is when I follow the above I get the following error: Agent stopped due to iteration limit or time limit
Thanks for this amazing video, Alejandro.
Is there a tutorial on Hierarchical agents on your channel or do you plan to post one in the future?
Awesome content Alejandro 👍
I love how you build it from scratch so that anyone can follow. You earned a subscribe and notify-all from me 😜
Hey Tom! Thanks, I appreciate it! i try to make all the videos as beginner-friendly as possible :) New tutorial coming up today!
thanks for taking time to create these amazing helpful videos!
i really enjoy it. and i have learned so much by making them and talking to the community here. you guys are awesome
This video is particularly beneficial I have already begun to think about using crew AI to automate tasks in the HR department this video will help me a lot to achieve that once I wrap into a front end UI thanks Alejandro for making these tremendously helpful videos ❤❤
adding a GUI is an excellent idea
Overall, a fabulous, clear, detailed examination of CrewAI use with agents. Inclusion of cost issues at the end was very, very helpful for real-world analysis. Now here is a final question. I have near-zero knowledge of programming Python, use of GitHub, and programming CrewAI. I'm reasonably smart but this is not my area of expertise. Presume I wanted to hire you to do a task similar to what you did here. Ballpark, how much would that cost? Or, how would I correctly ask someone about programmer costs for this kind of function? (I'm building a neuroscience-and-theater based educational tool with a colleague and this kind of research could be useful to us.)
Very good, sensational, congratulations. Without a doubt the best video I've seen so far!
this means a lot man, thanks :)
Amazing tutorial. It would be great if a new one can be done using Local Models. Besides the differences in capabilities of local LLM against Chat-GPT, the main issue is getting tools to work, which severely limits what you can do with local models
local models are coming up next week! and yeah, tools are the tricky part. that's what takes me the most time when preparing these tutorials
I wanna say the video is so good and easy to understand, I HAVE ZERO CODING background! im still able to follow !!!
You're the man 💯👏 rarely high quality content.
I appreciate that! Will do!
Great content! What is the tool you used for drawing the diagrams?
Thank you for the great vido! Very well presented. Looking forward to additional videos.
Thank you for sharing such a nice content! You've just got a new subscriver. Regards from Brazil!
hey there! Welcome aboard! i’m glad to hear you find it useful!!
Awesome Video! Thank you for putting this together~
it’s my pleasure!
Thank you
Was waiting for Agents, Tools
let me know what you think of it!
Hi ! I impressed with your chat with MySQL solution Can you make a video about chat with api which has swagger docs ?
Thanks!
thank you for the superthanks brandon!
@@alejandro_ao You have it backwards my friend. We thank YOU.
Next, I'd like to see something similar using Llama 8b API, or Groq API? Not sure how to change the code to get that functional and working tbh. But I'd like to see how it works. Any idea on how I can start experimenting with it. I get lost where you create the tools because you are using Exa, if that makes sense. I know you said you'll be looking at different Llm's below. Keep up the great work, very comfortable following along with you. Thank you so much!!
Excellent. No annoying, heavy accent, no unpleasant grating or whining voice.
What software was used to create the diagrams?
Thankyou for your video. It´s easy to understand e very objective. Could you make one video adapting it to use local LLM agents like llama3 using Ollama or LMStudio. It will be great!
that is definitely in the works :)
Hello Alejandro, please implement this OS-World, this can be the solution for a lot of use cases in which agents have to work with the compute OS-WORLD
Exciting predictions for AI's future! It's worth exploring alternative tools that can help you stay ahead of the curve in AI development. #FutureTech #AI
🚀
Beautifully done, thank you !
thank YOU
cant wait to test it out.
a great next idea would be cost saving and calculation with ai
you have a section in the video that shows how to monitor exactly how much you are spending. i that what you meant?
thanks alejandro? gracias por tu contenido de alta calidad!
muchas gracias a ti! saludos!
Hi Alejandro, Can you please tell me how I can evaluate my agents or is there any framework or tool like RAGAS for evaluating agents, also it would be helpful if you can make a video on that.
Could a workflow be created that could interact with an OS X Audio software (for example logic or cubase) to carry out tasks?
For example grouping audio files, dropping those files into the app, colour coding, sorting into folders and maybe even using the application to assess audio files to determine volume levels.
I'm keen to speed up the mundane part of my work
Have I missed a step?
ERROR: Cannot install -r requirements.txt (line 1) and python-dotenv==1.0.1 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested python-dotenv==1.0.1
crewai 0.22.5 depends on python-dotenv==1.0.0
What difference did you feel between Crewai and Langgraph? When would you use each one?
bruh never fail to surprise us with the up to date content
and there is much more coming up! 😎
Very good presentation. How is this different from an AI app built using RAG? Does this mean that we can replace all the AI apps with Agents? How can we use Agents within an LLM-based app using RAG? Can you show it in a diagram or, even better, in a demo? What UI frameworks (React, Streamlit, etc.) could we use to build the front end for agents? Thank you for your clarification.
hey jessica! while agents can perform rag, i wouldn't say that crewai replaces regular rag applications. agents operate at a higher level of complexity than regular rag apps. and i am an advocate for the simplest possible solution that delivers the job. that being said. there is one thing called "agentic rag" which can enhance the results of a rag application with an agent that oversees the retrieval process. however, i don't think you would necessarily use crewai for that one!
I wish you would give an example that is more useful rather than one taken from the documentation. For instance, you could prepare and send an Instagram post once a week. Or, I don't know, you could examine Google ads and prepare a more effective ad campaign to surpass competitors. The ones in the documentation are certainly very helpful, but they contain information that is not useful to anyone. Maybe they are ideal for understanding the basics, but if you are going to teach how to build an agent from scratch, wouldn't it be great if it was something more useful and something people would want to use?
Beautiful idea
Embora seja muito conteúdo, ele foi bem articulado 🤖. Então, parabéns🍻 pela leveza da condução da apresentação do video.
muito obrigado! 🔥
How do you host this in production. No data can be sent externally. CrewAI is a non starter in enterprises as aSaaS only model. Any other recommendations
Hello, Alejandro! First of all, thanks for the great content you bring to our community of AI fans. /Question: How can I make this example work using an Azure OpenAI API Key along with its endpoint? Any help will be appreciated. Thanks!
Thank you. Well presented :)
thanks!!
Thank you, hello from Vietnam
thanks man! hello from france!
Amazing, simple, clean and well explained. Thanks!
I got confused in one part though, do I need to give contexts for tasks considering the agent working order? Basically does it follow task order or agent order?
great, thanks! so since we are using a sequential process, it follows the task order. this means that the tasks will be executed one by one in the order that you specify them when you create your crew.
there is, however, a possibility of creating a crew with a "manager" that decides by himself the order of the tasks and the agents to assign them to. this would be a "hierarchical" process. i will make a video about it soon!
This is all nice for a single crew. But what if you want to switch between multiple crews? What if I have two different crews in the AI needs to decide which task is most appropriate for which crew
you would probably need to plug in each crew to a tool and then make an agent choose between those two tools. that's where i would start, at least
Hi, I am adding the gemini model to the agents using the llm parameter, but the model does not begin executing, after showing " Entering new CrewAgentExecutor chain..." two times there is no further steps being taken after that. Can you help me resolve this issue?
🎉 blog post looks amazing, what software did you use for it?
hey there, i use Hugo (Go-based static website generator) for the static website and a theme called Blowfish. i love the set up. i might make a video about it, even though it is not very AI
Very well done introduction, as always.
Is it better to use this or LangGraph? I'm curious to know if you have an opinion about the best framework for working with agents.
It should be used in conjunction with LangGraph, together they are an amazing ecosystem where you can use LangGraph as the control flow between different Agent Crews.
And they are completely compatible since under the hood they are all LangChain Agents. 👍
Awesome, thank you!
No worries!
what should i learn first langchain or crewai?
thanks for sharing. could you share the "how agents work" page?
Thanks!
So the tasks class could be consider the "process"?
Thanks, all the best
all the best to you too!
Very informative content Thahnks bro
My pleasure :)
Which software/website used to create that diagrams
Is it possible to have an orchestration layer that call different crews that solve specific tasks and pass back results?If so can you do a video about it in the future?
hey Jim! so good to hear from you! this would be so awesome, and it is not super hard to build. all you would need is a crew that creates and tests crews based on a user's input. i will try to make a video about that, maybe even with a GUI
Awesome tutorial and I'm getting ready to explore crews myself. Sorry if I missed but can you give the total cost for the Crews using 3.5Turbo vs. GPT4? I think 3.5T was 4 euros, but I didn't catch the total cost for the GPT4 crew
hey there, actually after tweaking a little bit the crew (especially after removing the tools from some agents who didn’t really need them), the final cost with GPT-4 was less than 1 USD.
GPT-3 might be slightly cheaper but not too much because it tends to make more requests (it makes more mistakes and tries to correct itself time after time). also in general, for agentic behaviour, results are pretty bad on GPT-3. I’d go for gpt-4 all day long
You have a nice voice Alejandro
Thank you very much for the video. Can you tell me for information what is the code assistant you are using ? Thx a lot
that' would be github copilot, really recommend
Thanks for the great content, a quick clarification, can we use open-source LLM like Mistral, LLAMA 2, etc. instead of OPENAI also any alternative to EXA. This is to control the cost while testing.
absolutely. there is not a very flexible way to do it so far, but i will be making a video about more llms and other tools. in the meantime, you can do the following for mistral:
OPENAI_API_KEY=your-mistral-api-key
OPENAI_API_BASE=api.mistral.ai/v1
OPENAI_MODEL_NAME="mistral-small"
more info here: docs.crewai.com/how-to/LLM-Connections/#configuration-examples
can anyone tell me where MeetingPrepTasks is defined in the github repo?
Hello, First of all, thank you for your video! I am getting repeated errors while using the search tools. I think it is related to EXA API: "I encountered an error while trying to use the tool. This was the error: eval() arg 1 must be a string, bytes or code object.
Tool get_contents accepts these inputs: get_contents(ids: str) - Get the contents of a webpage.
The ids must be passed in as a list, a list of ids returned from `search`." Could you help me please?
def get_contents(ids: str): should actually be def get_contents(ids: list): Note that the docstring even says 'The ids must be passed in as a list, ' Also the line 'ids = eval(ids)' should be deleted.
Can you please tell about how can make it like a assitant model? i mean for a specific input the agent will be assigned and the output would be given
do you mean, something like generating crews on the fly depending on the list of tasks (or the project) specified? this is a great idea, a bit more complex to implement though. I’ll see what I can do!
@@alejandro_ao I'm developing an AI-driven educational assistant that uses a multi-agent system to personalize learning for students. It begins by gathering detailed information to create a student profile. Then, the system assesses the student's knowledge with targeted MCQs, generates a learning summary, and creates a personalized roadmap to enhance their understanding. The system also provides dynamic explanations and Q&A support, all powered by advanced AI to ensure a tailored and effective learning experience. Need Your help :)
Thanks!!!!!
No problem!
This is so good thank you so much for this course. Can crewai be used to create a chatbot where it's conversational? Which has a memory like lagchain?
absolutely! i'm working on a video about this ;)
can we try it with open source models ?
sure, they have an integration with ollama. and with a bit of tweaking, you can use any model that langchain has an integration for. coming up in the next video!
Thanks for the work. I reran this and modified it to use gpt4-o, and on review (I used AgentOps Dashboard), the cost was $3.24. That seems to be very high. Are you seeing a similar charge? Thanks
hey there, yeah that seems a bit high, especially for gpt-4o, which is supposed to be cheaper than gpt-4. are you sure that the crew is actually calling this model?
@@alejandro_ao Yes. If you're interested, I can send you the run results from the AgentOps Dashboard. It shows 118k prompt tokens and 14k completion tokens.
Amazing!!!
But how is this different from LangChain Agents and Tools and when to use one over another?
Hey there! Thanks :) CrewAI is actually built on top of LangChain agents. It allows you to create a team of LangChain agents that work together and interact with each other. You could achieve the same thing (a team of agents) by using LangChain agents alone, but you would have to code the entire framework of how they interact with each other and organize their tasks. Effectively, you would be coding your own version of CrewAI by doing that...
I would say that if you need a single agent, LangChain alone is the way to go. If you want a tea of agents that would replace an entire departmemt in a company, then maybe CreaAI is for you :)
A more direct comparison of two products that do the same thing would be CrewAI vs AutoGen, for example!
@@alejandro_ao Thanks for the brief explanation. Totally makes sense. :)
Great video, Alejandro! Btw, what is gitignore file? Is it neccesary?
hey there. it is not necessary for the app to work, but it is needed to not leak your api keys to github (or other repo). when you push your code to github, the gotignore file tells your system which files NOT to include. this way, you can use the files locally but not push them. for example, in this case, our api keys are inside the .env file. so i added “.env” to .ignore so this file is not sent to github :)
exa_py==1.0.9 wont install, also I get 63 errors does that matter? also my writing is different colour does that mean this don't work?
what version of python are you using? are you using conda environments? you can let me know with a bit more detail on the discord server. you can post your code there and maybe i can help you out: link.alejandro-ao.com/discord
please tag me there when you post your question to be sure that i see it!
how can we have the repo code please!
hey there, sure. i realise i just added the repo link to the accompanying blog post. but here it is! github.com/alejandro-ao/crewai-crash-course
Great tutorial! Is there anyway to run local model instead of OpenAI model with CrewAI?
I found the document for connecting local running model. Thanks
great! how did that go? did you manage to set up ollama?
@@alejandro_ao thanks for following up. Yes, it worked.
What LLMs did work well with CrewAI for you beside gpt-4-turbo, at least for specific tasks?
so far i have tried mixtral8x7b with groq and was working pretty good too. but that requires a bit more tweaking behind the scenes. i might do a video with benchmarks, actually...
@@alejandro_ao which role was tested with mixtral with success: all or just less important ones?
@@attilavass6935 i used the same llm for all agents here
May I know what llm operating these agent. Can use differnt LLM&VLM?
You can pass in the LLM you want to use in the Agent() constructor, so you could use a different model based on the Agent requirements.
Even local models are possible to be used as long as they are able to handle functions (there are quite a few that support functions)
The default LLM that is being used is set up in the Agent source code as:
llm: Any = Field(
default_factory=lambda: ChatOpenAI(
model=os.environ.get("OPENAI_MODEL_NAME", "gpt-4")
),
description="Language model that will run the agent.",
)
So the default is GPT-4 and you can change that by setting a variable in your .env OPENAI_MODEL_NAME=gpt-4o (or any other model)
You are handsome, and look kind. I couldn’t focus on the video🎉
😘
But is crew ai free ?
yeah, but the language models are not all free, especially the ones with which this works correctly. you can try to run this with ollama or groq, but they don’t work as well as GPT-4. the problem with groq is the rate limit, not the models they have
@@alejandro_ao thanks
@@moroccanguy1957 i may add that groq is amazing. the only reason why agentic behavior does not work with them right now is that they have not released a paid plan. they only have a rate-limited free tier. and the agents eat up on that rate-limit pretty fast. as soon as they release their paid options, they will be probably the best way to run open source LLMs that are great for creating agents
I am no programmer... yet... maybe that is why it doesn't work. I have installed crew ai and I get no errors. However, when I type "from crewai..." I don't get creai autosuggested, not Tasks...
I suppose that I am doing something seriously wrong, but I can't figure out what.
Hmm... Import "crewai" could not be resolved Pylance (reportmissingimports)
Ahaaa.... if I use a different interpreter I get the crewai autosuggested!
hey there! are you sure you have created and activated your conda environment before installing and importing crewai? that might be the source of all your trouble!
Can you share which extentions you are using.
you mean the auto complete extension? that is github copilot
What's the plugin do you use to auto complete your code in vs studio?
that's github copilot
@@alejandro_ao thanks, is it free for using?
Why not give code?
I wanted requirements folder you didnt mention versions
hey there. the code is on the blog post. i also added the link to the gh repo over there.
here it is for quick access: github.com/alejandro-ao/crewai-crash-course
@@alejandro_ao Thank you so much
hi!!
i’m Korean salesman of medical AI software. so i’ve wanted to learn AI programing or something. Can i use your picture of your blog on my blog? i want to write a process of studying AI . also i will mention that this pic is captured from your blog.
sure thing! please add a link back to my post!
@@alejandro_ao thanks~ but.. i didnt post on my blog yet because i dont understand CrewAI.. if i can post i will remain my blog url. i always watch your video. thanks.
I am confused. Help me to find a roadmap for a career in AI.
hey mate, it is usually super hard to answer this question because it depends on each person. but i will try my best in a few lines:
i would say that you should become a software engineer first, and then specialize in AI. become good at solving problems, applying algorithms and implementing APIs. backend development should be your main specialization. while you're at it, try to apply all your learning projects to AI-applications and learn the generative-AI stacks (langchain, llamaindex, crewai, vectorstores like chrmadb or qdrant...). but definitely aim at software first, Ai second. it will come naturally ;)
Thanks mate I am a software engineer ( backend ) right now I have a use case to discuss can I have your email to discuss? Thanks
*_"Complete Course for Beginners"_*
Beginners? You're seriously funny. 😂
hey michael, please let me know what exactly caught you off guard. i am trying to make my videos as beginner-friendly as possible, even though these are quite sophisticated frameworks
👍👌❤
haha slow down with that mouse
yeah, i don't think i will be using this screen recording app for long format videos anymore tbh
I appreciate the tutorial but I had to stop 25 minutes in when I learned there's a 3rd party commercial API involved.
hey there, if you are talking about Exa, they have 1000 queries/month for free, so that should be enough for most projects and i found that their search api is the best for LLM-apps. if you prefer to use a google wrapper, you can use Google Serper (although they only give you 2500 free queries total): serper.dev/
$7 to $9 for the execution... ouch 😑
yeah… got-4o and claude are much cheaper though. you can also use local models like llama3 instead for free!
@@alejandro_ao Groq + Llama3 70b may fit well in this configuration.
yet another impossible-to-follow video!!!!
hey there, can you let me know what you mean by this? where did you get lost? i try to make these videos as approachable as possible
Will do I'm just going to have another go. Will start from scratch, just new to python and environments and API keys and everything else. I won't give up till I get it working. So I was thinking if I had something working then I could understand subtle changes I make or bots I've designed and repurpose the agents to do what idea I've got. But when I load in the code it's got loads of errors so I'm doing something wrong or is it the code I download, I'll make step by step notes on my next attempt. Just to stress I'm 100% noob to this so if I can learn this, we'll then anyone can, I'm a good advert if it works 😄.
Hi, what is the purpose of this in the get_contents() tool?
contents = [content[:1000] for content in contents]
as in, why specifically 1000 characters?
Also, saw this error during execution:
"I encountered an error while trying to use the tool. This was the error: eval() arg 1 must be a string, bytes or code object.
Tool get_contents accepts these inputs: get_contents(ids: str) - Get the contents of a webpage.
The ids must be passed in as a list, a list of ids returned from `search`."
But overall, nice work!
hey there! thanks for pointing that out. Actually, there is no need to run the `eval` command as the LLM identifies the input in JSON automatically. So you can comment out that line and it should work. Sorry about that!