Skip to main content

Dashboard

agentflow-dashboard is a self-hosted React dashboard with an Express backend. It watches trace directories, parses execution graphs in real time, and serves a web UI for exploring agent behavior.

Quick Start

# Install globally
npm install -g agentflow-dashboard

# Point at your traces directory
agentflow-dashboard --traces ./traces --port 3000

Open http://localhost:3000.

No configuration file required. The dashboard auto-discovers agents by scanning the traces directory recursively.

CLI Options

agentflow-dashboard [options]

Options:
-p, --port <number> Server port (default: 3000)
-t, --traces <path> Primary traces directory (default: ./traces)
-h, --host <address> Host address (default: localhost)
--data-dir <path> Extra data directory (repeatable)
--cors Enable CORS headers
--help Show help message

Multiple directories

agentflow-dashboard \
--traces ./traces \
--data-dir ./sessions \
--data-dir ./cron-runs \
--host 0.0.0.0

Run without installing

npx agentflow-dashboard --traces ./my-agent-traces

The Nine Tabs

Each trace opens into a tabbed detail view. Every tab shows a different lens on the same execution graph.

TabWhat it shows
TimelineWaterfall chart with duration bars and status icons per node
TranscriptChat-bubble replay: user messages, assistant responses, thinking blocks, tool calls
GraphInteractive Cytoscape.js execution flow visualization
MetricsSuccess rates, token usage, duration stats, node type breakdown
HeatmapError distribution across recent traces
State MachineExecution state flow diagram with node counts
SummaryAuto-generated text summary with recommendations
Agent TimelineGantt chart of all executions for an agent with expandable sub-activities
Process MapProcess mining graph: activity flows, transition frequencies, failure rates

Agent Timeline (Gantt)

Shows all executions for an agent on a shared time axis. Click any row to expand nested sub-activities. Bars are color-coded by node type (user, assistant, thinking, tool call, tool result). Displays up to the 50 most recent executions.

Process Map

Directed graph aggregated across all executions for an agent. Node size is proportional to frequency, edge width to transition count, and color to failure rate (green to red). Click any node to see occurrence count, frequency percentage, average duration, and fail rate. Rare activities are filtered automatically to keep the graph readable.


Supported File Formats

FormatExtensionDescription
AgentFlow JSON.jsonExecution graph traces with nodes, timing, status
JSONL Sessions.jsonlClaude Code / OpenClaw session transcripts
Cron Run Logs.jsonlJob logs with ts, jobId, action, status fields
Structured Logs.logPython structlog, JSON logs, key=value logs
Session Indexsessions.jsonAgent session metadata (auto-discovered)

JSONL Session Format

Compatible with Claude Code session format:

{"type":"session","id":"abc123","timestamp":"2026-03-19T10:00:00Z"}
{"type":"model_change","modelId":"claude-sonnet-4-20250514","provider":"anthropic"}
{"type":"message","message":{"role":"user","content":[{"type":"text","text":"Hello"}]}}
{"type":"message","message":{"role":"assistant","content":[{"type":"text","text":"Hi!"}],"usage":{"input":100,"output":50}}}

AgentFlow Trace Format

{
"id": "node_001",
"rootNodeId": "node_001",
"agentId": "my-agent",
"trigger": "cron",
"startTime": 1710800000000,
"endTime": 1710800060000,
"status": "completed",
"nodes": {
"node_001": { "id": "node_001", "type": "agent", "name": "my-agent", "children": ["node_002"] },
"node_002": { "id": "node_002", "type": "tool", "name": "search", "children": [] }
}
}

Programmatic API

Use DashboardServer to embed the dashboard in your own application:

import { DashboardServer } from 'agentflow-dashboard';

const dashboard = new DashboardServer({
port: 3000,
tracesDir: './traces',
dataDirs: ['./sessions', './cron-runs'],
host: 'localhost',
enableCors: false,
});

await dashboard.start();

REST API

The dashboard exposes a REST API that you can query directly.

MethodEndpointDescription
GET/api/tracesList all traces with metadata
GET/api/traces/:filenameFull trace detail (nodes, events, token usage)
GET/api/traces/:filename/eventsSession events and token usage
GET/api/agentsAll discovered agents with metrics
GET/api/agents/:agentId/timelineGantt data: executions with nested activities
GET/api/agents/:agentId/process-graphProcess mining graph: activity transitions
GET/api/statsGlobal performance statistics
GET/api/stats/:agentIdPer-agent statistics
GET/api/process-healthRunning process audit
WS/Real-time trace updates (WebSocket)

Real-Time Updates

The dashboard uses a WebSocket connection for live updates. The file watcher detects new or changed trace files and pushes updates to all connected browser sessions immediately. The WebSocket client auto-reconnects on disconnect.


Process Health

The dashboard audits running OS processes against your agent configuration. It detects:

  • Live process status and resource usage (CPU, memory)
  • PID file validity — whether the PID file points to an actually-running process
  • Systemd unit status for agents managed as services
  • Orphan processes — agent processes running outside your process manager

Access this via the Process Health section of the dashboard or the /api/process-health endpoint.