Skip to main content

Browser Agent

The meshbrow-agent is a daemon that runs alongside each browser session inside its network namespace or Firecracker VM. It provides health monitoring, process supervision, metrics collection, and filesystem watching.
The agent is automatically deployed by the Meshbrow platform. You only need to install it manually for self-hosted or custom setups.

Installation

Verify the installation:

Usage

Configuration

What It Does

The agent provides five core capabilities:

Health Reporting

Sends periodic heartbeats to the host (browserd) over the unix socket. Reports:
  • Browser process alive/dead status
  • CPU and memory usage
  • Uptime
  • Process ID

Browser Process Supervision

Monitors the Chromium process. If the browser crashes, the agent reports it immediately via a health status change, allowing browserd to restart or destroy the session.

Metrics Collection

Collects system metrics at configurable intervals:
  • CPU utilization
  • Memory usage (used/total)
  • Disk usage
  • Network I/O (bytes sent/received)
  • Open file descriptors
  • Active goroutines

Filesystem Watching

Monitors the session workspace for changes and streams events:
  • File creation
  • File modification
  • File deletion
Excludes noise directories (.git, node_modules, __pycache__).

Graceful Shutdown

Handles SIGTERM and SIGINT signals. On shutdown:
  1. Stops all subsystems (heartbeat, metrics, watcher)
  2. Sends a deregistration message to the host
  3. Exits cleanly

Architecture

Protocol Messages

The agent communicates via newline-delimited JSON over the unix socket.

Agent → Host

Host → Agent

Building from Source

Development