What are AI Agents? Perception, Decision, Action
Introduces the AI agent as an LLM placed in a perception-decision-action loop with tools, memory, and a goal, and covers its building blocks, autonomy levels, and honest 2026 limitations.
{"contentFormat":"slides.v1","completion":{"requireAllSlides":true,"requireQuiz":true},"slides":[{"kind":"title","eyebrow":"Module 7: Agentic AI and Autonomous Systems","title":"What are AI Agents? Perception, Decision, Action","body":"Move beyond single-turn prompts. Learn how AI agents perceive, decide, and act in a loop to accomplish goals autonomously — and where human oversight still matters.","outcomes":["Distinguish between a raw LLM and an AI agent","Explain the perception–decision–action loop","Identify the four building blocks of an agent","Describe levels of autonomy and human-in-the-loop patterns","Recognize current limitations and design trade-offs"],"narration":"Welcome to Module 7. In this lesson, we introduce the core mental model of AI agents: the perception–decision–action loop. You'll learn how agents differ from simple LLMs, what building blocks they need, and why human oversight remains essential in 2026."},{"kind":"content","heading":"From Model to Agent","body":"A language model (LLM) predicts text given an input. It has no memory of past sessions and cannot act on the world. An AI agent wraps an LLM in a loop, giving it tools, memory, and a goal. The loop lets it act, observe, and iterate.\n\nAnalogy. A raw LLM is like a brilliant consultant answering questions over the phone. An agent is that same consultant given a desk, a computer, a filing cabinet, and a task like \"prepare the quarterly report\" — now they can look things up, draft, check, and revise until the job is done.","callout":{"variant":"insight","title":"Key Distinction","text":"An LLM alone is passive. An agent is active: it decides what to do next, calls tools, and keeps working until the goal is met."},"narration":"Let's clarify the difference between a plain language model and an AI agent. A model just responds to prompts. An agent is a model placed inside a loop with tools, memory, and a goal — it can take actions and iterate."},{"kind":"content","heading":"The Core Loop: Perception, Decision, Action","body":"Almost every agent framework repeats three stages:\n\n- Perception (observe): Gather relevant information — user goal, previous results, tool outputs, retrieved documents. This becomes the context the model reasons over.\n- Decision (reason/plan): The model decides the next step. Should it call a tool? Answer directly? Break the goal into sub-tasks? This is where planning happens.\n- Action (act): Execute the decision — call a search API, run code, write a file, send a message — then feed the result back into perception. The loop repeats until the goal is met or a stop condition triggers.\n\nA widely used pattern is ReAct (Reason + Act): the model alternates between writing a short reasoning step and taking an action, using each observation to inform the next thought.\n\nPseudocode example:\n
\nwhile goal not met:\n context = perception(goal, memory, tool_results)\n thought, action = model.decide(context)\n result = execute(action)\n memory.store(thought, action, result)\n if stop_condition(goal, result): break\n","callout":{"variant":"note","title":"ReAct Pattern","text":"ReAct (Reason + Act) is a simple but powerful implementation: the model writes a thought, then an action, observes the result, and repeats."},"narration":"The core loop has three stages: perception, decision, action. The agent gathers information, decides what to do, then acts and observes the result. This loop repeats until the goal is achieved. Here's a simple pseudocode example."},{"kind":"content","heading":"The Four Building Blocks","body":"Every agent needs these components:\n\n- The model (the \"brain\"). Usually a capable LLM from providers like OpenAI or Anthropic. Its quality caps how well the agent reasons and plans.\n- Tools. Functions the agent can call to affect the world or fetch fresh data: web search, calculator, database query, code execution, email API. Modern models support tool use (function calling) — the API lets the model emit a structured request like search(query=\"rainfall Lagos 2025\"), your code runs it, and the result is returned.\n- Memory. How the agent remembers:\n - Short-term memory: current conversation and recent steps, held in the model's context window.\n - Long-term memory: facts stored externally (often in a vector database) and retrieved when relevant.\n- Planning. How the agent decomposes a big goal into ordered sub-steps and re-plans when something fails.","table":{"headers":["Building Block","Role","Example"],"rows":[["Model","Reasoning and decision-making","GPT-4o, Claude 3.5"],["Tools","Interface to the world","Web search, calculator, code runner"],["Memory","Retain context across steps","Conversation history, vector store"],["Planning","Decompose goals and adapt","ReAct, tree-of-thought"]]},"narration":"Four building blocks make an agent work: the model as the brain, tools to interact with the world, memory to remember context, and planning to break down goals. Here's a table summarizing each."},{"kind":"content","heading":"Levels of Autonomy & Human-in-the-Loop","body":"Not all agents operate the same way. Autonomy ranges from fully supervised to fully independent:\n\n- Assistive: You approve each action. Safest, but slow.\n- Semi-autonomous: The agent acts on low-risk steps, but pauses for a human-in-the-loop check on risky ones — e.g., delete, pay, publish. This balances speed and safety.\n- Fully autonomous: The agent runs the whole loop unattended. Powerful, but currently the riskiest and least reliable mode.\n\nExample: A customer support agent in Manila handles routine queries (order status, delivery dates) autonomously, but when a refund exceeds $50, it pauses and asks a human agent to approve. This human-in-the-loop gate prevents costly mistakes while still automating most work.","callout":{"variant":"exercise","title":"Design a Safety Gate","text":"Think of a goal like \"Plan a 3-day budget trip to Accra.\" Which actions should require your approval? (e.g., booking a flight vs. just looking up prices.)"},"narration":"Agents can operate at different levels of autonomy. Assistive agents require approval for every step. Semi-autonomous agents handle routine tasks but pause for human approval on risky actions — this is the human-in-the-loop pattern. Fully autonomous agents run unattended but are riskier."},{"kind":"content","heading":"Honest Limitations (as of 2026)","body":"Agents are powerful but have real drawbacks you must design around:\n\n- Hallucination compounds. A small error early in a loop gets built upon, so mistakes can snowball across steps.\n- Reliability. Multi-step agents fail more often than single answers; the more steps, the more chances to go wrong.\n- Cost and latency. Each loop step is another model call. A task can quietly consume dozens of calls and real money.\n- No true understanding. The agent predicts useful actions; it does not \"know\" it succeeded unless you give it a way to verify. It does not truly understand the goal — it follows patterns.\n\nAs of 2026, these limitations are well-known and actively researched. Always verify agent outputs, especially in high-stakes contexts.","callout":{"variant":"warning","title":"Design defensively","text":"Always include verification steps and human oversight for critical actions. Agents are tools, not oracles."},"narration":"Agents have limitations. Hallucinations compound across steps, reliability drops with more steps, costs can add up, and agents don't truly understand — they predict useful actions. Always verify outputs and include human oversight for critical tasks."},{"kind":"quiz","heading":"Check Your Understanding","questions":[{"question":"What is the main difference between a raw LLM and an AI agent?","options":["An LLM can use tools; an agent cannot.","An agent is an LLM placed inside a loop with tools, memory, and a goal.","An agent is always fully autonomous.","An LLM has memory; an agent does not."],"questionId":"cmrf73kaq002gpd27yplbpxv3"},{"question":"In the perception–decision–action loop, what happens during the 'decision' stage?","options":["The agent gathers information from tools.","The agent executes a tool call.","The model decides the next step (e.g., call a tool or answer directly).","The agent stores results in memory."],"questionId":"cmrf73kaq002hpd27s0ptwtcd"},{"question":"Which level of autonomy includes a human-in-the-loop check for risky actions?","options":["Assistive","Semi-autonomous","Fully autonomous","None of the above"],"questionId":"cmrf73kaq002ipd27owauooag"}],"narration":"Let's test your understanding with a few questions.","quizId":"qz_cmk7llpit002vg4p8l0uoi97n"},{"kind":"summary","heading":"Key Takeaways","takeaways":["An AI agent is an LLM wrapped in a perception–decision–action loop with tools, memory, and a goal.","The core loop: perceive context, decide next step, act, observe, repeat.","Four building blocks: model, tools, memory, planning.","Autonomy ranges from assistive (approve every step) to semi-autonomous (human-in-the-loop) to fully autonomous.","Limitations include compounding hallucinations, reliability issues, cost, and lack of true understanding.","Always design with verification and human oversight for critical actions."],"narration":"To summarize: AI agents extend LLMs with a loop, tools, memory, and planning. They operate at different autonomy levels, but always have limitations. Design defensively and keep humans in the loop for risky actions."}]}