Skip to main content
The Palyra daemon (palyrad) exposes three distinct network interfaces to facilitate communication between the core orchestration engine, user interfaces, remote execution nodes, and third-party integrations. These interfaces are built on a mix of REST/HTTP for management, gRPC over HTTP/2 for structured service calls, and mTLS-secured RPC over QUIC for distributed node operations.

Network Interface Overview

The transport layer is primarily defined within the palyra-daemon crate under the transport module crates/palyra-daemon/src/lib.rs#34. It manages the lifecycle of the Axum-based HTTP server and the Tonic-based gRPC server.
InterfaceProtocolPrimary PurposeSecurity
Admin/Console APIHTTP/1.1 & 2Web Dashboard, CLI management, Canvas UI.Session Cookies, API Tokens, CSRF protection.
Gateway gRPCgRPC (HTTP/2)Structured agent interaction, streaming runs.Static Auth Tokens, mTLS (optional).
Node RPCRPC over QUICRemote node orchestration, skill execution.mTLS (Device Identity), TOFU pairing.

Transport Architecture

The following diagram illustrates how incoming requests are routed through the various transport handlers to the central AppState. Diagram: Transport Routing and Code Entities Sources: crates/palyra-daemon/src/transport/http/router.rs#17-133, crates/palyra-daemon/src/lib.rs#170-182, crates/palyra-daemon/src/app/state.rs#1-100

Admin and Console HTTP API

The HTTP surface is managed via axum and is split into several functional namespaces. The build_router function crates/palyra-daemon/src/transport/http/router.rs#17 defines the routing logic for: For details on specific routes and authentication, see Admin and Console HTTP API.

gRPC Services and Protocol Buffers

Palyra uses gRPC for high-performance, bidirectional streaming between the daemon and its clients (like the CLI). The schemas are defined in .proto files within the schemas/ directory crates/palyra-daemon/src/lib.rs#170-173.
  • Gateway Service: The primary entry point for starting “Runs” and receiving event streams.
  • Browser Service: Controls the palyra-browserd instance for headless automation.
  • Auth Service: Manages credential exchange and session validation.
For details on the Protobuf definitions and service implementation, see gRPC Services and Protocol Buffers.

QUIC Transport and Node RPC

The Node RPC interface is the backbone of Palyra’s distributed capabilities. It utilizes the palyra-transport-quic crate, built on top of quinn, to provide a secure, multiplexed connection between the central daemon and remote execution nodes.
  • mTLS Security: Every node connection requires a valid DeviceIdentity certificate crates/palyra-daemon/src/lib.rs#142-143.
  • Node Pairing: A Trust-On-First-Use (TOFU) handshake allows new nodes to be authorized by the daemon.
  • Task Dispatch: Used for offloading heavy skill execution or browser automation to remote hardware.
For details on the QUIC implementation and node lifecycle, see QUIC Transport and Node RPC.

Security and Middleware

All transport interfaces are wrapped in layers of security middleware crates/palyra-daemon/src/transport/http/middleware.rs#1: Diagram: HTTP Middleware Pipeline Sources: crates/palyra-daemon/src/transport/http/middleware.rs#28-52, crates/palyra-daemon/src/transport/http/handlers/console/diagnostics.rs#10

Child Pages