CrewAI Tutorial - Next Generation AI Agent Teams (Fully Local)
Вставка
- Опубліковано 22 лип 2024
- CrewAI helps you build incredible AI agent teams with a focus on giving them tools, delegation powers, and more.
Monster API, the best place to integrate the latest AI models at a fraction of the cost - www.monsterapi.ai
Join My Newsletter for Regular AI Updates 👇🏼
www.matthewberman.com
Need AI Consulting? ✅
forwardfuture.ai/
Rent a GPU (MassedCompute) 🚀
bit.ly/matthew-berman-youtube
USE CODE "MatthewBerman" for 50% discount
My Links 🔗
👉🏻 Subscribe: / @matthew_berman
👉🏻 Twitter: / matthewberman
👉🏻 Discord: / discord
👉🏻 Patreon: / matthewberman
Media/Sponsorship Inquiries 📈
bit.ly/44TC45V
Links:
CrewAI - github.com/joaomdmoura/crewAI
Ollama Guide - • Using Ollama To Build ...
Chapters
00:00 - Introduction to Crew AI and its Features
01:10 - Setting Up Crew AI with GP4 and a Local Model
02:05 - Importing and Configuring Crew AI Components
03:15 - Creating Agent Teams for Specific Tasks
04:23 - Assigning and Managing Tasks for Agents
06:02 - Instantiating and Running the Crew
07:08 - Demonstrating Crew AI in Action
08:04 - Integrating Local Models with Crew AI
09:12 - Advanced Configuration with Local Models
10:19 - Preview of Upcoming Features and Tutorials
Thanks to @warezit for the chapters! - Наука та технологія
Part 2 coming soon, what should I cover in the intermediate/advanced video?
Some ideas:
1.webscraper for news and putting all output in a nice html
2.like u said for stock data would be cool but are u gonna process any sentiment of that data to give a rapport?
3.a coding team for a full-stack application
4.a coding team where one will analyze an existing codebase and one for migration/new features
5.a frontend team to make beautyfull websites where one will focus on html/css and the other more for javascript maybe?
6.An accountancy team where one is for checking state rules/taxes and the other for handling incoming receipts(ok maybe a bit to advanced)
Matthew are u planning to make a course of this? i would give money for that
It would be fantastic to see it do a literature review, and even better if it can pull it off using local models. I really think this would be an awesome use case!
Hi Matthew, thanks for the intro. I would like you to show how to integrate the tools (via langchain) using llamaindex so we can integrate a RAG tool. Furthermore is there an option to save a Crew and/or the execution? The progress and the result should be communicated to the user, so would langchains callback functionality be the way to go? Furthermore the new Builder functionality in autogen seems promising. All new developments are really promising but at some point in time we need to make a decision on what opensource platform to use... Thank you
Can you make an ancient that will make and delete agents as necessary. Basically a human resources agent.
And also a headhunter agent to find the best AI models for the human resources agent to choose from.
Etc. etc. etc.
Now I'm wondering how hard it would be to implement a full corporation.
Advanced: Translate video speech to text from at least 3 different language sources to compare news reports about same story from different countries. Then, set up a dedicated webpage to blog about the findings as to whether the reports tally, contradict and an estimation as to which report is more true and correct. Keep updating the blog as the story unfolds.
Create a software development team that can make a chess program based on the requirements ["a simple ASCII chess game in python for 2 players"]. You can create an Architect => create Design Spec => a Team Lead => create Developer Tasks => Developers solving Tasks => Validator reviewing code => Developer Who Fixes Review Findings => finished Python code ...
A locally run autogpt framework is exactly what I was looking for. Great video!
Was wondering when you were going to cover CrewAI. Seen a lot of unhelpful content around this and things that complicate it more than necessary so this was an absolute breath of fresh air! Love the content and the way you approach explaining these concepts!
Thanks!
Please make another video on this. Your videos are great
By far the best crewai tutorial out there. Always love your tutorial vids man! Would love to see one that looks up information solely based on a file on a google drive and/or from a vector db that it creates from those files. Thanks Matt!
Awesomesauce!
Would love to see in the advanced video a usecase where an agent creates a task list of 5 items to do surrounding a subject.
You mentioned tools so hoping to see how those are defined, instanciated, and executed. Particularly interested in web-scraping recent news so that the models aren't limited to just their pre-trained info.
I can certainly see how someone could use this to build, IN HOURS, a tool that scraps web content to create new training data for custom agents.
🎯 Key Takeaways for quick navigation:
00:00 🖥️ *Introduction to Crew AI and its Features*
- Overview of Crew AI as an open-source alternative to Autogen.
- Highlights of native support for Lang chain and ease of installation.
01:10 💻 *Setting Up Crew AI with GP4 and a Local Model*
- Demonstrating installation and setup of Crew AI.
- Introduction to role-based agent design and task delegation features.
02:05 🔑 *Importing and Configuring Crew AI Components*
- Step-by-step guide to import necessary libraries and set API keys.
- Instructions on setting up agents with specific roles and tasks.
03:15 🤖 *Creating Agent Teams for Specific Tasks*
- Creating a team of agents for research and blogging about AI trends.
- Explanation of assigning roles, goals, and allowing delegation.
04:23 ✍️ *Assigning and Managing Tasks for Agents*
- Process of assigning specific tasks to researcher and writer agents.
- Details on creating compelling content based on AI trends.
06:02 🧩 *Instantiating and Running the Crew*
- Steps to instantiate the crew with agents and tasks.
- Execution process using sequential task completion.
07:08 🚀 *Demonstrating Crew AI in Action*
- Live demonstration of Crew AI performing assigned tasks.
- Observations on the efficiency of the task execution process.
08:04 🌐 *Integrating Local Models with Crew AI*
- How to use local models like Open Hermes with Crew AI.
- Guidance on downloading and setting up alternative models.
09:12 ⚙️ *Advanced Configuration with Local Models*
- Detailed instructions for configuring agents with local models.
- Tips for optimizing settings for best performance.
10:19 📅 *Preview of Upcoming Features and Tutorials*
- Tease of future sophisticated use cases and tutorials.
- Invitation for audience engagement and suggestions for follow-up content.
Made with HARPA AI
Your timing is perfect Matthew! THANK YOU!! 😍I was struggling with some AI coding and was looking for a new way to run AI agents locally. And the GPT4 API costs are painful. 😅
Great step by step tutorial Matthew! Already watched 1 and 2hr videos on this, but apparently only needed 10 mins 🚀
Totally up for watching you move forward here. What a great setup!
Would be interested in seeing you implement MemGPT in this framework.
Hey Matthew! I just wanted to say I love your channel and it’s been so helpful. I love the content you cover, especially how you always keep us up to date with these open source models and show us how to use them! Your tutorials are really easy to follow and your videos are always edited so well! Keep up the great work and wishing you the best start to the new year! 🎉🎉🎉
Much appreciated!
Great Video. Would love to see your take on a researcher that searches the web based on a topic/criteria, reviews the results, continues to searach if not enough quality infromation has been gathered and then returns a formated summary of the results. For example, researching local solar providers, market value of a product, comparing local or online services or even searching for the best current llm based on need, like local only agent, uncensored, coding, math, etc.
Great video! Stoked to see the next one on CrewAi. Would love to see a comparison video on CrewAi and AutoGen, Pros and Cons and use cases.
This is actually informative and useful, and it is easy to use. Thank you and subscribed. Looking forward to the next one.
Hi Matthew, maybe a research topic and use case in itself would be to rank or assess the various open source models that are available in a multi agent framework so that the user could know which models there are and the optimal settings needed to get the best ones for the task at hand.
Really nice, thank you. In addition, please consider diving deeper into the trade offs between this and AutoGen. I’m assuming it’s more than just being able to use local and different LLMs.
hello Matt... thanks for teaching me so much. God bless you man
It would be great to see an example of managing actions in the style of gpt pilot, something more controlled, that the agents take an idea, generate a user story, create a technical task, execute it by programming in a file, and if something goes wrong or changes these can ask the user for feedback information
This is great! Thank you so much for doing this.
Pls make part 2, looking forward to it. Thanks for the good work.
I‘m excited as well. Can‘t wait for the next one!
00:02 CrewAI is an open source alternative to autogen for setting up agent teams.
01:23 Tutorial on using CrewAI and Monster API for complex AI tasks
02:45 Get OpenAI API key and define AI agents
03:58 Crew AI allows control over delegation, unlike Autogen
05:21 Defining agents for specific tasks is easier with CrewAI than Autogen
06:50 Crew AI allows easy chaining of tasks and agent delegation.
08:09 Using a local model with CrewAI
09:32 Using local models for AI agents
Crafted by Merlin AI.
your the first one to talk sense this year
So excited for part 2!!!!!! Maybe do a intermediate and then an advance video PT2 and PT3 given that new features will probably come up between the uploads
I wish you would do two video types, one for the masses for the scope of the field and deeper, more challenging setups. I’d pay a decent amount for in depth tutorials
More advanced video is coming soon. I’m launching paid courses soon.
@@matthew_berman
I too look forward to those courses
Thanks very much for such a great video Matt
30 seconds in and I'm already blown away.... Look out of the window rn, that's me orbiting the stratosphere
You are helping in trying AI. Thanks Matthew!
Matthew, thanks for the informative video!
I would love to see one about creating a team of agents for generating automation tests.
One agent analyzes a target website and summarizes its specifications. The second agent creates automation test source code using Selenium, for instance. The third agent reviews the code and provides feedback to agent #2.
Something cool to see is how CrewAI can help overcome some of the issues RAG pipelines run into.
For example, I've been creating various apps that heavily leverage the a RAG pipeline using many different embedding models (cohere, OpenAI, Google), many different vector stores (local and cloud), and many LLMs. The issue I have constantly is successfully getting the LLM to answer with information that is passed to it, which would be Context if you're using LangChain as-well-as making sure the embeddings are being queried correctly. Hard to get into the weeds over a comment. Looking forward to more content!
can you give any examples of the LLM hallucinating even with text context in the prompt? I've had different RAG pipelines, but the issue that I think you're describing sounds fixable through prompt updates like "only use the information given above"
just answered my own question with this video, matt you rule.
Excellent video. I’m very interested in a trip planner one so I can convince my travel planner wife that AI isn’t just hype.
By making this information available and accessible, you are doing so much more for humanity than we realize.
The people making these models and advancing the tech IN THE OPEN are heroes.
We need to be HYPER aware of control and regulation and scary stories they'll use to achieve it.
They are definitely going to produce some scary stories, be wary of the blog posts the machines will be writing as they take control
Yeah, sorry, disagree. They'll put half the population out of work in the next 10 years
@@somebody-anonymous lol every article that comes up on google these days is some AI-SEO-optimized garbage. They've taken control before they've even gained sentience
It would be great to achieve the task of copywriting conversational experience text for non autonomous agents (old fashioned chat bots). That task is usually labor intensive and done by copywriters who implement specific personality traits for the chat bot, which are defined by the Conversational Designer based on client’s business goals.
Thank you for the tutorial. It would help to get detailed explanation on most frequently used options. I got it somewhat working (using the tutorial and local LLM). Here is the output I got when using nous-hermes-llama2-13b.Q4_0. Indeed it required some finetuning of the parameters.
"The rise of AI technology has brought about major changes in the way we live and work. From chatbots that help us find information to autonomous vehicles that transport us safely, AI has become an essential part of our daily lives. As the technology continues to evolve, we can expect even more innovations that will change the way we interact with the world around us."
Hey Mathew, once again thanks for these cool updates.
I have one suggestion.
I believe in general, it would be helpful if we would have an extra level deeper on the new tools you mention, especially when they are open source and we can look into their codes.
For instance, for me who started coding as hobby 2 months ago, I see now the question is about limitations, control, ease/possibility of migration.
So when you introduce a tool like this one, and not a Botexpress category, someone like me who cant easily grasp the code behind, could really benefit from a brief insight from a senior developer with great teaching skills like you! 😍
Thanks for your help got it up and working now on my windows machine and now im eagerly waiting for the next !
a helpful tool could be using another model to format your goals into this prompt format. As a non programmer it's easy to forget details and sequence. A simple version could be a Google form where you fill in the steps in the right order and then add syntax with pre-filled questions
So excited for the v2 advanced video with Langchain!
Google Gemini embedded your video link in its response. That's how I discovered you. Great video
Liked, subscribed and sent a Thanks contribution. You are amazing. Thank you!
I cannot wait for the part 2 video
Would be very helpful to have a guide to your setup on your machine to run this. I didn't have vs code, c++, python, or any of the other requirements installed. I used to program in VS but it's been years and python is a new thing for me so a short tutorial on setting up your environment would have been great. Maybe you could do a separate video on just that and mention it with a link at the beginning of your instructional videos.
Would love to see some use cases with Stable Diffusion or any generative art!! Graphic designers need love too haha
Thanks for your work, it seems extremely complicated for something as simple as a blog post.. man
just got this working i created a front end html guy to output a html ready page , i was quite shocked it worked !
I like it, getting closer.
Simply awesome, I love your content.
Best content creator so far
I would love to see use cases for this being new to the concept. The development seems straight forward but it would be good to get examples.
Would really love to see more on the 'tools' agents can use. For instance, what it would look like to integrate the twilio api and send a text, or even coordinate a text conversation that would gather several points of info from the agent texting a person; and bring that back to another agent.
Yes +1 on this, any way we can intergrate API for input and response for app production!
Hey! I would love to see data processing and analysis. It would also be nice to undersand if there can also be user input, like autogen.
great video, good information density
It's like DJ Khaled is in the house. Another one!
It would be great to see a specialized webscraping agent example. I use Appify for things like that, but I can see an agent delegating the gathering of data for analysis in another task. For example, a car research agent can delegate collecting ratings on new cars coming out from a specific website. Separation of research and data gathering would allow more reusability.
thanks Matthew!! U'r like the geeky older Brother I never had!!
THis is a great video! For next time I hope you would show us how to make a finance crew looking at stocks and if they can also sentiment analysis. The cream dela cream would be also to make a crew that can do market research. Thank you again for all you work! Cheers!
Great video again🙌
Great video as usual! Using Google search integrated within this and using memory (e.g. ChromDB) would be great to see.
man this is crisp! great videos
Thanks Matt this is awesome! it has more clear role to set for each agent. I am wondering how to set up an agent-like what we did as proxy agent in AutoGen-that can ask human input/confirm? hope you can show how to do this in next clip. can't wait to see! Cheers
7:28 I don't get it. Where exactly does the pass happen? Just by writing the tasks in that specific order into an array? How would we specify to which agent to pass results if there are more agents?
Great video! I'd love for you to show other ways to use local models like through LM Studio or GPT4all.
So exited to try this
I would love to see it solving more complex cases. Finding contacts at companies in some industry related to product description.
Like I have a company witht product and want yo expand in to new area and want to see whos who.
I would love to see something with Image/Videos being Prompted and Generated after the Script is Created, Streamline a Content Creation Agent! Seems like were getting Close to it!
Excellent!
I really want to see a project for really scraping the internet discerning truthful information, understanding bias, ecc. to create a repository of classified information. I imagine something like that used by future models to make their own mental representation of the world, but for less long term i'd love something like that in my phone/pc, part of a loop in my personal local ai assistant
I havent wanted to see a followup you tube video so badly :)
I would looooove to see a video about using langchain and Groq (so we can use mixtral-8x7b or something similar, so we have monster performance at 0 cost). Everytime i try to set it up myself, I keep stumbling over the langchain package(s) requiring an openAI API KEY, even though I don't call anything openAI related or use openAI in any other way in my application.
I already got as far as you did here on my own. I am struggling getting the team to write meaningful code to files in the workdir. If i task it to generate a rest API in python / C#. It would be neat if i could test it afterwards. And maybe task it to review and correct its mistakes... aka do my job for me x) love your channel btw, appreciate what you do.
Any ETA on the follow up video? Can't wait to learn more! Keep up the good work
Would appreciate if we can create a meeting crew. One for taking notes, one for researching attendees, one for summarising etc
Like many, finding the connection between the theoretical blogs and the practical seems harder that it should be, but you are a clear bridge across that gap.
Thank you for sharing your knowledge in such an engaging and accessible way.
One question I have is why do you have agent and I need to put specifically openhermes as the model name? Is it due to multiple models being installed with Ollama?
Thank you so much for this tutorial, it helped me to find an entry into this topic. If I can just remark one change to consider: The os.environ should be used with an .env file (created in the project folder) which contains your API_KEY. The key should not be typed directly into the code.
Thanks! Check out my latest video where I build something at length with crewAI
Would love to see financial use cases - stock analysis or something like that
Actually you can define the crew and then make gpt define the task and the agent dedicate for each task automaticly, i don't know if that would be helpfull but i think you can make some cool thing with this
Great overview and quick examples. Exciting stuff.
Could this be used with memGPT to create a persistent personal assistant for an individual, on mobile?
Thank you for sharing your thoughts on this project and how to install it. One thing I'm curious about is how the writer knows to use the output from the researcher. What if I had many tasks involving many researchers and writers, how do they know what date to consider from which writers?
App tools will be very useful
This seems so much better
Other then that I am can't wait to see this run.
Chat with Docs and and User interface with multiple agents working together to research a local doc.
For next use cases I would like to feed an agent from a RAG using a vector database because most of the time in a corporate environment, the information required is not available right in the LLM
One of the most exciting videos. I would like to know if this tools can write files locally.
This seems really neat! I’ve had an idea for an email/calendar app I’ve wanted to make and this seems like it could be approachable. I’d love to see how you can structure more complex org charts:
Director
- 3 Supervisors
- 1 or more Coordinators each
-- 1 or more agents supervised by the coordinator
My example might be too much for a video but this gives you an idea where I’m going if you want to play with a different complex org for your own demo:
1. Director of Email and Calendar Management gpt4
1. Schedule Supervisor gpt3.5
1. Calendar Coordinator gpt3.5
2. Communications Supervisor gpt4
1. Analysis Coordinator gpt3.5
1. Lead Analyst gpt3.5
2. Lead Summarizer gpt3.5
2. Editing Coordinator gpt3.5
1. Lead Copywriter gpt3.5
3. Research Coordinator gpt4
1. Lead Researcher gpt3.5
3. Development Supervisor gpt4
1. Development Coordinator gpt3.5
2. Documentation Coordinator gpt3.5
You can do it. Use gpt and break out the starting points and be specific. One first one works, move on. I do a lot of api calls, and brought gpt4all locally with all the datasets (commercial, non commercial). Build out front ends in python (which ai can build), etc.
Yea, it’s a deeeeeeeeep hole but you must start at the tippy top to get it going and build out. Might have to restart several times too as things get to a “I didn’t see the consequences of this earlier action”. Fun!
Maybe using an open source model do image analysis based on a folder of images then somehow write a researched article based on the findings and if possible go online and find suitable research article to footnote to, all written with a specific style maybe based on an existing document. Could be an art history essay or science image analysis
Two questions: can you specify baseurl:port in order to use models deployed from LmStudio or text generation web ui?
Would be great to see if there's a way to run Autogen or Crew as a service with openai-compatible api. Of course locally.
How would yu go about setting up webhooks or API's to intergrate this into a production ready app which can send input and get response?
Which kind of tasks would be better suited to run locally with Ollama instead of GPT4?
Can we use it to apply a multi agent system in order to get into a consensus and aggregate results let's say from multiple classifiers ?
Is it possible to mimic Crew functionality using LangChain functionality along? What are the major gaps of LangChain to reproduce the example from the video?
Hi Matt this is great! Can we use this with RAG and our own documents? Thanks man!
yes more like this
Would love to see if and how a teachable agent (like the one in autogen) could be implemented
how would you make it so you can run different tasks in one project? ie - chosing between the blog post tem or a social media team when you ask, "make an ig post" ?
Great video - thanks!
Hi! Real estate statistical reports based on user country, area, property type. Using webscraping!
Book writing would be cool!
I second that!
@matthewberman what’s your take on crew ai performance vs prompt chaining performance via openai assistant APIs?
I’m building a solution changing a few asstapi agents together, but this crew ai looks very interesting!