Wardrik.Run (wardrik_protocol v0.1.0-rc.1)

Copy Markdown

One run of an agent: how it ended, how long it took, and what it used and cost.

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.Run{
  cost_micro_usd: term(),
  duration_ms: term(),
  error: term(),
  finished_at: term(),
  id: term(),
  input_tokens: term(),
  model: term(),
  output_tokens: term(),
  source: term(),
  started_at: term(),
  status: term(),
  tool_calls: term(),
  tool_errors: 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.