Skip to main content
The palyra-browserd daemon is a dedicated service responsible for headless browser orchestration within the Palyra platform. It provides a secure, resource-constrained environment for AI agents to interact with the web using the Chromium engine via the Chrome DevTools Protocol (CDP).

Role in the Platform

palyra-browserd acts as a specialized worker that abstracts complex browser interactions into a high-level gRPC API. It is designed to be decoupled from the main palyrad daemon, allowing it to run in isolated environments (e.g., separate containers or sandboxes) to mitigate risks associated with executing untrusted web content. Key Integration Points:

System Architecture

The following diagram illustrates the relationship between the code entities that manage the browser lifecycle and the external components they interact with. Browser Automation Entity Map Sources: crates/palyra-browserd/src/transport/grpc/service.rs#7-12, crates/palyra-browserd/src/support/tests.rs#80-101, crates/palyra-daemon/src/transport/http/handlers/console/browser.rs#15-22

BrowserService gRPC API

The primary interface for automation is the BrowserService defined in browser.proto. This API provides comprehensive control over browser sessions, tabs, and page interactions. Core Capabilities: For a full breakdown of the protobuf definitions and request/response structures, see BrowserService gRPC API.

Session Lifecycle and Security

Every browser interaction occurs within a BrowserSession. These sessions are governed by strict SessionBudget constraints to prevent resource exhaustion. Security Controls: For details on how Chromium is launched and how sessions are secured, see Browser Session Lifecycle and Security.

Browser Extension Integration

The apps/browser-extension allows the Palyra platform to bridge the gap between the headless daemon and the user’s actual browser. This is primarily achieved through the RelayAction mechanism. Integration Flow:
  1. The extension generates a RelayAction (e.g., CAPTURE_SELECTION).
  2. The action is sent to palyra-browserd via gRPC schemas/proto/palyra/v1/browser.proto#35-35.
  3. The daemon correlates the relay token with an active session to ingest the data (e.g., cookies or page snapshots).
For details on the extension architecture and relay protocol, see Browser Extension.

CLI Tooling

The palyra CLI provides an operator interface for managing the browser daemon. It supports starting/stopping the service, creating sessions, and executing manual automation steps for debugging crates/palyra-cli/src/commands/browser.rs#174-234. Common Commands:

Child Pages

Sources:
  • schemas/proto/palyra/v1/browser.proto (API Definitions)
  • crates/palyra-browserd/src/lib.rs (Constants and Dependencies)
  • crates/palyra-browserd/src/transport/grpc/service.rs (Service Implementation)
  • crates/palyra-cli/src/commands/browser.rs (CLI Logic)
  • crates/palyra-daemon/src/transport/http/handlers/console/browser.rs (Console Proxy)

Child Pages