hwatu logo

hwatu

Fast, interruptible verification browser for AI coding agents: 35 ms checks, pixel diffs, live human hand-off

Website GitHub

What is it?

What it is

Hwatu is a lightweight, warm‑daemon WebKitGTK browser written in Rust that provides fast, single‑call verification primitives for AI agents and allows seamless human hand‑off of live sessions.

Why it exists

It was created to eliminate the latency and resource waste of cold libraries like Playwright, avoid the focus‑stealing and overhead of full‑featured browsers, and give agents a deterministic, low‑cost way to prove visual and functional correctness with a single tool call.

Who should use it

AI agent developersLLM application engineersFrontend automation engineersDevelopers using Claude Code or CursorLinux users looking for high-performance browser automation

Who should avoid it

Windows and macOS users (Linux-only)Developers requiring Chromium-specific renderingUsers needing heavy-weight browser features (extensions, sync, etc.)

How it works

A quick walkthrough in plain English

How hwatu works

Step 1 of 3

You interact with it

Open hwatu, send a request, or connect it to your stack.

Features

Pixel-diff scoring with match percent, regions, and heatmap
Animations as numeric summaries (duration, easing, velocity)
Deterministic animation frames via time pinning
Page state snapshot as JSON tokens
Real input events with structured error reporting
JavaScript console and failed request monitoring
Push event subscriptions as JSON lines or MCP notifications
One-call page assertions with polling
Per-window headless/background/headed property switchable live
Human hand-off via live session focus
CAPTCHA/anti-bot detection with structured wait/resume
MCP server, plain CLI, and 1-line JSON socket protocol
Minimal WebKit browser for humans with ad blocking and crash restore

Advantages

  • Fast verification pass (~35 ms median) with a single tool call
  • Warm daemon design keeps engine and GPU context hot, eliminating cold starts
  • Headless by default prevents focus stealing while agents run
  • Small binary footprint (static binary + system WebKitGTK)
  • No need to download or ship Chromium
  • Deterministic animation handling reduces flakiness
  • Human hand-off preserves session state for debugging
  • Built-in CAPTCHA detection and structured wait
  • Cross‑agent compatibility via MCP, CLI, or socket
  • Linux‑only simplifies dependencies and packaging

Disadvantages

  • Linux‑only; no native support for Windows or macOS
  • Relies on WebKitGTK, not Chromium, which may affect rendering parity
  • AGPL‑3.0 license may be restrictive for some projects
  • Limited feature set compared to full Playwright or CDP APIs
  • Requires system WebKitGTK 6.0 to be installed
  • Potential learning curve for new users unfamiliar with WebKit

Installation

native

curl -fsSL https://raw.githubusercontent.com/hongnoul/hwatu/main/scripts/install.sh | bash
hwatu setup
# Or on Arch: yay -S hwatu
# Or from source: cargo build --release

FAQ

How does hwatu improve agent performance compared to Playwright?

Hwatu operates as a 'warm daemon' rather than a library. While Playwright requires engine startup for each task or complex manual connection management, hwatu keeps the engine, GPU context, and WebView prewarmed. This allows a full verification pass (load, eval, screenshot) to complete in ~35ms with a single tool call, whereas a warm Playwright server can take ~341ms and requires multiple API calls.

Can I interact with a headless browser session if the agent gets stuck?

Yes. Unlike most tools where headless mode is fixed at launch, hwatu treats headless as a window property. You can use the `hwatu focus <id>` command to materialize the live session into your tiling window manager, allowing you to handle CAPTCHAs or complex UI tasks before handing control back to the agent.

What are the system requirements and installation methods?

Hwatu is currently Linux-only and requires `webkitgtk-6.0`. You can install it via a shell script (`curl -fsSL... | bash`), via `yay -S hwatu` on Arch Linux, or by building from source using `cargo build --release`.

How do I connect my AI agent to hwatu?

Hwatu supports multiple connection methods: via the Model Context Protocol (MCP), a native Unix socket for Jcode, or a simple CLI. For manual MCP configuration, add the following to your config: `{"mcpServers": {"hwatu": {"command": "hwatu", "args": ["mcp"]}}}`.

What kind of verification metrics does hwatu provide?

Hwatu provides advanced verification primitives including pixel-diff scoring (with match percentage, regions, and heatmaps), animation metrics (duration, easing, and velocity), and structured JSON output for page state, console logs, and network requests.

Loading documentation…
View on GitHub

Featured in Videos

YouTube tutorials and walkthroughs for hwatu

Alternatives

Similar projects ranked by category, topics, and text overlap.

Compare
hwatu | MushyBook