Skip to main content

What is an Agent?

Lesson 13 Meet Zippy — a personal assistant agent and the example agent we’ll build across these lessons. An AI agent is an LLM that operates in a decision loop: it observes the environment, reasons about next steps, and invokes tools or actions to accomplish a goal. Unlike a single prompt/response interaction, an agent pursues multi-step objectives autonomously and adapts to feedback.
A retro-style graphic reading "AN AI AGENT IS AN LLM THAT..." with four colored button boxes labeled "RUNS IN A LOOP," "USES TOOLS," "PURSUES A GOAL," and "DECIDES ITS OWN STEPS." A small yellow robot icon labeled "ZIPPY" appears in the top-right corner.
Anthropic summarizes this clearly: agents are LLMs that use tools and act based on environmental feedback in a loop. This loop is the core pattern powering flexible, goal-directed behavior. How agents work — the loop
  • The user gives a goal or task.
  • The agent (LLM) observes the current context and available data.
  • It reasons about the next action.
  • It calls a tool or performs an action.
  • It observes the result and decides whether the task is complete.
A neon-style diagram titled "THE AGENT LOOP." It shows a flow from "USER TASK (gives a goal)" to "LLM THINKS (decide next step)" to "CALL TOOL (execute action)" and "GET RESULT (observe outcome)" forming a loop.
Callout: core cycle
Agents operate on a continuous perceive → reason → act cycle: they gather inputs, decide which tool or step to take, act, then re-evaluate based on results.
Perceive → Reason → Act
  • Perceive: collect user input, tool outputs, and conversation history.
  • Reason: choose which tool or pathway best advances the goal.
  • Act: call the chosen tool or emit a response.
An infographic showing a loop labeled "Perceive → Reason → Act," with two highlighted boxes: "Perceive" (user input, tool results, conversation history) and "Reason" (which tool to call, what parameters to use, whether the goal is complete).
Agent vs single LLM call vs fixed workflow
  • Single LLM call: one-shot prompt → response. No ongoing decision-making.
  • Fixed workflow: a developer-defined sequence of steps; deterministic and rigid.
  • Agent: runs in a loop with the LLM deciding which tools to call and when, enabling dynamic, goal-directed behavior.
An infographic titled "What makes an agent different?" comparing three setups: a single LLM call (prompt → response), a fixed multi-step workflow, and an agent that runs in a loop with the LLM making decisions and controlling actions.
Quick comparison table Adaptability — what makes agents powerful
  • If a tool call fails, an agent can switch strategies.
  • If additional information is required, the agent can search or ask clarifying questions.
  • This adaptability is essential for open-ended or failure-prone tasks.
A retro-styled infographic that reads "The agent doesn't just follow instructions. It pursues a goal." It shows problem boxes like "Tool call fails" and "Needs more information" with corresponding agent adaptations ("Try a different approach," "Decides to search for it") and a highlighted "ADAPTABILITY" section.
Concrete example: booking a restaurant User request: “Find me a good Italian restaurant nearby and book a table for two on Thursday evening.” A competent agent (Zippy) can autonomously:
  • Search for nearby Italian restaurants.
  • Evaluate results and check availability at top options.
  • If the first choice is booked, try the next-best.
  • Check the user’s calendar for conflicts.
  • Make the reservation once conditions are satisfied.
Example agent log:
No single developer-scripted sequence enumerated these exact steps — Zippy decided them at runtime based on observations. That autonomy is the meaningful distinction from a simple chatbot. Current capabilities and limits Zippy today is a capable general assistant: he can check calendars, search the web, send emails, and complete many everyday tasks. However, Zippy is intentionally bounded in some areas:
An infographic titled "Zippy Right Now" showing green boxes of what Zippy can do (check your calendar, search the web, send emails) and red boxes listing limits (no deep knowledge, no code execution, no memory). A teal banner at the bottom reads "Design Boundaries."
Table: Zippy — capabilities vs design boundaries
These limits are intentional safeguards and design choices. You can extend capabilities later by integrating specialist tools, execution environments, or persistent memory systems.
OpenClaw case study OpenClaw is a production personal-assistant agent used as our running case study. It runs on user devices and integrates with messaging channels like WhatsApp, Telegram, and Slack. OpenClaw implements the perceive → reason → act loop: it ingests messages, reasons about which tools to call, executes them, and replies with results.
A retro-style infographic for "OPENCLAW," a production AI agent that runs on devices and connects to messaging channels like WhatsApp, Telegram, and Slack. It shows a perceive → reason → act workflow: perceive reads messages, reason picks the tool, and act executes and replies.
Summary (key takeaways)
  • An agent is an LLM running continuously in a loop to pursue goals.
  • It perceives inputs, reasons about the next action, and acts by calling tools or generating responses.
  • The agent’s ability to adapt and choose its own steps — rather than following a pre-scripted workflow — is the defining characteristic.
  • Design boundaries are intentional and can be extended by integrating tools, execution environments, or memory systems.
Further reading and references

Watch Video

Practice Lab