Skip to main content
This section details the Palyra peripheral application ecosystem, focusing on the Manifest V3 browser extension and the mobile application stubs for Android and iOS. These components extend the daemon’s reach into the user’s active browsing context and mobile notification surfaces.

Browser Extension

The Palyra Browser Extension is a Manifest V3 compliant component designed to provide the palyra-daemon with high-fidelity DOM snapshots and relay capabilities. It operates with a loopback-only security posture, ensuring that it only communicates with a locally running or explicitly paired Palyra instance.

Core Architecture and Data Flow

The extension serves as a bridge between the browser’s internal state (DOM, tabs, cookies) and the palyra-browserd service. It uses a relay dispatch mechanism to handle requests from the agent.

Implementation Details

  • Manifest V3: Utilizes service workers for background processing and fine-grained permission scoping.
  • DOM Snapshotting: Captures the current state of the active tab, including computed styles and accessibility trees, to provide context to the LLM.
  • Relay Dispatch: Routes commands from the BrowserService gRPC interface to the specific browser tab.

Security Posture

The extension enforces a strict security model:
  1. Loopback-Only: By default, the extension only accepts connections from 127.0.0.1 to prevent cross-site request forgery (CSRF) or unauthorized remote control.
  2. Pairing Flow: Remote instances must undergo a pairing handshake, involving a PIN or QR code, which is managed via the AccessSection in the Web Console apps/web/src/console/sections/AccessSection.tsx#65-167.
  3. SSRF Protection: Integration with the daemon’s egress proxy ensures that the extension cannot be used as a proxy to scan internal networks.

Pairing and Trust

Devices, including browsers running the extension, must be enrolled in the Palyra Inventory. The pairing process is orchestrated through the useSupportDomain hook apps/web/src/console/hooks/useSupportDomain.ts#26-121. Browser Trust Lifecycle
  1. Discovery: The extension detects a Palyra daemon via a local handshake.
  2. Pairing Request: The user initiates pairing, creating a NodePairingRequestView apps/web/src/console/sections/AccessSection.tsx#73-73.
  3. Approval: The operator approves the request in the Access section apps/web/src/console/sections/AccessSection.tsx#148-151.
  4. Active Session: The extension receives a certificate and enters the “trusted” state.

Code Entity Mapping: Browser Service

The following diagram bridges the logical browser service concepts to the implementation entities. Browser Extension Logic to Code Mapping Sources: apps/desktop/ui/src/components/QuickFactsCard.tsx#62-70, apps/web/src/console/hooks/useSupportDomain.ts#72-74

Mobile Application Stubs

Palyra includes stubs for Android and iOS applications, located in apps/android/ and apps/ios/. These are currently designed as thin clients for the Web Console with native notification support.

Features and Capabilities

  • A2UI Rendering: Mobile apps use the same Adaptive Agent UI (A2UI) renderer as the web console to display run streams and tool outputs.
  • Push Notifications: Integration with the ChannelRouter to receive alerts for “AskEachTime” tool approvals or high-priority routine completions.
  • Identity Integration: Mobile devices use the palyra-identity crate logic to maintain mTLS connections to the daemon, similar to the CLI pairing flow.

Implementation Status

FeatureAndroidiOS
gRPC StubsGenerated (Kotlin)Generated (Swift)
mTLS AuthSupportedSupported
A2UI WebViewFunctionalFunctional
Background RelayExperimentalExperimental
Sources: apps/android/README.md#1-10, apps/ios/README.md#1-10

Integration with Channel Connectors

The browser extension and mobile apps often interact with the ChannelRouter when the agent requires human intervention (e.g., via Discord or Slack).

Discord Onboarding and Verification

The mobile and web interfaces provide specialized panels for managing these connections, such as the DiscordOnboardingPanel apps/web/src/features/channels/connectors/discord/components/DiscordOnboardingPanel.tsx. Operators can trigger test messages to verify that the mobile relay or browser notifications are correctly routed apps/web/src/features/channels/connectors/discord/components/DiscordConnectorActionsPanel.tsx#23-55. Channel Dispatch Flow Sources: apps/web/src/consoleApi/channels/discord.ts#10-29, apps/web/src/features/channels/connectors/discord/components/DiscordConnectorActionsPanel.tsx#78-84

Monitoring and Health

The health of the browser service and peripheral apps is monitored by the desktop supervisor and reported in the ControlCenterSnapshot apps/desktop/ui/src/components/HealthStrip.tsx#97-117. Key health metrics include: Sources: apps/desktop/ui/src/components/HealthStrip.tsx#97-117, apps/desktop/ui/src/components/QuickFactsCard.tsx#62-77, apps/web/src/console/sections/AccessSection.tsx#98-100