# AI use cases for Agent Measure (roy-tong/AgentMeasure)

Repo: [roy-tong/AgentMeasure](https://github.com/roy-tong/AgentMeasure) | Use cases: 5 | Page: https://dedupedai.com/use-cases/roy-tong-agentmeasure/

AgentMeasure is an open-source Python CLI that re-counts supported AI support billing exports against vendor rules and inspects local Codex or Claude logs for duplicates, retries and token anomalies.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Re-count an AI support bill against the vendor rule: https://dedupedai.com/use-cases/roy-tong-agentmeasure/recount-ai-support-bill-against-vendor-rule/
- Check local Codex or Claude sessions for duplicate retries: https://dedupedai.com/use-cases/roy-tong-agentmeasure/check-local-codex-claude-sessions-for-anomalies/
- Compare Claude response usage across session files: https://dedupedai.com/use-cases/roy-tong-agentmeasure/compare-claude-response-usage-across-session-files/
- Prepare a redacted Healthcheck summary to review: https://dedupedai.com/use-cases/roy-tong-agentmeasure/prepare-redacted-healthcheck-summary-for-review/
- Build a Dispute and Recovery Pack from a recount: https://dedupedai.com/use-cases/roy-tong-agentmeasure/build-dispute-pack-from-recount-findings/

## How to re-count an AI support bill against the vendor rule with Agent Measure

Repo: [roy-tong/AgentMeasure](https://github.com/roy-tong/AgentMeasure) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run the free CLI on a billing export to see overcharge and undercharge findings, unsettled rows and dollar variance.

**Who it is for:** A support operations lead or finance reviewer who received a per-resolution AI support invoice from Intercom, Zendesk, HubSpot, Salesforce, Ada or a similar vendor and wants to check it.

**The problem:** The invoice counts AI resolutions, but the team cannot tell whether each charge follows the vendor's stated billing rule or whether some rows lack the evidence to decide.

**The outcome:** A list of findings in both directions, rows marked cannot settle, the vendor rule with its public source, and a dollar net variance that can inform a vendor review.

### Steps

1. Run `pip install agentmeasure` to install the CLI from PyPI.
2. Save your reviewed billing export as `export.csv` using the canonical columns the README shows: conversation_id, human_agent_participated, issue_addressed, customer_recontacted_within_window and vendor_billed.
3. Run `agentmeasure recount --list-vendors` to confirm which vendor rule sets ship and their confidence grades.
4. Run `agentmeasure recount --export export.csv --vendor zendesk`, replacing zendesk with your vendor's rule if it differs.
5. Read the findings in both directions and the rows in cannot settle. Treat the dollar net variance as a rule-priced finding, not recovered money.

### Prompt to paste into your agent

```text
Using the AgentMeasure repo, run `agentmeasure recount --export <export.csv> --vendor <vendor>` on the file at <export.csv> and report the overcharge, undercharge, net variance and count of cannot settle rows. Verify that rows without enough evidence are excluded from the claim rather than zeroed.
```

### Caveat

A recount is arithmetic under a published rule, not a verdict on the vendor, and a finding is not an accepted claim or a refund.

Risk, credentials: The export contains customer conversation records, so remove any personal data your policy does not allow in a local tool before running the command.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roy-tong-agentmeasure/recount-ai-support-bill-against-vendor-rule/

## How to check local Codex or Claude sessions for duplicate retries with Agent Measure

Repo: [roy-tong/AgentMeasure](https://github.com/roy-tong/AgentMeasure) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Inspect your own Codex or Claude Code session logs for duplicate records, retry amplification and token anomalies.

**Who it is for:** A developer or team lead who runs Codex or Claude Code daily and suspects that retries or duplicate records are inflating token usage.

**The problem:** Session logs show more usage than expected, and it is unclear whether the extra counts come from duplicate records, retries or real work.

**The outcome:** A local report that flags duplicate records, retry amplification and token anomalies, with the note that missing evidence stays unknown and a retry is not automatically a second operation.

### Steps

1. Run `pip install agentmeasure` to install the CLI.
2. Run `agentmeasure demo` to see the output on a bundled synthetic session with no account and no upload.
3. Run `agentmeasure check` to inspect your default seven-day window of local sessions.
4. If the check finds no logs, run `agentmeasure check --all` or pass an explicit `--dir` and `--runtime`. For Claude Code, run `agentmeasure check --runtime claude`. (inferred, check the README)
5. Review each flagged item and treat a missing input as a gap, not a pass.

### Prompt to paste into your agent

```text
Using the AgentMeasure repo, run `agentmeasure check --runtime claude` on this machine and report duplicate records, retry amplification and token anomalies, with any missing inputs listed separately. Verify that the report states which inputs were not found instead of marking them as passing.
```

### Caveat

With both runtimes present, auto-discovery prefers Codex, so pass `--runtime claude` explicitly when you mean Claude Code.

Risk, credentials: Session logs can contain prompts, code and file content, so review the output before you share anything outside your machine.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roy-tong-agentmeasure/check-local-codex-claude-sessions-for-anomalies/

## How to compare Claude response usage across session files with Agent Measure

Repo: [roy-tong/AgentMeasure](https://github.com/roy-tong/AgentMeasure) | Difficulty: Advanced | Time: 30 minutes | Basis: From the README

Group response IDs from two Claude session files to see repeated usage snapshots, conflicts and missing fields.

**Who it is for:** A developer investigating a forked or resumed Claude session whose usage totals differ between two log files.

**The problem:** Two session files share response IDs, and the usage numbers for the same response do not match, so it is unclear which record to trust.

**The outcome:** A JSON file grouping the response IDs with repeated usage snapshots, conflicts and missing fields, read without rewriting any log.

### Steps

1. Run `pip install agentmeasure` to install the CLI.
2. Locate the two Claude session files you want to compare, for example first-session.jsonl and fork-session.jsonl.
3. Run `agentmeasure response-audit first-session.jsonl fork-session.jsonl --json responses.json`.
4. Open responses.json and list each response ID with its conflicts and missing fields.
5. Read the response-audit guide before drawing any conclusion about which snapshot is correct.

### Prompt to paste into your agent

```text
Using the AgentMeasure repo, run `agentmeasure response-audit <first-file.jsonl> <second-file.jsonl> --json responses.json` and summarize the conflicts and missing fields per response ID. Verify that the output does not select a winning snapshot or compute a session total.
```

### Caveat

The command groups and shows conflicts only, so you must decide which usage snapshot is right using your own evidence.

Risk, credentials: The supplied JSONL files may contain prompt and response content, so keep the output local unless you have reviewed it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roy-tong-agentmeasure/compare-claude-response-usage-across-session-files/

## How to prepare a redacted Healthcheck summary to review with Agent Measure

Repo: [roy-tong/AgentMeasure](https://github.com/roy-tong/AgentMeasure) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Create a local summary file from a check report, inspect it, and validate it before choosing to send it.

**Who it is for:** A developer who wants outside help with one local anomaly and needs to share only a summary, not the full logs.

**The problem:** Sending a full report or raw logs exposes more data than the question needs, but the team still needs a file that is valid and easy to inspect.

**The outcome:** A summary.json file written on the local machine that has been inspected and validated, ready for a decision about sharing.

### Steps

1. Run `pip install agentmeasure` to install the CLI.
2. Run `agentmeasure check --json report.json` to write the full report locally.
3. Run `agentmeasure share report.json --out summary.json` to write the summary on your machine.
4. Open summary.json and inspect it line by line before you decide to send anything.
5. Run `agentmeasure validate summary.json` to confirm the file is valid.

### Prompt to paste into your agent

```text
Using the AgentMeasure repo, run `agentmeasure check --json report.json`, then `agentmeasure share report.json --out summary.json`, then `agentmeasure validate summary.json`. Report whether validation passed and list the fields in summary.json. Verify that no upload happened and that report.json was not attached to any message.
```

### Caveat

Paid Healthcheck Diagnosis is a separate $10 service with its own scope, input requirements and refund terms on the service page, and a summary does not guarantee a root cause.

Risk, credentials: The full report.json and raw logs can contain sensitive session content, so send only the reviewed summary.json when a summary is requested.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roy-tong-agentmeasure/prepare-redacted-healthcheck-summary-for-review/

## How to build a Dispute and Recovery Pack from a recount with Agent Measure

Repo: [roy-tong/AgentMeasure](https://github.com/roy-tong/AgentMeasure) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Turn recount findings into a Dispute and Recovery Pack, then record what the vendor actually conceded.

**Who it is for:** A procurement or finance owner who has already recounted a vendor invoice and now needs a structured dispute file.

**The problem:** A recount shows a variance, but the claim is not yet organized for the vendor and the team needs to separate what was claimed from what the vendor accepted.

**The outcome:** A Dispute and Recovery Pack built from the recount, plus a recorded result showing what the vendor conceded, kept separate from the original claim.

### Steps

1. Run `pip install agentmeasure` and complete the recount from the first use case so you have findings to work from.
2. Run `agentmeasure prepare` on a native Intercom or Zendesk export to map it onto the canonical columns, if your export is in that native format. (inferred, check the README)
3. Run `agentmeasure dispute` to build the Dispute and Recovery Pack from the recount. (inferred, check the README)
4. Send the pack to the vendor through your own channel. Agent Measure does not send it for you.
5. Run `agentmeasure recovery` and record only what the vendor actually conceded, not the full claim. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the AgentMeasure repo, use the existing recount findings to run `agentmeasure dispute` and summarize the resulting pack. Then run `agentmeasure recovery` with the vendor concession, and verify that the recorded amount is kept separate from the original claim.
```

### Caveat

The README does not document flags for prepare, dispute or recovery, so confirm their exact syntax with `agentmeasure <command> --help` before running them, and a recovery is recorded only when the vendor actually concedes.

Risk, credentials: The dispute pack and vendor correspondence contain billing and customer data, so limit who receives them.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roy-tong-agentmeasure/build-dispute-pack-from-recount-findings/
