---
title: "Token Breakdown"
method: GET
path: "/observability/token-breakdown"
---

# Token Breakdown

`GET /observability/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``.

## Response `200`

Successful Response

- object

---

[API](https://skmtc.net/sipyourdrink-ltd/apis/bernstein-task-server.md) · [All operations](https://skmtc.net/sipyourdrink-ltd/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sipyourdrink-ltd/bernstein-task-server/revisions/86f514b4e920/schema)
