Edge Runtime
TheEdgeRuntime manages an agent on constrained hardware with automatic watchdog restarts, resource monitoring, health endpoints, and graceful degradation.
Quick Start
Presets
UseedgePreset(id) to get optimized defaults for your device:
Features
Watchdog
Automatically detects unresponsive agents. If noheartbeat() call is received within the timeout window, the runtime emits a watchdog-restart event.
Resource Monitor
Periodically checks CPU temperature, memory, and disk usage. Emits warnings when thresholds are exceeded.Health Endpoint
A lightweight HTTP server on port 9090 (configurable) responds toGET /health:
Config
string | EdgePreset
required
Device preset ID or custom preset object.
Agent
required
The agent instance to manage.
number
default:"9090"
Port for the health check HTTP server.
boolean
default:"false"
Disable the health endpoint entirely.
GPU Monitoring
TheResourceMonitor automatically detects NVIDIA GPUs via nvidia-smi and includes GPU metrics in every snapshot:
GPU Snapshot Fields
The
gpu-warning event fires when GPU memory usage exceeds the memoryThreshold (default 85%). GPU monitoring is automatic — if nvidia-smi is not available (e.g. on CPU-only machines), the gpu field is simply omitted from snapshots.
Connecting to Capacity Planning
The GPU snapshot data can be combined with the Capacity Planning module to compare actual GPU usage against theoretical capacity:EventBus, you get a complete picture: real GPU usage from nvidia-smi, real token counts from the LLM API, and theoretical capacity limits — all feeding into the same Prometheus metrics.