v6

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01485121699.8 KB

Token Breakdown

Return per-session token consumption breakdown.

For each agent session with a .tokens sidecar file, breaks down token usage into estimated categories:

  • system_prompt_estimated: overhead from Bernstein role templates
  • task_description_estimated: tokens for the task title + description
  • context_estimated: remaining input tokens (context files, tool results, prior conversation history, etc.)
  • output_tokens: actual assistant output tokens

Also reports optimization_opportunities - a list of human-readable insights when a category accounts for an unusually large share of tokens (e.g. "context files are 60% of input").

Token sidecar files live at .sdd/runtime/{session_id}.tokens. Breakdown percentages use a 4-chars/token heuristic for size estimates.

Returns: Dict with sessions list and aggregate summary.

get/observability/token-breakdown

Response

Successful Response

object required