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

# Agent Analytics Overview

> Label every agent span with Polaris, group runs by execution path in Flows, find the Triggers behind failed runs and join runs to user activity.

Agent Analytics is agent observability with behavior analytics on every run. Kubit queries the OpenTelemetry traces your agents already produce, labels and scores every span with Polaris annotations, then visually groups the runs by execution path. You can see which runs went wrong and what triggered them. Product Analytics reports then join those runs to what your users did next, so a change to the agent is judged by its outcome for users.

## What Agent Analytics does with your traces

Agent Analytics adds three things on top of raw spans.

<table>
  <colgroup>
    <col width="100" />

    <col width="334" />

    <col width="325" />
  </colgroup>

  <thead>
    <tr>
      <th>**Feature**</th>
      <th>**What it does**</th>
      <th>**Example question it answers**</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**Polaris**</td>
      <td>Kubit's in-house small language model labels and scores every span with what it did and whether it worked, in under a second per span. There is no additional LLM cost or sampling. It costs up to 98% less and runs about 15x faster than a frontier large language model used as a judge.</td>
      <td>Which tool calls returned 200 but picked the wrong parameter?</td>
    </tr>

    <tr>
      <td>**Flows**</td>
      <td>Groups every agent run by execution path (which tools ran, in what order) and draws all paths in one Sankey.</td>
      <td>What share of refund conversations loop on `search_orders` three or more times?</td>
    </tr>

    <tr>
      <td>**Triggers**</td>
      <td>Compares a metric across model versions or user segments and tells you when it changes.</td>
      <td>Did the Misstep rate on `book_appointment` go up after the model upgrade?</td>
    </tr>
  </tbody>
</table>

Polaris annotations come in five types: **Action**, **Exception**, **Misstep**, **Warning** and **Behavior**. [Concepts](https://learn.kubit.ai/agent-analytics/concepts.md#annotation-types) defines each one.

## Why Every Span Is Labeled

Polaris labels every span, not a sample, because the other features depend on it. Flows draws every execution path with a count of how many traces took it, so a path missing from the labels is missing from the Sankey. Triggers reads the labels to find which spans changed. Evals run on the same model, so scoring every span with your own eval prompt adds no LLM cost.

## How traces get into Kubit

Kubit queries agent traces straight from your warehouse, or sent over OpenTelemetry.

<table>
  <colgroup>
    <col width="297" />

    <col width="325" />

    <col width="261" />
  </colgroup>

  <thead>
    <tr>
      <th>**Where your traces are**</th>
      <th>**What you do**</th>
      <th>**Start here**</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>In your app or not collecting yet</td>
      <td>Send spans to an Agent workspace with the agent plugin, the Kubit SDK (`kubit-otel` for Python, `@kubit-ai/otel` for Node) or the stock OpenTelemetry exporter. The [Quickstart](https://learn.kubit.ai/agent-analytics/get-started/quickstart.md) helps you pick one.</td>
      <td>[Quickstart](https://learn.kubit.ai/agent-analytics/get-started/quickstart.md)</td>
    </tr>

    <tr>
      <td>Already in Langfuse, Arize or Braintrust</td>
      <td>Add Kubit next to your existing OTel span processor with the agent plugin. Your current tool keeps working.</td>
      <td>[Agent plugin](https://learn.kubit.ai/agent-analytics/integrate/agent-plugin.md)</td>
    </tr>

    <tr>
      <td>Already in your warehouse</td>
      <td>Connect Databricks, Snowflake, BigQuery or ClickHouse. Kubit queries the trace tables where they are.</td>
      <td>[Bring your own warehouse](https://learn.kubit.ai/warehouses/overview.md)</td>
    </tr>

    <tr>
      <td>In Pydantic Logfire, and you want a quick trial</td>
      <td>Export the traces to a file and upload it to a Sandbox workspace. Nothing in your app changes.</td>
      <td>[Logfire traces in a Sandbox](https://learn.kubit.ai/agent-analytics/cookbook/logfire-sandbox.md)</td>
    </tr>
  </tbody>
</table>

Traces already in your warehouse stay there. No data silo to secure. Nothing is retained outside your warehouse. Traces sent over OpenTelemetry to an Agent workspace are stored in a Kubit-hosted warehouse in the US or EU region, and you can switch to your own warehouse at any time.

Reports on traces, such as a funnel of agent runs or retention after a user's first session, are part of [Product Analytics](https://learn.kubit.ai/product-analytics/overview.md). They work on traces and clickstream events alike.

## Who uses Agent Analytics

<table>
  <colgroup>
    <col width="232" />

    <col width="498" />
  </colgroup>

  <thead>
    <tr>
      <th>**Reader**</th>
      <th>**Typical use**</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**AI product engineer**</td>
      <td>Acts as the agent's product manager. Instruments the agent, finds the execution paths that fail, checks a fix against the next week of runs and measures what users did after each path.</td>
    </tr>

    <tr>
      <td>**Product manager or analyst**</td>
      <td>Reads Flows to see which agent behavior leads to a completed task, a support ticket or a cancellation.</td>
    </tr>

    <tr>
      <td>**Coding agent**</td>
      <td>Wires Kubit into a repo with `/kubit-integrate`, then queries traces through the Kubit MCP server.</td>
    </tr>
  </tbody>
</table>

## Related

> [card] [Quickstart](https://learn.kubit.ai/agent-analytics/get-started/quickstart.md)
>
> Pick how to send traces, then check them in Activity.

> [card] [Concepts](https://learn.kubit.ai/agent-analytics/concepts.md)
>
> Users, sessions, traces, spans, execution paths and Polaris annotations.

> [card] [Agent Plugin](https://learn.kubit.ai/agent-analytics/integrate/agent-plugin.md)
>
> Let Claude Code or Cursor detect your tracing setup and wire Kubit in.

> [card] [Is my data flowing?](https://learn.kubit.ai/agent-analytics/get-started/data-flowing.md)
>
> Check each step when traces don't show up.


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