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

# AI ROI Agent

> A small program on each developer's machine that ties AI coding sessions to the work they produce. Prompts and code never leave the machine.

The **AI ROI Agent** is a small program that runs on each developer's machine. It listens to their AI coding tools and to git, and tells nOps which AI sessions led to which commits and pull requests. It is optional: AI ROI works without it, but its numbers are sharper with it.

> [!TIP]
>
> **Prompts, AI responses and code never leave the machine.** A small model on the machine decides what kind of work each prompt is. nOps receives only that label. See [What the agent sends and keeps](https://help.nops.io/ai-roi/agent/privacy.md).

## Why install it

| Without the agent | With the agent |
| - | - |
| AI cost per PR is an **estimate** (`~$42`), from the author's spend while the PR was in the making. | AI cost per PR is **exact**: the cost of the sessions that produced it. |
| AI spend that never reached a merged PR is **Not categorized**. | That spend gets a **work type** (Build, Fix, Understand, Docs, Ship), so you can see what exploration and unfinished work went to. |
| PRs whose author isn't matched to anyone show no cost. | PRs are linked to sessions through commits, even when the login isn't matched. |
| AI-assisted PRs are **inferred** from trailers and labels. | AI use is **verified**, with AI-written lines measured on the machine. |
| No view of how each person uses AI. | **How you use AI** on the Developers tab (work types and cost drivers), and the **Stuck sessions** coaching flag. |

## How it works

**1. The developer works with an AI coding tool**

The agent hears about sessions, prompts, tool calls and edits through the built-in hooks of Claude Code, Cursor, Codex and GitHub Copilot, and about commits through git hooks. It records only in repositories that belong to your organization's allowed GitHub organizations, GitLab groups or Bitbucket workspaces.

**2. The agent counts and labels, on the machine**

It counts prompts, tool calls, file kinds and lines changed. A small model on the machine labels each prompt with a work type. The prompt text is deleted once labelled.

**3. The agent sends counts and labels to nOps**

Every 30 seconds, it sends the counts, labels, repository and branch names, and commit IDs. Nothing is sent while the machine is offline; it waits on disk.

**4. nOps joins sessions to PRs**

Commits and branches link each session to the PR it ended up in, and the session's cost becomes that PR's AI cost.

## Supported tools and platforms

| | macOS | Linux | Windows |
| - | - | - | - |
| Claude Code | Yes | Yes | Yes |
| Cursor | Yes | Yes | Yes |
| Codex | Yes | Yes | Yes |
| GitHub Copilot | Yes | Yes | Yes |
| Git commits | Yes | Yes | Yes (Git for Windows) |
| Shell commands | zsh, bash | zsh, bash | PowerShell |

Node.js 22 or newer is required.

## Get started

> [card] [Install the agent](https://help.nops.io/ai-roi/agent/install.md)
>
> For developers: one command and a browser sign-in.

> [card] [Manage the agent](https://help.nops.io/ai-roi/agent/admin.md)
>
> For admins: allowed organizations, tools, prompt labels and machines.

> [card] [What it sends and keeps](https://help.nops.io/ai-roi/agent/privacy.md)
>
> Exactly what leaves the machine, and what never does.

> [card] [Commands and troubleshooting](https://help.nops.io/ai-roi/agent/commands.md)
>
> `clara status`, `doctor`, `pause`, `update`, `uninstall`.

> [!NOTE]
>
> Set the allowed organizations **before** developers install. Until at least one is set, the agent installs but records nothing. See [Manage the agent](https://help.nops.io/ai-roi/agent/admin.md#policy).


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