Phase 10 · Agentic AI/
Lesson 10.1core2 h 30 min

What is an agent? Loops, autonomy and workflows vs agents

The perceive–reason–act loop, and when not to build one

Everything after this lesson — tools (10.2 Tool use and function calling), planning (10.3 Reasoning and planning for agents), memory (10.4 Memory and context engineering), multi-agent systems (10.6 Multi-agent systems) — is a refinement of one loop. Understanding that loop precisely, and the difference between a workflow whose control flow you wrote and an agent whose control flow the model decides, is what separates engineers who ship reliable systems from those who ship demos. It also tells you when the right answer is "do not build an agent at all".

You'll be able to

  • State the perceive–reason–act loop formally and map each component to code you will write
  • Distinguish workflows from agents using Anthropic's definition and place a system on the autonomy spectrum
  • Recount the 2022–2026 history of LLM agents and explain why early attempts failed and what changed
  • Estimate token cost and reliability consequences of agentic designs before building them

Key ideas

  1. An agent = a model in a loop whose outputs (tool calls) change the environment; the harness, not the model, executes actions.
  2. Workflow: you wrote the control flow. Agent: the model decides its own steps and when to stop. Start with the simplest level of autonomy that works.
  3. Environment feedback (tests, search results, API responses) is what makes agents reliable; tasks with cheap, trustworthy feedback were automated first.
Show 3 more key ideas
  1. The 2023 AutoGPT wave failed on plumbing (no structured tool calls, small contexts, no verification); function calling, MCP and reasoning models fixed the plumbing by 2025.
  2. Agents cost roughly 4× (single) to 15× (multi-agent) the tokens of a chat turn, and reliability decays like pⁿ with the number of steps.
  3. Do not build an agent for fixed sequences, unverifiable high-stakes actions, tight latency budgets, or anything you cannot evaluate.

Suggested path through this lesson