Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Tokens: how models measure text
card 3 of 6
Everything it touches is tokens
All of these count:
- your messages
- the agent's replies
- every file it reads
- every command output it sees (the text a command prints)
- hidden instructions: text the tool adds to every conversation, telling the model how to behave and what actions it can take
They pile up in one running conversation, and the model reads all of it again at each step. That has two effects:
1. **Memory limit:** there is a hard maximum of tokens the conversation can hold at once.
2. **Cost:** usage is counted in tokens read (input) and tokens written (output). Because the whole conversation is read again at every step, each step costs more as the conversation grows.
Terms on this card
- agent
- An AI tool that can act in your project, such as reading files, running commands and editing code, not just chat.
- model
- The AI system behind the agent that reads text and writes replies.
- command
- An instruction typed into a terminal (a text window for running programs) that runs a program, such as `pytest`.
- hidden instructions
- Text the tool adds to every conversation without showing you, telling the model how to behave and what actions it can take. It counts as tokens too.
- memory limit
- The maximum number of tokens a model can hold in one conversation at once.
Lesson goal: Explain that models read and write text as tokens (word pieces). Explain that files, command output and conversation all consume tokens, which sets both memory limits and cost. ·
the whole lesson