Skip to content

TokenUsage

Source code in docs_src/capo_bedrock_agentcore/types/token_usage.py
class TokenUsage(TypedDict, closed=True):
    input_tokens: NotRequired["int"]
    """<p> The number of tokens consumed for input processing during the evaluation. Includes tokens from the evaluation prompt, agent traces, and any additional context provided to the evaluator model. </p>"""
    output_tokens: NotRequired["int"]
    """<p> The number of tokens generated by the evaluator model in its response. Includes tokens for the score, explanation, and any additional output produced during the evaluation process. </p>"""
    total_tokens: NotRequired["int"]
    """<p> The total number of tokens consumed during the evaluation, calculated as the sum of input and output tokens. Used for cost calculation and rate limiting within the service limits. </p>"""

input_tokens instance-attribute

input_tokens: NotRequired[int]

The number of tokens consumed for input processing during the evaluation. Includes tokens from the evaluation prompt, agent traces, and any additional context provided to the evaluator model.

output_tokens instance-attribute

output_tokens: NotRequired[int]

The number of tokens generated by the evaluator model in its response. Includes tokens for the score, explanation, and any additional output produced during the evaluation process.

total_tokens instance-attribute

total_tokens: NotRequired[int]

The total number of tokens consumed during the evaluation, calculated as the sum of input and output tokens. Used for cost calculation and rate limiting within the service limits.