Skip to main content
AKOS

Costs and Observability

Inspect spend, budgets, usage limits, traces, metrics, and anomaly rules from the CLI.

View canonical source

Cost and observability commands read the same meters and telemetry exporters as the Cost screen and Activity traces view.

All verbs require sidecar reachability unless noted.

Cost summary

akos costs summary
akos costs summary --workspace default --window-hours 168 --json

Aggregate spend for the configured window (default: recent hours).

Breakdown

akos costs breakdown --group-by provider --from 2026-07-01 --to 2026-07-05
akos costs breakdown --group-by role --provider openai --json

groupBy is required by the sidecar contract (provider, role, workspace, …).

Budgets and alerts

akos costs budgets --json
akos costs alerts --json
akos costs list --json

costs list returns itemized rows suitable for CSV piping; costs alerts surfaces budget threshold breaches.

Tenant usage meter

Cloud tenants expose backend-computed usage limits (do not recompute limits in scripts):

akos usage status --json
akos usage watch --once --json
akos usage watch --sse --timeout-ms 60000

usage watch exits non-zero when status is blocked or exceeded — useful in CI guardrails.

Per-run cost

For a single execution, use the runs cockpit:

akos runs show <runId> --json
akos runs logs <runId> --json

Token and USD fields appear in the enriched run detail payload.

Observability

akos observability status --json
akos observability metrics tokens.in --range 24h --json
akos observability traces <runId> --json
akos observability logs --workspace default --json

Metrics ids include tokens.in, tokens.out, cost.totalUsd, errors.count, and p99.latencyMs.

Anomaly rules

akos obs anomaly-rules --json

Companion to observability — lists structured anomaly rules and paused state.

Live tails

Poll-based streaming (ADR-0133) — safe for CI with deadlines:

akos logs tail --interval 2000 --workspace default
akos runs tail --interval 1500
akos runs watch <runId> --json

Set AKOS_STREAM_INTERVAL_MS to tune poll cadence.

Interactive shell shortcuts

In akos chat --interactive or --tui, slash commands mirror these surfaces:

  • /cost — spend summary for the session window
  • /runs, /run <id>, /watch <id>, /logs <id> — run inspection
  • /tail <id> — snapshot status + recent events

See Command reference › Interactive shell.

On this page