Agentic AI · Module 1 of 41 · 11 concepts · about 18 min

What Agentic AI Is

What the words mean, how an agent differs from a language model, a chatbot, a RAG system, a workflow and ordinary software, how much freedom an agent can be given, and when not to build one.

About Agentic AI: Agentic AI is software that does not just answer a question but gets a job done: it works out what to do, does it, checks what happened and carries on until the job is finished. This course takes you from the very beginning to being able to build such a system and talk about it in an interview. You start with what an agent is and the parts it is made of, then build each part: the tools it uses, how it remembers, how it plans and reasons. You write a complete agent yourself, in plain Python, before using any library. Then you learn how agents are combined, how they are run safely for real users, how to tell whether they work, and how they are attacked and defended. It finishes with six worked designs, ten exercises that build one agent, three projects, a capstone, and five sets of interview questions.

At work: The conversation every team has before it builds anything: is this task one for an agent at all, and if so, how much should the agent be trusted to do alone?

Agentic AI in one sentence

What it is

Agentic AI is software in which a language model decides what to do next, does it, looks at what happened, and repeats until a goal is met. Three words to learn first:

  • A language model (LLM) is a program that reads text and writes text. On its own it can only write.
  • An AI agent is a language model placed in a loop and given tools: functions it can ask your program to run, such as 'look up this order'.
  • Agentic describes how much of the deciding the model does. A system is more agentic the more it chooses its own steps.

Why it matters

The shift is from software that answers to software that finishes work:

  • A question-answering system tells a customer what the refund policy says.
  • An agentic system finds the customer's order, checks it against the policy, issues the refund and confirms it.

That is far more useful, and it raises the stakes: a wrong answer is a bad sentence, but a wrong action is real money moved or a real file deleted.

In the real world: An insurer replaces a bot that explained how to file a claim with one that collects the photos, checks the policy, files the claim and books the surveyor. Claims that took three days to start now start in four minutes.

Visual example

Vocabulary

Each one contains the one above it.

The three words this course is built on
wordwhat it iswhat it can do alone
Language modelText in, text outWrite an answer
AI agentA model, plus tools, in a loopLook things up and take actions
Agentic systemOne or more agents, with memory, limits and peopleFinish a whole job

Treating 'agentic' as a yes-or-no label. It is a dial. Most useful systems are a fixed process with a small amount of model decision-making at one or two points, and those are easier to build, test and trust than a fully free agent.

The agent loop: observe, reason, decide, act

What it is

Every agent runs the same loop:

  • Observe: read the goal and everything that has happened so far.
  • Reason: work out what is known and what is still missing.
  • Decide: choose one next step, either an action or 'I am finished'.
  • Act: your program carries out the action.
  • Observe again: the result of the action is added to what the model reads next.

The loop ends when the model says it is finished, or when a limit you set is reached.

Why it matters

The loop is what lets software handle a task whose steps are not known beforehand.

  • The agent cannot know which refund rule applies until it has seen the order.
  • It cannot know whether the refund worked until it has tried.
  • Each result shapes the next step, which a fixed script cannot do.

In the real world: A support team watches its first agent resolve a late-delivery complaint in four turns of the loop with no person involved; the same complaint used to take six minutes on a call.

Visual example

Agent loop

Repeated until the model says it is finished, or a limit stops it.

One turn of the loop

  1. ObserveGoal and everything so far
  2. ReasonKnown and missing
  3. DecideOne action, or finished
  4. ActYour program runs it; result recorded

The result becomes the next thing the model observes.

Goal:  “My order came an hour late. I want the delivery fee back.”

Observe  the customer's message
Reason   I need the order before I can judge lateness
Decide   call get_order
Act      get_order(customer=412)        -> order 88213, 62 minutes late

Observe  the order, 62 minutes late
Reason   I need the rule for late orders
Decide   call get_policy
Act      get_policy('late delivery')    -> fee refunded if more than 30 minutes late

Observe  62 is more than 30
Decide   call refund_fee
Act      refund_fee(order=88213)        -> ₹25 returned to wallet

Observe  refund succeeded
Decide   finished: “I've refunded the ₹25 delivery fee to your wallet.”

Thinking the model runs the tools. It never does. The model only writes text that says 'please run this tool with these inputs'. Your program runs it, which is exactly where you check permissions and limits.

