Dashboard
Open Brain ships with a dark-themed monitoring dashboard built on customtkinter. It shows memory stats, service health, recent captures, most-accessed memories, and OpenTelemetry observability metrics.
Features
| Panel | What it shows |
|---|---|
| Stat Cards | Total memories, +1 hour, +24 hours, pinned, upvoted, accessed |
| Service Pills | PostgreSQL, Ollama, MCP Server status (green/red/yellow). One-click Start button when a service is down. |
| Titlebar Dots | Per-service colored dots at a glance |
| GPU Selector (v0.10.0+) | Dropdown auto-populated from nvidia-smi -L showing the available CUDA devices ("RTX 5090", "RTX 3080 Ti", "Auto"). Hidden if nvidia-smi reports no GPUs. Apply button does a graceful Ollama restart so the new selection takes effect. |
| By Type / By Project | Bar charts showing memory distribution |
| Recent Memories | Last 10 memories with clickable rows to read full content |
| Most Accessed | Top 10 most-recalled memories (quality signal) |
| Observability Strip | Tool call counts, error rate, top tools, last restart. Reads from OpenTelemetry traces. |
| Server Log | Live tail of OTel trace log + Ollama log |
Event-Driven Refresh
The dashboard does not poll on a timer. A PostgreSQL trigger fires pg_notify('memories_changed') on every INSERT, UPDATE, or DELETE to the memories table. The dashboard listens on a dedicated connection and refreshes data widgets instantly when something changes.
Service health checks (Ollama, MCP) run on a separate 60-second interval since they don't need to be instant.
This eliminates the "strobe" effect that timer-based polling causes.
Launching
The dashboard detects whether Open Brain is already running. If services are up, it opens directly. If not, it shows a startup splash that drives scripts/infrastructure.py's bring_up() in a worker thread — bringing up Docker, the open-brain-db container, and ollama serve in sequence while streaming structured progress to the splash and to logs/startup.log. Since v0.8.0 this is a pure-Python flow (no .cmd chain, no pipe inheritance); since v0.9.0 shutdown uses a real Win32 Ctrl+Break graceful signal for ollama instead of taskkill /F; since v0.10.0 a single-instance guard inside dashboard.py itself prevents a duplicate window when the desktop shortcut is double-clicked twice — it focuses the existing window instead of spawning a second one.
Double-click Open Brain Dashboard on your Desktop. To create shortcuts:
Restart MCP
The titlebar has a Restart MCP button that:
- Kills the existing
server.pyprocess (via WSLpkill) - Polls until the process is confirmed dead
- Launches a new server in a
tmuxsession - Polls until the process is confirmed alive
- Shows step-by-step progress in the status bar
Memory Popup
Click any row in the Recent Memories or Most Accessed tables to open a popup showing the full memory content, type, project, and timestamp.
Observability
The dashboard reads OpenTelemetry spans from logs/otel-traces.jsonl. Every MCP tool call produces a span with:
mcp.toolattribute (tool name)status(OK or ERROR)duration_ms(call latency)trace_idandspan_idfor correlation
The observability strip aggregates these into: total calls, total errors, error rate %, top 3 tools by call count, and last server restart timestamp.
The dashboard itself writes its own spans to the same file (service name open-brain-dashboard) so refresh cycles are also traceable.
Requirements
The dashboard requires two additional Python packages (both included in requirements.txt):
customtkinter-- dark-themed Tk widgetspillow-- image handling for the app icon
Troubleshooting
| Symptom | Fix |
|---|---|
| Dashboard hangs on launch | Check that PostgreSQL is reachable. The dashboard uses 127.0.0.1 (not localhost) to avoid DNS resolution issues on Windows. |
| Taskbar shows generic Python icon | Reboot Windows to flush the icon cache. The dashboard sets SetCurrentProcessExplicitAppUserModelID and DPI awareness. |
| Observability strip shows zeros | Make some MCP tool calls (search, remember, etc.) to generate OTel spans in logs/otel-traces.jsonl. |
| MCP status shows offline | If the server was active within the last 5 minutes, it should show online. Check that logs/otel-traces.jsonl has recent spans with "service": "open-brain". |
v2 Monitoring
The v1 dashboard does not currently show brain_v2 stats. During the v2 soak period, use these MCP tools from any agent session to monitor v2 health:
health_v2— DB connectivity, Ollama reachability, table row counts, server uptime, tool listmetrics_v2— per-tool call counts, error rates, avg/p99 latencyrecent_errors_v2— last N errors from the in-memory ring buffer
v2 also writes persistent telemetry to the tool_events table (every tool call with timing) and structured JSONL to logs/brain_v2.jsonl (rotating, 5MB x 5 files).
A unified dashboard covering both v1 and v2 is planned for post-soak.