Knaph
BeginnerAiAi AgentsLLM+3

AI Agents Level 1: How Agents Work

What really happens when an AI agent works for you - tokens, the context window, tools and the agent loop, instruction files, skills, hooks, subagents and MCP - and how to use agents better because of it.

modules
8
modules
lessons
25
lessons
quizzes
8
quizzes
exercises
4
exercises
Start course →

About this course

An AI agent can read your files, run commands and work on a task for an hour while you do something else. But why does it forget what you told it this morning? Why does a long session get slow, expensive and confused? What are skills, hooks and MCP, and when should you use which?

This course opens the agent up, one part at a time. You start with what a language model actually does: it reads and writes tokens, one at a time, and remembers nothing between requests. Then you see everything the model can see, the context window, and why it fills up. You learn how a model that only writes text can use tools, and the loop that turns it into an agent. Then come the parts of the program around the model that you control: instruction files like CLAUDE.md and AGENTS.md, memory, skills, permissions, hooks, plan mode, subagents and MCP servers. The last module is about using agents well: prompt caching and cost, prompt injection, checking an agent's work, and handing over a task so it gets done right.

Every lesson ends with habits you can use the next time you work with an agent. Claude Code is the running example, and the ideas apply to every agent. No programming needed; optional Python exercises for those who want to try the ideas in code.

Course content

1What an Agent Is2 lessons · 1 quiz

Watch this module

  1. lessonText In, Text Out
  2. lessonA Model With Hands
  3. quizQuiz: What an Agent Is
2Tokens4 lessons · 1 exercise · 1 quiz

Watch this module

  1. lessonText Into Pieces
  2. exerciseSplit Into Tokens
  3. lessonOne Token at a Time
  4. lessonThinking Before Answering
  5. lessonPaying by the Token
  6. quizQuiz: Tokens
3The Context Window4 lessons · 1 exercise · 1 quiz

Watch this module

  1. lessonThe Model Remembers Nothing
  2. lessonEverything It Can See
  3. exerciseWill It Fit?
  4. lessonThe Hidden First Message
  5. lessonWhen the Window Fills Up
  6. quizQuiz: The Context Window
4Tools and the Loop3 lessons · 1 quiz

Watch this module

  1. lessonAsking for a Tool
  2. lessonThink, Act, Look, Repeat
  3. lessonThe Program Around the Model
  4. quizQuiz: Tools and the Loop
5Giving an Agent Knowledge3 lessons · 1 quiz

Watch this module

  1. lessonInstructions That Load Every Time
  2. lessonMemory Is a File
  3. lessonSkills: Knowledge on Demand
  4. quizQuiz: Giving an Agent Knowledge
6Keeping an Agent in Check3 lessons · 1 exercise · 1 quiz

Watch this module

  1. lessonAsking Permission
  2. lessonHooks: Rules That Always Run
  3. exerciseA Hook That Says No
  4. lessonPlan First, Then Act
  5. quizQuiz: Keeping an Agent in Check
7Many Agents, Many Tools2 lessons · 1 quiz

Watch this module

  1. lessonA Fresh Mind for a Side Task
  2. lessonOne Plug for Every Tool
  3. quizQuiz: Many Agents, Many Tools
8Using Agents Well4 lessons · 1 exercise · 1 quiz
  1. lessonThe Same Start Every Time
  2. exerciseThe Cost of a Session
  3. lessonInstructions Hidden in Data
  4. lessonChecking the Agent's Work
  5. lessonHanding Over a Task
  6. quizQuiz: Using Agents Well