Agent versus LLM, chatbot and RAG system

What it is

Four things are often confused. Each adds one ability to the one before:

  • An LLM writes text from the text it is given. It knows only what it learned in training.
  • A chatbot is an LLM with the conversation so far resent each time, so it can hold a dialogue.
  • A RAG system (retrieval-augmented generation) first searches your documents, then gives the model what it found, so the answer is grounded in your data.
  • An agent chooses which tools to use, in what order, for how many steps, and can change things as well as read them.

Why it matters

Knowing the difference stops you over-building.

  • If the user needs an answer from your documents, RAG is enough and costs one model call.
  • If the user needs something done, or the answer needs several look-ups that depend on each other, you need an agent.
  • An agent can use RAG as one of its tools. They are not rivals.

In the real world: A bank ships a RAG assistant for policy questions and an agent for disputes. The first answers 'what is the chargeback window?'; the second opens the dispute, attaches the statement and tracks it.

Visual example

Comparison

Read across a row to see what each one gains.

LLM, chatbot, RAG system and agent
LLMchatbotRAG systemagent
Remembers the conversationNoYesYesYes
Uses your private dataNoNoYes, by searchYes, by tools
Model calls per requestOneOneOne or twoMany
Who chooses the stepsNobodyNobodyYour codeThe model
Can change thingsNoNoNoYes
Cost of a mistakeWrong textWrong textWrong textWrong action

Calling a RAG chatbot an agent because it 'uses a tool'. In plain RAG your code always searches once and then answers. The model never decides whether to search, what to search for next, or when it has enough. That decision is what makes a system agentic.

Agent versus workflow, automation and traditional software

What it is

Three older ways of getting multi-step work done, and how an agent differs:

  • Traditional software: a programmer writes every rule. Same input, same output, every time.
  • Automation (scripts, robotic process automation, 'if this then that'): fixed steps triggered by an event. No judgement.
  • A workflow with a model in it: your code fixes the steps and their order; the model fills in each one (classify this, summarise that).
  • An agent: the model chooses the steps and their order while it works.

Why it matters

They trade predictability for flexibility:

  • Rules and workflows are cheap, fast, testable and do the same thing every time.
  • An agent copes with cases nobody wrote a rule for, and is harder to predict, test and budget.

If you can draw the steps as a flow chart before you start, build the flow chart. An agent earns its place only when the path depends on what is found on the way.

In the real world: A logistics firm reviews twelve projects labelled 'agents': eight are fixed pipelines, two are single model calls, and only two have paths that truly vary. Only those two stay agents.

Visual example

Comparison

Flexibility rises to the right. So do cost and unpredictability.

Four ways to get multi-step work done
traditional softwareautomationLLM workflowagent
Who decides each stepThe programmerThe programmerThe programmerThe model
Handles messy languageNoNoYesYes
Handles unplanned casesNoNoPoorlyWell
Same result every runYesYesNearlyNo
TestingEasyEasyModerateHard
Cost per taskTinyTinyKnownVariable

Rebuilding a working workflow as an agent because agents are newer. The result is usually slower, dearer and less reliable, doing exactly the same five steps.

What makes a system agentic

What it is

A system is agentic to the degree that it has these five properties:

  • Goal-directed: it is given an outcome to reach, not a list of steps.
  • Autonomous choice: the model picks the next step itself.
  • Tool use: it can read from and act on systems outside the model.
  • Feedback: it sees the result of each action and adjusts.
  • Persistence: it keeps going over many steps, and remembers what it has done.

Why it matters

This list is a practical test.

  • Ask of any system: who decides the next step, and can that decision depend on what the last step found? If the answer is 'the model' and 'yes', it is agentic.
  • It also tells you what to build: each property maps to a part covered later (goals and prompts, the loop, tools, observations, memory and state).

In the real world: A procurement team scores a vendor's 'agentic platform' against these five properties and finds it has tools but no feedback: it cannot react to a failed step. They buy something else.

Equating agentic with 'no humans'. A system that asks a person to approve every refund is still agentic: the model chose the refund. Autonomy and human approval are separate dials.

Levels of autonomy

What it is

