Agents seem to be everywhere these days š¤
You open LinkedIn, and your feed is filled with agent-related posts.
Heading to Twitter for some funny memes? Yep, theyāre about agents too.
Ready to read some mind-blowing Medium article? You guessed it - agents once more! š
Letās face it, agents are one of the hottest topics right now, but letās pause one second and ask: what exactly is an agent?
In this 5-lessons series, Iāll walk you through everything Iāve learned about agents, covering both the theory and practical implementation. To kick things off, weāll start with the fundamentals about agents and their basic components.
Ready to begin? Welcome to Lesson 0!
What is an Agent?
A few years ago, if you asked my about agents, the first thing that would pop into my mind was probably Agent Smith from The Matrix.
Fast forward to today, and thanks to frameworks like LangChain, LlamaIndex and CrewAI, anyone can build fully functional agents with just a few lines of code.
This is amazing, but it also comes with risks. The layers of abstractions can make it easy to lose sight of whatās happening under the hood.
So, before we start creating our first Crews and LlamaIndex Workflows, letās take a step back and try to understand what an agent really is.
Time for a a visual metaphor.
The Agentās Brain
This might seem obvious, but itās worth emphasizing: an agent is essentially a set of functionalities or abstractions layered on top of an LLM. Without the LLM powering it, the agent would be useless.
You can think of it like the human braināif your brain were removed, youād be out of the game (unless youāre some kind of zombie).
But sadly, a brain in a jar isnāt enough.
We need ways for this ābrainā to interact with the external world: to gather information, make plans, reason, and act.
Thatās where the additional components come in.
The Agentās Components
š Planning Capabilities
The ability to break complex tasks into smaller ones, manage subgoals and even reflect on the results and do self-criticism (more on this in future lessons š).
We humans are good at these tasks - well, maybe not so much at self-criticism - but how can we enable agents to do the same?
Thereās a growing arsenal of techniques for planning and reasoning - expanding exponentially, I might add - but here are some interesting examples:
Chain of Thoughts (CoT)
Tree of Thoughts (ToT)
If you look at the diagram above, you might notice that the ReAct technique is missing! Donāt worry, thatās intentional, itās just that I didnāt want to spoil you the surprise š¤£
ReAct is one of the most important planning techniques, and weāll dive into it in detail in Lesson 3, which covers the Planning Pattern.
š Memory Capabilities
A key component of an agent is its memory.
The agent needs to be able to ārememberā previous thoughts or interactions to plan, act on the external world or even have a simple chat with us! - imagine trying to have a conversation without recalling anything your interlocutor just said ā¦
We can divide memory into two groups:
š¹ Short-term memory
The most immediate memory, which for an LLM would be the context window.

š¹ Long-term memory
The type of memory the agent would need to retain information for a (potentially) infinite amount of time. Itās also necessary for accessing information the LLM has not stored in its weighs.
Vector Databases such as Qdrant, Weaviate or Pinecone (among others) are good examples of these long-term memory solutions.
š Tools
So, up to this point, we have an agent with memory and reasoning capabilities but ⦠what use would it be if it cannot interact with the external world? š
With tools, the agent learns to call external APIs and services for retrieving information that is missing from the model weights (e.g. latest results of UEFA Euro 2024 ā½ ) and acting on external systems (e.g. adding rows to a MySQL database).
Weāll cover tools in detail in Lesson 2 of this series, where weāll even implement one from scratch! š®
To recap
As you can see, despite all the hype around these systems, agents are pretty simple! š
All you need is an LLM as the ābrainā, a mechanism to reason, a way to ārememberā things and tools to interact with the external world!
If you like this post, I can assure you that youāll love the 4 posts that I have prepared for you. Code, videos, etc. All the resources youāll need to become an āagentic ninjaā š„·
See you next week friend! š
Miguel
Good intro
Great job over here too Miguel!
Now I don't know what to do, learn a bit about mongoDB, reading docs about MLflow,Langchain and other solutions that we need and use nowadays, reinforce my current data science skills and move from there... I'm more lost than our agents without a brain hahaha š¤Æ