AI usage dashboard
Lives in apps/web (the admin console), not apps/lms - reachable
by admin, superadmin, and support.
Who sees what
- A tenant admin sees only their own tenant's usage.
- Superadmin and support are treated as platform actors: they
get a cross-tenant rollup (per-tenant totals) with a
?tenantId=link to drill into any one tenant's own breakdown - the same view a tenant admin gets for their tenant, just reachable for any tenant.
What it shows
- Usage broken out by instructor, by learner, by system (background jobs, e.g. knowledge-base ingestion, not tied to any one user), and by content type (lesson content, exam questions, blog posts, knowledge-base ingestion, course Q&A, and so on).
- A daily trend of input/output token counts over time.
- Each row's call count and token totals.
Reading the numbers
Most rows carry real token counts reported by the AI provider. Rows flagged estimated are the exception: Gemini's embedding API (used for knowledge-base ingestion) doesn't return a token count at all, so those rows are estimated from character count instead (roughly 4 characters per token) - a deliberate approximation, flagged so the dashboard never presents it as an exact metered number.