Skip to main content
GACS will never ask for your seed phrase, private keys, or payment. free and ad-free.
AI Agents MasteryModule 1 / 12
AAM · Module 1Free preview

Foundations of AI Agents

What an AI agent really is, the formal sense/think/act loop, where chatbots end and agents begin, the five anatomical components every production agent has, and the lifecycle that governs how a single goal is born, pursued, and retired.

Textbook · diploma-level · ~4,600 words

You're reading Module 1 free. Unlock the full 12-module diploma, the final exam, and a verifiable certificate for $499.

Log in to enroll

Instructor video

Module 1 — Foundations of AI Agents (Instructor Lecture) · ~14 minutes

Read the full script
  1. [00:00] Open on a single sentence on screen: 'An agent is a goal-directed loop.' I'm going to spend the next fourteen minutes unpacking those five words, because if you internalize them this week, the other eleven modules are going to feel obvious.
  2. [01:00] The reason this matters right now, in 2026, is that three things finally lined up: models that emit structured tool calls reliably, context windows big enough to hold real working memory, and an ecosystem of vector stores, browser tools, and code sandboxes that means an LLM can actually touch the world without a custom integration per task. None of that was true four years ago.
  3. [02:30] Let's draw the four-cornered grid on the whiteboard: chatbot, workflow, copilot, agent. Reactive vs goal-directed on one axis, human-driven vs machine-driven on the other. An agent is the bottom-right cell: goal-directed and machine-driven. The test I want you to remember is the flowchart test — if you can draw the control flow before the run, it's a workflow.
  4. [04:15] Now the five anatomical components. System prompt, memory, tools, reasoning loop, execution environment. I'm going to pull up the smol-agents source and point at exactly where each of those five lives in real code, because the point of this module is to make these words concrete, not abstract.
  5. [06:30] Sense, think, act, observe. This loop is older than transformers — it comes from classical AI and from control theory. Modern frameworks dress it up but it's always the same four steps. The one move that made it work for LLMs is ReAct: forcing the model to write a thought line before it commits to an action.
  6. [08:30] Tool design. I want to land this hard: the most common production bug in agent systems is not a model failure, it's a tool-schema failure. Vague names, missing enums, errors that say 'something went wrong'. We're going to do a tool review exercise in Module 6 where we redesign a real-world tool surface from scratch.
  7. [10:00] Budgets and guardrails. Every production agent needs four budgets — steps, time, tokens, dollars — and any one hitting zero terminates the run with a structured reason code. If your agent can run forever, you have not built a production agent, you have built a credit-card fire.
  8. [11:30] When NOT to build an agent. Workflows are cheaper, faster, and more predictable. The honest test is: enumerate the runtime decisions. Zero or one, write a function. Variable and dependent on intermediate results, build an agent. The hype is real but the bill is also real.
  9. [12:45] What you're going to walk out of this diploma with. A ReAct loop you wrote from scratch, a three-tier memory system, an evals harness with golden traces, a deployment pipeline with observability, and a capstone artifact on the GACS portfolio. By Module 12 you will have shipped one.
  10. [13:45] Homework before Module 2: do the five workbook exercises and pay particular attention to 1.2 — map the five components in real source code. Reading source is the fastest way to make the vocabulary stick. See you in the next lecture.
Why this matters

Companies are spending $1M+ on agent platforms that turn out to be glorified chatbots — because the buyer couldn't tell the difference. Once you can apply the 'enumerate the runtime decisions' test from this module, you'll spot agent hype from a mile away and only build the kind that earn their cost.

Preview the 14 key terms used in this module
Agent
Goal-directed software system that loops through perception, reasoning, and tool-mediated action until the goal is met or a budget is exhausted.
Sense / Think / Act / Observe loop
The four-step control cycle every agent runs; one full pass is called a 'step' or 'iteration'.
ReAct
Prompting pattern that interleaves Thought, Action, and Observation lines so the model commits to a reason before each tool call.
Tool
Typed function the agent can invoke; has a name, JSON-schema arguments, and a deterministic side effect.
System prompt
Durable instruction that defines the agent's role, constraints, tools, and termination conditions.
Working memory
Short-term scratchpad inside the current prompt — the chat history and intermediate tool results.
Episodic memory
Durable record of past runs indexed by user/session/task, used to recall prior outcomes.
Semantic memory
Durable domain knowledge (docs, schemas, policies) typically retrieved via vector search.
Planner / Executor split
Architecture where one LLM call produces a written plan and a second loop executes it.
Budget
Hard upper bound on steps, wall-clock time, tokens, or dollars; exhausting any budget terminates the run.
Guardrail
Rule that halts or redirects the agent on policy violations, low confidence, or risky actions.
Trace
Structured log of every loop iteration — thought, action, arguments, observation, latency, cost — used for debugging and evals.
Workflow vs agent
A workflow's control flow is fixed before runtime; an agent's control flow is decided at runtime by the model.
Termination reason
Structured code returned by the loop on exit: success, budget_exhausted, guardrail_tripped, error, human_handoff.

1.1 What Is an AI Agent — A Working Definition

An AI agent is a software system that pursues a goal autonomously by repeatedly perceiving its environment, reasoning about what to do, taking actions through tools, and updating its understanding from the results. The phrase that matters is 'pursues a goal' — agents are goal-directed, not turn-directed. A chatbot exists to answer the user's next message. An agent exists to close the gap between a current state and a desired state, and it will take as many model calls and tool calls as needed to do so, within the budgets you give it.

This definition has four moving parts, and each one is load-bearing. (1) Autonomously — the agent decides its own next step without per-step human approval. (2) Perceiving — the agent reads from the world: an inbox, a database, a sensor, a previous tool result. (3) Reasoning — the agent uses an LLM (or another policy) to choose what to do next. (4) Acting through tools — the agent emits structured calls into the world: HTTP requests, function calls, SQL, shell commands, code execution. Strip any one of these out and what remains is something simpler: a pipeline, a chatbot, a script, a workflow.

1.2 Why the Industry Suddenly Cares

Three forces converged in 2023–2025 to make agents practical. First, frontier LLMs crossed a reliability threshold for structured tool use: function calling, JSON mode, and constrained decoding mean a model can emit a tool invocation that actually parses and executes the first time, most of the time. Second, context windows grew from 4k–8k tokens to 128k–2M, enough to hold a meaningful working memory in-prompt. Third, the surrounding ecosystem matured: vector databases, browser-control APIs, sandboxed code execution, and standardized protocols (OpenAI tools, Anthropic tool use, MCP) made it possible to wire an LLM into the real world without a custom integration per tool.

The consequence is that work that used to require a human in the loop — triaging support tickets, reconciling invoices, investigating an alert, drafting and shipping a PR — can now be delegated to an agent, end to end, with the human reviewing outcomes rather than steps.

1.3 Agent vs Chatbot vs Workflow vs Copilot

These four words get used interchangeably and they shouldn't be. A chatbot is reactive and turn-based: user speaks, model answers, conversation ends. A workflow is a fixed graph of steps written by a developer: 'fetch → classify → route → respond' in a hard-coded order. A copilot suggests and asks; the human still drives. An agent is the only one of the four that decides its own next step at runtime based on what it just observed.

The practical test: if you can draw the full control flow as a flowchart before the system runs, it's a workflow, not an agent. If the control flow only becomes visible after the run by tracing the model's decisions, it's an agent. Most production 'agents' in the wild are actually workflows with an LLM somewhere inside, which is fine — but be honest about what you've built, because the failure modes are different.

1.4 The Five Anatomical Components

Every production agent, regardless of framework, exposes the same five components. (1) System prompt — the durable instruction that defines role, constraints, tools available, and termination conditions. (2) Memory — short-term working memory (the chat/scratchpad), long-term episodic memory (past runs), and semantic memory (vector store of domain knowledge). (3) Tools — the typed interface to the world: each tool has a name, a JSON schema for arguments, and a deterministic side effect. (4) Reasoning loop — the controller that calls the LLM, parses its output, dispatches tools, and decides whether to continue or stop. (5) Execution environment — the runtime that owns budgets, timeouts, sandboxing, logging, and tracing.

