Skip to content

TokenUsage

autogen.beta.eval.trace.TokenUsage dataclass #

TokenUsage(input=0, output=0, cache_creation=0, cache_read=0)

Token counts summed across every model call in one task.

Cache tokens are reported separately from input / output so that scorers and dashboards can attribute prompt-cache savings without affecting raw input counts. :attr:total covers only input + output, matching what most provider price tables charge for.

input class-attribute instance-attribute #

input = 0

output class-attribute instance-attribute #

output = 0

cache_creation class-attribute instance-attribute #

cache_creation = 0

cache_read class-attribute instance-attribute #

cache_read = 0

total property #

total

Sum of input and output tokens (cache tokens excluded).