Skip to content
Back to course

15.6 AI Agents

An AI agent uses an LLM as a 'brain' that can plan, take actions and observe results in a loop until a goal is met. Instead of just answering once, the agent can call tools — search the web, run code, query a database, send an email — reason over what comes back, and decide the next step.

promptAI
An agent loop: think, act with a tool, observe, then decide the next step.

Imagine asking an agent to 'book the cheapest flight from Addis Ababa to Dubai next month'. It might search flight sites, compare prices, pick the best option, and fill the booking form — each step informed by the previous result. This 'reason-act-observe' cycle is often called the ReAct pattern.

Scenario

You need a system that researches a topic across multiple websites, runs calculations, and compiles a report autonomously. What fits best?

Check your understanding

1/4 · 40 XP

What distinguishes an AI agent from a single LLM answer?