palyrad daemon. It follows a modular architecture where the ConsoleShell acts as the primary layout container, routing between specialized functional sections.
Console Section Architecture
The console is organized into functional “Sections,” each represented by a unique ID and mapped to specific routes and UI components. This modularity allows the dashboard to scale across observability, control, agent management, and system settings.Navigation and Routing
Routing is handled by theConsoleShell and ConsoleSectionContent components, which map Section IDs to their respective React views apps/web/src/console/ConsoleSectionContent.tsx#26-106. Navigation is structured into five logical groups: Chat, Observability, Control, Agent, and Settings apps/web/src/console/navigation.ts#26-52.
| Group | Section ID | Path | Description |
|---|---|---|---|
| Chat | chat | /chat | Interactive agent communication interface. |
| Observability | overview, sessions, usage, logs, inventory, support | /control/* | System status, run history, token usage, and diagnostics. |
| Control | approvals, cron, channels, browser | /control/* | Human-in-the-loop approvals, scheduled tasks, and integrations. |
| Agent | agents, skills, memory | /agent/* | Agent configuration, tool/skill management, and long-term memory. |
| Settings | auth, access, config, secrets, operations | /settings/* | Provider profiles, security policies, and daemon configuration. |
Data Flow and State Management
Each section typically utilizes a specialized “Domain Hook” (e.g.,useUsageDomain, useConfigDomain) to manage its local state and interface with the ConsoleApiClient. Global state, such as the active session and theme, is managed by useConsoleAppState apps/web/src/console/useConsoleAppState.tsx#164-211.
Dashboard Data Flow
Sources: apps/web/src/console/ConsoleSectionContent.tsx#26-106, apps/web/src/console/useConsoleAppState.tsx#164-211, apps/web/src/console/navigation.ts#54-74
Key Observability Sections
Overview and Usage
The Overview provides a high-level heartbeat of the system, while the Usage section (UsageSection) provides deep insights into token consumption, costs, and model performance.
- Token Tracking: Aggregates prompt and completion tokens across windows (24h, 7d, 30d, 90d) apps/web/src/console/sections/UsageSection.tsx#153-163.
- Cost Estimation: Displays USD estimates based on
UsagePricingRecorddata from the backend crates/palyra-daemon/src/usage_governance.rs#69-89. - Routing Insights: Visualizes how the daemon’s smart router selects models based on complexity and health apps/web/src/console/sections/UsageSection.tsx#183-205.
Logs and Inventory
- Logs: Streams system events and orchestrator run logs via the
JournalStore. - Inventory: Manages the
node_inventory, showing connected remote nodes and their pairing status apps/web/src/App.config-access-support.test.tsx#12-15.
Control and Settings Sections
Config and Secrets Management
The Config section allows for safe mutation of thepalyra.toml file through a “Migrate/Mutate/Recover” workflow, preventing manual syntax errors apps/web/src/App.config-access-support.test.tsx#40-69.
- Secrets: The
SecretsSectionmanages sensitive API keys. It supports “Explicit Reveal” where values remain redacted until an operator specifically requests a decryption view apps/web/src/App.config-access-support.test.tsx#128-142. - Vault Integration: Behind the scenes, these secrets are stored in the
palyra-vaultusingVaultRefURIs crates/palyra-cli/src/commands/models.rs#5-6.
Governance and Approvals
The Approvals section (ApprovalsSection) is the inbox for ToolCallPolicy violations or high-sensitivity actions requiring human intervention.
- Decision Scopes: Operators can approve actions “Once,” for a “Session,” or “Always” (Permanent) apps/web/src/console/useConsoleAppState.tsx#204.
- Budget Overrides: Allows operators to bypass usage limits if a specific run is blocked by budget policy crates/palyra-daemon/src/transport/http/handlers/console/usage.rs#126-129.
Implementation Details
Auto-Refresh Logic
To ensure data freshness without overloading the daemon, sections have defined Time-To-Live (TTL) values. TheshouldAutoRefreshSection utility determines if a section needs a background update apps/web/src/console/useConsoleAppState.tsx#42-72.
| Section | TTL (ms) |
|---|---|
| Overview | 10,000 |
| Usage / Operations | 10,000 |
| Config / Secrets | 15,000 |
Model Registry and Failover
The Models view (part of Config/Auth) visualizes theProviderRegistry. It displays the health state of model providers (OpenAI, Anthropic, etc.) and whether failover is currently active crates/palyra-cli/src/commands/models.rs#27-45.
Model Registry Code Mapping
Sources: apps/web/src/console/providerRegistry.ts#46-59, crates/palyra-cli/src/commands/models.rs#27-45
Support and Diagnostics
The Support section allows operators to trigger aSupportBundleJob. This collects daemon logs, redacted config, and system metadata into a ZIP file for troubleshooting apps/web/src/App.config-access-support.test.tsx#16-17. It leverages the runtime.doctor capability to generate JSON diagnostics apps/web/src/console/fixtures/m56ControlPlane.ts#73-79.
Sources:
- apps/web/src/console/useConsoleAppState.tsx#42-72 (TTL and Refresh)
- apps/web/src/console/navigation.ts#26-74 (Routes and Groups)
- apps/web/src/console/ConsoleSectionContent.tsx#26-106 (Routing Implementation)
- apps/web/src/console/sections/UsageSection.tsx#51-128 (Usage UI)
- crates/palyra-daemon/src/usage_governance.rs#69-130 (Usage Logic)
- apps/web/src/App.config-access-support.test.tsx#40-150 (Config/Secret Flow)
- apps/web/src/console/providerRegistry.ts#46-102 (Registry Types)
- apps/web/src/console/fixtures/m56ControlPlane.ts#5-105 (Capabilities and Fixtures)