Operations and Diagnostics
TheOperationsSection serves as the central hub for system observability and troubleshooting. It aggregates data from the daemon’s internal diagnostics, audit logs, and self-healing subsystems.
Data Flow and Diagnostics
The section consumes adiagnosticsSnapshot provided by the useConsoleAppState hook apps/web/src/console/sections/OperationsSection.tsx#39-40. This snapshot contains real-time status for:
- Model Provider: Current state and provider identity (e.g., OpenAI, Anthropic) apps/web/src/console/sections/OperationsSection.tsx#53-53.
- Self-Healing: Active incidents and remediation attempts managed by the daemon’s
SelfHealingsubsystem apps/web/src/console/sections/OperationsSection.tsx#60-65. - Observability: Recent failure classes and operation-specific errors apps/web/src/console/sections/OperationsSection.tsx#56-56.
Background Queue Management
The daemon maintains a background task loop (spawn_background_queue_loop) that processes asynchronous operations such as delegation merges and long-running tool executions crates/palyra-daemon/src/background_queue.rs#30-34. The OperationsSection monitors these tasks, including their state (e.g., running, failed, cancel_requested) and attempt counts crates/palyra-daemon/src/background_queue.rs#148-150.
Operations Component Interaction
Sources: apps/web/src/console/sections/OperationsSection.tsx#47-109, crates/palyra-daemon/src/background_queue.rs#30-60, crates/palyra-daemon/src/self_healing.rs#1-20
Browser Automation Workbench
TheBrowserSection provides a dedicated interface for managing palyra-browserd sessions. It allows operators to manually trigger browser actions, inspect console logs, and retrieve artifacts like PDF exports or screenshots from failed steps.
Session Lifecycle
- Profile Management: Creation and activation of browser profiles (Persistence vs. Ephemeral) apps/web/src/console/sections/BrowserSection.tsx#71-74.
- Session Control: Spawning new browser instances via
createBrowserSessionapps/web/src/console/sections/BrowserSection.tsx#75-75. - Action Dispatch: Sending commands (Click, Type, Navigate) to the active session apps/web/src/console/sections/BrowserSection.tsx#78-78.
Diagnostic Integration
When an agent or operator performs a browser action, the section displays:- Console Entries: Real-time logs from the headless Chrome instance apps/web/src/console/sections/BrowserSection.tsx#112-112.
- Failure Artifacts: Base64 encoded screenshots captured automatically upon tool failure apps/web/src/console/sections/BrowserSection.tsx#121-124.
Governance and Usage
TheUsageSection implements the UI for the daemon’s governance engine. It tracks token consumption and latency across three dimensions: Sessions, Agents, and Model Profiles.
Key Metrics and Aggregates
The section uses theuseUsageDomain hook to fetch aggregated data from the JournalStore apps/web/src/console/sections/UsageSection.tsx#32-32.
- Total Tokens: Sum of prompt and completion tokens apps/web/src/console/sections/UsageSection.tsx#84-84.
- Estimated Cost: Calculated based on the
model_mixinsights provided by the backend apps/web/src/console/sections/UsageSection.tsx#94-100. - Routing Posture: Displays the current
default_mode(e.g.,Allow,Block,Flag) determined by the usage governance policies apps/web/src/console/sections/UsageSection.tsx#168-171.
Admin Views: Agents and Cron
Agent Management
TheAgentsSection (and corresponding backend handlers) allows for CRUD operations on agent definitions.
- AgentRecord: Stores
agent_id,display_name, and security constraints likedefault_tool_allowlistcrates/palyra-daemon/src/transport/http/handlers/console/agents.rs#183-195. - Default Agent: The daemon maintains a global default agent used when no specific identifier is provided in a run request crates/palyra-daemon/src/transport/http/handlers/console/agents.rs#149-163.
Cron and Routines
TheCronSection manages automated agent runs. It supports multiple trigger types:
- Schedule: Natural language (e.g., “every weekday at 9”) converted to cron/interval via the backend apps/web/src/console/sections/CronSection.tsx#198-210.
- Webhook/Hook: External triggers that initiate a routine run apps/web/src/console/sections/routinesHelpers.ts#54-60.
- System Event: Internal daemon events that trigger automation apps/web/src/console/sections/routinesHelpers.ts#59-59.
| Field | Purpose |
|---|---|
concurrencyPolicy | Handles overlaps (forbid, replace, queue_one) apps/web/src/console/sections/routinesHelpers.ts#62-66 |
misfirePolicy | Determines behavior after downtime (skip, catch_up) apps/web/src/console/sections/routinesHelpers.ts#68-71 |
deliveryMode | Where output is sent (same_channel, local_only, etc.) apps/web/src/console/sections/routinesHelpers.ts#73-78 |
Navigation: ConsoleShell
TheConsoleShell acts as the primary layout wrapper, providing top-level navigation and managing the global application state.
Navigation Logic
The shell utilizes aCapabilityCatalog to determine which sections are visible to the current user based on their permissions and the daemon’s configuration apps/web/src/console/sections/OperationsSection.tsx#48-49.
Run Management and Cancellation
The shell provides the global “Cancel” capability for active runs. When a cancellation is requested via the UI, the daemon transitions theRunStateMachine:
- Request:
is_orchestrator_cancel_requestedreturns true crates/palyra-daemon/src/application/run_stream/orchestration.rs#113-114. - Transition:
transition_run_stream_to_cancelledis called crates/palyra-daemon/src/application/run_stream/cancellation.rs#16-21. - Cleanup: The
RunLifecycleStateis updated toCancelledin theJournalStore, and heartbeats are cleared crates/palyra-daemon/src/application/run_stream/cancellation.rs#27-33.