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

# Metrics Reference

> How Agent Golf computes each number on the Dashboard, the Team page, and the user pages.

Each number on the **Dashboard**, the **Team** page, and the user pages, with its formula and the rules that change it.

| Metric | Measures | Shows on |
| - | - | - |
| [Inference Cost](#inference-cost) | Known cost of the model requests | Team page, Users table, user page |
| [Inference Cost per Contributor](#inference-cost-per-contributor) | Inference cost for each active contributor | Team page |
| [Inference Cost per Merged PR](#inference-cost-per-merged-pr) | Inference cost for each merged pull request | Team page, user page |
| [CI Cost](#ci-cost) | List-price cost of the pull requests' CI runs | Team page, Users table, user page |
| [Merged PRs](#merged-prs) | Pull requests merged in the period | Team page, Users table, user page |
| [Cycle Time](#cycle-time) | Median time from open to merge | Team page, Users table, user page |
| [Open PRs](#open-prs) | Pull requests open at the end of the period | Team page, Users table, user page |
| [Agent-Assisted PRs](#agent-assisted-prs) | Merged pull requests with an authored or reviewed session | Team page, user page |
| [AI Yield](#ai-yield) | Shipped lines for each line that agents added | User page, Model Mix |
| [Rework Rate](#rework-rate) | Share of merged code that later corrective work changed | Team page, Users table, user page |
| [Active Contributors](#active-contributors) | Users with a session in the period | Divisor of the per-contributor values |
| [Sessions](#sessions) | Root sessions | Users table, user page, Over Time |
| [Tool Failure Rate](#tool-failure-rate) | Failed share of the tool calls | Users table, user page |
| [Per Contributor, Per PR](#per-contributor-per-pr) | Averages per contributor and per pull request | Team page; **Per PR** on a user page |
| [Pull request metrics](#pull-request-metrics) | AI lines, Line Yield, Amplification, Churn, and LPT of one pull request | **AI Efficiency** tile of a pull request |

"User page" here also covers **Your Work** on the [Dashboard](https://docs.agent.golf/dashboard/overview.md#your-work) when you do not have **View Team Activity**, except **Per PR** and **Model Mix**, which show only on a user page. For the pages themselves, see [Team](https://docs.agent.golf/dashboard/team.md).

## How a period counts

Each metric counts an event at the time that it happened in the selected period. The period includes its start and excludes its end.

| Event | Time that counts | Metrics |
| - | - | - |
| Model request | Request time | Inference Cost and the values that divide it |
| Session | Time that Agent Golf analyzed the session | Sessions, Active Contributors, Tool Failure Rate |
| CI run | Finish time of the run | CI Cost |
| Pull request | Merge time, close time, or open state at the end | Merged PRs, Cycle Time, Open PRs, Agent-Assisted PRs, AI Yield, Rework Rate |
| Pull request update | Last update time | The pull-request values of [Per Contributor, Per PR](#per-contributor-per-pr) |
| Pull request on the roadmap | Last update time, with the pull request's full spend | Project Spend, Unplanned Spend. See [How Spend Counts](https://docs.agent.golf/linear/project-spend.md). |

A pull request counts only in the period of its merge, even when someone updates it later. The **Pull Requests** page and **Project Spend** count the pull requests that were updated in the period, so their numbers do not add up with **Merged PRs** or the cost tiles.

### Scope

* The **Workspace** section and the **Team** page count all users of the workspace. A user page counts one user.
* A session counts for its [contributor](https://docs.agent.golf/dashboard/sessions.md#contributor), or for its owner when it has no contributor.
* Values that use session links count only the links that you can see. Without **View Team Activity**, only the links of your own sessions count.

### Change and missing values

* A tile shows its change against the previous period of the same length, for example "+12%", but only when the previous value is not 0. When the previous value is near zero, at most 1% of the current value, the tile shows **New**. **Tool Failure Rate** and **Rework Rate** show the change in percentage points. **Open PRs** shows no change.
* **Not available** means that the value did not load. It is not 0. Reload the page.
* A median or a p25–p75 range needs two or more values. With one value, the detail shows only the count, for example "1 PR".

## Cost

### Inference Cost

**Inference Cost** is the known cost of the model requests in the period.

* Formula: reported cost + estimated cost. A request without a reported cost gets an estimate from the model price at the time of the request. See [Cost and the model catalog](https://docs.agent.golf/dashboard/sessions.md#cost-and-the-model-catalog).
* Requests of subagent sessions count.
* Requests with unknown cost do not count. When no request has a known cost, the tile shows **Unavailable**.
* It does not include CI. See [CI Cost](#ci-cost).

### Inference Cost per Contributor

**Inference Cost per Contributor** is the inference cost of the team divided by the people who did the work.

* Formula: [Inference Cost](#inference-cost) ÷ [Active Contributors](#active-contributors).
* When no user has a session in the period, the tile shows **No active contributors**.

### Inference Cost per Merged PR

**Inference Cost per Merged PR** is the inference cost divided by the merged pull requests.

* Formula: [Inference Cost](#inference-cost) ÷ the [merged pull requests](#merged-prs) whose author is a user of the workspace.
* The cost is all known inference cost of the scope in the period. It includes work that did not merge and sessions with no pull request, so the value is not the cost of a typical pull request.
* Pull requests of authors who are not users do not count in the divisor. The detail names them, for example "12 contributor PRs · 3 by other authors not counted".
* When no user merged a pull request, the tile shows **No merged PRs**. For a user without a linked GitHub account, the tile shows the user's total inference cost.

### CI Cost

**CI Cost** is the list-price cost of your pull requests' GitHub Actions runs that finished in the period.

* Formula: the billable minutes of each job × the list price of its runner. See [How CI cost is priced](https://docs.agent.golf/dashboard/ci-costs.md#how-ci-cost-is-priced).
* The team value counts the runs of the workspace's pull requests. A run that tested more than one pull request counts once.
* A user value counts the runs of the pull requests that the user authored. Agent Golf finds the author through the user's linked GitHub account. In the **Users** table, a run on pull requests of more than one user splits evenly between them.
* Runs that have not finished and minutes on runners without a list price add no cost.
* It needs **View Pull Requests and Repositories**. Without it, the tile does not show.

## Pull requests

### Merged PRs

**Merged PRs** counts the pull requests that merged in the period, by merge time.

* The team value includes pull requests whose author is not a user. The detail shows "Outside the organization: N" when N is more than 0.
* The detail also shows "N closed · N open": the pull requests that closed in the period without a merge, and the ones open at the end of the period.

### Cycle Time

**Cycle Time** is the median time from open to merge of the [merged pull requests](#merged-prs).

* Formula: median of (merge time − open time). The detail shows the p25–p75 range.
* Pull requests that closed without a merge do not count.

### Open PRs

**Open PRs** counts the pull requests that opened before the end of the period and did not merge or close before it. The detail shows their median age at the end of the period.

Agent Golf does not store reopen events. A pull request that closed and opened again counts as open for the full time, in **Open PRs** and in [Pull Request Flow](https://docs.agent.golf/dashboard/team.md#pull-request-flow).

### Agent-Assisted PRs

**Agent-Assisted PRs** counts the [merged pull requests](#merged-prs) that have at least one session linked as **authored** or **reviewed**.

* The tile shows the count and its share of all merged pull requests. The detail shows "N of M merged PRs".
* A pull request with only manual links does not count. See [What a linked session means](https://docs.agent.golf/dashboard/attribution.md#what-a-linked-session-means).
* When no pull request merged, the tile shows **No merged PRs**.

### AI Yield

**AI Yield** is the share of the agents' lines that the merged pull requests shipped.

* Formula: lines added by the pull requests ÷ [AI lines](#pull-request-metrics) added by their agent sessions. Here an agent session is a linked session that did not only review, manual links included.
* Up to 1.0, a value closer to 1.0 means less agent iteration. Above 1.0, the pull requests include lines that no agent session added, and the detail shows "includes non-agent lines".
* It uses only the merged pull requests that have GitHub line counts and whose agent sessions all have measured lines. The detail shows the excluded count, for example "N of M measured".
* The tile shows only when at least one merged pull request is measured.

### Rework Rate

**Rework Rate** is the share of the code that merged in the period that later corrective work changed.

* Formula: lines of the merged pull requests that a corrective pull request changed ÷ the eligible added lines of those pull requests. Lines in lockfiles, generated files, and snapshots do not count. Boilerplate lines, such as imports and module declarations, and lines that are too short or too long do not count either.
* Corrective means that the later pull request reverts the earlier one, fixes a bug in it, or a judgment of the two pull requests finds that it fixes or finishes the earlier work. Other changes to the same lines are **Code turnover** and do not count.
* Only pull requests with a session linked as **authored** count.
* A later change counts only inside the rework window after the merge. The default window is 7 days. Choose another on the [Code](https://docs.agent.golf/dashboard/code.md) page.
* A pull request still inside its window is not in the rate yet, so a recent period does not look better than it is. The detail counts these pull requests.
* When every pull request is still inside its window, the tile shows **Not available**. When no pull request counts at all, it shows **No merged PRs**.
* The detail shows the **rework cost**: the part of the attributed cost of the later pull requests that merged in the period and redid earlier code.
* On a user page and in the **Users** table, rework follows the author of the earlier pull request: who wrote the code, not who repaired it. The detail splits the lines into changes by the author and changes by others. Without **View Team Activity**, the tile follows this rule for your own pull requests.
* It needs **View Pull Requests and Repositories**.

## Activity

### Active Contributors

**Active Contributors** are the users with at least one [session](#sessions) in the period. Sessions without a user do not count. [Inference Cost per Contributor](#inference-cost-per-contributor) and the per-contributor values of [Per Contributor, Per PR](#per-contributor-per-pr) divide by this number.

### Sessions

**Sessions** counts the root sessions that Agent Golf analyzed in the period. Subagent sessions do not count.

### Tool Failure Rate

**Tool Failure Rate** is the failed share of the tool calls in the period.

* Formula: failed tool calls ÷ all tool calls. The detail shows "N of M tool calls failed".
* Tool calls of subagent sessions count.
* When the period has no tool calls, the tile shows **No tool calls**.

## Per Contributor, Per PR

The **Per Contributor, Per PR** card shows averages. The **Team** page shows all values. A user page shows only the per-pull-request values, under the title **Per PR**.

The values about pull requests use the pull requests that were updated in the period, not the ones that merged in it.

| Value | Formula |
| - | - |
| **Sessions per Contributor** | [Sessions](#sessions) ÷ [Active Contributors](#active-contributors) |
| **Agent-Assisted PRs per Contributor** | Merged pull requests with at least one linked session ÷ Active Contributors. Unlike the **Agent-Assisted PRs** tile, this value counts manual links. |
| **Sessions per PR** | Sessions linked as **authored** or **reviewed** ÷ the pull requests with at least one such session |
| **Models per PR** | Distinct models of those sessions, for each of those pull requests |
| **Lines Written per Line Shipped** | The inverse of [AI Yield](#ai-yield), over the merged pull requests updated in the period. The detail shows the yield and the churn. |
| **Prompts per Session** | HITL turns ÷ the root sessions whose harness sends prompts (Claude Code, Codex, and GitHub Copilot) |

A value whose divisor is 0 names the reason, for example **No active contributors** or **No attributed PRs**. **Lines Written per Line Shipped** does not show when no pull request has measured lines.

## Pull request metrics

The **AI Efficiency** tile of a pull request compares the lines that its agent sessions wrote with the lines that it shipped. It shows only when every agent session of the pull request has measured lines.

**AI lines** are the lines added and removed that the agent sessions' code-change reports state. An agent session is a linked session that did not only review. A session has no measured lines when it has no analysis, when it has unmeasured edits, or when it is an omp session that calls `eval` (code mode). See [HITL turns and AI lines](https://docs.agent.golf/dashboard/sessions.md#hitl-turns-and-ai-lines).

| Ratio | Formula | Shows after merge |
| - | - | - |
| **Line Yield** | [AI Yield](#ai-yield) of this pull request | Yes |
| **Amplification** | The inverse of **Line Yield**. More than 1× means agents wrote lines that did not ship. | Yes |
| **Churn** | (AI lines added + removed) ÷ (lines added + removed by the pull request) | Yes |
| **LPT** | AI lines added ÷ HITL turns: the lines that agents wrote for each prompt | No, but it needs HITL turns |

**Line Yield**, **Amplification**, and **Churn** need the GitHub line counts of the merge.


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