Skip to content

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

ViewURLDescription
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_db queries
  • 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:

  1. Step timeline — ordered execution steps with timestamps
  2. Chain of thought — LLM reasoning for each step
  3. Tool calls — tool names, arguments, and results
  4. Token usage — input/output/total tokens per step
  5. 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:

ModuleQueries
traces.pyTrace search, detail, chain-of-thought
episodes.pyEpisode listing, stats, memory browsing
knowledge.pyKnowledge graph queries
agents.pyAgent activity from trace data
analytics.pySystem and error analytics aggregations
schemas.pyTyped 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.