-
-
Notifications
You must be signed in to change notification settings - Fork 205
Tokens Costs and Analytics
CCAM's analytics help compare activity, find outliers, and explain spend. Treat cost as an estimate derived from recorded usage and configured pricing, not as a billing invoice.
Before comparing totals, align:
- time range and timezone;
- provider and model;
- project and source filters;
- whether cached/input/output token categories are included;
- the pricing table effective for that model and period.
Two screens can be individually correct while showing different scopes.
- Which sessions dominate token use this week?
- Is cost concentrated in one model, project, or source?
- Did a long session repeatedly reread context?
- Are cached tokens changing the effective cost pattern?
- Did a workflow retry or fan out across many subagents?
Use the analytics view for trends, then drill into a specific session for causality.
npx ccam cost
npx ccam analytics
npx ccam session <session-id>The current CLI help documents available ranges, groupings, and structured output options.
Check in this order:
- same session IDs and date boundaries;
- same provider/model identity;
- usage events are present and fully imported;
- pricing overrides match the intended rates;
- no duplicate remote/local collection of the same work;
- billing-system rounding or provider-specific categories.
Never “fix” a number by editing the database. Preserve the raw evidence and correct the importer, identity, or pricing configuration.
Alerts work best as early warnings, not hard accounting controls. Set thresholds high enough to avoid routine noise, route them to an owned channel, and include a link or session ID that makes the alert actionable.
For a focused procedure, use Recipe: Audit an Expensive Session. For alert setup, see Alerts and Webhook Recipes.
Start Here · Localized product Wiki · Repository · Releases · Security · Report an issue
Guidance tracks the current master branch. For a deployed release, consult the repository documentation at that release tag before changing configuration.
CCAM Handbook
Use CCAM
- Read the dashboard
- Sessions and agents
- Kanban and tasks
- Tokens and costs
- Run agents
- Personal settings
Operate CCAM
- Deployment guide
- Hook health
- Security
- Backups and retention
- Prometheus and Grafana
- Remote machines
- Upgrades and rollback
- Incident runbooks
Automate and extend
- CLI patterns
- MCP workflows
- Alerts and webhooks
- Dynamic workflows
- Skills and plugins
- Safe config explorer
- Integration patterns
Help