Agentic systems aren't one big thing. They are built from parts, and the type you choose decides what breaks first in production.
This is the last part of the series. The first three covered what agents are, how they differ from generative AI and how they work on the inside. This one is practical: what kinds of agents exist, what each is good for, where each tends to fail, and how to go about building your first one.
Five types of agents
There is no official taxonomy, but most agents you'll come across fall into one of five groups, depending on how much freedom they have and how many of them work together.
1. Task agents
The simplest kind. A task agent does one well-defined job: summarise a document, pull the key fields out of an email, produce a weekly report. It keeps little or no state and has little autonomy. Usually it is a prompt template, a couple of function calls and perhaps retrieval (RAG) over a document store. Task agents suit narrow, repeatable workflows such as compliance reporting. They break when the input drifts outside what the prompt anticipated, so validate their output instead of trusting it.
2. Interface agents
Interface agents deal with people: virtual assistants, support chatbots, sales advisers. They have to remember the conversation, handle text and often images or voice, and decide when to act and when to ask. A typical stack is a language model, some memory and a front end, whether that is React, Streamlit or simply Slack. Their weak spot is ambiguity. People rarely say exactly what they mean, and an interface agent that acts on a wrong guess is worse than one that asks a follow-up question.
3. Reflection agents
A reflection agent reviews work, either its own or another agent's. Code reviewers, answer graders and safety checkers belong here. The usual pattern is a generator and a critic, as two prompts in a chain or as two separate agents, sometimes backed by a reward model. Reflection noticeably improves quality, but only when the critic knows something the generator didn't, such as test results or a scoring rubric. A model grading its own output with nothing new to go on tends to approve it.
4. Planner agents
Planner agents take a goal with many steps and work out the route: coordinating a project, sending requests to the right workflow, organising a trip. They choose their path at runtime and usually sit on a framework with good tool support, such as LangGraph or AutoGen. They fail in the long tail. A plan that looks fine at step one may be impossible by step six, so planners need checkpoints where the plan gets re-evaluated.
5. Multi-agent systems
Here several agents with different roles work together, coordinated through messages or shared memory. Think of a research team where one agent searches, one reads and one writes, or a group of coding agents splitting up a feature. CrewAI and AutoGen are the usual starting points. The approach scales well to big tasks, but coordination becomes the hard part. Without clear roles and a rule for when to stop, agents loop, duplicate each other's work or drift away from the original goal.
The parts of a minimal agent
Whichever type you build, the same building blocks show up. The table lists them with some common options. It isn't a list of recommendations, just a map of the territory.
| Part | What it does | Common options |
|---|---|---|
| Language model | Reasoning and text generation | Models from OpenAI, Anthropic, Google or Mistral, or open-weight models you host yourself |
| Planner | Turns a goal into steps | LangGraph, LangChain agents, or a ReAct-style loop of your own |
| Tools | Let the agent act on the world | Function calling, your own APIs, browser automation such as Playwright or Selenium |
| Memory | Keeps context within and across sessions | Redis, Pinecone, Qdrant, Weaviate |
| Execution | Where actions actually run | Serverless functions, containers, a sandbox for code |
| Interface | How people or systems reach the agent | A chat UI, a REST API (FastAPI, for example), Slack |
A first project: a travel assistant
A travel assistant makes a good first agent because it needs every part and is still easy to reason about. Say the goal is: "Plan a trip from Istanbul to Berlin next month, within my budget, around my calendar."
Broken down, the agent has to:
- Plan: split the request into steps, such as checking visa rules, finding dates, searching flights and hotels, and proposing an itinerary.
- Use tools: a flight-search API, the calendar, and email for confirmations.
- Remember: preferred airlines, budget limits, which passport the user holds.
- Reflect: check that the plan really fits the budget and the calendar before showing it, and deal with failures such as a fare that has sold out.
request → plan → steps → tool calls → proposal
↑ │
memory ← check the result, reviseStart with the agent only proposing a plan and a person doing the booking. Once its proposals are reliably right, let it book, with a confirmation step before any payment. That order (suggest first, act later) is the safest way to build trust in any agent.
Habits that make agents reliable
- Make it stoppable. A person should be able to pause or override the agent at any point.
- Keep memory tidy. Separate short-term, long-term and semantic memory and clean them up, or stale and wrong information will steer later decisions.
- Keep the pieces small. Separate components for planning, tool use and validation are far easier to debug than one agent that does everything.
- Govern the tools. Give every tool explicit permissions and log every call.
- Test in simulation first. Run the agent against mocked tools and recorded scenarios before it gets anywhere near real systems.
Framework or your own code?
Sooner or later you'll have to decide whether to stay on a high-level framework such as LangChain or AutoGen, or to write the tool-routing layer yourself. Both are reasonable choices; they just cost different things.
| Framework | Your own router | |
|---|---|---|
| Getting started | Fast; most of the wrappers already exist | Slower; you write the state handling and schemas yourself |
| Visibility | Internal state and prompts can be hard to see | You see and control every prompt and every piece of state |
| Errors | Failures can get buried inside chains | Errors and retries are explicit |
| Token overhead | Often higher, because context is injected repeatedly | Lower; each call carries only what it needs |
My rule of thumb: use a framework to explore and to get a prototype in front of users quickly. Once the agent matters to the business, consider replacing the important parts with a small router of your own, with strict schema validation, readable stack traces and direct control over the model API. You lose some convenience, and in return you can see what your system is actually doing.



