Skip to content

feat: model usage tab — token & cost breakdown by model #2

@maxdraki

Description

@maxdraki

Summary

Add a Models tab to the AgentWatch dashboard showing per-model token usage, cost, request count, and latency.

Status

⚠️ Partially complete — infrastructure shipped in Night 7, but tab shows no data.

Done

  • Models tab UI at /models with per-model requests, tokens, cost, p50/p95 latency and cost share bars
  • Storage: model_usage table with record_model_usage() + get_model_stats()
  • HTTP ingestion: POST /api/v1/ingest/model_usage
  • Public API: agentwatch.record_model_usage()
  • 10s auto-refresh

Blocked

OpenClaw gateway does not currently emit model:used (or equivalent) events, so the hook cannot capture model invocations. The index.ts handler in examples/openclaw-hook/ is a forward-looking implementation waiting for these events.

See #10 for the investigation into how to populate this tab with real data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions