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 3 of 6

The loop, step by step

1. **Decide** a next step from your request plus everything observed so far. 2. **Act**: call a tool (read, search, run, edit). 3. **Observe**: read the result, such as file contents, command output or an error. 4. **Repeat**, or stop when the model *judges* the task done and writes a summary. Each step is chosen from what it has observed, especially the latest result. If an observation changes, the path changes. "Done" is the model's judgement, not a guarantee.
Terms on this card
model
The AI that reads text and writes text. In an agent, it decides what to do next.
tool
An action the agent program lets the model use, such as reading a file, searching, running a command or editing a file.
observation
The result the agent gets back from a tool call, such as file contents, search matches, command output or an error. It decides its next step from these.
command
A line of text that tells the computer to run a program, typed in a terminal, for example `python src/cart.py`.
output
The text a command or program prints when it runs, including results and error messages.
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