← Home System Overview Architecture Data Pipeline Health System Usage System Workflows MCP Tools

Health System — ManyAI Desktop

Blueprint · Last updated 2026-05-02

Overview

ManyAI Desktop uses a health monitoring system implemented in lib/healthCheck.ts to periodically assess the status of all configured AI providers. The system polls each provider at a configurable interval, collects performance metrics, and uses these results to influence the smart router's provider selection. Degraded providers are automatically downweighted.

Per-Provider Metrics

MetricDescription
uptime_pctPercentage of recent health checks that succeeded
avg_latency_msRolling average response time in milliseconds
last_check_tsISO 8601 timestamp of the most recent check
last_result"success" or an error string from the last check

getPenalty(provider)

Returns a 0–1 float for use in the smart router scoring formula:

score = successRate(last 20) × 0.7 + speedScore × 0.3 − getPenalty(provider)

Configuration

Stored in localStorage under key manyai_health_config.

FieldTypeDefaultDescription
intervalMinutesnumber5Interval between automatic checks
continuousEnabledbooleanfalseWhether to poll automatically on a schedule

Startup Behavior

UI

Settings → Health tab displays a live status table showing: provider name, uptime %, average latency (ms), last check timestamp, and last result for all configured providers.