InterLAB tools · CSV/JSONL · budgets · in-browser

Agent cost tracker

Load an API event export — CSV, JSONL or JSON. The tool maps the columns, totals tokens and spend by project, model, task and day, finds retries and anomalies, and checks spend against monthly budgets. You enter the prices yourself, from your provider's price list.

Free, no sign-up

Rules v1.0, 2026-10-13

Event source

CSV (the delimiter is detected), JSONL (one object per line) or a JSON array. Nested usage { input_tokens, … } objects are recognised.

Nothing is sent: parsing happens in your browser. Up to 50,000 events.

Current data

…

How it works

  1. Import events

    CSV with any delimiter, JSONL or a JSON array — as a file or pasted. Up to 50,000 events. Bad rows do not break the import: you see the line number and the reason, and the rest is loaded. Repeated request IDs are dropped as duplicates.

  2. Map the columns

    Timestamp, model, input and output tokens, cache writes and reads, project, task, session, request ID, status, attempt and cost are detected from common names, including a nested usage object. You can adjust the mapping by hand.

  3. Cost

    If an event carries a cost, the figure is marked “reported”. Otherwise it is an “estimate”: tokens × the prices per 1M tokens from your price list. A model without a price is “no price” — such events are counted separately, never silently turned into zero.

  4. Analysis, budgets and export

    Totals and breakdowns by project, model, task and day, cache share, retry cost, failure rate, anomalies under published rules, budgets with thresholds and a forecast at the current pace. The report exports as Markdown and PDF, aggregates as CSV, settings as JSON.

Calculation rules

The table is generated from the same code as the calculation. The X, Y, N and Z thresholds can be changed under “Analysis → Rule parameters”; budget thresholds on the “Budgets” tab.

ACT-S1

Rule
An event is an error if its status contains error, fail, exception, timeout, rate limit, overloaded, cancel, abort, refused, denied, invalid, unavailable or an HTTP 4xx/5xx code. end_turn, stop, tool_use, max_tokens or an empty status count as success.

ACT-D1

Rule
A repeated request ID is a duplicate: the first event counts, the rest are skipped and counted.

ACT-P1

Rule
A model's price is matched by exact name (case-insensitive), otherwise by the longest “prefix*” pattern. No row → “no price”, counted separately.

ACT-C1

Rule
Event cost: reported from the data if the column exists and “prefer reported” is on; otherwise estimate = (input × input price + output × output price + cache write × write price + cache read × read price) / 1,000,000.

ACT-C2

Rule
If input in your data already includes cached tokens (like OpenAI prompt_tokens), turn the setting on: cache reads and writes are subtracted from input.

ACT-C3

Rule
No cache write or read price → the input price is used (an upper estimate), and the model is flagged in the notes.

ACT-R1

Rule
Retry: an event with attempt number above 1 in the same task and session.

ACT-R2

Rule
Retry: an error event followed by a successful event in the same task and session (used when the group has no attempt numbers, so one failure is never counted twice). Retry cost and its share of spend are shown separately.

ACT-A1

Rule
Expensive task: task cost above X × the median task cost of the same project (X = 3 by default; needs at least 5 tasks with non-zero cost in the project).

ACT-A2

Rule
Daily spike: a day's spend above Y × the average of the previous N calendar days (Y = 2, N = 7; needs at least 3 prior days; days without events count as zero).

ACT-A3

Rule
Output/input outlier: an event's output ÷ input (input includes cache) above Z × the median across events (Z = 5; at least 20 events and 1,000 output tokens in the event).

ACT-B1

Rule
Budget threshold: the month's spend (project or overall) reached a threshold — 50/80/100% by default; 100%+ is critical, 80%+ is high.

ACT-B2

Rule
Forecast at the current pace: spend ÷ elapsed days × days in month ≥ 100% of the budget while 100% is not yet reached. For a finished month the forecast equals actual spend.

ACT-B3

Rule
The budget's project is not in the month's data — likely a typo in the name.

ACT-B4

Rule
The month has events without a price — budget spend is understated.
Rules v1.0, 2026-10-13

Timestamp

Column names
timestamp, created_at, createdat, time, date, datetime, ts, created, start_time, started_at

Model

Column names
model, model_name, model_id, usage.model, response.model

Input tokens

Column names
input_tokens, prompt_tokens, tokens_in, usage.input_tokens, usage.prompt_tokens, input, n_input_tokens

Output tokens

Column names
output_tokens, completion_tokens, tokens_out, usage.output_tokens, usage.completion_tokens, output, n_output_tokens

Cache write tokens

Column names
cache_creation_input_tokens, cache_write, cache_write_tokens, cache_creation_tokens, usage.cache_creation_input_tokens

Cache read tokens

Column names
cache_read_input_tokens, cached_tokens, cache_read, cache_read_tokens, usage.cache_read_input_tokens, usage.prompt_tokens_details.cached_tokens, usage.input_tokens_details.cached_tokens, prompt_tokens_details.cached_tokens

Project

Column names
project, project_id, project_name, workspace, workspace_id, app, application

Task

Column names
task, task_id, ticket, ticket_id, issue, issue_id, issue_key, job

Session / run

Column names
session, session_id, run, run_id, conversation_id, thread_id, trace_id

Request ID

Column names
request_id, requestid, request, message_id, event_id, response_id, id

Status / error

Column names
status, outcome, result, error, error_type, stop_reason, finish_reason

Attempt

Column names
attempt, attempt_number, try, retry, retry_count, retries

Reported cost

Column names
cost, cost_usd, total_cost, cost_total, usd, amount, price
Columns detected automatically

Limitations

  • There are no vendor prices by default: price lists change, and a stale number is worse than an empty one. The example carries illustrative prices — check them against your provider's price list.
  • Days and months are in UTC; a timestamp without a time zone is read as UTC.
  • A reported cost column is assumed to be in the currency set on the “Prices” tab; there is no currency conversion.
  • Retries are detected from the data only: without task, session, status and attempt columns they are invisible.
  • The forecast at the current pace is a linear extrapolation, not a prediction: spikes and weekends distort it.
  • Events are stored in this browser's IndexedDB (up to 50,000); if the browser forbids it, they stay in the tab's memory and the tool says so.

Privacy

  • Files and pasted text are parsed in your browser: events and task names are not sent to a server and never appear in the page address; project and model names leave only in the request summary, if you send one.
  • Settings and versions are kept in localStorage, events in this browser's IndexedDB. “Clear everything” deletes both.
  • Analytics receives only the fact of an import or export and the file format — no data.
  • The result reaches us only if you send a request yourself and keep the “Attach the result” box ticked — the form shows exactly what will be sent. The summary holds the period, totals by project and model, retries, budgets and alerts — never individual events, tasks or request IDs.

Related tools

All tools · 40
Tell us about your task — we'll review your request and get back to you

Agent spend growing faster than the value?

A technical consultation is a paid engineering review: where agents waste tokens, and how to tune caching, retries and model choice per task. The first short conversation about the format is free.

  • The first short conversation is free — we choose the format
  • NDA — yours or ours
  • Pricing after a brief and an agreed scope

Please do not send passwords, access keys or source code through this form — we will agree a safe way to share access separately.

By clicking the button you agree to the processing of your personal data.