All Posts Foundations

What Is an AI Agent?

Strip away the hype. An agent is an LLM with tools, memory, and a loop.

May 11, 2026 · By builderlabsadmin

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 DB
  • send_email(to, subject, body) — your transactional mail provider
  • query_database(sql) — your production read replica
  • browse_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.

Want to build agents in production?

Cohort 1 of the Agentic AI Bootcamp opens May 16, 2026. 16 weeks. In person at Hatch Works, Colombo. Two real production capstones.

Apply Now
FAQ · Agentic AI Bootcamp

Common Questions

How is the Agentic AI Bootcamp different from an online course? +

You show up in person, work alongside a cohort, and ship two real production systems by the end. Online courses give you content. The Agentic AI Bootcamp gives you a portfolio, instructor connections, and a Demo Day in front of hiring companies.

Do I need coding experience? +

Yes — basic Python or JavaScript is enough to keep up. If you don't have it yet, learn the basics before Cohort 1 starts on May 16, 2026 (Codecademy or freeCodeCamp work). For non-technical professionals, see the Applied AI Bootcamp.

When does Cohort 1 start? +

May 16, 2026. 16 weeks. Saturday sessions 9am to 1pm, in person at Hatch Works, Colombo.

How much does it cost? +

LKR 150,000 for the full 16-week programme. Flexible payment plans available. Corporate invoicing for employer-sponsored students.

Newsletter

The Twice-Monthly AI Briefing

Updates from the AI world — what shipped, what we’re using in production, and what’s worth your attention. Two emails a month, no spam.