Strip away the hype and an AI agent is three things wrapped in a loop: a language model that can reason, a set of tools it can call, and a way to remember what it has done. Take any one of those away and you don’t have an agent — you have a chatbot, a workflow, or an LLM with very expensive amnesia.
The shift from “LLM” to “agent” is the shift from a system that answers in one turn to a system that decides what to do next. That tiny difference is where most production AI work lives in 2026.
The Loop Is The Whole Idea
Every agent runs on the same four-step cycle:
- Perceive the current state. What did the user just ask? What do I already know?
- Plan the next move. Which tool do I call? With what arguments?
- Act. Actually call the tool — the API, the database, the function.
- Observe what came back. Did it work? Am I done? If not, return to step 1 with the new information.
Without that loop, you have a chatbot that can call exactly one function. With the loop, you have a system that can navigate uncertainty — try something, look at the result, adjust, try again. Almost every interesting agent behaviour falls out of that simple structure.
Tools Are The Agent’s Hands
A language model on its own can’t do anything outside the conversation. Tools change that. A tool is just a function the agent can call with arguments it generates:
search_documents(query)— retrieval over your vector DBsend_email(to, subject, body)— your transactional mail providerquery_database(sql)— your production read replicabrowse_url(url)— fetch any webpage
The model’s job is to pick the right tool and produce a JSON payload that’s precise enough to call it. Modern frontier models (Claude Sonnet, GPT-5, Gemini) are reliable enough at this that you can build a 4-tool agent over a weekend and it’ll mostly do the right thing.
Memory Is What Makes Agents Useful Over Time
Memory comes in three flavours, and the design problem is what to put where:
- Conversation memory — what the user said earlier in this session. Just chat history.
- Working memory — what the agent has discovered during this run. Usually a running tool-call trace.
- Long-term memory — facts about the user or domain that persist across runs. Typically a vector DB.
Push everything into conversation memory and you blow the context window before the agent finishes anything useful. Push everything to long-term memory and the agent has no recall of what it just did. The architectural trick is treating them as different stores, each with a different write and recall pattern.
When To Reach For An Agent
When the path through the problem is genuinely uncertain. If you can write the workflow as a deterministic flowchart, write the flowchart. Agents earn their cost when branching is data-dependent — when the model needs to look at the output of step 2 before it can decide step 3.
Common production patterns:
- Research agent: search → read → summarise → loop until the question is answered
- Support agent: classify ticket → look up customer → propose action → escalate if confidence is low
- Extraction agent: fetch document → identify structure → extract → validate → flag uncertain fields
When NOT To Use One
If the workflow runs the same way every time, you don’t need an agent. You need a script. Most “agent” deployments would be better served by a state machine with one or two LLM-powered steps inside it. Signs you’ve over-agented:
- Each agent run costs more than the value of the task it produced
- Loop depth regularly exceeds five steps — something is broken, not deep
- You spend more time debugging hallucinated tool calls than shipping features
Build One This Weekend
The smallest useful agent is around thirty lines of Python: a system prompt that explains the task and the available tools, a while-loop that calls the model, a switch over the tool calls the model wants to make, and a stop condition. LangChain, LangGraph, CrewAI, and Pydantic AI all give you this scaffolding pre-built — pick one, build a research agent that answers “what changed in [topic] this week” using a web-search tool, and you’ve shipped your first real agent.
This is what we cover in Module 3 of the Agentic AI Bootcamp. By Module 5 you’re building multi-agent systems. By Week 16 you’re presenting one to hiring partners on Demo Day.