Skip to main content
Palyra provides a comprehensive suite of tools for monitoring, controlling, and diagnosing the behavior of the agentic system. This subsystem bridges the gap between high-level business constraints (budgets, model selection) and low-level system health (telemetry, self-healing). The observability stack is built on a foundation of RuntimeCounters and the JournalStore, which feed into real-time dashboards and automated governance loops.

System Overview

The governance and observability architecture is centered around the palyrad daemon’s ability to track every token, tool call, and system event.
ComponentRoleCode Entity
Usage GovernanceEnforces budget policies and smart routing.usage_governance.rs
DiagnosticsAggregates system state for troubleshooting.diagnostics.rs
Observability StateTracks real-time counters and failure classes.observability.rs
Support BundlesGenerates redacted system snapshots.support_bundle.rs

Code-to-Entity Mapping (Governance Flow)

The following diagram illustrates how high-level usage concepts map to specific backend implementation structures. Usage Decision Pipeline Sources: crates/palyra-daemon/src/usage_governance.rs#8-21, crates/palyra-daemon/src/transport/http/handlers/console/usage.rs#11-18

Usage Governance & Budget Policies

Usage Governance is responsible for ensuring that agent runs stay within defined financial and operational boundaries. It evaluates every request against a set of UsageBudgetPolicyRecord entries to determine if a run should proceed, be throttled, or require an manual override. Key features include: For details on policy configuration and CLI commands, see Usage Governance & Budget Policies. Sources: crates/palyra-daemon/src/usage_governance.rs#26-51, crates/palyra-daemon/src/usage_governance.rs#133-146

Diagnostics, Self-Healing & Support Bundles

The diagnostics system provides a unified view of the daemon’s internal state, covering everything from memory maintenance to model provider connectivity. Diagnostics Aggregation Map Sources: crates/palyra-daemon/src/transport/http/handlers/console/diagnostics.rs#6-66, crates/palyra-daemon/src/transport/http/handlers/console/support_bundle.rs#1-30

Key Observability Components

For details on incident remediation and the redaction pipeline, see Diagnostics, Self-Healing & Support Bundles. Sources: crates/palyra-daemon/src/transport/http/handlers/console/diagnostics.rs#100-142, crates/palyra-daemon/src/observability.rs#92-94

Real-time Telemetry & Costs

The system tracks usage across several dimensions to provide immediate insights into the “Model Mix” and operational costs.

Metric Tracking

The UsageSection in the Web Console visualizes data derived from the UsageSummaryEnvelope, which includes:

Model Mix Telemetry

The daemon maintains records of which models are being used and their relative performance. Sources: apps/web/src/console/sections/UsageSection.tsx#95-143, crates/palyra-daemon/src/transport/http/handlers/console/usage.rs#191-210

Child Pages