Service: services/gateway/routers/observability.py
Frontend: frontend-vue/src/components/screens/ObservabilityDashboard.vue
Status: ✅ Production Ready
The Purple8 Observability Dashboard provides real-time monitoring of all 58+ agents, infrastructure services, pipeline executions, and system metrics. It is accessible from the Builder UI header (📊 icon or Cmd/Ctrl+Shift+O).
The dashboard requires admin credentials:
POST /api/observability/auth/loginadmin / admin123 (change in production via env vars)localStorage (persists across browser sessions)| Component | Purpose |
|---|---|
ObservabilityDashboard.vue |
Main dashboard container |
observabilityApi.js |
API service layer (all HTTP calls) |
exportUtils.js |
Export to JSON, CSV, PDF |
Access: Click the 📊 icon in the app header, or press Cmd/Ctrl+Shift+O.
All endpoints require admin authentication (Authorization: Bearer <token>).
| Endpoint | Method | Description |
|---|---|---|
/api/observability/agents |
GET | List all agents with health status |
/api/observability/agents/{name} |
GET | Single agent detail |
/api/observability/agents/{name}/status |
PATCH | Update agent status |
Response shape (agents list):
{
"agents": [
{
"agent_id": 1,
"name": "BackendDevelopmentAgent",
"category": "core",
"status": "healthy",
"uptime": 99.8,
"avg_response_time": 2340,
"success_rate": 97.2,
"last_active": "2026-02-26T10:00:00Z"
}
]
}
| Endpoint | Method | Description |
|---|---|---|
/api/observability/system-metrics |
GET | CPU, memory, GPU, AI call metrics |
Response shape:
{
"cpu_usage": 42.1,
"memory_usage": 68.4,
"gpu_usage": 15.2,
"ai_calls_today": 1284,
"avg_response_ms": 1820,
"active_sessions": 3
}
| Endpoint | Method | Description |
|---|---|---|
/api/observability/logs |
GET | Pipeline and agent logs (paginated) |
/api/observability/logs?level=error |
GET | Filter by level (info, warning, error) |
| Endpoint | Method | Description |
|---|---|---|
/api/observability/traces |
GET | Agent execution traces |
/api/observability/traces/{trace_id} |
GET | Single trace detail |
| Endpoint | Method | Description |
|---|---|---|
/api/observability/run-tests |
POST | Trigger test suite from UI |
/api/observability/coverage |
GET | Test coverage report |
| Endpoint | Method | Description |
|---|---|---|
/api/observability/alerts |
GET | Active alerts |
/api/observability/alerts/{id}/resolve |
POST | Resolve an alert |
The dashboard uses WebSocket polling (every 5 seconds) for live data:
/ws/observabilityFour export formats are available from the dashboard toolbar:
| Format | Contents |
|---|---|
| JSON | Full snapshot: agents, metrics, logs, alerts |
| CSV | Separate files for logs and metrics |
| Formatted HTML report (printable) | |
| Export All | ZIP of all formats |
The observability data lives in PostgreSQL (created by migrations/001_create_observability_tables.sql):
| Table | Purpose |
|---|---|
agents |
Agent registry with health status and metrics |
test_results |
Test run outcomes per agent |
logs |
Pipeline and system logs |
traces |
Agent execution traces |
coverage |
Code coverage snapshots |
alerts |
Active and resolved alerts |
See docs/DATABASE_SCHEMA.md for full column definitions.
| Category | Count | Examples |
|---|---|---|
core |
10 | API Gateway, BackendDevelopmentAgent, etc. |
qa |
9 | SecurityQA, PerformanceQA, AccessibilityQA |
aiml |
11 | DeepLearning, NLP, ComputerVision |
enterprise |
9 | DataEngineering, Compliance, Audit |
infrastructure |
4+ | PostgreSQL, Redis, RabbitMQ, Qdrant |
psutil.cpu_count() falls back to 1 if the OS returns Nonecursor.fetchone() is always null-checked before subscriptingresolve_alert() endpoint is defined once (duplicate stub was removed)