Back to architecture
live

Insights + Cost Metering

Conversations become funnels, ROI, and per-tenant token cost.

Every conversation turn logs its tokens, cost, and events. A rollup turns that raw log into the owner-facing views: engagement funnels, ROI, and per-tenant token cost that feeds metering and caps.

Data flow

How the pieces connect and where data moves.

Components: Conversations (every message), Chat logs (tokens + events), Metrics rollup (aggregate), Funnel + ROI, Insights dashboard (owner view). Connections: Conversations to Chat logs for log tokens + turns; Chat logs to Metrics rollup; Metrics rollup to Funnel + ROI; Metrics rollup to Insights dashboard for cost per tenant; Funnel + ROI to Insights dashboard for funnel + ROI.

Loading data-flow map

Behavior

How it behaves step by step over time.

Loading behavior diagram
Each conversation turn writes tokens, cost, and events to the chat log. A metrics rollup aggregates that log into engagement funnels and ROI plus per-tenant token cost, and both feed the owner-facing insights dashboard.