> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corepillar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Usage

> The organization-wide spend, model mix and PII dashboard in AgentHub: every metric, how it is calculated, who can see it, and how it differs from ModelHub's personal Usage page.

**AI Usage** sits in the AgentHub sidebar right after Model Manager. It shows what your organization spends on AI, who spends it, on which models and features, and how much personal or sensitive data was stripped out of prompts before they reached a provider.

<Info>
  AgentHub has no Playground in its sidebar. AI Usage takes that slot. The prompt-comparison Playground only exists on CorePillar's demo build.
</Info>

## Who sees what

The page decides your view from your role, on the server. Nothing in the URL can widen it.

| Your role | What AI Usage shows |
| - | - |
| Your organization's super admins | The organization view, with an **Organization / Just me** toggle |
| Owner or Admin | The organization view, with an **Organization / Just me** toggle |
| Editor (AI Builder) | Only your own usage ("My AI usage"), no toggle |
| Viewer | Viewers can't open AgentHub. They see their own usage in [ModelHub's Usage page](/modelhub/usage). |

The organization view opens by default. **Just me** switches to your own numbers and adds `?scope=personal` to the URL; **Organization** removes it. Both views start loading when the page opens, so switching is instant once the second one has arrived.

<Note>
  The `/playground` address on AgentHub also renders the organization dashboard, gated on the `manage_org_settings` permission (Owner and Admin by default). Anyone without it sees "Not available on your account — Org-wide AI usage and cost is visible to workspace owners and admins. Your own usage is on the AI Usage page." Use the AI Usage sidebar item; the result is the same data. See [Roles and permissions](/agenthub/settings/roles-and-permissions).
</Note>

## Header and filters

The title is **AI Usage & Cost** with your organization's name underneath, or **My AI usage** / "Your activity only" in the personal view.

| Control | Options | Notes |
| - | - | - |
| Scope toggle | **Organization**, **Just me** | Only for those who can see the organization view. |
| User filter | **All users**, or pick people | Organization view only. Lists every member of the organization, including people with no activity in the window ("No members yet." when empty). Shows one name, or "*N* users". |
| Project filter | **All projects**, or pick projects | Organization view only. Lists every project in the organization, including empty ones ("No projects yet."). |
| Time range | **7d**, **30d**, **90d** | Default **30d**. Stored as `?days=`. |

Each filter panel has **Select all** and **Clear**, closes on Escape or a click outside, and writes its choice to the URL (`?users=` and `?projects=` as comma-separated IDs), so a filtered view can be bookmarked or shared with another admin. Switching to **Just me** drops the user and project filters.

Days are UTC calendar days. The window ends now and reaches back 7, 30 or 90 days.

## Where the numbers come from

Every figure is a sum over four sources. Each source is attributed to the person who triggered it.

| Source | What counts as a request | Cost and tokens |
| - | - | - |
| **Chat** | One ModelHub chat turn | The turn's measured tokens and cost |
| **Cost Calculator** | One executed scenario in a Cost Calculator run | The run's measured cost and tokens. Runs imported from OpenTelemetry traces are excluded, because that cost is your existing production spend, not a call CorePillar made. |
| **Playground** | One model result in a Playground comparison run | Priced when the call was made. The Playground is not part of AgentHub, so this row is normally zero here. |
| **Evaluations** | One LLM-judge call in a trace evaluation | **Not recorded.** Judge calls are counted, but their tokens and cost are not stored, so they add requests and no cost. The table shows "tokens & cost not recorded". |

Chat data comes from ModelHub, which shares your organization's data with AgentHub. If nobody in the organization uses ModelHub, the chat-only sections below (PII, routing, latency, right-sizing) stay empty.

## KPI tiles

| Tile | Meaning | Change indicator |
| - | - | - |
| **Total spend** | Cost across all sources in the window | Percent change against the previous window of the same length. Down is shown green, up red. |
| **Requests** | Model calls across all sources | Percent change; up is green. |
| **Active users** | Distinct people with any activity in the window. Organization view only. | Percent change |
| **Tokens** | Input plus output tokens across all sources | None |
| **PII events** (organization) / **PII stripped** (personal) | Identifiers detected and removed from chat prompts | None |

The change reads "flat" when it rounds to 0%, and "—" when the previous window had nothing to compare against.

## Spend over time

An area chart of daily spend across all sources, with a dashed **Requests (relative)** line. The requests line has no axis of its own; it is scaled to the chart so you can compare its shape with spend. Hover a day to see the date, its spend and its request count. "No data yet" when the window is empty.

## Spend by source

A table with one row per source, plus a stacked daily bar chart of cost by source.

| Column | Meaning |
| - | - |
| **Source** | Chat, Cost Calculator, Playground, Evaluations |
| **Requests** | Calls from that source |
| **Tokens** | Input plus output tokens |
| **Cost** | Spend from that source |
| **Share** | That source's share of total spend |

Only sources with spend get a series in the chart.

## Cost by user (organization view)

Horizontal bars for the **top 10** people by spend. Each bar shows the person's name, their spend, and their share of total spend. People who have since left the organization still appear by name. Someone whose profile can't be found shows as "Unknown user".

This is cost per person across every source: their chat turns, the Cost Calculator runs they started, and any evaluations they ran.

## Tokens in / out and Activity (personal view)

