Graphrt

Web Browser

Teks atau markdown yang mudah dibaca, link, ekstraksi dengan CSS selector dan screenshot. Hanya host publik (tanpa loopback, alamat privat atau metadata), menghormati robots.txt, tidak bisa mengklik atau mengetik

Stabil v0.2.1 Node.js 4 aksi Risiko ToS rendah
Pakai di Graphrt Desktop

Tentang

Plugin Graphrt untuk membuka halaman web publik secara hanya baca di Chromium headless (Playwright). Workflow dan agent bisa membaca halaman sebagai teks bersih atau markdown, menampilkan link-nya, mengambil nilai dengan CSS selector dan mengambil screenshot. Plugin ini tidak bisa mengklik, mengetik atau login, dan tidak membiarkan halaman menjangkau jaringan lokal kamu atau layanan metadata cloud.

Yang bisa dilakukan

  • fetch_page: returns the final URL, HTTP status, title, meta description, language, canonical URL, and the readable main text. Optionally it also returns markdown (headings, lists, links, tables, code) and the links in the content. Text and links are capped.
  • get_links: lists the page's unique http(s) links with their text. You can filter them by scope (all, same_host, same_domain) and by a wildcard pattern such as /blog/.
  • extract: takes fields, which maps names to a CSS selector (the text of the first match) or to {selector, attribute?, all?}. It returns one value per field, or a list for all: true. The selectors are CSS only and are run by a fixed in-page function.
  • screenshot: saves a PNG of the viewport, or of the full page up to max_height px, in WEB_BROWSER_SCREENSHOT_DIR and returns the path.
  • Waiting: every operation takes wait_until (load, domcontentloaded or networkidle), an optional wait_for_selector, and timeout_seconds (5–60).
  • One browser per plugin process: - Chromium starts on the first call and closes after WEB_BROWSER_IDLE_MINUTES without use, or when Graphrt stops the plugin. - Each call gets a fresh browser context, so no cookies, storage or cache carry over. At most WEB_BROWSER_MAX_PAGES pages are open at once, further calls wait their turn.

Aksi

Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.

  • Fetch web page web-browser.fetch_page
  • Get page links web-browser.get_links
  • Extract from page web-browser.extract
  • Screenshot web page web-browser.screenshot

Pengaturan

Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.

  • WEB_BROWSER_SCREENSHOT_DIR ~/.graphrt/web-browser/screenshots
    Where screenshot writes PNGs (created with mode 700, files are 600, names are generated)
  • WEB_BROWSER_RESPECT_ROBOTS 1
    0 ignores robots.txt
  • WEB_BROWSER_IDLE_MINUTES 5
    Close the background browser after this many idle minutes
  • WEB_BROWSER_MAX_PAGES 2
    Pages open at the same time (1–4), more calls wait
  • WEB_BROWSER_MAX_DOWNLOAD_MB 15
    Bytes one operation may download in total (1–100)
  • WEB_BROWSER_USER_AGENT (Chrome UA + plugin token)
    Replaces the user agent (one line, max 300 characters)

Cara memakainya

Di Graphrt Desktop

  1. Buka Plugins dan cari Web Browser.
  2. Klik Install lalu setujui.
  3. Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
  4. Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Plugin di Graphrt Desktop

Dengan CLI

terminal
$ graphrt plugin install web-browser
workflow.yaml
- { id: page, type: web-browser.fetch_page, url: "https://example.com/blog/post", include_markdown: true, max_chars: 8000 }
- { id: links, type: web-browser.get_links, url: "https://example.com/blog/", scope: same_host, pattern: "*/blog/20*" }
- { id: prices, type: web-browser.extract, url: "https://example.com/shop", fields: { title: "h1", prices: { selector: ".price", all: true }, next: { selector: "a.next", attribute: href } } }
- { id: shot, type: web-browser.screenshot, url: "https://example.com", full_page: true, max_height: 6000 }
Plugin di docs