Get Token Breakdown

Changed on

Per-agent session token consumption breakdown.

For each agent session shows where the context budget was spent: system prompt (Bernstein overhead), context files, task description, tool call results accumulated at runtime, and assistant output.

Identifies optimization opportunities - e.g. if 60% of tokens are context files the agent never used.

Args: request: FastAPI request. session_id: If provided, return breakdown for a single session only.

Returns: JSON with sessions list and aggregate summary.

get/costs/token-breakdown

Request

  • The document declares no server URL.
  • Auth
    none declared

Query parameters

session_idstring nullable

Response

Successful Response

unknown required

Changes