AgentUsage
junjo.agent.result.AgentUsage
Kind: Class
SDK version: 0.64.0
Documentation channel: Next source preview
Signature
Section titled “Signature”AgentUsage(*, model_responses: int = 0, fields: Mapping[str, UsageAggregateField] | None = None)Aggregate of validated per-response provider usage facts.
Constructor
Section titled “Constructor”Create a validated immutable aggregate.
Parameters
Section titled “Parameters”| Name | Type | Description | Default |
|---|---|---|---|
model_responses |
int |
Count of validated model responses, including responses whose provider reported no usage. |
0 |
fields |
Mapping[str, UsageAggregateField] | None |
Supported token fact aggregates only. | None |
Members
Section titled “Members”model_responses
Section titled “model_responses”model_responses: intPublic attribute.
fields
Section titled “fields”fields: Mapping[str, UsageAggregateField]Public attribute.
add(usage: ModelUsage | None) -> AgentUsagePublic member documented by its signature.
to_json
Section titled “to_json”to_json() -> dict[str, object]Public member documented by its signature.