Revision notes

AI Agents & Automation: Practice

The key points, rules to remember, tables and diagrams from all 5 lessons, on one page for quick revision. To keep a copy, use your browser's Print and choose "Save as PDF".

Lesson 1

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

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

  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.
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

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.

Read the full lesson

Lesson 2

Tools and APIs: how an agent reaches other software

An API call

  • Request
    • The endpoint, such as /notices
    • A method: GET to read, POST to create, PUT to change, DELETE to remove
    • Any details needed
  • Response
    • A status code: 200 success, 404 not found, 401 not authorised
    • The data

{"tests": [{"id": 31, "subject": "Reasoning", "date": "2026-11-02", "seats": 12}, {"id": 32, "subject": "English", "date": "2026-11-09", "seats": 0}]}

— Illustrative response from a fictional booking system

How a model uses a tool

  1. Tool descriptions The developer gives each tool's name, purpose and inputs.
  2. A user states a goal
  3. The model requests a tool call It does not call anything itself.
  4. The software checks and runs it It runs the real API request and passes the result back.
  5. The model reads the result It asks for another tool or writes its final answer.
Two kinds of tools
KindWhat it doesExamplesRisk
Read-onlyLooks at data without changing anythingSearch notices, read a file, list upcoming testsLower: the worst case is a wrong reading or exposed data
WriteCreates, changes, sends or deletes somethingBook a seat, send an email, make a payment, delete a recordHigher: effects reach the real world and may be impossible to undo

The model proposes a tool call; the software checks it, runs it with keys the model never sees, and returns the result.

Key takeaways: an API is a request to an endpoint that returns a status code and data, often as JSON. A model is told which tools exist and asks for calls; the software decides whether to run them. Read-only tools can run freely; write tools need limits and often a person's confirmation. Keys live with the software, never in a prompt.

Read the full lesson

Lesson 3

Workflows and memory: fixed steps, open-ended agents and what they remember

Fixed workflow and open-ended agent

  • Fixed workflow
    • The developer writes the order of steps in advance
    • A model may do one step but does not choose what happens next
    • Predictable, cheaper and easier to test
  • Open-ended agent
    • The model decides the order of steps and which tools to use
    • Flexible
    • Harder to control

Long-term memory and retrieval

  1. Save notes To a file or database.
  2. Search the store When a later task needs them, by keywords or embeddings.
  3. Bring back the relevant few Only those entries go into the context window.
Two kinds of agent memory
MemoryWhere it livesHow long it lastsExample
Short-termThe context windowThe current task onlyTool results from the last few steps
Long-termA file or database, searched when neededUntil updated or deletedApproved reply templates; earlier decisions

Short-term memory = what fits in the context window now. Long-term memory = stored notes, searched and brought back only when relevant (retrieval).

Key takeaways: fix the route where you can and let the model judge only where needed; use branches for decisions and limited retries for temporary failures. Short-term memory is the context window and fills up; long-term memory is a searched store whose notes need sources, dates, expiry and strict privacy.

Read the full lesson

Lesson 4

Human approval and safety: keeping a person in charge of an agent

Actions that need a person's approval

  • Irreversible
    • Deleting records
    • Making payments
  • Outward-facing
    • Emails, SMS or posts in the office's name
  • High-impact
    • Changing someone's account, marks or entitlements
Where approval belongs
ActionApproval needed?Why
Searching notices or reading a fileNot usuallyRead-only; nothing changes
Saving a draft reply that nobody else seesNot usuallyNothing leaves the office
Sending the replyYesOutward-facing; it cannot be unsent
Paying a supplierYes, often by two peopleMoney is hard to recover
Deleting a fileYes - or better, do not allow it and archive insteadIrreversible

Going live safely

  1. Dummy data A copy of the register with made-up names, delivering to a test inbox.
  2. Several clean runs Right students selected, approval step waited for, logs match.
  3. A small real group Say 20 students.
  4. Everyone

Read freely, act carefully: a person approves anything irreversible or outward-facing, and text the agent reads is data, never instructions.

Key takeaways: approval belongs before irreversible, outward or high-impact actions and should show the real action. Least privilege and a separate account limit damage; logs make the work auditable. Prompt injection is defeated by design - text read is data - not by hoping the model notices. Test on dummy data before real people.

Read the full lesson

Lesson 5

A simple agent workflow end to end: watch, summarise, draft, approve, send

The recruitment-notice workflow

  1. Watch Read-only fetch of the saved official page.
  2. Detect A plain script finds notices not seen before.
  3. Summarise The model, with every date beside its quoted line.
  4. Draft Saved, not sent.
  5. A person approves Approve, edit or reject.
  6. Send Only to students who opted in.
Every step is logged.
The notice-reminder workflow
StepWhat happensToolKindWhat is logged
1Check the saved official page on a schedulefetchPageRead-onlyTime, address, whether the page changed
2Find notices not seen beforeComparison with the stored copy (plain script)Read-onlyNew links found
3Read and summarise each new noticereadDocument, then the modelRead-onlyNotice address, summary, quoted lines
4Draft a reminderThe model, then saveDraftWrite, internal onlyDraft text
5Wait for a personApproval queueNone until a decisionWho approved, edited or rejected, and when
6Send to students who opted insendMessageWrite, outwardTime, number of recipients, delivery failures

The approval queue

  • What the teacher sees
    • The original notice
    • The summary with its quoted lines
    • The draft
    • The recipient group
  • What the teacher can do
    • Approve
    • Edit
    • Reject
Nothing leaves the centre until a person says yes.

Watch (read) -> detect (script) -> summarise (model, with quoted lines) -> draft (saved, not sent) -> a person approves -> send -> log every step.

Key takeaways: the safe design uses a script for fixed jobs, the model only for reading and drafting, read-only tools until the very end, and one clear approval point before anything goes out. Every step is logged, every date is checked against the notice, and students are always sent to the official source.

Read the full lesson

Privacy · Terms · Refunds · Delivery