What Actually Makes an AI Agent
An agent is an LLM in a loop that chooses tools and acts on results. Here is the loop, the components and when you should not build one.
Agentic AIBeginner2 min readUpdated 11 Oct 2026
The core loop
A chatbot answers once. An agent runs a loop: decide → act with a tool → observe the result → decide again, until the goal is met or a limit is hit.
agent loop
1. Read
Take in the goal, the conversation and any retrieved context.
2. Plan
Decide the next step: answer directly or call a tool.
3. Act
Call the tool — query a database, search docs, hit an API.
4. Check
Read the result. Done? Answer. Not yet? Loop again.
Components
| Component | Purpose | Example |
|---|---|---|
| Model | Reasoning and choosing actions | Any capable tool-calling LLM |
| Tools | Do things the model cannot | SQL query, search, API call, file write |
| Instructions | Role, constraints, definition of done | "Only read from the warehouse; never run DDL" |
| Memory | State across steps or sessions | Conversation history, scratchpad, vector store |
| Guardrails | Limits and approvals | Max steps, allow-listed tools, human approval for writes |
Workflow or agent?
| Use a fixed workflow when | Use an agent when |
|---|---|
| Steps are known in advance | The path depends on what is discovered |
| You need predictability and low cost | Flexibility is worth extra latency and cost |
| E.g. "summarise every new ticket" | E.g. "investigate why yesterday's revenue dropped" |
Many production systems are mostly workflows with an agentic step where judgment is needed.
Data engineering examples
- Diagnose a failed pipeline: read logs, query the ledger, check source freshness, propose a fix
- NL-to-SQL analyst: inspect schema, write a query, run it read-only, explain the result
- Data quality triage: compare counts across layers and point to the first divergent stage
Finished this note?
