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 1 of 6
One sentence, 52,000 of something
You give the agent (an AI tool that can read your files and run commands for you) a first task: find why a login test fails. It opens one file, runs the tests and answers. Your tool then shows the conversation now holds `52k tokens` (52,000), yet you typed one short sentence.
What is being counted? And how did one sentence turn into 52,000 of it?
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.
- test
- A small piece of code that runs part of your program and checks it gives the expected result. It reports pass or fail.
- run commands
- Start programs by typing instructions, e.g. `python report.py` runs that script. An agent can do this on your computer.
- tests
- Small pieces of code that run your program's code and check it gives the expected results.
- tokens
- Secret strings, similar to API keys or passwords, that a service issues to grant access.
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