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).
Decision
Section titled โDecisionโ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.
What it shows
Section titled โWhat it showsโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 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
โธ screenshotbadge if visual proof exists,โธ textfor glasspane evidence - Success: โ (green) or โ (red)
Click a card with โธ โ lightbox opens the terminal screenshot at task completion time.
Data sources
Section titled โData sourcesโ| Source | What | Refresh |
|---|---|---|
task_costs (PostgreSQL) | Per-task cost rows pushed by daemon heartbeat | Real-time (SSH push on completion) |
hive_nodes (PostgreSQL) | Node metadata, capabilities, LLM tier | Node heartbeat |
task_costs JSON file | Denormalized JSON for the dashboard page | Every 60s (cron) |
proof_text (inline JSON) | glasspane state snapshot | On task completion (daemon heartbeat) |
Architecture
Section titled โArchitectureโ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 panelDeployment
Section titled โDeploymentโ# On mother (osa):cd /usr/local/src/colibri/packaging/mother/dashboard./deploy.shThis places:
/usr/local/www/clawdie/dashboard/index.htmlโ the dashboard pageexport-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.
Agent-friendly JSON
Section titled โAgent-friendly JSONโ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.โ
Screenshot proof
Section titled โScreenshot proofโ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.
References
Section titled โReferencesโ- 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