Interface: TokenUsage¶
Defined in: src/types.ts:194
LLM token usage totals, as accumulated by kaboo-workflows from each agent completion. Appears on a StreamGroup (per-agent totals) and in ActivityState.usageByRun (per-run rollup). Counts accumulate across repeat completions (interrupt resumes, delegate re-entry).
Properties¶
cacheReadInputTokens?¶
optionalcacheReadInputTokens?:number
Defined in: src/types.ts:206
Input tokens served from the provider's prompt cache (billed at a steep discount), counted apart from TokenUsage.inputTokens. Absent on streams from services that predate cache accounting.
cacheWriteInputTokens?¶
optionalcacheWriteInputTokens?:number
Defined in: src/types.ts:208
Input tokens written to the provider's prompt cache. Absent on older streams.
cost?¶
optionalcost?:number
Defined in: src/types.ts:214
Accumulated dollar cost of the LLM calls, as reported by the provider's usage accounting. Absent on older streams or providers without per-call cost reporting.
inputTokens¶
inputTokens:
number
Defined in: src/types.ts:196
Prompt/input tokens consumed, not counting cache reads or writes.
outputTokens¶
outputTokens:
number
Defined in: src/types.ts:198
Completion/output tokens produced.
totalTokens¶
totalTokens:
number
Defined in: src/types.ts:200
Total tokens (as reported by the model provider).