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.
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.