Wardrik.Runs.Totals (wardrik_protocol v0.1.0-rc.1)

Copy Markdown

Totals across an agent's runs.

Summary

Functions

Builds one from the protocol's JSON.

Returns it as the protocol's JSON, without fields that are nil.

Types

t()

@type t() :: %Wardrik.Runs.Totals{
  cost_micro_usd: term(),
  failed: term(),
  input_tokens: term(),
  last_at: term(),
  output_tokens: term(),
  runs: term(),
  tool_calls: term()
}

Functions

from_json(json)

@spec from_json(map()) :: t()

Builds one from the protocol's JSON.

to_json(value)

@spec to_json(t()) :: map()

Returns it as the protocol's JSON, without fields that are nil.