Agentic AI Explained

Complete educational guide from AI to Agentic AI

Artificial Intelligence

AI is the science of making machines perform tasks that normally require human intelligence such as learning, reasoning, understanding language, and solving problems.

Machine Learning

Machine Learning is a subset of AI where computers learn patterns from data instead of being explicitly programmed.

Deep Learning

Deep Learning uses neural networks with many layers and powers modern systems like ChatGPT, image recognition and speech recognition.

Generative AI

Text

Stories, reports, code.

Images

AI generated artwork.

Audio

Music and speech.

Transformers & LLMs

Tokenization

Embeddings

Attention

Prediction

AI Agents

An AI Agent can observe, reason, use tools and take actions.

Agentic AI

Agentic AI combines multiple specialized AI agents that collaborate to solve larger goals autonomously.

Workflow

Goal → Planning → Task Breakdown → Agents → Tools → Final Output

Planner Agent

Research Agent

Analysis Agent

Report Agent

🧠 What is a Large Language Model (LLM)?

The brain behind ChatGPT, Gemini, Claude, Grok and many modern AI systems.

LLM stands for Large Language Model.

A Large Language Model is an Artificial Intelligence system trained on massive amounts of text data so it can understand, generate, summarize, translate and reason using human language.

Think of an LLM as a super-smart digital brain that has read billions of documents, books, articles, websites and conversations.

Examples include ChatGPT, Gemini, Claude, Llama and Grok.

🤔 Why Do We Need LLMs?

Before LLMs, computers followed fixed rules.

They could not easily understand human language.

LLMs changed this by allowing computers to:

⚙️ How LLMs Work

Text Data
Tokenization
Embeddings
Transformer Model
Prediction
Generated Response

🎓 How LLMs Are Trained

Step 1: Collect Massive Data

Books, websites, articles, code repositories and research papers.

Step 2: Clean Data

Remove spam, duplicates and low-quality content.

Step 3: Tokenization

Convert words into tokens.

Step 4: Pretraining

Predict missing or next words billions of times.

Step 5: Fine Tuning

Improve model on specific tasks.

Step 6: Human Feedback

Humans rank answers to improve quality.

📚 What Data Is Used To Train LLMs?

Dataset Type Examples
Books Digital Libraries, Public Books
Web Pages Common Crawl
Wikipedia Wikipedia Articles
Research Papers Scientific Publications
Programming Code GitHub Repositories
Documentation Technical Manuals
Forums Public Discussions

🏢 Major Companies Building LLMs

Company Model Family Country
OpenAI GPT Series USA
Google Gemini USA
Anthropic Claude USA
Meta Llama USA
xAI Grok USA
Mistral AI Mistral Models France
DeepSeek DeepSeek Models China
Alibaba Qwen China

📈 Evolution of Large Language Models

Year Model Company
2018 GPT-1 OpenAI
2019 GPT-2 OpenAI
2020 GPT-3 OpenAI
2022 ChatGPT OpenAI
2023 Llama 2 Meta
2024 Llama 3 Meta
2024 Claude 3 Anthropic
2024 Gemini Google
2025 Advanced Reasoning Models Multiple Companies

🚀 What Can LLMs Do?

✍️ Write Articles
💻 Generate Code
📄 Summarize Documents
🌍 Translate Languages
🤖 Create Chatbots
📊 Analyze Data
🎓 Teach Concepts
📧 Draft Emails

🚀 What Can LLMs Do?

✍️ Write Articles
💻 Generate Code
📄 Summarize Documents
🌍 Translate Languages
🤖 Create Chatbots
📊 Analyze Data
🎓 Teach Concepts
📧 Draft Emails

⚠️ Limitations of LLMs

Limitation Description
Hallucinations Can generate incorrect information
No True Understanding Predicts patterns rather than understanding like humans
Bias May reflect biases present in training data
Knowledge Cutoff May not know future events without updates
Privacy Concerns Sensitive data must be handled carefully

🔗 From LLMs to AI Agents

LLMs are powerful brains that can understand and generate language.

However, LLMs alone mostly generate responses.

To perform actions such as searching the web, reading PDFs, sending emails, booking tickets, or analyzing files, we need AI Agents.

This is where the next evolution begins: AI Agents and Agentic AI.

🔗 From LLMs to AI Agents

LLMs are powerful brains that can understand and generate language.

However, LLMs alone mostly generate responses.

To perform actions such as searching the web, reading PDFs, sending emails, booking tickets, or analyzing files, we need AI Agents.

This is where the next evolution begins: AI Agents and Agentic AI.

Understanding Agentic AI in Simple Words

Imagine you are asked to organize a school science exhibition.

You cannot do everything yourself.

You need different people to help you.

All these students work together to complete one goal.

Agentic AI works exactly the same way.

Instead of students, we have AI Agents.

Each agent specializes in a specific task.

Together they solve complex problems.

Key Idea

Generative AI creates content.

AI Agents perform tasks.

Agentic AI achieves goals.

This is why Agentic AI is considered the next major evolution of Artificial Intelligence.

Why Traditional AI is Not Enough?

Traditional AI

Traditional AI systems answer questions.

Example:

User: "What is the capital of France?"

AI: "Paris"

Task completed.


Complex Goal

Now imagine asking:

"Plan a 5-day vacation to Goa with a budget under ₹30,000."

This requires:

One AI response is not enough.

Agentic AI solves such complex goals.

How Agentic AI Thinks

Step 1: Understand Goal

The AI first understands what the user wants.

Example: "Build a website."

Step 2: Create a Plan

The AI creates a roadmap.

Step 3: Assign Tasks

Different agents receive different responsibilities.

Step 4: Execute Tasks

