875 B
875 B
Agent Browser Workflows
1) Snapshot-first loop
open <url>snapshot -iand extract refs- Act using refs:
click @e12,fill @e14 "text" snapshot -iagain after DOM changes
2) JSON mode for agents
- Prefer
snapshot -iand--jsonoutputs for deterministic parsing. - Keep a local map of ref -> intent.
3) Authentication and reuse
- Log in once and
state save. - Reuse with
state loadin later runs. - Treat state files as secrets and rotate when needed.
4) Stability tips
- Wait for load state before actions:
wait --load networkidle. - Use
wait --textorwait --urlfor dynamic flows. - Prefer refs from
snapshotover brittle CSS selectors.
5) Safe automation loop
- Validate URL against an allowlist before
open. - Avoid
evaland file access unless explicitly approved. - Prefer read-only operations when possible.