Skip to content

Bedrock Agentcore  >  Structures  >  HarnessTokenUsage

HarnessTokenUsage

Structure Class

HarnessTokenUsage dataclass

Token usage counts for the invocation.

Attributes

cache_read_input_tokens class-attribute instance-attribute
cache_read_input_tokens: int | None = None

The number of input tokens read from cache.

cache_write_input_tokens class-attribute instance-attribute
cache_write_input_tokens: int | None = None

The number of input tokens written to cache.

input_tokens instance-attribute
input_tokens: int

The number of input tokens consumed.

output_tokens instance-attribute
output_tokens: int

The number of output tokens generated.

total_tokens instance-attribute
total_tokens: int

The total number of tokens consumed.