Lesson 10.08 · Phase 10 · Coding & Computer-Use Agents

Computer use: screenshots to clicks

A computer-use model looks at a screenshot and answers with pixel coordinates. Between those two lives a controller you write. It downscales screenshots so they fit the model, scales the model's coordinates back up to the real screen, takes a fresh screenshot after every action so the model checks instead of assumes, and stops before clicks that can't be undone. Get the scaling wrong and every click lands somewhere else while the model reports success.

Learning objectives

  • Explain the screenshot → action → screenshot loop and the actions computer-use models emit.
  • Implement coordinate scaling between screenshot space and screen space, and show the failure without it.
  • Verify each action with a fresh screenshot and flag actions that changed nothing.
  • Gate sensitive clicks behind approval, and render real PNG screenshots with the standard library.

Some software has no API and no DOM: a legacy desktop app, a remote desktop, a canvas-based design tool, a PDF form. For those, an agent has to do what people do: look at the screen and click.

Loading the full lesson…