Skip to main content
This page provides a technical deep dive into the specialized sections of the Palyra Web Console responsible for system diagnostics, usage governance, and the agent’s cognitive memory layers. These sections bridge the gap between high-level user intent and the underlying daemon state, providing observability into self-healing loops, token economics, and workspace knowledge.

Operations & Diagnostics

The OperationsSection serves as the primary observability hub for the daemon’s internal health and the palyrad self-healing subsystem. It surfaces diagnostic snapshots, audit events, and recovery job statuses.

Implementation & Data Flow

The section consumes a diagnosticsSnapshot provided by useConsoleAppState apps/web/src/console/useConsoleAppState.tsx#30. This snapshot is populated via the ConsoleApiClient calling the GET /console/v1/diagnostics endpoint. Key components of the Operations view include:

Diagnostics Architecture

The following diagram illustrates how the Web Console retrieves and displays operational health from the daemon’s internal services. Operational Health Data Flow Sources: apps/web/src/console/sections/OperationsSection.tsx#49-122, apps/web/src/console/useConsoleAppState.tsx#164-211

Usage & Governance

The UsageSection implements the UI for Palyra’s “Smart Routing” and token governance system. It allows operators to monitor model mix, estimated costs, and budget enforcement.

Key Logic & Metrics

Budget Enforcement

The daemon evaluates UsageBudgetPolicyRecord crates/palyra-daemon/src/usage_governance.rs#11-13 to determine if a run should be blocked or if an approval is required. The console surfaces these as “Usage Alerts” apps/web/src/console/sections/UsageSection.tsx#70-80. Usage Governance System Sources: crates/palyra-daemon/src/usage_governance.rs#28-51, crates/palyra-daemon/src/transport/http/handlers/console/usage.rs#162-188, apps/web/src/console/sections/UsageSection.tsx#95-143

Memory & Learning

The MemorySection provides a management interface for the daemon’s long-term knowledge base, including the Workspace (curated documents) and the Learning Queue (automated fact extraction).

Workspace Documents

The Workspace represents “Tier-1” memory. The console allows for:

Learning Review Queue

The Learning system automatically identifies potential facts or procedures from chat sessions. These are held in a queued state until an operator reviews them.

Memory Implementation Details

EntityCode ReferenceDescription
MemoryStatusmemoryStatus apps/web/src/console/sections/MemorySection.tsx#43Summary of usage, retention, and maintenance tasks.
Learning CandidateMemoryLearningCandidate apps/web/src/console/sections/MemorySection.tsx#59A fact or skill proposed by the reflection loop.
Recall PreviewmemoryRecallPreview apps/web/src/console/sections/MemorySection.tsx#77Simulated vector search results for a given query.
Workspace HitmemoryWorkspaceHits apps/web/src/console/sections/MemorySection.tsx#56Documents returned from lexical search in the workspace.
Memory & Learning Pipeline Sources: apps/web/src/console/sections/MemorySection.tsx#104-180, apps/web/src/console/useConsoleAppState.tsx#244-290

Section Refresh Lifecycle

To maintain data freshness without overwhelming the daemon, the console implements a TTL-based auto-refresh strategy defined in AUTO_REFRESH_SECTION_TTL_MS apps/web/src/console/useConsoleAppState.tsx#42-54:
  • Memory: 10,000ms
  • Operations: 10,000ms
  • Usage: No auto-refresh (typically manual or on-mount) to prevent heavy aggregate recalculations.
Sources: apps/web/src/console/useConsoleAppState.tsx#42-54, apps/web/src/console/useConsoleAppState.tsx#62-72