Lesson 6.2 · 3:35
Give the agent eyes
Goal: Let the agent click through your app in a real browser and report what it saw.
Try it
- Start the practice app (
node serve.mjs) so it runs athttp://127.0.0.1:4174. - Add the
mcpblock above toopencode.jsonand restart OpenCode. - Send this prompt:
Use the browser tool to test this local app at http://127.0.0.1:4174 against TEST-MATRIX.md. For each case, state the input, action, observed result, and pass/fail. Do not change code during this first pass. If the tool cannot access the app, report that limit rather than claiming it passed.
- Approve the browser actions as they come up. Compare its results with the ones you wrote by hand in 6.1.
You're done when you have the agent's row-by-row report, you've checked that no files changed, and you've repeated one case yourself.
Recap
- Without a browser tool, the agent is guessing from code. With one, it can use the app.
- Tools are added in
opencode.json. The plug's name and how it works come in 7.4. - First pass = observe only, report limits honestly, and you still check the key case.
Next lesson (6.3): a surprise the browser reveals. Where does your app's data actually live?