Autonomy is how much an agent does without a person. Five levels, from least to most:

  • Level 0, assist: the model drafts; a person does everything.
  • Level 1, suggest: the agent proposes an action; a person carries it out.
  • Level 2, act with approval: the agent prepares the action; a person clicks approve.
  • Level 3, act then report: the agent acts; a person reviews afterwards.
  • Level 4, act alone: the agent acts within fixed limits; people see only the exceptions.

Why it matters

The right level depends on two things: what a mistake costs, and whether it can be undone.

  • Looking up an order is free to get wrong: level 4.
  • A ₹25 refund is cheap and reversible: level 3 or 4, with a cap.
  • Closing an account cannot be undone: level 2.
  • The same agent sits at different levels for different actions.

In the real world: A bank's assistant answers balance questions alone, drafts transfers for the customer to confirm, and has no tool for closing an account at all.

Visual example

Autonomy

Set the level per action, by what a mistake would cost.

Five levels of autonomy
levelthe agenta personsuits
0 AssistDrafts textDoes all the workNew or untrusted systems
1 SuggestProposes an actionPerforms itHigh-stakes decisions
2 Act with approvalPrepares the actionApproves itCostly or irreversible actions
3 Act then reportActsReviews afterwardsReversible, moderate actions
4 Act aloneActs within limitsSees exceptionsCheap, routine, reversible

Setting one level for the whole agent. That either slows every routine action for the sake of one risky one, or lets the risky one through with the routine ones. Set the level per action.

Examples and real-world use cases

What it is

Where agentic systems are in real use today:

  • Customer support: resolve refunds, bookings and account changes, not only answer questions.
  • Coding: read a codebase, change files, run the tests, fix what failed.
  • Research: search many sources, read them, cross-check claims, write a cited report.
  • Data analysis: write a query, run it, look at the result, chart it, explain it.
  • Operations: triage alerts, gather logs, propose or apply a fix.
  • Personal tasks: plan a trip, manage a calendar, fill in forms across websites.

Why it matters

The successful uses share a shape, and that shape is your guide for spotting new ones.

  • The task takes several steps that depend on each other.
  • There are tools that give real information and real effect.
  • Success can be checked: the tests pass, the refund appears, the sources support the claim.
  • A mistake can be caught or undone.

In the real world: A software company's coding agent opens pull requests overnight; nothing merges without passing tests and a human review, which is why the team trusts it with real work.

Visual example

Use cases

The last column is why the use case works in practice.

Six kinds of agent and what keeps each one safe
agentmain toolshow success is checked
SupportOrders, policies, refundsThe refund exists in the payment system
CodingFiles, shell, testsThe test suite passes; a person reviews
ResearchSearch, page fetchEvery claim has a source that supports it
Data analysisSQL, PythonQueries run; numbers reconcile
OperationsLogs, metrics, runbooksThe alert clears
Travel planningFlights, hotels, calendarThe user approves before booking

Copying a use case without its safety net. Coding agents work well largely because tests and code review catch their mistakes. Move the same design to a task with no automatic check and it fails quietly.

When to use an agent, and when not to

What it is

Use an agent only when all of these are true:

  • the task needs several steps that depend on each other;
  • the path cannot be written down in advance;
  • there are tools that give it real information or effect;
  • there is a way to check whether it succeeded;
  • mistakes are tolerable or reversible, or a person approves the risky ones.

If any is false, use something simpler: one model call, a RAG system, or a fixed workflow.

Why it matters

An agent costs more than a single call in every way:

  • many model calls, so more money and more waiting;
  • more ways to fail, and errors that build on each other;
  • harder testing, because the path varies from run to run.

That price is worth paying for open-ended work and wasted on fixed work.

In the real world: A team asked for 'an invoice agent' finds every invoice follows the same five steps, ships a workflow, and passes every test at a tenth of the cost.

Visual example

Decision

Read down and stop at the first row that fits.

Which design fits the task
the taskuseexample
One stepA single model callClassify a support ticket
An answer from your documentsA RAG systemWhat is the return window?
Several steps, always the sameA workflowExtract, validate and file an invoice
Steps that depend on what is foundAn agentResolve a refund dispute
Several independent strandsSeveral agentsResearch a company from many sources

Starting with an agent and simplifying later. It runs the other way: start with one call, add a workflow when one call is not enough, and add agent freedom only at the step where the workflow keeps breaking.

