Crew AI Build AI Agents Team With Local LLMs For Content Creation
Summary
TLDRThe video tutorial demonstrates how to use Crew AI, a framework for building automated workflows using multiple AI agents. It shows how to connect local LLMs like Anthropic's Constitutional AI and LM Studio to Crew AI to define different agents with specific roles. A sample workflow is created with a 'researcher' agent that gathers information on AI advancements online using DuckDuckGo and a 'writer' agent that generates a blog post on the topic. The workflow enables automating research and content creation by harnessing multiple LLMs. Crew AI provides flexible integration of different LLMs to build efficient, multi-agent automation.
Takeaways
- 😀 Crew AI allows creating workflows using multiple AI models as agents
- 👥 You can connect Crew AI to OpenAI, Anthropic, Cohere, or local LLMs like AMA
- 💻 Installation requires Python and some dependencies like DuckDuckGo
- 🤖 Agents are defined with a LLM, work scope, and backstory
- 🔀 Tasks define what each agent must do in the workflow
- ✏️ A sample workflow gathers AI advancements info to generate blog content
- 📝 One agent researches info, another writes content based on that info
- ⚙️ Workflows can be sequential or hierarchical depending on needs
- 🔗 You can connect LM Studio in addition to AMA as agents
- 🎉 Crew AI enables automating workflows using multiple LLMs easily
Q & A
What is Crew AI?
-Crew AI is a multiple AI agent framework that allows users to build workflows using multiple AI models as autonomous agents to complete automation tasks.
What types of large language models can be connected to Crew AI?
-Crew AI can connect to models like GPT from OpenAI, as well as local large language models hosted on the user's machine, like those from Anthropic, Cohere, or LM Studio.
How does Crew AI allow the AI models to search the internet?
-Crew AI uses the DuckDuckGo search library to enable the AI agents to search the internet and retrieve information.
What is the purpose of defining a workscope and backstory?
-Defining a workscope and backstory provides context for the AI agents to understand their roles and objectives within the workflow.
What were the two agents defined in the example workflow?
-The two agents were a 'Researcher' responsible for gathering information, and a 'Tech Content Strategist' responsible for using that information to write tech content.
How did the two agents interact in the workflow?
-The Researcher gathered information on AI advancements from the internet, then passed that information to the Tech Content Strategist to write content based on it.
What tools did the agents use if they needed additional information?
-The agents used the DuckDuckGo search library to search the internet for any additional information they needed.
What was the end result of the workflow?
-The end result was a set of paragraphs with titles constituting a blog post on AI advancements.
Besides AMA, what other local large language model could be connected?
-The script shows how LM Studio could also be connected as one of the agents in the workflow.
What benefits does Crew AI provide for content creation?
-Crew AI allows automating content creation by using multiple AI agents in defined roles within a workflow.
Outlines
😊 Introduction to Crew AI and its capabilities
The paragraph introduces Crew AI, a tool that allows creating workflows using multiple AI models as autonomous agents. It allows connecting local LLMs like AMA or LM Studio to perform various tasks like content creation. The tutorial will demonstrate setting up Crew AI on a PC and connecting it to AMA and LM Studio to generate content.
👩💻 Step-by-step walkthrough on using Crew AI
The paragraph provides a detailed walkthrough on using Crew AI - installing it, connecting local LLMs, creating a script with multiple agents, defining tasks for research and content writing, executing the workflow to gather information and generate content. It shows a sample output demonstrating how the researcher gathers information which the writer uses to generate content.
Mindmap
Keywords
💡crew AI
💡workflow
💡agent
💡task
💡DuckDuckGo
💡AMA
💡LM Studio
💡automation
💡API
💡code
Highlights
Crew AI allows us to build a workflow using multiple AI models as autonomous agents
We can connect Crew AI to OpenAI, Anthropic, Cohere, or a local LLM like AMA or LM Studio
Crew AI provides instructions on connecting different LLMs and customizing AI agents
We design workflows using sequential or hierarchical processes with multiple agents
Crew AI shows how to connect AMA and LM Studio locally without an API key
We define work scope, backstory, LLM, and tasks for each agent in the workflow
One agent researches information, the other writes content based on that
Agents analyze if they need more info and can search DuckDuckGo if researcher
We define the crew with agents, tasks, and execute the workflow
Researcher gathers info, writer creates content in 4 paragraphs
Example workflow shows automation for content creation from research
Can connect multiple LLMs like AMA and LM Studio as different agents
Code shows how to define API URL to connect other LLMs as agents
Example workflow automates researcher and writer tasks for content creation
Transcripts
crew AI a multiple AI agent framework
allows us to build a workflow that
autonomously agents to complete
automation tasks for us let's check it
out so in this tutorial we are going
through crew AI it allows us to build a
chain of workflows using multiple AI
models as our autonomous agents to
accomplish certain tasks that you define
for the AI agents here we will have a
step-by-step walkthr on how we can set
this up on our PC and also connect it
with our local llm models to run certain
tests and perform content creation
processes so right here as we can see
the crew AI official page is open-
Source tools and it allows us to use any
large language models for example you
can connect with your open AI API key to
use Chad GPT or if you have a local
large language model you can connect
with Ama or LM Studio to incorp
incorporate those large language models
into your workflow and Define multiple
large language models as individual AI
agents to complete specific tasks in the
documentation they provide clear
instructions on how to connect with any
large language models customize the
agents and utilize sequential or
hierarchical processes to design
efficient workflows importantly you need
to know how to connect with a large
language model hosted locally on your PC
for example we have LM Studio here in
this section it shows you how to define
the API based URL for LM Studio you
don't need an API key so leave that
field empty additionally they provide
examples on how to connect with AMA in
this video we are going to connect with
these two popular options AMA and LM
Studio you can also connect with
Microsoft Windows Azure to access their
AI Studios using authorization keys and
API Keys now let's get started with
creating a workflow and connecting those
large language models in crew AI first
we need to install crew AI by running
this command prompt and downloading the
necessary
files after that it will automatically
install the required
components then we need to install the
duck duck go search Library this library
is essential for enabling our AI to
search the internet and retrieve
information for
us once that is done we are good to go
now let's open Visual Studio code vs
code and start creating our script for
multiple AI agents here I have already
run two AMA large language models one is
Mistral and one is llama 2 so both of
them just keep that command prompt
running in the background and also the
AMA running the AMA server here which
allows API access for AMA so in here we
have vs code and this script you can
download it on the GitHub page of crew
AI I will post a link to it in the video
description below scroll up here and as
you can see I have the Lama 2 and
Mistral using as well to connect here
basically I will use this tool to
generate content for my workflows and to
run two individual agents in different
roles in this workflow and right here
this is the template of the very basic
crew AI multiple agents creation script
and above that we have the installation
command prompt you can just copy this
too and install it and it's pretty easy
actually let's go through each of the
rows that we are going to do so in the
OS versions here we have the open AI API
key now we don't need that so we just
put that into comments and we don't need
to run that script then we scroll down
into here let's go through each one so
running 2 and then Mistral running as
the second agent using
Al and right below that we have the land
chain tools that is we import the Duck
Duck Go search and we are going to use
Duck Duck Go search to gather
information online if the large language
model necessary needs some information
from them and then we have to Define
the llm on each agent here these llms
are using the llm which is the Llama
tool that I defined at the beginning of
this script then we have the work scope
and the backstory you have to define
those as well and then the second agent
here is the tech content strategist
which is the content writer for the tech
content blow poost these agents are
responsible for gathering information
from the first agent and then writing
content based on it
these agents are going to use mistal llm
from my defined Al agent large language
model for this agent lastly we have to
create the tasks the tasks are going to
Define what these two agents have to do
in this workflow there's task one which
is the researcher and task two which is
the writer the writer is going to write
about the AI advancements based on the
content they're getting from the
researcher lastly we have to Define find
the crew the crew includes the agents
and tasks that are included in this crew
workflow lastly it will execute on the
last command code here is my first run
using this code and it gathers
information from the researcher so the
researcher is going to the internet and
then Gathering the information secondly
we have the tech content strategist who
will use that information to write four
paragraphs of content or code for my
blog post this is a very typical iCal
task for lots of bloggers and website
owners who want to create new content
this kind of workflow is simple yet
effective and practical allowing people
to automate this task here as you can
see each AI agent has its own automation
they will analyze if they need tools to
run their tasks and then answer
themselves if the answer is yes they
will use duck ducko if the agent is a
researcher they will go online and
search for re AI advancements and pass
that information to the
writers the content writers will then
write the content based on that
information the content is divided into
different paragraphs as you can see with
title paragraphs and all the content and
additional thoughts about the content
this is how we use crew AI Additionally
you can also connect LM studio with crew
AI not just AMA in this case we have the
first agents using Ama and the second
agents using LM Studio the code is
provided here for the first one as you
can see we use the URL at the top to
connect and create content using other
large language models as agents in this
workflow I hope you find inspiration in
using crew AI this is a simple workflow
using two agents in one automation
workflow I will see you in the next
tutorial have a nice day
bye
Browse More Related Video
How I Automated My Workflow with AI Agent Teams (NO-CODE)
AI Agents EXPLAINED: Unbiased Review of Langraph, AutoGen, and Crew AI Frameworks
Chatbot or AI Agent Setting up crewai framework for scaling tasks
MoA BEATS GPT4o With Open-Source Models!! (With Code!)
How I've Created an Army of AI Agents (so I don't have to work lol)
Build generative AI agents with Vertex AI Agent Builder and Flutter
5.0 / 5 (0 votes)