A few years ago, we all started using ChatGPT — for many of us, our first experience interacting with artificial intelligence. How did we use it? We typed something, it replied, done. No need to worry about anything else.

It worked. But over time I realized I didn't understand anything about what was happening underneath. I'd repeat the same instructions and get different results each time, with no idea why.

Then came the magic question, the one we always ask when we don't understand something: how does this actually work?

I started reading, experimenting, testing things. And what I found is that there's no magic. Agentic AI is built on concrete pieces, each with a clear role. And once you understand them, everything else starts to click.

So I decided to write this down, in case you have the same question I had at the start. I've spent a week and a half writing it — it would have been easier to just ask Claude to do it, but I decided to do it the old-fashioned way. Heh.

01

The core problem: a box that only processes text

Picture a very sophisticated box. You feed text in one side, and it hands text back out the other. That's a language model in its purest form.

It has no eyes. No hands. It can't open a file, run anything, or connect to the internet. It only processes text and generates text. That's all it is, in its natural state.

The problem is obvious, I think. If it only processes text, how does it do anything useful in the real world? How does it check your calendar? How does it book an appointment? How does it help you with something that happens outside the conversation?

The answer is: on its own, it can't. It needs infrastructure around it. And that infrastructure is what we're going to take apart today, concept by concept. There are 8 — bear with me, I kept it tight.

02

The context

Before anything else, you need to understand the most fundamental concept of all: context.

Every time you talk to Claude, Gemini or ChatGPT, there's a window of information the model can "see" at that moment. That's the context. It's literally all the text available in that conversation: your question, the previous answers, any document you pasted in, the initial instructions.

The model doesn't remember anything outside that window. There's no memory between conversations. Every new conversation starts completely blank.

This has an important consequence: the model doesn't learn from you over time. It doesn't get smarter the more you use it. What looks like "memory" in these tools is always just text someone inserted at the start, before you ever saw the first reply.

Context is the workspace. Everything the model knows at a given moment is right there. No more, no less.

03

The tools

Let's go back mentally to the box that only processes text. The solution engineers found is elegant: what if the model could ask the system to do things on its behalf?

That's how tools are born. A tool is a function the model can request. The model doesn't run it directly — it can't. What it does is write a request: "I want to use this function with this data." The system receives it, runs the function, and hands the result back as more text inside the conversation.

The model never left its box. But it managed to interact with the real world through that back-and-forth.

Tools can be almost anything: searching the internet, reading and writing files, querying a database, sending an email, checking the weather. Whatever the system can do, the model can request.

Tools are the model's arms and eyes. Without them, it only talks. With them, it acts.

04

The agent loop, the heart of it all

By now you have a model that processes text and can request tools. But you still don't have an agent. What's missing is what makes everything move on its own.

An agent is a system you give a goal to, and it works in a repeating cycle until it meets it. That cycle always has the same structure: think, act, observe, and repeat.

First it thinks: it analyzes the situation and decides what to do. Then it acts: it carries out that decision. Then it observes: the result of what it did enters the conversation and gets processed. And then it repeats: it thinks again, now with more information than before.

This cycle repeats on its own, without you having to step in, until the model decides it's met the goal.

The difference from a normal conversation is huge. In a conversation, you ask "how do I plan a move?" and it explains the steps, but you have to do all the work. With an agent, you say "plan my move" and it handles it: builds the list, books the truck, coordinates the dates, and lets you know when it's done.

One gives you advice. The other executes the tasks.

The agent loop turns the model from a passive advisor into an autonomous worker. That's the whole difference.

05

Memory

As we already saw above, context gets wiped with every new conversation. That's a problem for any system that needs to be consistent.

Memory is the mechanism for saving information between conversations. Nothing fancy — just text saved somewhere that gets loaded at the start, before you begin.

There are two types.

Memory you write yourself: notes that tell the system how it should behave, what it should know, what rules to follow. It's always loaded, predictably.

Memory the system builds on its own, as you use it: the agent takes notes on patterns, corrections and decisions. It saves them and retrieves them next time.

Both work the same way underneath: they're text inserted into the context. The difference is who wrote it.

