> ## Documentation Index
> Fetch the complete documentation index at: https://docs-code.palyra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 10. Frontend Applications

<details>
  <summary>Relevant source files</summary>

  The following files were used as context for generating this wiki page:

  * apps/desktop/README.md
  * apps/desktop/src-tauri/src/commands.rs
  * apps/desktop/src-tauri/src/companion.rs
  * apps/desktop/src-tauri/src/desktop\_state.rs
  * apps/desktop/src-tauri/src/lib.rs
  * apps/desktop/src-tauri/src/onboarding.rs
  * apps/desktop/src-tauri/src/profile\_registry.rs
  * apps/desktop/src-tauri/src/snapshot.rs
  * apps/desktop/src-tauri/src/supervisor.rs
  * apps/desktop/src-tauri/src/tests.rs
  * apps/desktop/src-tauri/src/tests/support.rs
  * apps/web/README.md
  * apps/web/src/App.test.tsx
  * apps/web/src/App.tsx
  * apps/web/src/console/sections/MemorySection.tsx
  * apps/web/src/console/useConsoleAppState.tsx
  * apps/web/src/consoleApi.test.ts
  * apps/web/src/consoleApi.ts
  * crates/palyra-daemon/src/application/learning.rs
  * crates/palyra-daemon/src/transport/http/handlers/console/memory.rs
</details>

Palyra provides three primary frontend surfaces for human operators to interact with the daemon and manage agent lifecycles. These applications are built using a shared set of protocol definitions and UI patterns to ensure consistency across the web, desktop, and browser environments.

## Overview of Frontend Surfaces

The frontend ecosystem is designed around the **Console API**, a specialized HTTP/JSON interface exposed by the daemon for administrative and interactive tasks.

| Application           | Technology           | Primary Role                                                                           | Deployment                             |
| :-------------------- | :------------------- | :------------------------------------------------------------------------------------- | :------------------------------------- |
| **Web Console**       | React / Vite         | Full administration, memory management, and session orchestration.                     | Hosted by `palyrad` or standalone VPS. |
| **Desktop App**       | Tauri / Rust / React | Sidecar supervision (palyrad/browserd), local node management, and ambient voice/chat. | Local installation (Win/macOS).        |
| **Browser Extension** | Manifest V3          | DOM snapshots, loopback relay, and secure pairing.                                     | Browser stores (Chrome/Edge).          |

### System Relationship Diagram

The following diagram illustrates how the different frontend entities relate to the `palyrad` daemon and its internal services.

```mermaid theme={null}
graph TD
    subgraph "Frontend Layer"
        WC["Web Console (React)"]
        DT["Desktop App (Tauri)"]
        BE["Browser Extension (MV3)"]
    end

    subgraph "Daemon Layer (palyrad)"
        C_API["Console API Router"]
        AUTH["Auth Service"]
        JOURNAL["Journal Store (SQLite)"]
        SUPER["Supervisor (Desktop Only)"]
    end

    WC -- "REST/SSE" --> C_API
    DT -- "Tauri Command" --> SUPER
    DT -- "REST/SSE" --> C_API
    BE -- "Loopback REST" --> C_API

    C_API -- "Verify Session" --> AUTH
    C_API -- "Query/Write" --> JOURNAL
```

