Skip to main content
A browser agent in about 100 lines. Playwright drives a headless Chromium, each screenshot goes to Holo, and Holo answers with the next click, keystroke, scroll, or URL. It applies every convention from Core concepts in the function calling format.
1

Install

2

Save the agent

browser_agent.py
3

Run it

Output

How it works

  • Screen size. The viewport is fixed at 1280 by 800 and screenshots are taken at that size, so scaling the [0, 1000] coordinates back is one multiplication.
  • Settling. After each action the loop waits a second, then for the page to load. Without the wait, a screenshot can land mid-navigation and show the model a stale page.
  • Memory. Only the last 3 screenshots stay in context. Older ones become a text placeholder inside their <observation> wrapper.
  • Stopping. The run ends only when Holo calls answer. A step without a tool call is skipped.
To drive a desktop or an Android device instead, swap Playwright for your OS or emulator driver: screenshot() and execute() change, the loop does not.

Next steps

Hybrid agent

Add a code runner to this agent.

Core concepts

The loop conventions Holo is trained on.