M9-A — What Are AI Agents?

How to read this note

You have used chatbots (ask → answer). An AI agent goes further: give a goal → it figures out steps → uses tools → keeps going until done (or stuck).


🆚 Chatbot vs Agent

Chatbot AI Agent
One question → one answer One goal → many steps
Waits for you each time Can loop on its own
No tools (usually) Can search web, run code, send email
"What is RAG?" "Research today's AI news and save summary to my notes"

Personal assistant analogy

Chatbot  = friend who only gives advice when asked
Agent    = assistant who books the ticket after you say "plan my trip"

🧩 What makes something an "agent"?

Most agents have four abilities:

1. PERCEIVE  →  read message, files, web results
2. PLAN      →  break goal into steps
3. ACT       →  call tools (browser, calculator, API)
4. REMEMBER  →  store what happened for next step
        ┌─────────────┐
 Goal → │   AGENT     │ → Tools (search, files, apps)
        │  (LLM brain)│
        └──────┬──────┘
               ↓
           Memory
The real insight

The LLM is the brain. Tools are the hands. Memory is the notebook. Without tools + memory, you only have a chatbot.


🔧 What are "tools"?

A tool is anything the agent can call besides talking:

Tool Agent uses it to…
Web search Find current information
File read/write Save notes, update TODO
Calculator Do maths correctly
Email API Send message
Terminal Run a script

When you see ChatGPT "browse" or "run code" — that is tool use.


🔄 The agent loop (backend)

This loop runs until task done or max steps reached:

┌──────────────────────────────────────┐
│  1. Read goal + memory               │
│  2. LLM decides: "next action?"      │
│  3. If answer ready → reply to user  │
│  4. If need tool → call tool         │
│  5. Tool result goes back to memory  │
│  6. Go to step 1                     │
└──────────────────────────────────────┘

Example:

Goal: "Summarise today's AI news into notes.md"

Step 1: Agent searches web
Step 2: Agent reads 5 articles
Step 3: Agent writes summary
Step 4: Agent saves file
Step 5: Agent tells you "Done"

You did not micro-manage each search query — the agent planned it.


🎒 Examples students understand

Agent idea What it does
Homework helper Finds sources → outlines essay → you edit
Job finder Reads resume → searches listings → drafts cover letter
Shop bot Reads enquiry → checks price list file → drafts reply
Study agent Reads your PDFs → makes quiz → logs wrong answers

Brochure: Agentic AI = systems with memory, planning, execution, autonomous workflows.


⚠️ Agents are not magic robots

Myth Truth
"Fully autonomous forever" Needs goals, limits, and human checks
"Never wrong" Tools fail, web lies, loops get stuck
"Replaces developers" You design goals, tools, and safety rules
Always set stop rules

Max steps, allowed tools, "ask human before sending email" — otherwise agents run wild.


🛤️ Where you are in the course

Module 1–3   Prompts
Module 4     Prompt systems
Module 5     Multimodal content
Module 6     Productivity
Module 7–8   RAG & knowledge
Module 9     Agents ← you are here
Module 10    Many agents together
Module 11    CrewAI / AutoGen tools

Next: M9-B — Memory Planning and Execution
Compare: M1-A - The Intelligence Stack — Agentic AI layer