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.
- 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.

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: 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.

- 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.

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.

- 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.

These limits are intentional safeguards and design choices. You can extend capabilities later by integrating specialist tools, execution environments, or persistent memory systems.

- 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.