Week 1 of 6 · Foundations

AI Foundations: From Automation to Agents

What separates an AI agent from a chatbot or a script, how every agent runs the same Think → Act → Observe loop, and why someone is always accountable for what it does.

75–90 min No-code lab Developer notebook Quiz + portfolio
Your progress

Progress is saved in this browser only.

By the end of this week you can

  • Place automation, machine learning, generative AI, and agents on one map
  • Tell a tool, a workflow, and an agent apart with one question
  • Trace a real agent's Think → Act → Observe loop step by step
  • Name an agent's five parts and choose a sensible level of autonomy

Part 1

The AI family, in one picture

"AI" gets used for everything, so start with precise terms. They nest inside each other:

Artificial intelligence tasks we'd call intelligent: rules, search, prediction Machine learning behaviour learned from data Deep learning → Generative AI neural networks that create text, images, code Agents = GenAI + tools + loop
Not every AI is generative, and not every generative AI is an agent.

A rule that emails a reminder every Friday is automation. A spam filter that learned from millions of examples is machine learning. A chatbot that drafts an essay is generative AI. A system that takes a goal, decides its own steps, uses tools, checks results, and keeps going is an agent.

Part 2

Tool, workflow, or agent? One question decides

The test

Who decides what happens next? Nobody (it answers once and stops) → a tool. The developer, in advance → a workflow. The AI itself, as it goes → an agent.

Tool / chatbotWorkflowAgent
Who picks the steps?No stepsThe developerThe AI, at run time
Takes actions?RarelyYes, in a fixed orderYes, chosen as it goes
Adapts to results?NoOnly planned branchesYes
Example"What's the capital of Kenya?"Every new form is summarised and emailed to a teacher"Find out why club sign-ups dropped and draft a plan"

Workflows are predictable and cheap; agents are flexible but cost more and are harder to test. Good builders use the simplest option that works.

Interactive

Sort these six systems

Pick tool, workflow, or agent for each. Explanations appear as you answer.

Part 3

The loop every agent runs

THINKreason about the goal ACTuse a tool OBSERVEread the result repeat until the goal is met — or a step, time, or cost limit is reached

Here is a real trace of an agent asked to plan a study schedule:

# Goal: plan 3 days of study before Friday's biology test THINK I need the test date and the student's weak topics. ACT calendar.find("biology test") OBSERVE Friday 9:00 — 3 days left. THINK Check recent quiz scores to find weak topics. ACT notes.search("quiz scores") OBSERVE genetics 55%, cell transport 62%, ecology 88%. ANSWER Day 1 genetics · Day 2 cell transport · Day 3 mixed practice. Add to calendar? [needs your approval]

Notice the last step: adding to your calendar changes something outside the conversation, so a well-designed agent asks first.

Part 4

Five parts of every agent

BrainModel

The language model that reasons and decides the next step.

Job descriptionInstructions

The system prompt: role, goal, rules, boundaries.

HandsTools

Search, calculators, calendars, databases, email — ways to act.

NotebookMemory

What it can see now, plus what it saved from before.

ManagerOrchestration

The code that runs the loop, enforces limits, and asks for approval.

Key ideaThe model proposes

Only the orchestration code actually runs a tool — that's where safety lives.

Autonomy is a dial, not a switch

LevelWhat it doesExample
1 · AssistantSuggests; you do everythingAutocomplete in a document
2 · CopilotDrafts actions; you approve each oneDrafts an email you review and send
3 · Supervised agentActs alone on low-risk steps, asks before risky onesBooks a study slot, asks before inviting others
4 · Autonomous agentWorks end to end inside set boundaries, monitoredTidies your files every night, with a log

Lab A · No code

Watch a real agent work

No-code lab · 25 min

Trace an AI assistant's loop on a real task

Use any AI assistant that can search the web and shows its steps — for example ChatGPT with search, Gemini, Perplexity, or Claude with web search. Use the one your school or workplace allows.

Free tier is fineBrowser onlyEvidence: 1 screenshot + your trace
  1. Ask a one-shot question

    Type: What is the capital of Kenya? Notice it answers once and stops — tool behaviour.

  2. Give it a goal instead

    Paste the goal below. Open any "searching" or "thinking" panel it shows.

    Plan a 3-day study schedule for a biology test next Friday on cell transport and genetics. Find two reliable sources to study from, and list each source with its link.
    Expect: several searches, pages opened, and a plan with links — multiple steps chosen by the AI.
  3. Write the trace

    For each step you can see, note THINK (what it was trying to find), ACT (what it searched or opened), OBSERVE (what it learned). Use the activity form below.

  4. Verify one claim

    Open one of its links. Does the page actually support what the assistant said? Note any mismatch.

  5. Find the approval point

    Ask: Add this plan to my calendar and invite my study group. Does it ask first, refuse, or do it? Which of those is right, and why?

Evidence for your portfolioA screenshot of the assistant's steps, your THINK/ACT/OBSERVE trace, and your answer to step 5.

Lab B · For developers

Build the agent loop in Python

Jupyter notebook · 75–90 min

Agent Fundamentals: from API call to agent loop

Write the tool-calling loop from scratch with real weather and Wikipedia APIs, measure agent vs workflow cost, then rebuild it in Pydantic AI and the OpenAI Agents SDK.

  1. Metered model calls: tokens, latency, cost
  2. Hand-written tool schemas and the loop in ~40 lines
  3. Typed output, usage limits, approval-gated tools
  4. Exercises with automatic checks
Open in Colab → View on GitHub

Needs Python and your own OpenAI or Anthropic API key (about US$0.05 for this lab). Start with the environment check.

Responsible AI

Who owns this agent's decisions?

When an agent gets something wrong, "the AI did it" is never the answer. Responsibility sits with people: whoever built it, whoever deployed it, and whoever relied on its output. That's why good agents ask before actions that can't be undone or that affect other people.

The apps you map in this week's activity also collect data about you to make their decisions. Look at what they collect — you usually have a say in it.

Portfolio activity · The Agent Hunt

Map an agent you use

Choose the assistant from Lab A, or any "smart" product you use (recommendations, navigation, a tutoring app). Map its loop.

Key terms

AgentSoftware that pursues a goal over several steps, choosing its own next action.
WorkflowSteps fixed in advance by a developer, even if AI is used inside them.
ToolA function an agent can call to get information or take an action.
AutonomyHow much an agent decides on its own — a dial, not a switch.
OrchestrationThe code that runs the loop, enforces limits, and asks for approval.
AccountabilityThe people responsible for an AI system's outcomes.

Go further

Up next · Week 2

Generative AI & LLMs

How models predict text, why they hallucinate, and how to prompt them well.

Take the Week 1 quizStart Week 2 →