LearnFrenzy
Sign in Take a free test

How Agents Work · Lesson 1 of 6

What Are AI Agents? Chatbots vs Workflows vs Agents Explained

An agent is an AI system that is given a goal instead of a single question, and decides its own steps to reach it. Here is what that really means, how it differs from a chatbot, and when you should not use one.

9 min read Beginner Updated Nov 9, 2026 Reviewed by Saurabh Samir

Open any tech news site this year and you will see the word agent everywhere. Coding agents, shopping agents, customer-support agents, "agentic AI". Strip away the marketing and the idea is surprisingly simple — and once you see it, you will understand most of the products being launched.

Start with what you already know: the chatbot

When you ask a chatbot "What is normalisation in DBMS?", it reads your message, writes one answer and stops. One question in, one answer out. If the answer needs fresh information or an action — checking today's internship deadlines, running some code, saving a file — the chatbot cannot do it unless you do it yourself and paste the result back.

Now give the AI a goal and some tools

An AI agent is a language model that is given three extra things:

  • A goal instead of a single question — "Find three Python internships in Bengaluru with deadlines this month and draft an application email for each."
  • Tools it can use — web search, a calculator, a code runner, your calendar, a database, an email draft folder.
  • A loop — after each step it looks at the result and decides what to do next, until the goal is met or it decides it cannot continue.

For the internship goal, an agent might search the web, open five results, filter them by location and deadline, read your resume file, and write three emails — deciding each of those steps itself. You check the drafts and press send.

One-line definition: an AI agent is a system where a language model decides which actions to take, uses tools to take them, looks at the results and repeats until the task is done.

Chatbot vs workflow vs agent

Many things called "agents" are actually workflows — and that is not a bad thing. The difference is who decides the steps:

ChatbotAI workflowAI agent
Who decides the steps?Nobody — one replyThe developer, in fixed codeThe model, at run time
Uses tools?No (or only one)Yes, in a fixed orderYes, chosen as needed
PredictabilityHighHighLower — needs guardrails
ExampleExplain recursionEvery new support email → summarise → tag → route to a team"Fix this failing test" — read files, edit, run tests, retry

A workflow is like a train on fixed tracks; an agent is like a taxi driver who picks the route. Taxis are flexible, but you want a good driver and a meter.

Where agents are already working

  • Coding agents read a codebase, make changes across several files, run the tests and fix what fails.
  • Research agents search many sources, read them and write a report with citations.
  • Customer support agents look up your order, check the refund policy and process a simple refund — handing over to a human for anything unusual.
  • Data agents turn a question like "Which city had the highest returns last quarter?" into SQL, run it and explain the result.

When you should not use an agent

Agents are slower, cost more (every loop is another model call) and are harder to test than a fixed workflow. Good engineers reach for the simplest thing that works:

  1. If one well-written prompt solves it — use a prompt.
  2. If the steps are always the same — write a workflow.
  3. Only if the steps genuinely depend on what you find along the way — build an agent.

Common mistake: building an "agent" for a task like "summarise this PDF". There is nothing to decide — it is one call. Saying this confidently in an interview shows real understanding.

The four building blocks

Every agent, from a weekend project to a product used by millions, is built from the same four parts. The rest of this track takes them one at a time:

  1. Model — the LLM that reasons and decides.
  2. Tools — functions the model can ask your code to run.
  3. Memory and knowledge — what it remembers and the documents it can look up.
  4. Loop and guardrails — the code that runs the cycle, sets limits and asks a human when it should.

Try it yourself (10 minutes): Write down three tasks from your week (for example, "prepare for Monday's DBMS viva"). For each, decide: prompt, workflow or agent? If agent, list the tools it would need. You have just done the first design step every agent team does.

What to learn next

The heart of every agent is its loop. The next lesson shows exactly what happens inside it — the plan, act, observe cycle known as ReAct.

Common interview questions

Try answering each one aloud before you open it.

1What is an AI agent?

A system where a large language model is given a goal and tools, decides which actions to take, uses tools to take them, observes the results and repeats until the task is complete — instead of answering once and stopping.

2How is an agent different from a workflow?

In a workflow the developer fixes the sequence of steps in code. In an agent the model chooses the next step at run time based on what it has observed. Workflows are more predictable; agents are more flexible.

3When would you avoid using an agent?

When a single prompt or a fixed workflow solves the problem. Agents add cost, latency and unpredictability, so they are worth it only when the steps genuinely depend on intermediate results.

Practise this

Build something with it

FAQs

Is ChatGPT an agent?

The basic chat is not — it answers and stops. When it browses the web, runs code or uses connected apps to complete a multi-step task on its own, it is acting as an agent. Many assistants now switch between both modes.

Are agents the same as AGI?

No. Agents are today’s language models wrapped in a loop with tools. They can be very capable at specific tasks, but they have the same limits as the underlying model, including mistakes and hallucinations.

References & further reading

Finished this lesson?

Mark it complete. Create a free account to save it on every device.

Next lesson

Search LearnFrenzy

Esc

Quick links