Learning / Agentic Operations / Lesson 0001

Agentic Operations · Lesson 0001 · Level 1 · Foundations

Not in Context = Doesn't Exist

The one mental model everything else in this field hangs off.

Your win for this lesson: explain, in your own words, why an agent's behavior is entirely a function of what's in its context window — and pass the retrieval quiz below. That's the first half of the Level 1 gate.

1 · An LLM predicts text; it doesn't look things up

An LLM is a next-token predictor: given everything so far, it emits the statistically most plausible next token (≈¾ of a word). There is no database of facts inside — training compressed a huge slice of text into model weights, and generation is those weights producing plausible continuations (Karpathy's one-hour intro is the canonical walkthrough). This single mechanism explains both the magic and the failures: a confident wrong answer isn't a "bug" — it's a plausible continuation that happens to be false.

2 · Context is the model's entire world

Context is everything the model can see right now. Not "what it was told earlier" — what is in the window on this call:

CONTEXT WINDOW — a fixed budget of tokens, rebuilt every single call
system prompt — who the model is, the rules of engagement
instructions & conversation so far
retrieved data — files, search results, database rows
tool outputs — what came back from the last action
outside the window: everything else in the universe — including "what the model said yesterday"

Fig. 1 — If it's not in one of these slots on this call, the model behaves as if it never existed.

The model is stateless. Between two API calls it retains nothing — zero. Any appearance of memory is an engineering choice: someone's code re-inserted the conversation history, the file, the fact. You've watched this from the user side daily: when a Claude Code session compacts, the model didn't "forget" — its world got rebuilt with a summary where the raw history used to be. Whoever controls what goes into the window controls what the agent knows, believes, and does.

The load-bearing sentence: an agent's behavior is entirely a function of its context window, because the model is a stateless next-token predictor — the window is the only input it has. Change the context and you change the agent; nothing else you "told it" exists.

3 · Two corollaries that separate practitioners from tourists

4 · An agent is a loop around this stateless core

An agent = an LLM in a loop with tools and a goal (Anthropic, Building Effective Agents). A tool call is just structured text the model proposes — a name and arguments. Your code executes it and pastes the result back into the window; the model then continues from that enriched context. Call → observe → decide → repeat. Every iteration of the loop is another full rebuild of the model's world. You'll build this loop yourself in the Level 1 practice lesson "Build the Single-Tool Agent."

5 · Retrieval quiz — closed book

Answer from memory (that's the point — effortful recall is what makes it stick). Click an option for instant feedback.

1. Why does an LLM sometimes state false facts confidently?

Generation is next-token prediction over the context. "Plausible" and "true" are different properties — and the model only optimizes the first.

2. What does the model itself retain between two separate calls?

Stateless. Anything that "carries over" was re-inserted into the context by code — a retrieval-and-injection choice someone made.

3. Your agent "forgot" an instruction mid-run. Where do you look first?

Behavior is a function of the window. If the instruction was truncated, compacted away, or buried mid-context, it doesn't exist to the model on that call.

4. Adding more marginally-relevant documents to context tends to…

Context rot: irrelevant tokens distract and degrade reasoning well before the window is full. Curation beats volume.

5. What is a tool call, mechanically?

The model only ever emits text — here, a structured request (name + arguments). Your code is what makes it real, and what makes it safe.

6. Cost, latency, and context limits are all measured in…

Models read and write tokens (≈¾ of a word). Every operational number in this field is denominated in them.

6 · Say it in your own words

The Level 1 gate is explaining this in your own words. Write your explanation, then reveal the rubric and grade yourself. Bring it to the next session — your teacher will pressure-test it.

A passing explanation touches all four:

Next

Next in the foundations: Lesson 0002 — Match the Pattern to the Problem — every design choice is a justified answer to "what goes in the window, and why?" And when you reach the Level 1 practice ladder, Lesson 0005 — Tokens & Cost delivers on this lesson's promise: you'll tokenize real text and read cost off a real API response.