Core Architecture
The platform is built as a modular monorepo primarily in Rust, with a React-based web console and a Tauri-based desktop supervisor. At its heart, thepalyra-daemon (palyrad) acts as the central orchestrator.
High-Level System Context
The following diagram illustrates how the primary code entities interact to form the Palyra platform. Palyra System Map Sources: crates/palyra-daemon/src/bin/palyrad.rs#11-14, crates/palyra-cli/src/bin/palyra.rs#11-14, Cargo.toml#1-19Key Subsystems
1. Control Plane & Daemon (palyrad)
The daemon manages the lifecycle of “Runs,” which are units of agent execution. It handles message routing, state persistence in a SQLite-backed Journal, and integrates with various LLM providers.
- For details, see Core Daemon (palyrad)
2. Security & Identity
Palyra employs a layered security model. Identity is managed via mTLS and X.509 certificates generated bypalyra-identity. Authorization decisions are offloaded to palyra-policy, which leverages the Cedar policy language. Sensitive data is stored in palyra-vault using envelope encryption.
- For details, see Security Architecture
3. Execution & Sandboxing
Tools and skills are executed within restricted environments. The platform supports multiple sandbox tiers, including WebAssembly (Wasm) viawasmtime for lightweight plugins and OS-level sandboxing for more complex tasks.
- For details, see Sandbox Execution Tiers and WebAssembly Plugin Runtime
4. Connectors & Channels
Palyra communicates with the outside world throughpalyra-connectors. These adapters normalize communication from platforms like Discord or Slack into a standard format the daemon can process.
- For details, see Channel Connectors
Codebase Navigation
The repository is organized as a Cargo workspace with clear separation between core logic, applications, and shared schemas.| Directory | Purpose | Key Entities |
|---|---|---|
crates/ | Core library components | palyra-common, palyra-vault, palyra-sandbox |
apps/ | End-user applications | web, desktop, browser-extension |
schemas/ | Cross-language definitions | Protobuf (.proto), JSON Schema (.json) |
scripts/ | Tooling and CI/CD | bootstrap.sh, protocol-generate |
Licensing
Palyra is source-available under the Palyra Community Source License (PCSL) v1.1. This allows for personal and internal commercial use but prohibits the creation of competitive standalone products or services.- For details, see Repository Structure and Workspace Layout
- Sources: LICENSE#1-15, README.md#9-12
Next Steps
- To understand the physical layout of the code and licensing in depth, see Repository Structure and Workspace Layout.
- To set up your local development environment, follow the Getting Started: Setup and Development Environment guide.