The running example: Kirana Kart

What it is

One example carries this whole course. Kirana Kart is a made-up grocery delivery app. It wants an agent that resolves support requests. The agent can:

  • look up a customer's orders;
  • read the policies on refunds, late delivery and cancellations;
  • issue a refund, within limits;
  • reschedule or cancel a delivery;
  • hand over to a human with a summary.

Why it matters

It is a good teaching example because it contains every hard part of agent design:

  • it reads private data, so it needs permission checks;
  • it spends money, so it needs limits and approval;
  • some actions cannot be undone, so retries must be safe;
  • customers will try to talk it into things, so it needs guardrails;
  • it must know when to stop and call a person.

In the real world: A food-delivery firm's first agent handles simple refunds well and fails on the first customer who asks for two things at once, which sends the team back to design the loop properly.

Designing only for the polite customer with a clear, valid request. The real work is in the other cases: the missing order, the claim that cannot be checked, the customer who insists a manager already approved it.

Interview questions: the basics of Agentic AI

What it is

The questions interviewers ask about the basics of Agentic AI, from the first screening call to the senior round. Cover the answer, say yours aloud, then compare.

Why it matters

Reading an idea and explaining it are different skills.

  • Each answer below is the two or three sentences an interviewer is listening for.
  • The reasoning behind each one is in the cards above. If an answer surprises you, go back to that card.

In the real world: A phone screen opens with 'explain an agent to a product manager'. The candidates who progress do it in two sentences and one example.

Q: What is an AI agent?

A language model that uses tools in a loop: it decides the next step from what it has found so far, your code carries the step out, and it repeats until the goal is met or a limit is reached.

Q: What makes a system agentic?

The model, not the programmer, chooses the next step, and that choice can depend on the result of the last one. Goal-directed, tool-using, feedback-driven and persistent over several steps.

Q: Agent versus chatbot?

A chatbot produces an answer in one model call. An agent takes actions over many calls and decides for itself when the task is done. The cost of a chatbot's mistake is a wrong sentence; an agent's is a wrong action.

Q: Agent versus RAG?

RAG is a fixed pipeline: search once, then answer. An agent decides whether to search, what to search for next and when it has enough, and can also change things. RAG is often one of an agent's tools.

Q: Agent versus workflow?

In a workflow your code fixes the steps and the model fills them in. In an agent the model chooses the steps. Workflows are predictable and cheap; agents are flexible and harder to test.

Q: When would you not use an agent?

When the steps are known in advance, when there is no way to check success, or when a mistake is costly and cannot be undone. A single call or a workflow is cheaper, faster and easier to test.

Q: What are the levels of autonomy?

Assist, suggest, act with approval, act then report, act alone. The level is set per action by the cost and reversibility of a mistake, not once for the whole agent.

Defining an agent by naming frameworks. The interviewer wants the idea first: a model, tools and a loop.

Exercise: classify ten systems

What it is

A short build that uses this module's ideas. Write it yourself before looking anything up; the checks at the end tell you whether it works.

Why it matters

An idea you have only read fades in a week.

  • Building it once, even in fifty lines, is what makes it yours.
  • Interviewers can tell the difference between someone who has read about a loop and someone who has debugged one.

In the real world: A consultant runs exactly this exercise in a client's first workshop; it routinely cuts a list of twenty 'agent ideas' to four worth building.

Your task. Decide, for ten real tasks, whether each needs a single model call, a RAG system, a workflow or an agent, and defend each choice in one sentence.

Steps

  1. Write down ten tasks from a business you know: for example 'tag incoming emails by department', 'answer questions about the leave policy', 'process an expense claim', 'find why sales fell last week'.
  2. For each task, answer two questions: are the steps known in advance, and does the next step depend on what the last one found?
  3. Assign each task to one of the four designs using the decision table above.
  4. For every task you labelled 'agent', write what would check that it succeeded and what the worst mistake would be.

You are done when

  • No more than three of the ten are labelled 'agent'. If more are, re-read the workflow comparison.
  • Every 'agent' has a named success check and a named worst case.
  • You can explain each choice aloud in one sentence.

Stretch. For one 'agent' task, set the autonomy level for each action it would take.