8 min read6 days ago
–
Press enter or click to view image in full size
Large Language Models have come a long way — from simple chatbots that answer questions to powerful systems that can reason, plan, and interact with the real world. But even the smartest LLMs still have a limitation: they don’t act on their own. They respond when asked, and that’s where the story usually ends.
This is where AI agents change the game.
By combining LLMs with memory, tools, and planning abilities, AI agents can break down complex problems, make decisions, and execute multi-step tasks autonomously. Take this idea one step further, and you get Multi-Agent Systems — teams of specialized agents collaborating like humans to achieve a shared goal.
In this blog, we’ll explore the journey fr…
8 min read6 days ago
–
Press enter or click to view image in full size
Large Language Models have come a long way — from simple chatbots that answer questions to powerful systems that can reason, plan, and interact with the real world. But even the smartest LLMs still have a limitation: they don’t act on their own. They respond when asked, and that’s where the story usually ends.
This is where AI agents change the game.
By combining LLMs with memory, tools, and planning abilities, AI agents can break down complex problems, make decisions, and execute multi-step tasks autonomously. Take this idea one step further, and you get Multi-Agent Systems — teams of specialized agents collaborating like humans to achieve a shared goal.
In this blog, we’ll explore the journey from LLMs to AI agents, understand why multi-agent systems matter, and build a simple Research Assistant using CrewAI to see these concepts in action — step by step, in a practical and beginner-friendly way 🚀.
Journey of LLM to AI agents :
When it comes to LLM models (November 30, 2022**), **they really excel at NLP (Natural Language Processing) 🌟. At first, they function like chatbots that can understand human intent. However, simply providing answers isn’t enough; they need to follow a consistent data structure that can be utilized for better applications.
After that, LLMs are trained on structured data(August 6, 2024**)**, and they also learn how to understand various formats. Typically, they make use of inference in formats like JSON or Pydantic schemas 📊. This is super helpful for tasks like labeling data or extracting information, which then can provide relevant input to another LLM.
Overall, there’s been some great progress, but we’re not quite at the level of perfection yet. They are fantastic at handling general, simple tasks, but they struggle with more complex challenges, like solving differential equations 🧮 or other intricate problems. That’s where the concept of “Chain of Thought” comes in! With this approach, LLMs(September 12, 2024**)** have developed reasoning capabilities, allowing them to think before answering questions 🤔. This advancement enables them to solve many issues more effectively.
While it’s impressive progress, LLMs still remain mostly as chatbots that provide information. To evolve beyond that, LLMs have been integrated with various tools (May 30, 2024), allowing them to perform real-world tasks, like sending emails ✉️, searching the web 🌐, and much more. When you combine LLMs with these tools, they become agents, stepping into a whole new realm of possibilities! 🚀
Press enter or click to view image in full size
What are AI agents?
AI agents are autonomous software systems that perceive their environment, reason, plan, and take actions using tools to achieve complex goals with minimal human oversight, going beyond simple commands by creating their own workflows and adapting through learning, powered by large language models (LLMs). They function like digital assistants that can handle multi-step tasks, make decisions, and interact with external applications to solve problems or automate processes, from customer service to software development.
How are Agents different from the LLM?
Press enter or click to view image in full size
An LLM (Large Language Model) is the language-understanding “brain” that generates text, while an AI Agent is a complete system that uses an LLM, adding autonomy, tools (like APIs/code), memory, and planning to execute multi-step tasks in the real world, going beyond just responding to prompts. Think of the LLM as an expert providing answers and the Agent as a proactive assistant that takes action based on those answers to achieve goals.
What is Multi Agents System?
A Multi-Agent System (MAS) is a computational framework consisting of multiple autonomous, intelligent agents that interact within a shared environment to solve complex problems collectively. Unlike a single AI model that operates in isolation, MAS distributes intelligence and tasks among specialized entities that can communicate, coordinate, and even compete to achieve a global objective.
Core Components of AI Agents
- Brain (Cognitive Abilities)
2. Memory( Knowledge , Context)
- Short-term Memory
- Long Term Memory
- Entity-Based Memory
3. Tool (Perfrom Action, do task )
- tool Decotator
- Add doc string
- add type hint
- tool call
Characteristics of AI Agents
- Goal-Oriented: Primary Motivation of Agents (Anyhow achieve the goal).
- **Autonomy: **Agents capable of executing tasks with human intervention or with Human in the Loop.
- Planning: It involves creating a roadmap or steps to achieve the goal. It not only makes one path. It makes multiple paths to achieve the goal.
- Reasoning: The cognitive ability of your agents to perform certain tasks. Adaptability: Agents capable of removing roadblocks in execution. They dynamically change the plan if any unusual events occur during task execution.
- Orchestration: An agent also acts as a manager. Maintain the execution order in a logical way.
CrewAI Philosophy:
Get Debasish Das’s stories in your inbox
Join Medium for free to get updates from this writer.
Crew AI is built for developing multi-agent systems, not single-agent systems. Here, “Crew” refers to a team of agents communicating with one another to achieve a common task.
- We easily add to the terminal and use it to build multiple agent systems.
- Crew AI provides a well-suited folder structure for developing multiple AI systems.
- Crew AI mimics a human team, where each agent represents a different team member. Each agent has distinct tasks, and it’s important to note that multiple agents perform better than single agents.
- Components of Crew AI:
- Agents: An agent is an entity responsible for performing specific actions. Each agent is defined by three key attributes: Role: The function or duty assigned to the agent. Goal: The objective the agent aims to achieve. Backstory: The background information that provides context for the agent’s motivations and actions.
- Task: A task is an assignment given to agents to accomplish. This entity includes the following attributes: Description: A detailed overview of what the task entails. Expected Output: The anticipated results or deliverables of the task. Agents: An agent attribute that specifies which agents are designated to execute the task.
- Crew: A crew consists of a team of agents working together. The crew operates based on: Order: The sequence in which tasks are assigned and executed, which can be sequential or hierarchical.
- Execute the Crew: This process involves initiating the crew’s operations, which can be broken down into the following steps: Kickoff: The starting point for the crew to begin executing their tasks.
This structure ensures that each agent and task is clearly defined, allowing for efficient collaboration and execution within the Crew AI system.
Installation Of Crew AI:
- Visit the Web Crew AI Documentation.
Step:1
# Python Version Requirements# CrewAI requires Python >=3.10 and <3.14. Here’s how to check your version:python3 --version# If you need to update Python, visit python.org/downloads
Step:2
CrewAI uses the uv as its dependency management and package handling tool. It simplifies project setup and execution, offering a seamless experience.
# For Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"# For Linux or MacOScurl -LsSf https://astral.sh/uv/install.sh | sh # or wget -qO- https://astral.sh/uv/install.sh | sh
Step:3
#Run the following command to install crewai CLI:uv tool install crewai# To verify that crewai is installed, run:uv tool list# Expected Output will Be:crewai v0.102.0- crewai
Step:4
Creating a project using the Crew AI template.
# Run the following command for Template crewai create crew <your_project_name> # Write Project name # after that multiple question will be ask
After following these four steps, you will have a project directory( with structure) for creating AI agents for your crew.
my_project/├── .gitignore├── knowledge/ # Directory for knowledge base├── pyproject.toml├── README.md├── .env # Store API keys and environment variables└── src/ └── my_project/ ├── __init__.py ├── main.py # Project entry point and execution flow ├── crew.py # Crew orchestration and coordination ├── tools/ #Directory for custom agent tools │ ├── custom_tool.py │ └── __init__.py └── config/ ├── agents.yaml # Define your AI agents and their roles └── tasks.yaml # Set up agent tasks and workflows
Initial Setup is Done
Our primary file for the time being is agents.yaml, along with task.yaml, crew.py, and main.py.
Let’s do a small project, a Research Assistant Chatbot:
First, make Agents agents.yaml :
report_generator: role: > Expert report generator on {topic} goal: > Creating detailed report on {topic} backstory: > You are an expert researcher and you have developed a lot of research reports on various topics in the past. Your reports are detailed covering a multi-dimensional view about the topic and is included along with current and future trends, is simple to read with good analogies where ever applicable.blog_writer: role: > Expert Blog Writer on {topic} goal: > Creating well crafted blog on {topic} backstory: > You are an expert in creating blog on {topic}. Your blogs are fun to read, full of facts presented in a fun and simple way, even a 5 year old can understand.
Second, write down task task.yaml:
report_task: description: > Based on the input topic: {topic}, generate a detailed report including all the latest facts and future trends in a structured way. The report should be around 2000 words. expected_output: > 2000 words long report on the topic: {topic} agent: report_generatorblog_writing_task: description: > Based on the report on {topic}, create a well written and structured blog that even a 5 year old can understand. The blog should be around 500 words. expected_output: > 500 words long blog post on topic: {topic}. The blog should be well structured with a creative and fun heading. agent: blog_writer
Third, Build Crew Agents crew.py:
from crewai import Agent, Crew, Process, Taskfrom crewai.project import CrewBase, agent, crew, taskfrom crewai.agents.agent_builder.base_agent import BaseAgentfrom typing import List# define the class for our crew@CrewBaseclass ResearchAndBlogCrew(): agents: list[BaseAgent] tasks: list[Task] # define the paths of config files agents_config = "config/agents.yaml" tasks_config = "config/tasks.yaml" # ============= Agents ==================== @agent def report_generator(self) -> Agent: return Agent( config=self.agents_config["report_generator"] ) @agent def blog_writer(self) -> Agent: return Agent( config=self.agents_config["blog_writer"] ) # ============== Tasks =========================== # order of task definition matters @task def report_task(self) -> Task: return Task( config=self.tasks_config["report_task"] ) @task def blog_writing_task(self) -> Task: return Task( config=self.tasks_config["blog_writing_task"], output_file="blogs/blog.md" ) # ================ Crew =============================== @crew def crew(self) -> Crew: return Crew( agents=self.agents, tasks=self.tasks, process=Process.sequential, verbose=True )
Fourth, Execution of Crew Agents in main.py
from reaseach_and_blog_crew.crew import ResearchAndBlogCrewdef run(): """ Run the crew. """ inputs = { 'topic': 'AI agents in coding' } try: ResearchAndBlogCrew().crew().kickoff(inputs=inputs) except Exception as e: raise Exception(f"An error occurred while running the crew: {e}")
If you have any questions, feel free to ask me. Buy some coffee🍵 for me. Thank you for visiting! I plan to add more information in the future. If you enjoyed this, please follow me on Medium for more updates.
Check Out My Other Blogs
- CNNs Explained: How Convolutional Neural Networks Actually Work
- PyTorch Mastery: Complete Deep Learning Guide (2025 Edition)
- Master LangChain in 2025: From RAG to Tools (Complete Guide)
If you enjoy this type of content, you can follow me on Medium** **and GitHub, and connect with me on LinkedIn. Feel free to leave a comment, and I will improve my writing. Thank you for your valuable time.