Interface: AgentUsageTotals
Makaio Framework / ai-adapters-core / AgentUsageTotals
Interface: AgentUsageTotals
Section titled “Interface: AgentUsageTotals”Defined in: ../../../adapters/core/src/adapter/types.ts:69
Cumulative usage totals tracked per agent.
Token totals (totalInputTokens, totalOutputTokens) are fully restored on
rehydration by summing persisted turn history, so they reflect the lifetime
of the session across process restarts.
totalCalls is intentionally not restored on rehydration: it is reset to
zero on each process start because the historical number of API calls is not
stored per-turn with sufficient fidelity to reconstruct accurately (one turn
may represent multiple API calls for streaming or multi-step adapters).
Treat totalCalls as “calls since last process start”, not a lifetime count.
Properties
Section titled “Properties”totalCalls
Section titled “totalCalls”totalCalls:
number
Defined in: ../../../adapters/core/src/adapter/types.ts:72
totalInputTokens
Section titled “totalInputTokens”totalInputTokens:
number
Defined in: ../../../adapters/core/src/adapter/types.ts:70
totalOutputTokens
Section titled “totalOutputTokens”totalOutputTokens:
number
Defined in: ../../../adapters/core/src/adapter/types.ts:71