Memory isn't the model "remembering." It's that someone saved relevant text and inserted it before you started. The mechanism is always the same.

06

Skills, my favorite

There's a consistency problem the agent loop alone doesn't solve.

You ask the agent to put together a summary of something. It does. The next day you ask for the same thing and the result comes out different: different format, different structure, different criteria. Not because the agent is bad, but because every time it starts a task, it decides how to do it on the spot. Without a fixed reference, variation is inevitable.

A skill is a document that tells the agent exactly how to carry out a type of task. It's not a general behavior instruction like memory. It's a concrete process: it tells the agent what steps to follow, in what order, with what criteria, in what format.

The difference from memory matters. Memory tells the agent who it is and how to behave in general. A skill tells it how to do one specific task from start to finish.

There are two ways to trigger a skill. You invoke it directly, or the agent detects that the task you gave it matches an available skill and uses it on its own.

Memory defines who the agent is. Skills define how it works. Without skills, every time is an improvisation. With skills, it's a process that repeats the same way.

07

Subagents

There's a scaling problem with the basic loop: the context fills up. It's brutal when it happens to you mid-task.

If you give the agent a huge task, everything it reads and processes takes up space in the context. Sooner or later it fills up, and the agent starts losing track of what it did at the start.

The solution is the same one you'd use on any large project: delegate.

A subagent is another "copy" of the agent working on its own, with its own blank context. The main agent hands it a task, the subagent carries it out from start to finish, and when it's done it hands back only the summary. The main agent never filled up with the whole process — it only received the conclusion.

And just like a real team, subagents can work in parallel. Instead of doing three tasks one after another, the main agent launches three subagents at once and waits for all of them to finish. Total time drops dramatically.

Subagents are how you scale without the context collapsing. It's delegation, same as on a human team. The simple fix, without running /compact. Heh.

08

Hooks

Everything we've covered gives the agent the power to act on its own. But that autonomy comes at a cost: the agent does whatever it thinks is right at each step. If it makes a bad call, it's already carried out the action before you can stop it.

Hooks are checkpoints you define inside the agent's loop. They're rules that run automatically at specific moments, no matter what the model decides.

There are four typical moments: before the agent does something (to review or block it), after it does it (to process the result), when it needs your attention (to notify you), and when it finishes (to trigger something automatic).

The most important thing about hooks is that they're non-negotiable. They don't depend on the model "remembering" to do something. They're not suggestions it can interpret its own way. They run every time, no exceptions.

Hooks are the rules that aren't up for discussion. Everything else is a suggestion for the model. Hooks are the system's law.

09

MCP, my other favorite

Basic tools work inside your own environment. But real systems need to connect to the outside world: third-party platforms, databases, services of every kind.

The problem was that every connection had to be built custom, with its own format and its own logic. It cost a lot to build — and if it costs that much, it doesn't scale.

MCP (Model Context Protocol) — which translates to something like "protocolo de contexto para modelos" in Spanish — is an open standard that solves this. It defines a universal way for AI to talk to external services. The agent is the client, and each service has its own "plug" that speaks the same language.

When you connect a service over MCP, the agent automatically gets the list of things it can do there, and uses them just like its regular tools. To the agent, there's no difference: it requests an action, gets back a result.

A universal connector that lets you plug any service into any agent. Wonderful.

So, these eight concepts aren't loose parts. They're layers built one on top of the other.

Context is the foundation — without it, the model has nowhere to operate. Tools give it arms to act in the world. The agent loop turns those capabilities into real autonomy. Memory makes that autonomy consistent over time. Skills standardize tasks so the result is predictable. Subagents let it scale without the context collapsing. Hooks guarantee everything respects the rules you set. And MCP connects that whole system to the outside world.

Once you understand these eight concepts, you understand any agentic AI system that exists today, no matter what name it's given. The tools change every week. The interfaces change. But the fundamentals don't change nearly as often.

AI moves fast. There's something new every week. But having the fundamentals clear is what lets you adapt faster and get more out of whatever comes next.

Don't just use AI to write things and ask for things. Pay attention to what's happening underneath. That's where the real opportunities are.

If you made it this far, thank you — genuinely. What I enjoy most is always sharing what I know. See you in the next one.