Skip to content

Analytics and Ask Kwilo

One analytics workspace serves both products. Admins see default dashboards per module, rearrange the cards, and ask Ask Kwilo a question in plain language. The answer comes back as a chart they can add to a dashboard.

Surface Route Tabs
Classroom /analytics Overview · Attendance · Academics · Students
Campus /erp/analytics Overview · Attendance · Fees · Students · Library

Campus module pages embed the same card grid as their Overview tab, so a number on Analytics equals the number on the module page.

Who sees it

Role Scope
Unit manager / principal The whole institution
Head of department Their departments only. Fees, library and institution-wide views are hidden.
Org admin Drills from the organisation into one institution

Learners and guardians never see Analytics. Every dashboard is one institution; there are no cross-institution roll-ups.

Dashboards

  • A dashboard is an ordered list of cards. Each card stores its query and chart spec, never result rows, and re-runs under the viewer's permissions.
  • Cards span one, two or four columns of a four-column grid and reorder by drag.
  • Defaults ship in code. A user's first edit forks the default into a dashboard they own.
  • A card whose query no longer validates shows Ask again instead of a blank.

Ask Kwilo

  1. The admin asks, e.g. "attendance by department this month".
  2. Kwilo shows progress (understanding, exploring, running, building), then an answer sentence and a preview card.
  3. Add to pins it in one click. Not what I meant opens a correction in the same thread.

The agent ends every turn in one of three ways:

  • Clarify when a name matches zero or several records ("Which section B? · CSE Sem 3 · ECE Sem 3"), the measure is ambiguous, or the time range can't be defaulted. Options are real values from the institution's data.
  • Answer with its assumptions shown as chips ("Time range: last 30 days"). Clicking a chip corrects it.
  • Unanswerable with the nearest thing it can show instead.

Routine questions with no time range default to the last 30 days and say so. Charts: bar, horizontal bar, line, stat, table, donut. Clicking a bar drills into the rows behind it.

Confirmed answers are stored per institution and never shown to another tenant.

Limits

  • Ask is rate limited to ten requests a minute. Every query also counts against an hourly budget per institution (ANALYTICS_QUERY_BUDGET_PER_HOUR, default 60; cache hits are free), a 5 s statement timeout and row caps.
  • Read-only. No writes, scheduled reports or editing pinned cards through chat.
  • ANALYTICS_AGENT_ENABLED switches Ask Kwilo on per environment. Dashboards work without it.

How the isolation works: Analytics agent.

Where it lives

  • Web: apps/web/src/analytics/
  • Backend: apps/backend/src/analytics/ (catalog YAML under catalog/)
  • Agent: kwilo-chatbot, analytics runner