ainb-fleetcost

Solid

Show fleet spend — per-session, per-model, per-day, and per-group USD cost rollups for every claude/codex session, sourced live from ainb's burndown analytics (which already prices every provider call). Use when you need spend visibility across a multi-session fleet, want to find the most expensive session/model, or are checking whether any session/group has crossed a configured budget cap. Budget breaches are also delivered as notifyd alerts. Default output: text tables. Pass --format json for LLM consumption.

AI & Automation 18 stars 6 forks Updated today MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
43
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# ainb fleet:cost Fleet-shaped spend rollups. ainb already tracks `cost_usd` per provider call (the burndown plugin aggregates it); this verb reshapes that data into per-session / per-model / per-day / per-group USD totals joined to the live fleet, and evaluates configured budget caps. ## Run ```bash ainb fleet cost # text tables (default) ainb --format json fleet cost # JSON for piping ainb --format json fleet cost --period week # window: today|week|30days|month|all ``` `--format` is a **global** flag — it goes before `fleet`, not after `cost`. The `--period` window scopes the data (default `month`): burndown date-bounds its call set and re-aggregates, so a narrower period returns less spend; `all` reports lifetime totals. ## Output fields (JSON) | field | meaning | |---|---| | `totals` | fleet-wide `{cost_usd, bucket, session_count, model_count}` | | `sessions[]` | per-session `{session_id, provider, project, cwd?, group?, cost_usd, bucket}`, sorted by descending cost | | `models[]` | per-model `{model, cost_usd, bucket}`, sorted by descending cost | | `daily[]` | per-day `{date, cost_usd, bucket}` | | `groups[]` | per-workspace `{group, cost_usd, session_count, bucket}` (only sessions that match a live fleet cwd) | | `budget_breaches[]` | `{scope, subject, cwd?, cost_usd, limit_usd}` — caps crossed this run (also delivered to notifyd) | `bucket` is the token breakdown: `input_tokens`, `cache_creation_tokens`, ...

Details

Author
stevengonsalvez
Repository
stevengonsalvez/agents-in-a-box
Created
1 years ago
Last Updated
today
Language
Rust
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

ainb-fleet

Fleet orchestration overview — the `ainb fleet ...` Rust subcommand namespace for driving every claude session on the host. Routes to the sub-skills (standup / broadcast / sequence / needs / daemon / atc). Invoke this for an at-a-glance map of what fleet can do; reach for the specific sub-skill for the verb you want.

18 Updated today
stevengonsalvez
AI & Automation Solid

ainb-fleetstandup

Show fleet status — every claude session running on the host, merged across ainb + claude-peers broker + background jobs. Use when you need to enumerate sessions before composing an action, check the `summary` of each session, or pipe the list into jq for filtering. (Writes go via tmux by default; a `peer_id` is just an extra discovery signal / fallback channel, not a routing requirement.) Default output: text table. Pass --format json for LLM consumption.

18 Updated today
stevengonsalvez
AI & Automation Solid

ainb-fleetdaemons

Runtime-health view of the four fleet daemons — phone bridge, notifyd, ATC, and the fleet auto-continue daemon — in one table. Each row reports state (running / stopped / unknown), pid, uptime, last activity, error count, and a HEALTH reason that distinguishes a clean stop from a crash (stale heartbeat) or a pid-recycle. Use this when you need to answer "are my background daemons actually alive?" — not just installed, but serving. Default output: a fixed-width text table. Pass --format json for tooling.

18 Updated today
stevengonsalvez