Run
praisonai at least once so a session exists β otherwise the report is empty.Quick Start
1
See your spend
2
Change the grouping
3
Narrow the window or script it
How It Works
The command reads the already-persistedtotal_tokens and cost fields on each session record in the local session store, filters by --days, groups by --by, and renders a table or JSON. No new data is written, no network calls, no configuration.
Cost values match
praisonai tracker β both read from the same pricing reference.Choosing --by
Pick the dimension that answers your question.
day sorts chronologically; model and project sort by highest token count first.
Options
An invalid
--by value prints --by must be one of: day, model, project and exits with code 1.
Output Formats
- Table
- JSON
-, and a final Total row sums the report.Empty Stores and Warnings
Empty and broken reports are always distinguishable.- No sessions yet? The command prints
No usage recorded yetand exits0. - A damaged or unreadable store surfaces as
Usage may be incomplete: ...in table mode, or in the top-levelerrorsarray in JSON mode.
Best Practices
Alert on spend in CI
Alert on spend in CI
Wire
praisonai usage --days 7 --json into a cron or CI job and alert if cost exceeds a threshold.Find your most expensive model
Find your most expensive model
Run
praisonai usage --by model weekly to see which model your agents actually spend the most on.Compare workspaces
Compare workspaces
Use
praisonai usage --project <id> inside a workspace and praisonai usage --by project in the default shell to compare workloads.Script with jq
Script with jq
--json is stable for scripting β pipe into jq or a small dashboard rather than parsing the table.Related
Token Usage Protocol
Wire custom sinks and queries (databases, dashboards)
Sessions
The store
praisonai usage reads fromCost Tracker
Per-run token and cost tracking

