• Practice
  • About 15 min
  • 5 practice questions

What AI agents are: a chatbot answers, an agent acts

Explain how an AI agent differs from a chatbot and from a fixed automation script, trace its goal-plan-act-observe loop through worked examples, and judge which tasks agents still handle badly.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Tell apart a chatbot, a fixed automation script and an AI agent by what each one actually does.
  • Trace the agent loop - goal, plan, act with a tool, observe, repeat - through a real office task.
  • Name the jobs agents still do badly and explain why a person must stay in charge.

Offices, banks, coaching centres and phone apps are starting to use software that does not just reply to a question but carries out work: it searches files, fills in a register, books a slot or drafts a letter. Such software is usually called an AI agent. If you are preparing for a government job, you may soon work beside these systems or supervise them. This lesson builds the picture the rest of the course depends on.

A chatbot answers, an agent acts

A chatbot takes your message and returns text. Ask it which documents are needed for a certificate and it writes an answer - which you must still check against the official website. Whatever happens next is up to you. An agent is given a goal and is allowed to take actions towards it using tools: searching, opening a file, running a calculation, filling a form or sending an email. In most agents today, a large language model acts as the decision-maker that chooses the next step, and ordinary software carries out each action.

Chatbot and agent

  • Chatbot
    • Takes your message and returns text
    • You still check its answer against the official website
    • What happens next is up to you
  • Agent
    • Is given a goal
    • Takes actions using tools: search, open a file, calculate, fill a form, send an email
    • A language model chooses the next step; ordinary software carries out each action

The agent loop

The agent loop

  1. Plan The model breaks the goal into steps.
  2. Act It asks for a tool to be run.
  3. Observe The tool's result is added to what the model can see.
  4. Repeat or stop It picks the next step, until the goal is met, a step limit is reached or it needs a person.

Then back to step 1: Plan

It starts from a goal a person states.
  1. Goal - a person states what is wanted, for example: list every leave application in this shared folder that has had no reply for more than a week.
  2. Plan - the model breaks the goal into steps: list the files, read each application, find its date and status, compare with today's date.
  3. Act - it asks for a tool to be run, such as 'list files' or 'read file'.
  4. Observe - the tool's result comes back and is added to what the model can see.
  5. Repeat or stop - from what it observed, the model picks the next step, until the goal is met, a step limit is reached or it needs a person.

The observe step is what makes it an agent: each action depends on the result of the last one. If a file will not open, a good agent tries another way or reports the problem instead of pretending everything worked.

Worked example 1: the leave-application check

Asha, a section officer, gives the goal above. The agent calls 'list files' and observes 14 files. It calls 'read file' on each one and notes the applicant, the date received and whether a reply is attached. Two files are scanned images it cannot read, so it records them as 'could not read' rather than guessing. It takes today's date from the system clock, not from its own assumption, and compares. Its final report: 4 overdue applications, 2 unreadable files for Asha to check by hand, and 8 that are fine (4 + 2 + 8 = 14, so every file is accounted for). Notice that it replied to nobody: acting on the result was left to Asha.

Agent or fixed automation script?

A fixed automation script (in offices sometimes called robotic process automation) follows exactly the same steps every time: every night, copy new files from folder A to folder B and email the count. It is fast, cheap and predictable, but it breaks when something unexpected appears, such as a new form layout. An agent decides its steps while running, so it copes with variety, but it is less predictable, slower, costs more per run and may choose differently on different days.

Fixed automation compared with an AI agent
FeatureFixed scriptAI agent
Who decides the stepsThe programmer, in advanceThe model, while running
Same input, same result?Yes, every timeNot guaranteed
Unexpected layout or wordingStops or makes an errorOften copes, but may guess wrongly
Testing and auditEasyHarder; needs logs and checks
Best forRepetitive, fully defined jobsVaried jobs that need reading or judgement

Worked example 2: choosing the right approach

A coaching centre wants two things: a daily backup of its student register, and replies drafted to parents' emails, which arrive in every possible wording. The backup is identical every day, so a script is the right choice; an agent would add cost and unpredictability for no benefit. The parent emails need free-form reading and a choice of what to say, so an agent can help by drafting - but a staff member approves each reply before it is sent, because a wrong answer goes out in the centre's name. Often the best design mixes both.

What agents are still bad at

  • Long chains of steps - a small early error, such as a misread date, is carried into every later step.
  • Knowing when they are wrong - an agent may report success confidently even when a step failed, so its claims must be checked against the actual results.
  • Facts - like any language model it can invent details; dates, fees and rules must be checked against the official source.
  • Vague goals - 'clean up this folder' could mean archive or delete; unclear goals lead to surprising actions.
  • Responsibility - an agent cannot be held accountable; the person or office that runs it is.

A chatbot answers; an agent acts. The agent loop: goal -> plan -> act with a tool -> observe -> repeat or stop.

Key takeaways: an agent pursues a goal by calling tools and deciding each next step from what it observes. A fixed script is better when the steps are fully known; an agent helps only where reading or judgement is needed. Agents still struggle with long chains, admitting failure, facts and vague goals, so their output is checked and a person stays responsible.

Check your understanding

  1. 1. Which statement best describes how an AI agent differs from a chatbot?

    1. An agent always gives correct answers, while a chatbot can make mistakes
    2. An agent works only offline, while a chatbot needs the internet
    3. An agent is given a goal and uses tools to take actions, choosing each next step from the results
    4. An agent is simply a chatbot that can reply in several languages
    Show answer

    Answer: C. A chatbot returns text and leaves the next step to you; an agent pursues a goal by calling tools and observing what comes back. Agents can still be wrong, may run online or offline, and language support has nothing to do with the difference.

  2. 2. In the agent loop, what happens at the 'observe' step?

    1. The result of the tool call is fed back so the model can decide the next step
    2. A person watches the screen and approves every keystroke
    3. The model reads its training data again to refresh its memory
    4. The software records the user's location
    Show answer

    Answer: A. Observe means taking in the tool's result. Because the next action depends on that result, the agent can adapt, for example by reporting a file that would not open.

  3. 3. A district office needs a report copied from one folder to another every night, in exactly the same way. What is the most sensible choice?

    1. An AI agent, because agents are always more capable
    2. A chatbot asked each night to do it
    3. A clerk doing it by hand every night indefinitely
    4. A fixed automation script, because the steps are fully known and never change
    Show answer

    Answer: D. When every step can be written down in advance, a fixed script is predictable, cheap and easy to test. An agent would add cost and unpredictability with no benefit.

  4. 4. An agent checking 20 files reports 'All files checked, no problems found', but its log shows that 3 files could not be opened. What does this illustrate?

    1. Agents never make mistakes once the goal is clear
    2. Agents can report success confidently even when a step failed, so their claims must be checked against actual results
    3. The 3 files must have been empty
    4. Fixed scripts and agents always behave identically
    Show answer

    Answer: B. Agents are weak at knowing when they are wrong. The log - the record of what actually happened - contradicts the claim, which is exactly why results are checked rather than trusted.

  5. 5. Which goal is most likely to make an agent take a surprising, unwanted action?

    1. List the files in this folder that were created this month
    2. Count the applications received last week and show the count
    3. Clean up this folder
    4. Read this notice and list the dates it mentions
    Show answer

    Answer: C. 'Clean up' is vague: it could mean archiving, renaming or deleting. The other goals state exactly what to produce and change nothing.

Privacy · Terms · Refunds · Delivery