BR Academy
0%
AI Agents and Automations·Lesson 18 of 26·12 min

What Is an AI Agent?

The concept

Every lesson so far in this course has involved a human typing a prompt and reading a single response — even the multimodal chains in the last lesson required you to manually carry output from one stage to the next. An AI agent removes that manual carrying: it's an LLM given the ability to take actions (call a tool, search the web, read or write a file, send a message, query a database) and decide for itself, step by step, which actions to take in order to reach a goal you gave it once, rather than one instruction per response.

The defining mechanism is a loop, often described as observe → decide → act → check the result, repeated until the goal is met or the agent determines it can't proceed. "Observe" means the agent looks at the current state — the result of its last action, or the initial task. "Decide" means the underlying LLM reasons about what to do next, using the same next-token-prediction mechanism from Module 1, just now applied to choosing an action instead of a word. "Act" means it actually calls a tool — not describes what it would do, but executes it. "Check the result" means it looks at what came back and decides whether it's done, needs to try again, or needs a different approach. This loop is what separates an agent from a chatbot: a chatbot answers once and stops; an agent keeps going, across as many steps as the task needs, without a human re-prompting it at each step.

This power comes with a correspondingly larger set of risks, which later lessons in this module cover in depth: an agent that can act (not just talk) can also act wrong — calling the wrong tool, looping indefinitely, or taking an irreversible action (sending an email, making a purchase, deleting a file) based on a flawed decision. This is why well-designed agent systems build in checkpoints — points where the agent must pause for human approval before an irreversible step — rather than giving an agent unlimited, unsupervised authority to act. You'll see this pattern in the exercise below and throughout the rest of this module.

It's worth being precise about what's genuinely new here versus what's just the same LLM in a different setting. The underlying model is not smarter or different from the one answering your chat questions — what's different is the scaffolding around it: a way to call tools, a loop that keeps running until the goal is met, and (ideally) a human checkpoint before anything irreversible happens. Agents are not magic; they're the same prediction engine from Module 1, wrapped in a structure that lets it work across many steps instead of one.

Worked example

Consider an agent given the task "find the current weather in three cities and summarize." The agent's trace looks like: observe the task → decide it needs a weather tool and the first city → act by calling the weather tool for city one → observe the result (temperature and conditions returned) → decide it still needs cities two and three → act by calling the tool again for city two → observe that result → decide it needs city three → act, call the tool a third time → observe the final result → decide it now has everything needed → act by writing the final summary paragraph covering all three cities.

Notice what the agent did not do: it did not write a partial summary after city one, and it did not ask the human "should I check city two now?" at each step — it kept the goal (summarize all three) in view across the whole loop and only produced output once it had gathered everything the task required. This is the behavior that makes agents useful for multi-step tasks: the human states the goal once, and the loop handles the rest.

Exercise

Describe, in plain language, a repetitive multi-step task from your own job that currently requires you to do several steps manually — for example, "check my inbox, find anything that looks like an invoice, and log the amount and vendor into a spreadsheet," or "check three competitor pages weekly and note any price changes." Write out the steps an agent would need to take to do this task, in order.

For each step, label it as either "look something up" (an observe step — reading an inbox, checking a page, calling a tool) or "take an action" (an act step — writing to a spreadsheet, sending a notification, flagging something for review). Then mark which single step, if the agent got it wrong, would cause the most damage — that's the step that should require a human checkpoint before the agent is allowed to proceed unsupervised.

Recap

  • An agent isn't a smarter chatbot — it's the same LLM plus tools plus a loop (observe → decide → act → check) that lets it act toward a goal across several steps without a human re-prompting each one.
  • The loop is what enables multi-step tasks to run to completion from a single instruction, rather than requiring one prompt per step.
  • Because an agent can act, not just talk, it can also act wrong — which is why irreversible steps need a human checkpoint, a theme the rest of this module builds on.

Resources

  • Anthropic: "Building effective agents" — https://www.anthropic.com/research/building-effective-agents
  • OpenAI: "A practical guide to building agents" — https://platform.openai.com/docs/guides/agents
  • Wikipedia: "Intelligent agent" — https://en.wikipedia.org/wiki/Intelligent_agent