Agentic AI Chapter 1 / 16 · Foundation

01 Foundation

AI, from the ground up.

Before agents, memory, or tools — one question. When a machine "understands" your sentence, what is physically happening? The answer is three ideas stacked on top of each other: a neuron, a network of them, and a 2017 design called the transformer. Let's build all three.

Neurons & weights Neural networks Training Transformers Self-attention

First, the words

"AI" is a stack of nested ideas.

People use AI, machine learning, and LLM as if they're the same thing. They're actually rings inside rings. AI is the whole goal — machines doing things that seem intelligent. Machine learning is the winning approach inside it: don't hand-code rules, let the machine learn patterns from examples. Deep learning is machine learning done with many-layered neural networks. And a large language model is one very big deep-learning network trained on text. Every agent you'll build lives in that innermost ring.

Artificial Intelligence Machine Learning Deep Learning LLMs
Four labels, one nesting. LLMs are deep learning, which is machine learning, which is AI.

The atom

It starts with one neuron.

A neuron is almost embarrassingly simple. It takes a few numbers in, multiplies each by a weight (how much that input matters), adds them up with a bias, and squashes the result through an activation function into a single output. That's it — multiply, add, squash. The "learning" is nothing more than finding good weights. Press play and watch three inputs become one decision.

0.9 0.1 0.7 inputs × 0.8 × -0.5 × 0.6 Σ + bias → σ neuron ? output
weighted sum = (0.9·0.8) + (0.1·−0.5) + (0.7·0.6) + bias → activation → one number out.
The one-liner

A neuron just multiplies, adds, and squashes. Intelligence doesn't live in any single neuron — it emerges from millions of them, and the weights between them.

Scale it up

Wire neurons into layers.

Stack neurons into layers and connect every neuron to the next layer. Numbers enter on the left, flow rightward — each layer transforming them a little — until the last layer produces an answer. This left-to-right sweep is a forward pass. A modern network has billions of these weighted connections. Watch a signal ripple through.

idle
resting activated signal on a connection

Training flips this around. The network guesses, we measure how wrong it was (the loss), and an algorithm called backpropagation nudges every weight a hair in the direction that would've been less wrong. Repeat billions of times on billions of examples — that's a trained model.

How we got here

Three eras led to one breakthrough.

AI didn't arrive fully formed. It moved through three eras: hand-written rule-based systems that broke the moment reality stepped outside the rules; machine learning that could finally learn patterns from data but stayed narrow — one model, one task; and then, in 2017, the transformer. Everything since runs on that third era.

1950s–80s Rule-based hand-written if/then rules 1990s–2000s Machine Learning learns patterns from data 2017 Transformers every word sees every word
Rigid rules → narrow learners → a design that scales. More data + more compute = a smarter model.

2017 · the turning point

The transformer, and one big idea: attention.

Older language networks read one word at a time and forgot the beginning by the end of a long sentence. In 2017 a paper with a bold title — "Attention Is All You Need" — introduced the transformer, the architecture behind GPT, Claude, and Gemini. Its trick: let every word look at every other word at once and decide which ones matter for its meaning. That mechanism is called self-attention.

Take the word it in the sentence below. To understand it, the model has to figure out what "it" refers to. Click any word to make it the "query" and watch where its attention flows.

query: it → strongest link: animal
Line thickness = attention weight. The model learns that "it" points back to "animal" — so "tired" attaches to the animal, not the street.

Why it changed everything

Attention runs in parallel across all words, so transformers train on enormous text far faster than older step-by-step models — which is exactly what made billion-parameter LLMs possible.

The stack

A real model stacks dozens of these attention layers. Each layer refines meaning a little more — early layers catch grammar, later layers catch intent.

Chapter 1 in one breath

Multiply, add, squash — a billion times.

A neuron weighs its inputs. A network stacks neurons into layers and sweeps signals through them. Training tunes the weights. The transformer adds attention so every word can consider every other word — and that's the engine every AI agent runs on.

🖥 Present this chapter

A matching slide deck with speaker notes — press S for notes, F for fullscreen.

Open the slides →