**Sources:** [apps/web/src/consoleApi.ts#1-23](http://apps/web/src/consoleApi.ts#1-23), [apps/desktop/src-tauri/src/supervisor.rs#1-41](http://apps/desktop/src-tauri/src/supervisor.rs#1-41), [crates/palyra-daemon/src/transport/http/handlers/console/memory.rs#1-12](http://crates/palyra-daemon/src/transport/http/handlers/console/memory.rs#1-12)

***

## 10.1. Web Console (React)

The Web Console is the most feature-complete interface for Palyra. It is a React-based Single Page Application (SPA) that communicates with the daemon via the `ConsoleApiClient` [apps/web/src/consoleApi.ts#147-148](http://apps/web/src/consoleApi.ts#147-148).

### Key Architecture Components

* **ConsoleApiClient**: A centralized client for all `/console/v1` routes, handling CSRF tokens, session persistence, and streaming responses [apps/web/src/consoleApi.ts#1-23](http://apps/web/src/consoleApi.ts#1-23).
* **useConsoleAppState**: The root state machine for the console, managing global domains like `auth`, `memory`, `skills`, and `channels` [apps/web/src/console/useConsoleAppState.tsx#146-180](http://apps/web/src/console/useConsoleAppState.tsx#146-180).
* **Memory Section**: A sophisticated UI for managing the RAG pipeline, including learning candidate review, workspace document editing, and retrieval diagnostics [apps/web/src/console/sections/MemorySection.tsx#131-190](http://apps/web/src/console/sections/MemorySection.tsx#131-190).

For deep technical details on the console architecture, state management, and the A2UI renderer, see **[Web Console (React)](/frontend_applications/web_console_react)**.

**Sources:** [apps/web/src/consoleApi.ts#147-148](http://apps/web/src/consoleApi.ts#147-148), [apps/web/src/console/useConsoleAppState.tsx#1-53](http://apps/web/src/console/useConsoleAppState.tsx#1-53), [apps/web/src/console/sections/MemorySection.tsx#39-112](http://apps/web/src/console/sections/MemorySection.tsx#39-112)

***

## 10.2. Desktop Application (Tauri)

The Desktop Application serves as a control center for local Palyra instances. It uses **Tauri** to bridge a React-based UI with a Rust-based supervisor that manages local sidecar processes [apps/desktop/src-tauri/src/supervisor.rs#1-18](http://apps/desktop/src-tauri/src/supervisor.rs#1-18).

### Supervisor and Sidecars

The desktop app supervises the lifecycle of three primary services:

1. **Gateway (`palyrad`)**: The main daemon [apps/desktop/src-tauri/src/supervisor.rs#52-52](http://apps/desktop/src-tauri/src/supervisor.rs#52-52).
2. **Browserd**: The browser automation service [apps/desktop/src-tauri/src/supervisor.rs#53-53](http://apps/desktop/src-tauri/src/supervisor.rs#53-53).
3. **Node Host**: The local capability execution host [apps/desktop/src-tauri/src/supervisor.rs#54-54](http://apps/desktop/src-tauri/src/supervisor.rs#54-54).

### Desktop-Specific Features

* **Process Supervision**: Automatic restart logic with exponential backoff for sidecars [apps/desktop/src-tauri/src/supervisor.rs#127-139](http://apps/desktop/src-tauri/src/supervisor.rs#127-139).
* **Companion Shell**: Ambient UI features including a tray-based quick panel and a voice overlay for push-to-talk interaction [apps/desktop/src-tauri/src/desktop\_state.rs#50-57](http://apps/desktop/src-tauri/src/desktop_state.rs#50-57).
* **Local Secrets**: Management of encryption keys and admin tokens via the `DesktopSecretStore` [apps/desktop/src-tauri/src/desktop\_state.rs#23-27](http://apps/desktop/src-tauri/src/desktop_state.rs#23-27).

For details on the supervisor, desktop state persistence, and onboarding flows, see **[Desktop Application (Tauri)](/frontend_applications/desktop_application_tauri)**.

**Sources:** [apps/desktop/src-tauri/src/supervisor.rs#48-87](http://apps/desktop/src-tauri/src/supervisor.rs#48-87), [apps/desktop/src-tauri/src/lib.rs#32-44](http://apps/desktop/src-tauri/src/lib.rs#32-44), [apps/desktop/src-tauri/src/desktop\_state.rs#1-27](http://apps/desktop/src-tauri/src/desktop_state.rs#1-27)

***

## 10.3. Browser Extension and Mobile Apps

The Browser Extension provides the "eyes" for the agent within the user's web browser, while the mobile apps provide on-the-go access to approvals and voice notes.

### Extension Capabilities

* **DOM Snapshots**: Capturing the current state of a webpage for the agent.
* **Loopback Relay**: Securely dispatching requests from the browser to the local daemon.
* **Pairing Flow**: Facilitating the trust handshake between the browser and the Palyra node.

### Mobile Companion

The `ConsoleApiClient` includes specific endpoints for mobile bootstrap and voice note creation, allowing mobile stubs to interact with the same backend infrastructure as the web console [apps/web/src/consoleApi.test.ts#121-150](http://apps/web/src/consoleApi.test.ts#121-150).

For details on the Manifest V3 extension architecture and mobile integration, see **[Browser Extension and Mobile Apps](/frontend_applications/browser_extension_and_mobile_apps)**.

**Sources:** [apps/web/src/consoleApi.test.ts#121-150](http://apps/web/src/consoleApi.test.ts#121-150), [apps/desktop/src-tauri/src/desktop\_state.rs#91-104](http://apps/desktop/src-tauri/src/desktop_state.rs#91-104)

***

## Shared Contracts and Communication

All frontend applications rely on a unified set of contracts defined in the `palyra-common` crate and shared Protobuf schemas.

### Frontend Communication Entities

```mermaid theme={null}
classDiagram
    class ConsoleApiClient {
        +getSession()
        +login(credentials)
        +listCronJobs()
        +getOnboardingPosture()
    }
    class ManagedService {
        +ServiceKind kind
        +bool desired_running
        +Child child
        +restart()
    }
    class DesktopStateFile {
        +u32 schema_version
        +DesktopOnboardingStep step
        +DesktopCompanionAmbientState ambient
    }

    ConsoleApiClient ..> DesktopStateFile : consumes handoff
    ManagedService --|> ServiceKind
```

**Sources:** [apps/web/src/consoleApi.ts#243-250](http://apps/web/src/consoleApi.ts#243-250), [apps/desktop/src-tauri/src/supervisor.rs#129-139](http://apps/desktop/src-tauri/src/supervisor.rs#129-139), [apps/desktop/src-tauri/src/desktop\_state.rs#1-27](http://apps/desktop/src-tauri/src/desktop_state.rs#1-27)

## Child Pages

* [Web Console (React)](/frontend_applications/web_console_react)
* [Desktop Application (Tauri)](/frontend_applications/desktop_application_tauri)
* [Browser Extension and Mobile Apps](/frontend_applications/browser_extension_and_mobile_apps)
