🧭 Roadmap
🔬
MiniLLM Lab · Stage 7 — Turn it into an Application
Agents are Stage 7's capstone — add tool calling and a planning loop to turn your assistant into a fully autonomous system.
View project →

01. What is an agent?

Core idea

An AI agent is a system built around a model that can do more than just answer once.

A normal LLM flow is:

input → model → output

An agent flow is more like:

goal → think → choose action → use tool → observe result → continue until done

So an agent is not just a model. It is a model + tools + control loop + memory/state.

Simple intuition

Think of the difference like this:

  • A chatbot answers your question
  • An agent tries to complete your task

Example:

  • Chatbot: “Here are five hotels in Bangalore.”
  • Agent: “I searched hotels, compared ratings, checked your budget, and prepared a shortlist.”

What makes something an agent?

Most agent systems have these parts:

  1. Goal

    • What the system is trying to achieve
  2. Reasoning

    • Deciding what to do next
  3. Actions

    • Calling tools, APIs, search, files, databases, browsers, etc.
  4. Observations

    • Looking at tool results and updating the next step
  5. Loop

    • Repeating until a stop condition is reached

Minimal mental model

User goal
   ↓
LLM interprets task
   ↓
Chooses next action
   ↓
Uses tool
   ↓
Gets result
   ↓
Decides next step
   ↓
Returns final answer

Why agents matter

Agents become useful when the problem needs:

  • multiple steps
  • external tools
  • decisions during execution
  • memory of previous steps
  • adaptation when something fails

When not to use an agent

Do not use agents for everything.

A simple one-shot prompt is often better when:

  • the task is short
  • no tools are needed
  • deterministic output matters more than flexibility
  • cost and latency must stay low

Quick distinction

System Best for
Plain LLM call Summaries, rewrites, simple Q&A
Workflow Fixed sequence of steps
Agent Dynamic tasks with choices and tools

Next

Continue to Agent architectures.

🐙
Go Deeper · Code it yourself
ai-engineering-from-scratch
54-lesson agent engineering phase — starts with ~120 lines of pure Python to build the agent loop from scratch, then progresses through planning, memory, multi-agent systems, and production deployment.
🔨 Phase 14.01 · The Agent Loop 🔨 Phase 14.02 · ReWOO and Plan-and-Execute