total_tokens and cost per session. praisonai usage reports those totals β no config, no network.
Quick Start
1
Run the report
Print the last 30 days, grouped by day.
2
Group by model or project
Switch the grouping dimension with
--by.3
Window the results
Limit the report to a time window with
--days (0 = all history).4
Emit JSON
Produce machine-readable output for scripts.
5
See per-tool reliability
How It Works
The command reads the current-project and global default session stores, filters by time window, groups the rows, then renders a table or JSON.Options
An invalid
--by value prints --by must be one of: day, model, project, tool and exits with code 1.
Which --by should I pick?
Pick the grouping that answers your question.
tool sorts by most-called first, so your busiest (or busiest-failing) tool rises to the top.
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.JSON Output
--json prints a stable shape for dashboards and pipelines.
$0.0034); JSON rounds to 6.
With --by tool, each row describes a tool instead of a spend bucket:
total_tokens / cost fields β it reports outcomes, not spend.
Common Patterns
Run a quick weekly review of spend by day.Best Practices
Enable a session store first
Enable a session store first
Rows only exist once agents run with a session store. Enable one with
memory="history" or a session_id so praisonai usage has data to report.Keep --days small for fast iteration
Keep --days small for fast iteration
A short window (
--days 7) scans fewer sessions and returns quicker during active development.Use --json for scripting
Use --json for scripting
Pipe
--json into jq or a spreadsheet instead of parsing the table.Remember --project scopes the read
Remember --project scopes the read
Passing
--project <id> reads only that projectβs store β the global bucket is skipped.Spot flaky or slow tools before users notice
Spot flaky or slow tools before users notice
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.Related
CLI Reference
Full command tree, including session commands
Session Resume
The session store these totals come from

