Artificial Intelligence (AI) aims to operate by allowing Large Language Models to interact with their environment. This interaction requires the AI to perform actions in the real world in order to be considered useful.
This has led to innovations like AI Tools, Function Calling, and Retrieval-Augmented Generation (RAG). The purpose of these tools is to allow AI to perform actions on behalf of the user, which makes it more useful beyond just generating content.
What Are AI Agents
An AI agent is basically a system that can reason using an LLM, tools, memory, and Generative AI concepts such as prompt engineering to accomplish specific goals.
This opens up a world of possibilities where one could build multiple AI agents that can communicate with each other, delegate tasks, and automate workflows.
Why Multiple Agents
You can imagine multiple use cases, like a sales assistant system that utilizes multiple agents, including a market research agent and a content writer agent, to generate customized messages to sales leads.
We are in a world where, with the right prompt and set of tools, an AI agent can perform a lot of tasks on its own.
The idea behind allowing multiple agents to talk to each other and writing agents has been approached in a similar manner by tools like Crew AI, Langchain, LangGraph, Agent Development Kit (ADK), and more.
Introducing Crew AI
Crew AI is one of such promising tools that attempts to provide you with a framework that helps you to write AI agents and how they even talk to each other.
The idea behind Crew AI or agent orchestration tools is that you create agents, tasks, and a pipeline for agent to agent communication. I keep talking about multiple agents, but you can also use single agents. The idea behind multiple agents is to ensure that each agent performs a specific task or goal, allowing it to focus on just achieving the goal.
As much as you can just write single agents, collaboration among multiple agents is a valid and recommended use case to ensure that you assign only the necessary tools to accomplish certain tasks and even allow you to switch out or use different LLMs for each specific task.
How Crew AI Works
When building agents with CrewAI, there are a lot of concepts to grasp, which can sometimes throw you off, but you only need to just start with Agents and Tasks. Once you get a grasp of it, you can continue to investigate further on how you can get the best out of your agents with training and different ways of communication between agents.
At the core of CrewAI, agents can be powered by an LLM; they have a specific goal and a backstory. A goal can be what the agent intends to do. For instance, the goal of an article editor agent might be to proofread the article and verify facts. Its backstory can be: "it's an editor with over 7 years of experience proofreading and verifying articles. It should be professional, concise, and verify any information provided to it."
For each CrewAI agent, you can create a task. So you can think of it like the agent is the person you employ to do the job. When you employed them, you had a goal. You required some experience (backstory). And now, you assign a task to them.
A CrewAI task has a description and an expected output. You can use the description to tell the agent or describe to the agent what it needs to do. And then, use the expected output to tell the agent what you expect after it completes the task.
CrewAI offers more features than this, but once you understand these concepts, it opens up the way for you to pursue further or advanced use cases.
As you can see, Crew AI offers a simple yet powerful way to build and coordinate AI agents for different tasks. Whether you’re working with a single agent or designing a team of specialized agents, understanding the basics: agents, tasks, goals, and backstories, can help you get started quickly. Once that foundation is in place, you can begin exploring more advanced use cases and unlock the full potential of multi-agent collaboration.