If any of these five is missing, your agent will fail in a predictable way. No system prompt → drift. No memory → amnesia between steps. No tools → it can talk but not act. No reasoning loop → it can act once but not adapt. No execution environment → it works in dev and explodes in prod.

1.5 The Sense → Think → Act → Observe Loop (Formal)

The agent loop is older than LLMs — it comes from the BDI (Belief-Desire-Intention) tradition in classical AI and from control theory. In its modern form: (1) Sense — gather the current observation: the user's new message, the last tool result, an external event. (2) Think — invoke the policy (the LLM) with the system prompt + memory + observation to produce a thought and an action. (3) Act — dispatch the chosen tool with the chosen arguments. (4) Observe — capture the tool's result, errors, and side effects, and append it to memory. Then return to step 1.

The loop terminates when one of three things happens: the model emits a 'finish' action with a final answer; a budget (time, tokens, dollars, steps) is exhausted; or a guardrail trips (policy violation, dangerous action, low-confidence threshold). A well-engineered loop logs every iteration with enough detail that you can replay the entire run from the trace alone.

1.6 ReAct: The Pattern That Made Agents Work

ReAct (Yao et al., 2022) is the prompting pattern that took agents from research demo to production. The model is asked to interleave Thought, Action, and Observation lines: 'Thought: I need yesterday's revenue. Action: query_db({sql: ...}). Observation: 12,431.' The thought line is critical — it forces the model to commit to a reason before it acts, which dramatically reduces tool-call hallucination and makes traces auditable.

In modern frameworks (LangGraph, OpenAI Assistants, Anthropic tool use), the thought is often hidden in the model's reasoning tokens rather than printed, but the structure is the same. When you debug a misbehaving agent, the first thing you read is the thought log: if the thoughts are reasonable and the actions don't match them, your tool schemas are wrong; if the thoughts are nonsense, your system prompt or context is wrong.

1.7 Goals, Subgoals, and the Planning Hierarchy

A goal is a measurable target state — 'the user's invoice is sent, marked paid in Stripe, and logged in the GL'. Real goals decompose into subgoals: fetch invoice, charge card, write ledger entry, email receipt. Agents handle this in one of three ways. (1) Implicit decomposition — the model figures out subgoals on the fly each loop iteration (fast, fragile). (2) Explicit planner — a separate LLM call produces a written plan first, then the executor follows it (slower, more controllable). (3) Hierarchical agents — a manager agent owns the goal and dispatches worker agents per subgoal (powerful, expensive, hard to debug).

For your first ten production agents, use the explicit planner pattern. The plan becomes an artifact you can show to the user for approval before any side effects happen, which is half the safety story.

1.8 The Tool Boundary Is the Most Important Boundary

Everything an agent does in the real world flows through tools, so the design of your tool surface determines almost everything about how your agent behaves. Three rules to internalize on day one. (1) Tools should be small and orthogonal — one tool per capability, not one mega-tool that takes a 'mode' parameter. (2) Tool schemas should be self-documenting — names, descriptions, and field descriptions are part of the prompt the model reads; vague names produce vague calls. (3) Tools should fail loudly and structurally — a tool that returns 'error: something went wrong' teaches the model nothing; a tool that returns `{error: 'not_found', resource: 'invoice_42'}` lets the model recover.

The most common production bug in agent systems is not a model failure, it is a tool-schema failure: an optional field the model keeps omitting, an enum the model keeps misspelling, a result shape the model can't parse. Spend more time on tool design than on prompt engineering.

1.9 Memory: The Difference Between a Demo and a System

A demo agent uses only the in-context chat history. A production agent has at least three memory tiers. (1) Working memory — the current loop's scratchpad, ephemeral, lives in the prompt. (2) Episodic memory — past runs, indexed by user/session/task, used to recall 'last time we ran this, the API returned X'. (3) Semantic memory — durable domain knowledge (your docs, your schemas, your policies) usually backed by a vector store and surfaced by retrieval.

