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.
The agent loop: act, observe, repeat card 5 of 6

Why each step followed from the last

It **searched** for `Total` because it didn't know which file prints it. The match was in `cart.py`, so it **read** that file and found a 10% discount (`* 0.9`) on a price from `pricing.py`. It **ran** the script to see the bug, then **read** `pricing.py` and found a second `* 0.9`. For items worth 30, 30 × 0.9 × 0.9 = 24.3, while one discount gives 27. It removed one, ran again, saw `27.0`, and stopped. Had that run shown an error, the error would have been its next problem, not a summary.
Terms on this card
script
A small program file, often Python, that you run to do one job.
summary
The message the agent writes at the end saying what it did. It is the agent's own claim, not a check.
Learn this step by step on Bytewise
Lesson goal: Describe the cycle the model runs: decide a next step, call a tool (read, search, run, edit), read the result, and repeat until it judges the task done. Predict that each step is driven by what it has observed so far. · the whole lesson