Stripping scripts and styles and capping the traversal depth is the difference between a page a model can reason about and one that fills its context with markup. Instances are explicit — every session starts by creating one and should end by closing it — and the instance ceiling and TTL exist so a forgotten session does not leave Chrome running.
A browser automation server built on chromedp. It manages Chrome instances explicitly, returns pages as a cleaned DOM tree with scripts and styles stripped, and can capture the screen when structure alone is not enough.
- create_chrome_instance and close — start an instance with headless, sandbox, popup, extension and security options, and close it when the session ends
- navigate, navigate-back, navigate-forward — go to a URL and move through history, with navigation returning the clean DOM tree
- get-all-elements, select-element, get-element-withtext — the whole page as a tree at a chosen depth, one selector's subtree, or the element containing given text
- click-element — click by CSS selector or XPath, with left, right and double clicks and a wait for visibility
- send-key, set-value, key-event — type into an element, set a form value directly, or send key combinations with modifiers
- screenshot — capture the page so the model can see layout, colours, popups and error states
- set-cookie — set cookies with control over domain, path, security and expiry
- download-file and download_image — download by clicking a link, or fetch an image by URL or selector
- generate_pdf — produce a PDF from a URL or from HTML content
- tips — the usage notes the project recommends reading first
Chrome or Chromium installed and on PATH, and Go 1.19 or higher to build the binary. Instance limits are configurable: CHROME_MAXIMUM_INSTANCE for how many can run at once, CHROME_TTL for how long an idle instance lives, and CHROME_EXE_TIMEOUT for the operation timeout. The project describes itself as under development.
