Skip to main content
The Palyra Plugin and Skills system provides a secure, sandboxed execution environment for extending agent capabilities. It leverages WebAssembly (WASM) to ensure that third-party code (Skills) can be executed with fine-grained resource limits and explicit capability grants. The system is divided into a high-level packaging and trust layer (Skills) and a low-level execution runtime (Plugins).

System Overview

The architecture follows a “Guest-Host” model where the palyrad daemon acts as the host, managing a pool of WASM modules.
ComponentRoleCrate
Plugin RuntimeThe wasmtime-based host that executes modules.palyra-plugins-runtime
Plugin SDKGuest-side library for building WASM modules.palyra-plugins-sdk
Skills LayerPackaging, signing, and manifest management.palyra-skills
RunnerOrchestrates module resolution and execution policy.palyra-daemon

Architecture and Data Flow

The following diagram illustrates how a Natural Language request for a tool eventually triggers a sandboxed WASM execution via the WasmPluginRunner. Tool Execution Pipeline Sources: crates/palyra-daemon/src/wasm_plugin_runner.rs#96-126, crates/palyra-daemon/src/plugins.rs#13-18, crates/palyra-plugins/runtime/src/lib.rs#133-150

9.1 WASM Plugin Runtime

The palyra-plugins-runtime crate implements a hardened host for WebAssembly using wasmtime. It enforces strict isolation through several mechanisms: The WasmPluginRunnerPolicy in the daemon defines the global constraints for all plugins, such as whether inline modules are allowed and the maximum allowed module size crates/palyra-daemon/src/wasm_plugin_runner.rs#18-30. For details, see WASM Plugin Runtime.

9.2 Skills: Packaging, Trust, and Audit

Skills are the distribution units for Palyra extensions. A Skill is a signed artifact containing a WASM module and a skill.toml manifest that declares its identity and required capabilities.

The Skill Manifest

The SkillManifest defines the metadata, entrypoints (tools), and requested capabilities. Entrypoints specify the input_schema and output_schema using JSON Schema, allowing the LLM to understand how to invoke the tool crates/palyra-skills/examples/echo-http/skill.toml#8-22.

Trust and Security

The system implements a multi-stage trust model:
  1. Verification: Ensuring the artifact signature matches the publisher’s key crates/palyra-skills/src/lib.rs#24-24.
  2. Auditing: The audit_skill_artifact_security function scans the WASM module for suspicious imports or excessive exports crates/palyra-skills/src/lib.rs#12-12.
  3. Trust States: Skills can be in Quarantine, TOFU (Trust On First Use), or Trusted states.
Skill Lifecycle and Management Sources: crates/palyra-daemon/src/transport/http/handlers/console/plugins.rs#109-113, crates/palyra-daemon/src/plugins.rs#93-100, crates/palyra-daemon/src/hooks.rs#45-54 For details, see Skills: Packaging, Trust, and Audit.

Hooks and Automation

The system supports a Hook mechanism where plugin execution can be triggered by system events rather than direct LLM tool calls. Sources: crates/palyra-daemon/src/hooks.rs#1-17

Child Pages