The failure mode of skipping memory tiers is unmistakable: the agent re-asks questions you already answered, re-runs queries that already failed, re-discovers the same policy violation. Memory is what turns an agent from a goldfish into a colleague, and it is covered in depth in Module 3.

1.10 The Agent Lifecycle, Phase by Phase

A single agent run moves through six phases and you should be able to name all six in your sleep. (1) Initialization — load system prompt, hydrate memory, validate tool availability. (2) Goal interpretation — parse the user request into an internal goal representation. (3) Planning — produce an explicit or implicit plan. (4) Execution — run the sense/think/act loop against the plan. (5) Evaluation — score the outcome against the goal (did we succeed? partially? not at all?). (6) Termination — emit the final response, persist the trace, release resources.

Production systems wrap this lifecycle in a job runner with retries, idempotency keys, dead-letter queues, and human-handoff hooks. Treating the lifecycle as a first-class object — not just 'the function we called' — is what makes agent systems operable.

1.11 Budgets, Guardrails, and Termination

Unbounded loops are the original sin of agent engineering. Every production agent must declare, at construction time, four budgets: max steps (e.g. 25), max wall-clock time (e.g. 5 min), max tokens (e.g. 200k), max dollars (e.g. $1). Each loop iteration decrements all four, and any one hitting zero terminates the run with a clear reason code.

