# `Wardrik.Run`

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

# `t`

```elixir
@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()
}
```

# `from_json`

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

Builds one from the protocol's JSON.

# `to_json`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
