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
| Endpoint | Method | Response | Purpose |
|---|---|---|---|
/ | GET | HTML (Jinja2) | Main dashboard. |
/vision | GET | HTML (Jinja2) | Vision observability page. |
/logs | GET | HTML (Jinja2) | Logs page. |
/events | GET | HTML (Jinja2) | Events page. |
/memory | GET | HTML (Jinja2) | Memory page. |
/conversations | GET | HTML (Jinja2) | Conversation page. |
/status | GET | HTML (Jinja2) | Raw compact snapshot page. |
/api/status/compact | GET | JSON snapshot | Current system, runtime, database, event, and vision diagnostics. |
/api/status/stream | GET | Server-Sent Events | Streaming compact snapshots, 1/sec. |
/api/vision/snapshot | GET | JPEG file or JSON error | Latest saved camera snapshot. |
/api/logs | GET | JSON array | Recent logs, with SQL-level filters. |
/api/events | GET | JSON array | Recent events from EventRepository. |
/api/memories | GET | JSON array | Recent memories, with category/search filtering. |
/api/conversations | GET | JSON array | Recent 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.
| Path | Purpose |
|---|---|
templates/base.html | Shared layout/navigation. |
templates/dashboard.html | Main dashboard. |
templates/vision.html | Vision observability page. |
templates/logs.html, events.html, memory.html, conversations.html, status.html | Inspector/status pages. |
static/js/dashboard.js, vision.js, logs.js, events.js, memory.js, conversations.js, status.js | Page-specific frontend behavior. |
static/css/webui.css | CSS import entrypoint. |
static/css/base.css, layout.css, components.css, tables.css, dashboard.css, inspectors.css, vision.css | Split 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 
