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.
Untrusted text steering the agent
card 2 of 6
Everything it reads is just more text
builds on: The agent loop: act, observe, repeat, What the agent can and cannot see
The agent's **context** is one stream of text: your messages plus everything it has read. The model has no reliable way to tell *your* instructions apart from instruction-shaped text inside a file or web page. Each step of its loop is chosen from what it has observed so far. So a sentence planted in that issue can become its next action, even if the sentence is hidden from view on the page. This is **prompt injection**.
Terms on this card
- prompt injection
- Instructions planted in text the agent reads (a page, file or issue) that redirect what it does, as if you had typed them.
- context
- Everything the model can currently see: your messages, files it read, command output. It decides its next step only from this.
- issue
- One bug report or request in an issue tracker, written by whoever opened it.
- loop
- Code that repeats a step for each item in a list, e.g. adding up every row of a table.
- model
- The AI that reads text and writes text. In an agent, it decides what to do next.
Lesson goal: Explain prompt injection: instructions hidden in a web page, issue, README, dependency or data file can redirect the agent. Explain why private data plus untrusted input plus a way to send data out is the dangerous combination. ·
the whole lesson