In **Just me** and in an Editor's view, the Cost by user card is replaced by two cards:

* **Tokens in / out**: stacked daily bars of input and output tokens. Hover a day for "*date*: *N* in · *N* out". "No token activity yet" when empty.
* **Activity**: a calendar heatmap of requests per day, Monday-first, with a **Less ... More** legend. Hover a cell for the date, request count and cost. "No activity in this window yet" when empty.

## Model mix

A donut of spend by model with **Total spend** in the centre, and a table:

| Column | Meaning |
| - | - |
| **Model** | Display name of the model |
| **Requests** | Calls to that model across all sources |
| **Cost** | Spend on that model |
| **Avg latency** | Average response time, from chat turns only. "—" when the model has no chat traffic. |
| **Right-sized** | Share of that model's chat turns that ModelHub judged the right size for the request. "—" without chat turns. |

## PII leakage

ModelHub strips personal and sensitive data (names, email addresses, card numbers, API keys and so on) out of prompts before they reach a provider. This card summarizes what was stripped. It covers chat only.

* **Events over time**: daily count of identifiers stripped. A **"*N* turns blocked"** badge appears when some turns were held back entirely because of what they contained.
* **By severity**: a single bar split into Critical, High, Medium and Low, with counts.
* **By type**: the top 8 identifier types, coloured by severity.

"No PII detected" appears in each part when there is nothing to show.

## Stripped identifiers (organization view only)

Under the PII card, admins see the itemized log: every identifier type stripped from every turn, newest first.

"Visible to workspace administrators only. Credentials and government identifiers are stored partially masked — enough to identify which one leaked, not enough to use."

A summary strip shows the total ("*N* stripped"), a count per severity, and "*N* turns held" when any turns were blocked. Two filters narrow the table: **All severities** and **All types**.

| Column | Content |
| - | - |
| **When** | Relative time ("just now", "5m ago", "3d ago") |
| **What** | Identifier type (for example "Email address", "Card number", "Anthropic API key") with a severity dot, and a **Held** badge if the whole turn was blocked |
| **Count** | How many of that type were stripped from the turn |
| **Model** | The model the turn went to |
| **Who** | The person who sent it |
| **Stripped value** | The text that was removed. Non-critical findings are shown as typed; critical ones (credentials, government IDs) are partially masked. Multiple values show the first one and "+*N* more" (hover to see them). Conversations that were end-to-end encrypted show "Encrypted". |

The log holds the **300** most recent entries in the window. It is an audit view, not an export.

Empty states: "Nothing has been stripped yet — prompts so far contained no detected identifiers." and, when a filter excludes everything, "No matches for this filter."

<Warning>
  The Stripped value column shows the actual personal data your people typed. Only Owners, Admins and super admins can see it. The personal view never loads it: when you switch to **Just me**, the log and the member list are removed before the data reaches your browser.
</Warning>

## Routing & savings

Chat-only figures from ModelHub's automatic model routing. The card header carries three pills when there is data: **Right sized**, **Overpowered** and **Underpowered**, each with a count and share of chat turns.

| Figure | Meaning |
| - | - |
| **Saved by auto-routing** | Money saved by turns where people left the model on Auto and ModelHub picked a cheaper model. Underneath: "*N* of *N* turns on Auto · *N* escalated". An escalation is an Auto turn that needed more than the small tier. |
| **Prompt optimisation** | Tokens saved by ModelHub tidying prompts, "saved across *N* turns". |
| **Right-sizing headroom** | What would have been saved "if every overpowered turn used its cheaper fit". A what-if figure, not money spent. |
| **Tier split** | Chat turns by the tier they required: Small, Mid, Large. |

## Demo data

If CorePillar set up a demo for your organization, it may have loaded a sample usage history: roughly 60 days of chat turns from synthetic coworkers, plus a share attributed to the person the demo was prepared for. The synthetic coworkers are added to the organization as Viewers and their accounts are blocked from signing in. Every seeded row is tagged, so CorePillar can remove the whole set on request. Real usage is never mixed into or altered by it.

If you see unfamiliar names in **Cost by user** in a new organization, ask your CorePillar contact whether a demo dataset was loaded.

## How this differs from ModelHub's Usage page

[ModelHub's Usage page](/modelhub/usage) is the same screen, built on the same calculation:

| | AgentHub AI Usage | ModelHub Usage |
| - | - | - |
| Audience | Owners, Admins and super admins (org view); Editors (own usage) | Every ModelHub user |
| Default view | Organization | Your own usage, unless you are an admin |
| Filters | Users, projects, time range | Time range (plus the users and projects filters for admins in the organization view) |
| Stripped identifiers log | Yes, with values | Only in an admin's organization view |

Because personal and organization views run the same aggregation, an employee and their admin always see identical numbers for the employee.

## Related

<CardGroup cols={2}>
  <Card title="ModelHub Usage" icon="user" href="/modelhub/usage">
    The employee-facing view of the same data.
  </Card>

  <Card title="Cost Calculator" icon="calculator" href="/agenthub/cost-calculator">
    The source of most non-chat spend in AgentHub.
  </Card>

  <Card title="Roles and permissions" icon="shield" href="/agenthub/settings/roles-and-permissions">
    Which roles see the organization view.
  </Card>

  <Card title="Model Manager" icon="key-round" href="/agenthub/model-manager">
    Where model prices come from.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.