AI Agents 101
What an AI agent is, how it works, and what loops, tools, and memory actually do with real examples.
A common misconception about AI agents I still hear from a lot of people is that they’re only big, complex systems like Claude Code, but that’s not actually true.
Claude Code is an AI agent, but it’s a rather complex one and agents don’t need to be. At their core, they’re actually pretty simple.
An agent is just an LLM system that runs in a loop and works toward a goal given to it by a user. To understand what that means, you just need to know that every agent is made up of four things: an LLM (the brain — the thing that “thinks”), access to tools (the hands — what it can actually do), a loop, and some form of memory.
Why does an agent need a loop?
Because most real goals can’t be solved in a single step.
When you ask someone to “book me a flight to Barcelona for next week under €200”, they don’t just do one thing and hand you an answer. They check flights, see the prices are too high, try different dates, find one that works, check your calendar to make sure you’re free, then book it. Multiple steps, each one depending on the result of the last.
An agent works the same way. The loop is what lets it:
- React to what it finds — it doesn’t know what the weather API will return until it calls it, and its next action depends on that result
- Break big goals into steps — instead of solving everything at once, it just asks itself “what’s the next thing I need to do?” after each action
- Know when to stop — it keeps looping until it decides the goal is done, or it realizes it can’t complete it and tells you why
Why does an agent need memory?
Because the loop runs multiple steps, and each step needs to know what happened in the previous one.
If the agent checks the weather, then in the next step of the loop needs to decide what to recommend you wear. It needs to actually remember what the weather check returned. Without that, every step starts completely blank.
Memory is what lets the agent:
- Know what it already did — so it doesn’t repeat steps
- Build on previous results — so each step can use what the last one found
- Remember the original goal — so after several tool calls it still knows what it’s working towards
At its simplest, memory is just the conversation history. Everything the agent has done and seen gets passed along each loop. The agent reads it, figures out where it’s up to, and decides what to do next.
Why does an agent need access to tools?
Because an LLM on its own can only work with what it already knows. It can’t look anything up, it can’t take any action, it can’t touch the real world.
If the goal is “what’s the weather in Amsterdam right now?” the LLM by itself doesn’t know because it wasn’t trained on live data. Without a tool to go fetch that information, it can only guess, and that is where you get things like wrong information (also known as “hallucinations”).
Tools are what let the agent:
- Get information it doesn’t have — like current weather, live stock prices, or your calendar
- Do things in the real world — like sending an email, booking a meeting, or updating a database
This is also why you may have seen tools be described as the hands of an agent, while the LLM as the brain.
Simple examples of what an agent is
A weather outfit agent — Goal: “What should I wear today?” The LLM can’t answer that on its own, it doesn’t know the weather. So it calls getWeather(“Amsterdam”), gets back 12°C and rainy, and tells you to wear a jacket and bring an umbrella.
An “is it open?” agent — Goal: “Is my local supermarket open right now?” It calls getOpeningHours(“My Local Supermarket”), gets the hours back, compares to the current time, and gives you a yes or no.
A meeting scheduler agent — Goal: “Book me a 1-hour meeting with Linus Torvalds next week.” It checks your calendar, finds a free slot, checks Linus’ availability, sends the invite.
More complex examples of AI agents
A travel booking agent — Goal: “Book me a flight to Spain next week under €200.” It searches for flights, finds they’re all over €200, loops back and tries different dates, finds a cheaper option on Tuesday, checks your calendar to make sure you’re free, books the flight, and sends you a confirmation. It has multiple tools, multiple loops, each step depending on the last.
A customer support agent — Goal: “Help users resolve issues with their orders.” A user messages the agent saying their package is late. The agent checks the order status, sees it’s stuck at a depot, looks up the refund policy, decides to offer a discount, sends the user an email with the offer, and waits for a response. If the user accepts, it processes the refund. If not, it escalates to a human.
A research agent — Goal: “Find the top 5 competitors to our product and summarize what makes each one unique.” It searches the web, reads a page, stores what it found, decides it needs more detail on one competitor, searches again, reads another page, keeps looping until it has enough on all 5, then writes the final summary.
Hopefully this helped clear things up. At their core, agents are pretty simple. They can just get complex when you start layering in guardrails, orchestration, multiple tools, or multi-agent communication. But the concept itself is pretty straightforward.
If you’re ever wondering whether something is an AI agent, just ask yourself four things: does it use an LLM to make decisions, does it run in a loop, does it have tools it can actually use, and does it carry memory between steps? If the answer to all four is yes, it’s an agent.


