For Cursor agents

Agent playbook

Perfect gives Cursor hands in real Chrome. Prefer visible cursor tools over silent browser_evaluate.

01

Research a page

  1. browser_navigate → URL (reuse returned tabId)
  2. browser_snapshot with mode: "text" for readable body, or browser_extract for links/tables
  3. browser_screenshot with refs + labels when you need annotated evidence for a doc
  4. Write markdown notes in the repo from extract + captions — Perfect supplies evidence only
Using Perfect: open https://example.com, take a snapshot, and tell me the main heading.

02

Search & play media (YouTube)

There is no dedicated browser_search tool — chain the browser tools.

  1. browser_navigate to a search URL, e.g. https://www.youtube.com/results?search_query=saiyaara+song (reuse tabId)
  2. browser_wait a few seconds; browser_screenshot if snapshot is flaky on heavy SPAs
  3. Prefer a known watch URL when the top result is clear: browser_navigatehttps://www.youtube.com/watch?v=…
  4. browser_press k (YouTube play/pause) or Space if autoplay is blocked
  5. Confirm with browser_screenshot
Live smoke (v0.2)

“saiyara” → official YRF Saiyaara Title Song (BSJa1UytM8w) played in the Perfect tab group. On script-heavy sites, snapshot/evaluate can fail; navigate + wait + screenshot + keyboard still works.

Using Perfect: search YouTube for “Saiyaara song”, open the official YRF title track, and play it.

03

Fix / debug UI

  1. Snapshot (full if modals/menus matter)
  2. browser_hover to open menus / reveal flip panels
  3. browser_click / browser_fill / browser_select with cursor
  4. browser_wait with selector instead of long sleeps
  5. browser_console if the page logs errors (protected)

04

Builders (WPBakery / iframes)

  1. Snapshot — look for frame:fN on actions and frames[].sameOrigin
  2. Click/fill refs that live in same-origin iframes (no silent evaluate unless required)
  3. Put lasting CSS in Custom Code → CSS, not a temporary injected <style>

05

Drag, upload, network, dialogs

Need Tool Notes
Drag card / item browser_drag fromRef + toRef after snapshot (includes [draggable=true])
File input browser_upload Absolute path / paths; protected; claimed tab
See requests browser_network Read-only log; redacts sensitive query params
alert / confirm / prompt browser_handle_dialog accept + optional promptText; arm before the click that opens it

06

When scripts fail

Use browser_extract / mode: "text" snapshot. Do not reach for document.cookie / storage (prohibited).

07

Tab hygiene

  • Reuse tabId; newTab: true only when needed
  • browser_tab_focus / browser_tab_close only for claimed Perfect-group tabs

08

Security

Manual mode by default. Screenshots, console, network, annotations, and uploads can include PII. See the security page and the privacy policy.

Token thrift

Reuse tabId; one snapshot then many fills; skip screenshots unless necessary; don’t re-navigate the same URL. On “Extension disconnected”: wait ~2s, browser_status, retry the same tool once.