Analytics

The analytics panel shows how you use the agent: how many prompts you sent, how much text (tokens) was spent, how much it cost, and how fast the model answered. Everything is drawn on clear charts that you can filter by any period — a day, a week, or all time. This helps you understand your spending and spot patterns — for example, which days you are most active.

The analytics page with Agent usage charts

What the analytics tracks

The data is collected automatically from your chat sessions — nothing to enable or configure, and counting starts from the very first message. The panel shows:

  • Requests — the number of messages you sent;
  • Messages — the total count of messages (both yours and the agent’s replies);
  • Token usage — how much text was spent: sent to the model, generated in reply, plus cache writes and reads (the cache “remembers” text that was already processed — touching it again costs less);
  • Costs — an estimate based on your AI provider’s prices;
  • Response speed — how fast the model answers (in tokens per second);
  • Commit activity — how many times changes were saved to Git through the interface;
  • Per-model data — the same costs, tokens, and speed, broken down by each AI model.

How to open the analytics

Pick Open Analytics from the menu in the header. The panel opens with a period selector at the top, key figure cards below, and detailed charts in collapsible sections.

The Open Analytics item in the Agent header menu

Panel overview

At the top are the key figure cards — the headline numbers for the selected period:

Key figure cards on the analytics panel
  • Requests — how many messages you sent;
  • Total Tokens — the total volume of text: input, output, and cached;
  • Total Cost — estimated spending across all chats;
  • Tokens/s — the average response speed of the AI;
  • Messages — all messages exchanged;
  • Commits — how many times changes were saved to Git.

The cards recalculate for the selected period — handy for comparing figures across different time spans.


Sections with charts

Below the cards come several sections with charts. Each section collapses — click its title to expand or collapse it. The open/closed state is remembered in your browser, so on your next visit the panel returns to its familiar shape.

Cost

The biggest section — charts of cost, prompts, and commits over time:

The Cost section: charts of cost, prompts, and commits
  • Cost — spending over time with a breakdown: input text, output text, cache write and read;
  • Model Cost — how spending is spread across AI models;
  • Prompts — the number of prompts over time, plus the message and chat counts for the period;
  • Commits — how often changes were saved over time.

Tokens

The Tokens section — charts of text volume and speed:

The Tokens section: charts of total token volume and speed
  • Total Tokens — consumption over time, accumulating input, output, and cached tokens;
  • Tokens per Second — the AI’s response speed over time;
  • Model Tokens — consumption broken down by each model;
  • Model Speed — a comparison of how fast different models answer.

Messages

A nested section inside Cost — charts of message counts and their intensity:

The Messages section: charts of total messages and messages per second
  • Total Messages — the number of messages over time;
  • Messages per Second — how intense the message exchange was over time.

Hour of Day

Here the data is grouped by hour of day (0–23) in your local time. It helps you see which hours you work with the agent the most:

The Hour of Day section: activity by hour of day
  • Total Tokens by Hour of Day — the volume of text for each hour;
  • Messages by Hour of Day — the number of messages for each hour;
  • Tokens/s by Hour of Day — the average response speed by hour;
  • Messages/s by Hour of Day — the average message intensity by hour.

Day of Week

The data is grouped by day of the week — you can see which days are your most active:

The Day of Week section: activity by day of week
  • Total Tokens by Day of Week — the volume of text for each day;
  • Messages by Day of Week — the number of messages for each day;
  • Tokens/s by Day of Week — the average response speed by day;
  • Messages/s by Day of Week — the average message intensity by day.

Distributions

Charts of how the figures vary from chat to chat — for example, which conversations turn out the most expensive or the longest:

The Distributions section: cost, duration, and speed distributions across chats
  • Cost Distribution — how spending is distributed across chats;
  • Duration Distribution — how long chats run on average (processing time);
  • Tokens/s Distribution — the spread of response speeds across chats;
  • Messages/s Distribution — the spread of message intensity across chats.

Skills

The Skills section shows how work is spread across skills — sets of instructions attached to chats. Every skill has its own color; chats without a skill are combined into a “No skill” series. Three stacked charts for the selected period:

  • Tokens by skill — the volume of text for each skill;
  • Cost by skill — spending by skill;
  • Total chat time by skill — the total processing time of chats with that skill. This chart replaced the former “tokens per second by skill”; model speed is still visible in the Tokens and Distributions sections.

Apps

A chat remembers which app created it. The app id is set by the product that created the chat through the API: Portal, CRM, Research, Data, News, Tests, Chatbot, MultiAgent, Analytics, Proxy, and others. A subagent inherits the app of its parent chat. This is why the analytics shows which app spends what and loads the agent how — especially useful when several products work on one agent at the same time.

The Apps section is three charts, one curve per app plus a separate “No app” curve for chats created by hand in the agent itself:

  • Tokens by app — the volume of text each app processed;
  • Cost by app — spending by app;
  • Total chat time by app — the total processing time of each app’s chats.

