Skip to main content
See exactly where your tokens (and dollars) are going — no dashboard, no API key, no config. praisonai usage reads the same local session store that praisonai session list uses and rolls it up per day, per model, or per project — or per tool, to show reliability and latency.

Quick Start

1

Run the default report

Show the last 30 days grouped by day:
2

Group by cost driver

Find your most expensive model:
3

See per-tool reliability

Reports calls, success rate, average latency, and the last error for each tool used.

Choose Your View

Four groupings answer four different questions. tool sorts by most-called first, so your busiest (or busiest-failing) tool rises to the top.

By day

Spot spend spikes over time. Rows sort chronologically.

By model

Find your most expensive model. Rows sort by highest spend first.

By project

Compare projects sharing one machine. Rows sort by highest spend first.

By tool

Spot flaky or slow tools. Rows sort by call count first.

Options


Per-Tool Reliability

praisonai usage --by tool reports per-tool call counts, success rate, average and last latency, and the last error — read from the local session store, same as every other grouping.
Last ms and Last error are picked by when the tool itself last ran, not by when the session was last updated. If no tool calls are recorded, the command prints No tool usage recorded yet.
The tally counts tool outcomes that reach the AFTER_TOOL hook — which covers normalised tool failures (the common case). A raw exception that escapes the tool retry loop does not fire AFTER_TOOL and is not counted.

Python: read the same data with a hook

Prefer Python? The same per-call data is available via the AFTER_TOOL hook — no new API is needed.
The CLI tally reads exactly these three fields.

Common Patterns

Check last week only:
Break a single project down by model:
Pipe into jq to flag expensive rows:
The JSON output shape:
The --by tool JSON shape:
Tool mode omits the top-level total_tokens / cost fields — it reports outcomes, not spend. Spot flaky or slow tools:

How It Works

praisonai usage reads the on-disk session store — the same store surfaced by praisonai session list. No network calls, no configuration, no external observability platform. With no --project, both the current-project store and the global default store are read. Rows keep their originating identity (current or global), and a session that appears in both stores is counted once. Costs come from the existing per-run ModelPricing tracker — usage aggregates what was already recorded, it does not re-price.

Best Practices

Use --days 7 for a fast look at the current week before it grows into a surprise bill.
Group by model to see which model drives your spend, then decide whether a cheaper one fits.
Use --json in cron or CI and act on the numbers with jq.
Run praisonai usage --by tool --days 7 as part of your weekly review. Rows are sorted by call count first, so the busiest tool is on top — and the Success column immediately shows which ones are quietly failing. Pipe --json into jq in CI to fail a build when any tool drops below your target success rate.
Numbers reflect only what was recorded to the local session store. For team-wide totals across machines, use an observability integration such as Langfuse.

Session

The session store this command reads from.

Traces

Richer per-trace inspection.

Cost Tracking

The in-run cost display this aggregates.

Metrics

Real-time token counters during a run.