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 5 of 6
Same question, very different token bill
Both versions read the same file. Only the test run differs: the first lets the full log into the conversation, while the second asks for just what's needed. Token figures are approximate. Some tools cut very long output short, but don't rely on it.
# Costly version
▸ You: Why does test_login fail?
⚙ Read: src/auth.py
(~4,000 tokens)
⚙ Run: pytest
(2,500 lines of output, ~35,000 tokens)
# Lean version
▸ You: Why does test_login fail? Run only
tests/test_auth.py, stop at the first
failure.
⚙ Read: src/auth.py
(~4,000 tokens)
⚙ Run: pytest tests/test_auth.py -x -q
(40 lines of output, ~600 tokens)
Terms on this card
- token
- A chunk of text, often a word or part of a word, that a model reads and writes. Roughly 4 characters of English.
- test
- A small piece of code that runs part of your program and checks it gives the expected result. It reports pass or fail.
- log
- Lines of text a program prints while it runs, describing what it is doing or what went wrong.
- output
- Here: tokens the model writes, meaning its replies and the code it produces. Also the text a command prints, depending on context.
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