Agents start working independently.

Step 5: Review Results

Results are checked for errors.

Step 6: Final Output

User receives completed work.

Memory in Agentic AI

Memory is one of the most important parts of Agentic AI.

Without memory, the AI would forget everything after every step.

Memory helps agents remember:

This makes the system smarter and more efficient.

Reflection and Self-Correction

Humans often review their work before submitting it.

Agentic AI does the same thing.

After completing a task, agents can review:

This process is called Reflection.

Reflection helps improve accuracy and reliability.

Tools Used by Agentic AI

🌐 Search Engine

Searches latest information.

🧮 Calculator

Performs calculations.

🗄 Database

Stores and retrieves information.

📄 PDF Reader

Reads reports and documents.

📧 Email Tool

Sends notifications and emails.

💻 Code Interpreter

Executes code and analyzes data.

AI Agent vs Agentic AI

FeatureAI AgentAgentic AI
AgentsSingleMultiple
PlanningBasicAdvanced
AutonomyMediumHigh

Blood Report Analysis Project

Upload PDF → Extract Text → Analyze Values → Detect Risks → Generate Recommendations.

🚀 Mini Project: Agentic AI Blood Report Analyzer

A simple real-world Agentic AI project using Groq and Gradio.

Project Goal

Upload a blood report and let AI analyze the report, identify abnormalities, explain medical terms, detect health risks, and provide recommendations.

Instead of reading a complex medical report, users receive a simple understandable explanation.

🚀 Build Your Own Agentic AI Blood Report Analyzer

Let's build a real-world Agentic AI project using Python, Gradio, Groq, and Llama 3.

🎯 Project Objective

The goal of this project is to automatically analyze blood reports and provide easy-to-understand explanations.

Instead of manually reading complex medical reports, users simply upload a PDF report and receive an AI-generated analysis.

This project demonstrates how multiple AI agents can collaborate to solve a healthcare-related problem.

🤖 Agents Used in the Project

📄 PDF Reader Agent

Reads uploaded blood report PDFs.

🔍 Extraction Agent

Extracts text from the report.

🩺 Medical Analysis Agent

Understands medical values.

⚠ Risk Detection Agent

Finds abnormal blood parameters.

💡 Recommendation Agent

Generates health suggestions.

📝 Report Agent

Creates final user-friendly report.

🔄 Complete Workflow

Upload Blood Report PDF
Extract Text using PDFPlumber
Send Data to Groq API
Llama 3 Analyzes Report
Identify Risks & Abnormal Values
Generate Recommendations
Display Final Analysis

🚀 Build Your Own Agentic AI Project

Blood Report Analyzer using Groq, Llama 3 and Gradio

🎯 Project Objective

In this project, we will build an Agentic AI application that can automatically analyze blood reports and generate easy-to-understand medical explanations.

Instead of manually reading complicated medical reports, users simply upload a PDF file and receive a complete AI-generated health analysis.

This project demonstrates how multiple AI agents collaborate to solve a real-world healthcare problem.

🤖 Why Is This An Agentic AI Project?

📄 PDF Reader Agent

Reads uploaded blood report PDF files.

🔍 Extraction Agent

Extracts text and medical values from the report.

🩺 Medical Analysis Agent

Understands blood parameters and medical terminology.

⚠ Risk Detection Agent

Detects abnormal blood values and possible risks.

💡 Recommendation Agent

Generates personalized health suggestions.

📝 Report Agent

Creates the final user-friendly explanation.

🔄 Complete Agentic AI Workflow

User Uploads Blood Report PDF
PDF Reader Agent
Text Extraction Agent
Medical Analysis Agent
Risk Detection Agent
Recommendation Agent
Final Health Report

🔑 Step 1: Create Groq API Key

Before using Llama 3, we need access to Groq's AI servers.

Follow These Steps

  1. Visit: https://console.groq.com
  2. Create a free Groq account.
  3. Verify your email.
  4. Login to the Groq Console.
  5. Navigate to API Keys.
  6. Click Create API Key.
  7. Give the key a name.
  8. Copy and save the API Key.

☁ Step 2: Setup Google Colab

  1. Open Google Colab
  2. Create a New Notebook
  3. Rename it as: Blood_Report_Analyzer
  4. Install required libraries

⚙ Step 3: Install Required Libraries

!pip install gradio
!pip install groq
!pip install pdfplumber

🐍 Step 4: Import Required Libraries

import gradio as gr
import pdfplumber
from groq import Groq

📄 Step 5: Extract Text From PDF

def extract_text(pdf_file):

    text = ""

    with pdfplumber.open(pdf_file) as pdf:

        for page in pdf.pages:

            text += page.extract_text()

    return text

🤖 Step 6: Connect Groq API

client = Groq(
    api_key="YOUR_API_KEY"
)

🩺 Step 7: Analyze Blood Report

def analyze_report(report_text):

    prompt = f'''
    Analyze this blood report.

    Explain:
    1. Important blood values
    2. Abnormal values
    3. Health risks
    4. Recommendations

    {report_text}
    '''

    response = client.chat.completions.create(
        model="llama3-8b-8192",
        messages=[
            {
                "role":"user",
                "content":prompt
            }
        ]
    )

    return response.choices[0].message.content

🎨 Step 8: Create Gradio Interface

def process(pdf):

    text = extract_text(pdf)

    result = analyze_report(text)

    return result

gr.Interface(
    fn=process,
    inputs=gr.File(),
    outputs=gr.Textbox(),
    title="AI Blood Report Analyzer"
).launch()

🎓 Learning Outcomes

Congratulations! 🎉 You have successfully learned how Agentic AI can be used to solve a real-world healthcare problem.