> For the complete documentation index, see [llms.txt](https://skyforgeai.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyforgeai.gitbook.io/docs/use/analytics.md).

# Analytics

SkyForge estimates how much developer time every session saved — for both direct Hub use and MCP clients (Claude Desktop, Claude.ai). Rule-based estimation is free and instant, always on, no setup. The Analytics tab is where you turn on the AI-refined pass and pin which model does it — no config file editing required.

Prefer to write config by hand, or need the full reference (env var fallback, JSON schema)? See [Configuration → Time Saved & Session Analytics](/docs/reference/configuration.md#time-saved--session-analytics).

***

## Open it

**Hub → Analytics**, in the left nav below Providers.

![Hub → Analytics — the behavior table, the pinning toggle, and the MCP settle window](https://2874025704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoJEVszlHbBuPIN3VRjBS%2Fuploads%2Fgit-blob-9d0020f35dde9cddad3cfe30d730cf05c4187242%2Fhub-analytics-tab.png?alt=media)

## How classification works

Two tiers, always in this order:

* **Rule-based (Tier 1)** — matches tool-call patterns to ServiceNow deliverables. Instant, zero tokens, always runs first as a floor.
* **AI-refined (Tier 2)** — an LLM pass that reasons over the actual work instead of pattern-matching. **Hub sessions get this automatically**, using whichever model that session itself ran on — nothing to turn on. **MCP sessions** (Claude Desktop, Claude.ai) only get it once you opt in here, since an MCP session has no session model of its own to fall back to.

The page's own table (screenshot above) is the fastest reference for what the toggle actually changes:

| `analytics.aiClassification` | Hub/agent sessions                                                       | MCP sessions                                      |
| ---------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------- |
| **off** (default)            | AI classification, using that session's own model (unchanged either way) | rule-based only                                   |
| **on**                       | AI classification, using the model you pick below                        | AI classification, using the model you pick below |

So the toggle isn't "turn AI on" — Hub sessions already have it. It's "pin a specific model for both Hub and MCP" instead of each defaulting to whatever it'd otherwise use.

## Enable classifier model pinning for Hub + MCP

Tick the checkbox, then pick a model from the **Classifier model** dropdown — sourced from providers you've already connected on the [Providers](/docs/connect/ai-providers.md) tab. This is required once the toggle is on; there's no "default model" option, since silently falling back to one is more confusing than useful (it'd resolve to whichever model happens to sort last alphabetically among your connected providers, not a deliberate choice).

Hit **Save**. This writes `analytics.aiClassification` and `analytics.classifierModel` into `skyforge.jsonc` for you — same two keys as the hand-edit path, shown at the bottom of the page.

## MCP Settle Window

Below the pinning box, a separate field for how long an MCP session must sit idle (no new tool calls) before it's eligible for AI classification — prevents classifying a session that's still mid-work. Default is 30 minutes if left empty. This only affects MCP sessions; Hub sessions classify immediately when they end, regardless of this setting.

Saved with the same **Save** button above — writes `analytics.mcpSettleMinutes`.

## Running it on demand for one session

Don't want to wait for the settle window? On the **Overview** and **Activity** tabs' Sessions & Tasks tables, any session still showing the **RULES** badge has a **✨ Run AI** button right next to it — filled blue, distinct from the inert MCP/AGENT/RULES badges beside it, since it's the one thing in that row you can actually click.

![Activity tab — Run AI button next to a RULES-badged MCP session, tooltip showing on hover](https://2874025704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoJEVszlHbBuPIN3VRjBS%2Fuploads%2Fgit-blob-e38a7e186c3b6b632ad72eb9a1aace5bb1f4bb08%2Frun-ai-button.png?alt=media)

Click it and it does exactly what its tooltip says: runs AI classification for **that one session**, right now — bypassing both the settle window above and the dedup guard that normally skips a session that's already been classified. Under the hood it's `POST /api/analytics/sessions/:id/analyze?ai=true`.

What happens next:

* **While running** — the button disables and shows `…`.
* **On success** — the row updates on its own: the **RULES** badge flips to **AI**, and the **Run AI** button disappears (there's nothing left to run). No manual refresh needed.
* **If it can't run AI classification** — the row shows a note under the session ID explaining exactly why, instead of the click looking like it did nothing: not enabled yet, no provider connected, or the actual classification call failed (bad key, rate limit, malformed response) — that last one still means the toggle and model were fine, something else went wrong.

***

## Need help?

[Submit an issue →](https://github.com/tryskyforge/skyforgeissues)
