Refs provide deterministic element selection from snapshots. Best for AI agents.
# 1. Get snapshot with refsagent-browser snapshot# Output:# - heading "Example Domain" [ref=e1] [level=1]# - button "Submit" [ref=e2]# - textbox "Email" [ref=e3]# - link "Learn more" [ref=e4]# 2. Use refs to interactagent-browser click @e2 # Click the buttonagent-browser fill @e3 "test@example.com" # Fill the textboxagent-browser get text @e1 # Get heading textagent-browser hover @e4 # Hover the link