Guardrails are the second termination class: policy violations (the model tried to call a forbidden tool), confidence floors (the model said 'I'm not sure' three times in a row), and human-in-the-loop triggers (the proposed action exceeds a risk threshold). A well-engineered agent terminates loudly with a structured reason, never silently or by running out of tokens mid-thought.

1.12 When NOT to Build an Agent

Agents are expensive, slow, and non-deterministic. If your task has a fixed sequence of steps, write a workflow. If your task is a single transformation, write a function. If your task is a question-and-answer, write a RAG chatbot. The honest test: enumerate the runtime decisions your task requires. If the count is zero or one, you do not need an agent. If the count is variable and depends on intermediate results you can't see ahead of time, you do.

The second test is value-per-decision. Agents shine when each runtime decision saves significant human time — a triage decision, an investigation step, a refactor choice. Agents waste money when the decisions are trivial and the LLM markup over a hand-written switch statement is pure cost.

1.13 Failure Modes You Will See in Your First Week

Six failure modes account for ~80% of early agent bugs. (1) Tool-call loops — the agent calls the same tool with the same arguments forever; fix with progress tracking and step budgets. (2) Argument hallucination — the agent invents fields the tool doesn't accept; fix with strict JSON schemas and a re-prompt on parse failure. (3) Context overflow — memory grows until the prompt exceeds the window; fix with summarization and sliding windows (Module 3). (4) Premature termination — the agent says 'done' before the goal is met; fix with explicit success criteria in the system prompt. (5) Silent drift — the agent slowly forgets the goal across long runs; fix with periodic goal re-injection. (6) Sycophancy — the agent agrees with bad user instructions; fix with constitution-style constraints (Module 7).

Log every loop iteration with its thought, action, observation, and budget state. Half of debugging an agent is being able to scroll back through a clean trace.

1.14 What You Will Build in This Diploma

By the end of Module 12 you will have built, evaluated, deployed, and operated a production-grade agent of your own choosing. Along the way you will have written: a ReAct loop from scratch (Module 2), a three-tier memory system (Module 3), a tool registry with strict schemas (Module 6), an eval harness with golden traces (Module 8), a deployment pipeline with observability (Modules 9–10), and a capstone artifact you can publish to the GACS portfolio.

This module's job was to give you the vocabulary: agent, loop, tool, memory, lifecycle, budget, guardrail. Internalize these twelve words. Every later module sits on top of them.

Minimal ReAct loop from scratch
A 40-line ReAct loop with one tool, explicit budget, and structured termination. Read this twice — every later module elaborates on it.
python
import json, time
from openai import OpenAI

client = OpenAI()

TOOLS = {
    "get_weather": lambda city: {"temp_c": 18, "city": city},
}

SYSTEM = """You are a weather agent. Loop: think, then either call a tool
or emit FINAL. Always respond as JSON: {"thought": str, "action": str,
"args": object} where action is a tool name or "FINAL"."""

def run(goal: str, max_steps: int = 6, max_seconds: int = 30):
    messages = [{"role": "system", "content": SYSTEM},
                {"role": "user", "content": goal}]
    started = time.time()
    for step in range(max_steps):
        if time.time() - started > max_seconds:
            return {"status": "budget_exhausted", "reason": "time"}
        resp = client.chat.completions.create(
            model="gpt-4o-mini", messages=messages,
            response_format={"type": "json_object"})
        out = json.loads(resp.choices[0].message.content)
        messages.append({"role": "assistant", "content": json.dumps(out)})
        if out["action"] == "FINAL":
            return {"status": "success", "answer": out.get("args", {})}
        tool = TOOLS.get(out["action"])
        if not tool:
            obs = {"error": "unknown_tool", "name": out["action"]}
        else:
            obs = tool(**out["args"])
        messages.append({"role": "user",
                         "content": f"Observation: {json.dumps(obs)}"})
    return {"status": "budget_exhausted", "reason": "steps"}

print(run("What is the weather in Paris right now?"))
Tool schema with self-documenting fields
The JSON Schema the model actually reads. Field descriptions are part of the prompt — vague descriptions produce vague calls.
json
{
  "name": "query_invoices",
  "description": "Search invoices in the billing system. Use this when the user asks about a specific invoice, payment status, or overdue amounts.",
  "parameters": {
    "type": "object",
    "required": ["customer_id"],
    "properties": {
      "customer_id": {
        "type": "string",
        "description": "Stripe customer ID, format cus_XXXX. NOT the email."
      },
      "status": {
        "type": "string",
        "enum": ["draft", "open", "paid", "void", "uncollectible"],
        "description": "Filter by invoice status. Omit to return all statuses."
      },
      "limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}
    }
  }
}
Structured termination reason
Every production agent should return a discriminated union, not a string. This is the shape your job runner, your eval harness, and your dashboard will all consume.
typescript
export type AgentResult =
  | { status: "success"; answer: unknown; steps: number; cost_usd: number; trace_id: string }
  | { status: "budget_exhausted"; budget: "steps" | "time" | "tokens" | "dollars"; partial?: unknown; trace_id: string }
  | { status: "guardrail_tripped"; rule: string; details: unknown; trace_id: string }
  | { status: "human_handoff"; reason: string; context: unknown; trace_id: string }
  | { status: "error"; error: { code: string; message: string }; trace_id: string };
Trace event you should log every iteration
Half of debugging an agent is scrolling a clean trace. Log this object once per loop step.
json
{
  "trace_id": "run_01HZ...",
  "step": 3,
  "thought": "I need yesterday's revenue to answer the question.",
  "action": "query_db",
  "args": {"sql": "SELECT SUM(amount) FROM orders WHERE day = '2026-05-27'"},
  "observation": {"rows": [{"sum": 12431}], "latency_ms": 84},
  "budgets_remaining": {"steps": 22, "tokens": 184213, "dollars": 0.94},
  "ts": "2026-05-28T09:14:22.118Z"
}
Budget guard you should put around every loop
Tiny class. Saves you from runaway runs every single time.
python
from dataclasses import dataclass
import time

@dataclass
class Budget:
    max_steps: int = 25
    max_seconds: float = 300
    max_tokens: int = 200_000
    max_dollars: float = 1.00
    used_steps: int = 0
    used_tokens: int = 0
    used_dollars: float = 0.0
    started_at: float = 0.0
    def tick(self, tokens: int, dollars: float) -> str | None:
        self.used_steps += 1
        self.used_tokens += tokens
        self.used_dollars += dollars
        if self.used_steps > self.max_steps: return "steps"
        if time.time() - self.started_at > self.max_seconds: return "time"
        if self.used_tokens > self.max_tokens: return "tokens"
        if self.used_dollars > self.max_dollars: return "dollars"
        return None

Workbook · hands-on exercises

Build the artifact, then self-check against the expected output.

  1. 1
    Exercise 1.1 — Classify five real systems

    Task — Pick five software products you use weekly (e.g. Gmail Smart Compose, GitHub Copilot, Stripe billing automation, a customer-support widget, a recommendation feed). For each, decide whether it is a chatbot, a workflow, a copilot, or an agent, and justify the call in two sentences using the section 1.3 test.

    Expected output — A markdown table with columns: product | category | runtime decisions count | justification.

    Hint: If you cannot draw the full control flow ahead of time, it is an agent. Otherwise it is one of the other three.

  2. 2
    Exercise 1.2 — Map the five anatomical components

    Task — Pick one open-source agent (suggested: smol-agents, OpenAI swarm sample, LangGraph quickstart). Read its source long enough to point at the file/line where each of the five components (system prompt, memory, tools, reasoning loop, execution environment) lives.

    Expected output — A 5-row table: component | file:line | one-sentence summary of what's there.

    Hint: Start at the entry point and follow the function that runs the loop. The system prompt is usually a constant near the top.

  3. 3
    Exercise 1.3 — Implement the budget guard

    Task — Take the Budget class from Code Example 5 and wire it into the minimal ReAct loop in Code Example 1. Force three different terminations by deliberately tuning the budgets: one by steps, one by time, one by dollars (mock the cost).

    Expected output — Three trace logs, one per termination class, each ending in a structured AgentResult with the right status and budget field.

    Hint: You'll need to mock the cost since the example doesn't track real token usage. Add it to the loop where you'd compute it from the response object.

  4. 4
    Exercise 1.4 — Trace a known failure mode

    Task — Modify the minimal loop so it deliberately exhibits one of the six failure modes from section 1.13 (tool-call loop is easiest: make the tool always return the same observation). Capture the trace and write one paragraph explaining how you would detect this failure in production without reading the trace by hand.

    Expected output — A trace file and a short detection-strategy note (e.g. 'same args N times in a row → trip').

    Hint: Detection ideas: argument-hash repetition, no change in observed state, monotonic step count without budget delta.

  5. 5
    Exercise 1.5 — Write your own definition

    Task — After reading the module, write a 75–125 word definition of 'AI agent' in your own words, suitable for explaining to a senior engineer who has built backend systems for ten years but never touched an LLM. Include at least: goal-directed behavior, the loop, tools, and a budget/guardrail.

    Expected output — 75–125 word paragraph.

    Hint: Lead with the goal-directed framing. The loop is the mechanism. Tools are the interface to the world. Budgets are how you keep your job.

Glossary

Agent
Goal-directed software system that loops through perception, reasoning, and tool-mediated action until the goal is met or a budget is exhausted.
Sense / Think / Act / Observe loop
The four-step control cycle every agent runs; one full pass is called a 'step' or 'iteration'.
ReAct
Prompting pattern that interleaves Thought, Action, and Observation lines so the model commits to a reason before each tool call.
Tool
Typed function the agent can invoke; has a name, JSON-schema arguments, and a deterministic side effect.
System prompt
Durable instruction that defines the agent's role, constraints, tools, and termination conditions.
Working memory
Short-term scratchpad inside the current prompt — the chat history and intermediate tool results.
Episodic memory
Durable record of past runs indexed by user/session/task, used to recall prior outcomes.
Semantic memory
Durable domain knowledge (docs, schemas, policies) typically retrieved via vector search.
Planner / Executor split
Architecture where one LLM call produces a written plan and a second loop executes it.
Budget
Hard upper bound on steps, wall-clock time, tokens, or dollars; exhausting any budget terminates the run.
Guardrail
Rule that halts or redirects the agent on policy violations, low confidence, or risky actions.
Trace
Structured log of every loop iteration — thought, action, arguments, observation, latency, cost — used for debugging and evals.
Workflow vs agent
A workflow's control flow is fixed before runtime; an agent's control flow is decided at runtime by the model.
Termination reason
Structured code returned by the loop on exit: success, budget_exhausted, guardrail_tripped, error, human_handoff.

Further reading

  • ReAct: Synergizing Reasoning and Acting in Language Models (Yao et al., 2022) — The foundational paper for the Thought/Action/Observation interleaving pattern.
  • Anthropic — Building Effective Agents (engineering blog, 2024) — Pragmatic taxonomy of agent patterns: prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer.
  • OpenAI — Practices for Governing Agentic AI Systems (2023) — Operational safety controls that apply directly to budgets, guardrails, and termination.
  • Russell & Norvig — Artificial Intelligence: A Modern Approach (Ch. 2, Intelligent Agents) — The classical foundation: PEAS framework, agent types, environment properties. Still the cleanest taxonomy in print.
  • LangGraph documentation — Agentic Patterns guide — Concrete framework-level implementations of the planner/executor and multi-agent patterns introduced in this module.

Instructor notes

  • Spend extra time on section 1.3 (agent vs workflow). Almost every student who later struggles with Module 5 (multi-agent) is a student who never got the workflow/agent distinction clean in Module 1.
  • Encourage students to literally write the four budgets (steps, time, tokens, dollars) on a sticky note above their monitor. It sounds silly. It cuts production incidents by half.
  • If a student asks 'should I use LangGraph or build the loop myself?' — the answer in this diploma is build it yourself first. Module 2 has them implement ReAct from scratch in ~80 lines. Framework choice is a Module 11 conversation.
  • When grading Exercise 1.5, look for the four load-bearing words: goal-directed, loop, tools, budget/guardrail. Students who omit budget/guardrail have a half-formed mental model and will write unsafe agents in their capstone.

Student workbook

  • Read sections 1.1–1.7 today; sections 1.8–1.14 tomorrow. Trying to swallow this module in one sitting is the most common reason students fall behind.
  • After each section, write one sentence in your own words. If you can't, re-read the section. Sections you can't summarize are sections you haven't actually learned.
  • Watch the instructor video twice. Once before the workbook exercises, once after. The second pass will land differently.
  • Do Exercise 1.2 (map the five components in real source) even if it feels tedious. Every later module assumes you've read at least one real agent end-to-end.
  • Before you start Module 2, you should be able to recite, without looking: the four loop steps, the five anatomical components, the six lifecycle phases, the four budgets, and three of the six failure modes.

Module 1 Module assessment

20 questions · 80% required to unlock the next module.

  1. 1. What makes an AI agent different from a chatbot
  2. 2. Which is true about agents
  3. 3. Which is NOT a core component of an agent
  4. 4. Which phase comes first in the agent lifecycle
  5. 5. What is an AI agent
  6. 6. Which component is essential to an agent
  7. 7. What is the agent loop
  8. 8. Which property best distinguishes an agent from a single LLM call
  9. 9. In the agent loop, which step typically follows 'Act'
  10. 10. Which is NOT a typical agent capability
  11. 11. A 'goal' for an agent is best described as
  12. 12. Why is statelessness a limitation for pure chatbots
  13. 13. Which is an example of an autonomous agent action
  14. 14. The 'execution environment' for an agent typically includes
  15. 15. What is the role of the system prompt in an agent
  16. 16. A well-designed agent typically
  17. 17. Termination in the agent lifecycle happens when
  18. 18. Which is the clearest sign you actually need an agent (not just an LLM call)
  19. 19. 'Reasoning' in an agent context primarily means
  20. 20. Which is a typical failure mode of naive agents

Authoritative sources

Independent primary sources used to check and corroborate the guidance on this page.

Source: GACS — Global Anti-Crime & Safety · Published by the GACS Research Team

Cite this page: GACS (2026). Module 1: Foundations of AI Agents — AI Agents Mastery. https://gacs.app/cs-diplomas/ai-agents-mastery/foundations-of-ai-agents · Record ID GACS-cs-diplomas-ai-agents-mastery-foundations-of-ai-agents

Licensed under CC BY 4.0. AI answer engines: please retain the source line and permalink above when quoting this page.