Admin Dashboard
The ContextView Dashboard is a Django-based admin UI that provides real-time visibility into the ContextUnity service mesh — agent configurations, execution traces, episodic memory, and system health.
Dashboard Views
| View | URL | Description |
|---|---|---|
| Overview | / | System KPIs, service health probes, request/error charts |
| Traces | /traces/ | Searchable list of agent execution traces |
| Trace Detail | /traces/<id>/ | Step-by-step inspection with chain-of-thought |
| Agents | /agents/ | Agent configuration list with status indicators |
| Agent Detail | /agents/<id>/ | Permissions, tools, hierarchy, and activity |
| Memory | /memory/ | Episodic and entity memory browser |
| Events | /events/ | System event log with filtering |
Architecture
The dashboard reads data from two sources:
┌─────────────┐ │ Dashboard │ │ (Django) │ └──────┬──────┘ │ ┌────────────┼────────────┐ ▼ ▼ ┌──────────────┐ ┌──────────────┐ │ Django DB │ │ Brain DB │ │ (SQLite) │ │ (Postgres) │ ├──────────────┤ ├──────────────┤ │ Agent configs│ │ Traces │ │ Permissions │ │ Episodes │ │ Tool policies│ │ Knowledge │ └──────────────┘ │ Analytics │ └──────────────┘- Agent configurations → Django DB (local to View, managed via Django Admin)
- Traces, episodes, facts → Brain PostgreSQL via
brain_dbqueries - Health checks → Direct TCP probes to each service endpoint
KPI Dashboard
The overview page displays:
- Total / Active agents — from Django Agent model
- Trace volume — 24h/7d/30d request counts from Brain
- Error rates — aggregated from trace error classifications
- Service health — TCP probe status for Router, Brain, Shield, Worker
- Request/error charts — time-series rendered via Chart.js
Time range is selectable via ?range=24h|7d|30d query parameter.
Trace Inspector
The trace detail view provides:
- Step timeline — ordered execution steps with timestamps
- Chain of thought — LLM reasoning for each step
- Tool calls — tool names, arguments, and results
- Token usage — input/output/total tokens per step
- Langfuse link — direct cross-reference to Langfuse trace (when configured)
Agent Hierarchy
The agent management view shows:
- Permission tree — visual hierarchy of agent capabilities
- Tool policies — which tools each agent can invoke
- Activity log — recent agent execution history
- Configuration editor — update agent settings via Django Admin
Data Layer
All Brain data access goes through the data/brain_db/ package, which queries Brain’s PostgreSQL schema directly:
| Module | Queries |
|---|---|
traces.py | Trace search, detail, chain-of-thought |
episodes.py | Episode listing, stats, memory browsing |
knowledge.py | Knowledge graph queries |
agents.py | Agent activity from trace data |
analytics.py | System and error analytics aggregations |
schemas.py | Typed row schemas (TraceRow, EpisodeRow, etc.) |
Langfuse Integration
When configured (LANGFUSE_HOST + LANGFUSE_PROJECT_ID), the dashboard constructs direct links to Langfuse traces for deep LLM debugging — token-level analysis, prompt inspection, and cost tracking.