Skip to content

Cost Dashboard

โ† index

The Cost Dashboard is the presentation surface for the hive-wide cost data flowing into motherโ€™s task_costs table. It serves two audiences: operators (human gallery) and agents (JSON query).

One HTML page, two views. The same data feeds both a human-browseable card grid (with lightbox screenshot proofs) and an agent-queryable JSON panel. No server-side rendering โ€” static HTML with a JSON data file refreshed every 60s by cron.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ HIVE COST DASHBOARD [4 nodes] [24h] [$2.37] โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ”‚
โ”‚ debby โ— online 12 tasks $1.87 โ–ฒ $0.15 avg 89% success โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘ โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘ โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ”‚ โ† cost cards โ”‚
โ”‚ โ”‚ deepseek โ”‚ โ”‚ deepseek โ”‚ โ”‚ claude โ”‚ โ”‚ gemini โ”‚ โ”‚
โ”‚ โ”‚ $0.0042 โ”‚ โ”‚ $0.0031 โ”‚ โ”‚ $0.89 โ–ธ โ”‚ โ”‚ $0.02 โ–ธ โ”‚ โ–ธ = screenshot โ”‚
โ”‚ โ”‚ โœ“ โ”‚ โ”‚ โœ“ โ”‚ โ”‚ โœ— โ”‚ โ”‚ โœ“ โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Each cost card shows:

  • Cache-hit bar: green (cache) vs grey (fresh) โ€” visual cache efficiency
  • Provider: deepseek / claude / gemini / ollama / local
  • Cost: with โ–ธ screenshot badge if visual proof exists, โ–ธ text for glasspane evidence
  • Success: โœ“ (green) or โœ— (red)

Click a card with โ–ธ โ†’ lightbox opens the terminal screenshot at task completion time.

SourceWhatRefresh
task_costs (PostgreSQL)Per-task cost rows pushed by daemon heartbeatReal-time (SSH push on completion)
hive_nodes (PostgreSQL)Node metadata, capabilities, LLM tierNode heartbeat
task_costs JSON fileDenormalized JSON for the dashboard pageEvery 60s (cron)
proof_text (inline JSON)glasspane state snapshotOn task completion (daemon heartbeat)
daemon heartbeat
โ”‚
โ”œโ”€ push_cost_to_mother() โ”€โ”€SSHโ”€โ”€โ†’ colibri-mcp-ssh "report-task-cost"
โ”‚ โ”‚
โ”‚ โ””โ”€ INSERT INTO task_costs
โ”‚ (node_hostname โ†’ node_id lookup)
โ”‚
โ””โ”€ proof_text (inline) โ†’ glasspane state snapshot (agent, state, tokens, cost JSON)
cron (every 60s)
โ””โ”€ export-costs.sh
โ””โ”€ psql โ†’ task_costs JSON file (dashboard data file)
browser
โ””โ”€ GET /dashboard/ โ†’ index.html
โ””โ”€ fetch task_costs JSON file โ†’ render cards, lightbox, JSON panel
Terminal window
# On mother (osa):
cd /usr/local/src/colibri/packaging/mother/dashboard
./deploy.sh

This places:

  • /usr/local/www/clawdie/dashboard/index.html โ€” the dashboard page
  • export-costs.sh โ€” JSON export script (in mother webroot)
  • /usr/local/etc/cron.d/clawdie-dashboard โ€” cron job (every 60s)

Nginx serves it as a static location under the existing mother vhost.

The dashboard has a JSON toggle button that shows the filtered data as structured JSON. This is the same data agents get via colibri_list_task_costs MCP tool, but with screenshot UUIDs and node groupings:

{
"updated_at": "2026-06-27T14:00:00Z",
"summary": {
"total_tasks": 23,
"total_cost": 2.37,
"avg_cost": 0.103,
"success_rate": 87.0,
"cache_hit_ratio": 64.3
},
"nodes": {
"debby": [
{
"task_id": "abc-123",
"provider": "deepseek",
"cost": 0.0042,
"success": true,
"proof_text": "{\"agent\":\"zot\",\"state\":\"Done\",\"tokens_in\":150}",
"tokens": {"in": 45000, "out": 2800, "cache_read": 12000}
}
]
}
}

Agents use this for cost-aware routing: โ€œdebby averages $0.004/task with 89% cache-hit on DeepSeek โ€” route non-urgent tasks there.โ€

The โ–ธ screenshot badge on cost cards opens a lightbox with the terminal PNG. The โ–ธ text badge shows the glasspane state snapshot inline. screenshot UUID is stored alongside the cost row. Clicking opens the lightbox with:

  • The full terminal PNG at task completion time
  • Task ID, provider, and cost in the overlay
  • The screenshot metadata (pane title, command, path, timestamp)
  • Signature detection results (failures, warnings, healthy signals)

This is the โ€œverify, donโ€™t guessโ€ layer โ€” every cost number has visual proof behind it.

  • task-board โ€” local task board (data source for cost capture)
  • hive-pane โ€” hive board (companion surface, node status)
  • hive-routing โ€” cost-aware routing engine (consumes this data)
  • screenshot module โ€” auto-capture on task completion