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:
Goal
- What the system is trying to achieve
Reasoning
- Deciding what to do next
Actions
- Calling tools, APIs, search, files, databases, browsers, etc.
Observations
- Looking at tool results and updating the next step
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.
