LlmInvocationHistory

History of LLM invocations made during an agent process.

Methods on this interface report LLM-only figures. For the aggregate including other invocation types (e.g. embeddings), see AgentProcess.totalCost, AgentProcess.totalUsage, etc.

Inheritors

Properties

Link copied to clipboard
Link copied to clipboard
abstract val toolsStats: ToolsStats

Functions

Link copied to clipboard
open fun cost(): Double
Link copied to clipboard
open fun costInfoString(verbose: Boolean): String
Link copied to clipboard

Total LLM call count. Default = own; overridable for subtree aggregation.

Link copied to clipboard
open fun modelsUsed(): List<<Error class: unknown class>>

Distinct list of LLMs used, sorted by name.

Link copied to clipboard
open fun usage(): Usage

Note that this is not apples to apples: The usage may be across different LLMs, and the cost may be different. Cost will correctly reflect this. Look in the list for more details about what tokens were spent where.