The charts are computed for the selected period and granularity, so spending and load break down by app easily: you can see which product spent how much, which one is growing, and which one has gone quiet.

App names are shown in English — “Portal”, “CRM”, “News”, and so on; an unknown id is printed as it is. The same apps show in the chat list row and count in the chat list search: a chat is found by the app’s name too.

All charts are interactive: hover over a point to see exact values. The data refreshes itself when you change the period or the granularity.


Choosing the period

The period selector at the top of the panel filters all data by time:

Choosing the period in the analytics
  • Ready-made periods — quick picks: Today, Yesterday, Last 7 days, 14 days, 30 days, 90 days, and more;
  • Custom period — set exact start and end dates;
  • All time — from your first chat to today.

All cards and charts recalculate for the selected period — handy for comparing weeks, months, and specific stretches.


Granularity

You can change the “zoom” of the data — points per hour, day, week, or month:

  • Hourly — one point per hour; for ranges longer than 30 days it switches to daily automatically;
  • Daily — one point per day; the default, best for ranges from a week to a month;
  • Weekly — weekly totals; handy for ranges from a month to a quarter;
  • Monthly — monthly totals; for spotting long-term trends.

The chosen granularity is remembered in your browser between visits.


The chats table

Below the charts sits a table with statistics for each chat. Clicking a row opens that chat; Ctrl+click opens it in a new tab.

The chats table in the analytics

Every column of the table is sortable:

  • Chat Title — the name of the conversation;
  • Date — the time of the last activity (in relative form: “5 minutes ago” and the like);
  • Model — the AI model used, and Skill — the skill attached to the chat;
  • App — which app created the chat;
  • Duration — the total processing time;
  • Tokens — the volume of text spent, and Cost — the spending for this chat;
  • Tokens/s — the average response speed;
  • Messages — the number of messages;
  • Commits — how many times changes were saved to Git during the chat.

Clicking a column header sorts the table by that figure; clicking again flips the sort direction. The app column sorts the same way — “Sort by app”: chats are grouped by app, and chats without an app gather together in a “No app” group. The table is paginated — 10 chats per page.


Subagent chats

A separate table shows subagent chats — the “child” conversations the AI starts on its own to work on small tasks in parallel. They live in their own table so the difference is visible: whether you talked to the agent directly, or the agent worked by itself. Columns, sorting, and pagination are the same as in the main table.

The subagent chats table

Maintenance

At the bottom of the panel there are several service buttons:

Maintenance operations on the analytics page
  • Recalculate Stats — recalculates tokens and cost from the raw chat data: it fixes possible losses, extracts missing numbers, and removes duplicates. Use it when the figures look stale or wrong. It runs in the background and, when finished, reports how many chats were fixed and how many duplicate tokens were removed;
  • Reimport Subagent Chats — rebuilds subagent chats from the transcripts still on disk. First it works out which subagents have a readable local transcript: Claude Code chat files and MiniAgent’s own session files (matched by prompt and start time). Only those are deleted and rebuilt; a subagent without a readable transcript stays in place, and its message processing times are repaired in place from the marks its own rows keep — after that it stops showing unrealistic tens of thousands of tokens per second (tokens, cost, and texts are left untouched). When there are no local transcripts at all, nothing is deleted: the operation reports “Nothing to reimport: no agent chat files were found, nothing was deleted”. The report shows how many chats were created, how many already existed, how many were kept without a chat file, and how many were repaired in place. It asks for confirmation before running: the operation can still rebuild chat history, so start it deliberately;
  • Push to ClickHouse — when ClickHouse is configured (a system that collects statistics from all your projects), sends new and updated chat data for unified reporting across all instances. The button appears only when ClickHouse is configured.

Project code statistics

The Source Code Stats section of the analytics shows the makeup of your project’s code base: how many files and lines it consists of and which languages it is written in. It opens from the settings: the Tools group → the Analytics card → the Source Code Stats section of the analytics dialog.

At the top — five summary tiles for the whole project:

  • Total Line Count — code, comments, and blank lines together;
  • Code Lines — executable lines;
  • Comment Lines — comment lines;
  • Blank Lines — separators and spacing;
  • Files — how many files were counted.

Below is a table by language: Language, Code, Comment, Blank, Files. In every column the width of the gradient bar is proportional to the leading language: the maximum fills the whole scale, the rest are shorter. Languages are sorted by lines of code, descending.

The numbers are counted by the external tool cloc, which is wired in automatically: the cloc installed on the system is used, and if there is none, a standalone script is downloaded into a temporary folder (it only needs Perl, no administrator rights). To keep the numbers an honest measure of the code base, only files tracked by Git are counted — build artifacts and dependencies never make it into the statistics. For projects outside Git, the count runs without repository awareness, excluding the usual service directories (node_modules, bin, obj, dist, build, target, vendor, .git).

The result is cached for 5 minutes, and computations run one at a time — so the panel never overloads the machine. The Refresh button next to the table title forces a recount on the spot; the cloc version and the counting time are shown next to it.