Skip to main content
The Browser Service (palyra-browserd) is a specialized daemon responsible for high-fidelity browser automation and web content extraction. It acts as a secure wrapper around the Chromium engine, providing a gRPC interface for the Palyra ecosystem to perform actions like DOM manipulation, screenshot capture, and session-persistent web browsing.

System Overview

palyra-browserd is designed to run either as a local sidecar to the main daemon or as a remote service. It leverages the headless_chrome crate to control Chromium via the Chrome DevTools Protocol (CDP) crates/palyra-browserd/src/lib.rs#39-43.

Component Interaction

The following diagram illustrates how the Browser Service integrates with the broader Palyra architecture: Browser Service Context Diagram Sources: crates/palyra-browserd/src/transport/grpc/service.rs#9-11, crates/palyra-cli/src/commands/browser.rs#25-35, crates/palyra-daemon/src/transport/http/handlers/console/browser.rs#5-15.

Key Features

1. gRPC Service Interface

The service implements the BrowserService trait defined in palyra.browser.v1 crates/palyra-browserd/src/transport/grpc/service.rs#14-15. It handles requests for:

2. Browser Profiles & Persistence

The service supports named BrowserProfileRecord entities that store cookies and local storage. State is persisted using an encrypted PersistedStateStore crates/palyra-browserd/src/support/tests.rs#9-12.

3. Security & Domain Validation

The service enforces strict security boundaries:

4. Browser Extension (Relay Companion)

A Manifest V3 extension facilitates interaction between the user’s manual browsing and the daemon. It allows “relaying” page snapshots and selections directly to the palyra-browserd loopback interface.

Internal Architecture

The daemon is structured into several core modules:
  • engine: Manages the lifecycle of the Chromium process and tab allocation.
  • domain: Contains the logic for browser actions (Click, Type, Scroll).
  • persistence: Handles the encrypted SQLite storage for profiles.
  • transport: Implements the gRPC server and health check endpoints.
Code Entity Mapping: Service Implementation Sources: crates/palyra-browserd/src/transport/grpc/service.rs#9-11, crates/palyra-browserd/src/support/tests.rs#10-12.

Child Pages

For CLI usage, refer to the palyra browser command group documentation in CLI Command Reference crates/palyra-cli/src/commands/browser.rs#160-200.

Child Pages