Menu

Cosmo Wiki

WebUI

Read-only page-based observability dashboard with runtime, logs, events, memory, and vision views.

WebUI Observability Dashboard

Cosmo runs an embedded FastAPI WebUI for real-time runtime observation. The WebUI is read-only by design; it is an observability surface, not a control panel.

flowchart LR
    WebUI["WebUI Pages"] --> Diagnostics["DiagnosticsManager"]
    Diagnostics --> Runtime["Runtime State"]
    Diagnostics --> Events["Event Metrics"]
    Diagnostics --> Database["Database Metrics"]
    Diagnostics --> Vision["Vision Snapshot"]
    Vision --> VisionPage["/vision"]
    Database --> Inspectors["Logs / Events / Memory / Conversations"]

Page Navigation

  • /: Dashboard overview.
  • /vision: Latest camera snapshot, camera/frame status, image quality, calibration guidance, face detection, reject reason, and bounding boxes overlay.
  • /logs: SQLite logs inspector.
  • /events: Event repository inspector.
  • /memory: Memory repository inspector.
  • /conversations: Conversation history inspector.
  • /status: Raw compact status snapshot.

Endpoint Reference

EndpointMethodResponsePurpose
/GETHTML (Jinja2)Main dashboard.
/visionGETHTML (Jinja2)Vision observability page.
/logsGETHTML (Jinja2)Logs page.
/eventsGETHTML (Jinja2)Events page.
/memoryGETHTML (Jinja2)Memory page.
/conversationsGETHTML (Jinja2)Conversation page.
/statusGETHTML (Jinja2)Raw compact snapshot page.
/api/status/compactGETJSON snapshotCurrent system, runtime, database, event, and vision diagnostics.
/api/status/streamGETServer-Sent EventsStreaming compact snapshots, 1/sec.
/api/vision/snapshotGETJPEG file or JSON errorLatest saved camera snapshot.
/api/logsGETJSON arrayRecent logs, with SQL-level filters.
/api/eventsGETJSON arrayRecent events from EventRepository.
/api/memoriesGETJSON arrayRecent memories, with category/search filtering.
/api/conversationsGETJSON arrayRecent conversations, with role/search filtering.

Example Requests

curl http://127.0.0.1:8765/api/status/compact | jq .
curl -N "http://127.0.0.1:8765/api/status/stream" | head -n 3
curl http://127.0.0.1:8765/api/vision/snapshot --output /tmp/cosmo-vision.jpg
curl http://127.0.0.1:8765/api/memories?limit=20&category=preference
curl "http://127.0.0.1:8765/api/conversations?search=cosmo&role=user"
curl http://127.0.0.1:8765/api/events?limit=50
curl "http://127.0.0.1:8765/api/logs?limit=100&search=vision"

Vision Page

  • Shows the latest snapshot preview from /api/vision/snapshot.
  • Displays camera status, frame status, snapshot path, auto-capture state, and capture interval.
  • Displays image quality metrics: brightness, contrast, dark ratio, bright ratio, overexposed ratio, blur score, and backlit score.
  • Displays calibration guidance based on image quality and face readiness.
  • Displays face detection status, skipped state, skip reason, accepted count, raw detections, filtered-out count, reject reason, largest face, and errors.
  • Draws face bounding boxes over the latest snapshot using the accepted face payload.

Static Files

Static files are located at cosmo/interfaces/webui/static/. Templates are page-based and JavaScript is page-specific.

PathPurpose
templates/base.htmlShared layout/navigation.
templates/dashboard.htmlMain dashboard.
templates/vision.htmlVision observability page.
templates/logs.html, events.html, memory.html, conversations.html, status.htmlInspector/status pages.
static/js/dashboard.js, vision.js, logs.js, events.js, memory.js, conversations.js, status.jsPage-specific frontend behavior.
static/css/webui.cssCSS import entrypoint.
static/css/base.css, layout.css, components.css, tables.css, dashboard.css, inspectors.css, vision.cssSplit CSS modules.

Read-Only Constraints

  • No POST, DELETE, or PATCH endpoints for destructive actions.
  • No ability to modify personality, clear data, or shut down from WebUI.
  • Mutations happen only through voice commands or direct database access.
  • The WebUI is designed for observability, not control.

LAN Accessibility

If webui.host: 0.0.0.0, the dashboard is accessible from any machine on the LAN.

curl http://<cosmo_ip>:8765/api/status/compact